Skip to main content

Introduction

A Secp256k1 authority connects an Ethereum signer to a Swig wallet on Solana.
  • Use when: your user or service already signs Ethereum messages and needs to control Solana assets.
  • For: apps integrating Ethereum accounts with a separate Solana fee payer.

How it works

  1. Register the signer’s full public key as the authority.
  2. Provide a callback that signs the SDK’s raw message bytes.
  3. Prepare the operation against fresh wallet state and the current slot.
  4. Let the Solana payer sign and submit the resulting transaction.

Signing inputs

SDK example

Install viem alongside the Protocol SDK. This example accepts a Viem account already owned by your application.
  • Register authorityInfo with Add a role, then pass the callback to Signing.
  • A browser wallet can implement the same callback through its message-signing API. Sign raw bytes, not the text of a hex string.
  • Locate roles with findRolesBySecp256k1SignerAddress(ethereumAddress) and select the intended role ID.
  • Refetch the wallet before the next operation so authorization uses the current state.