Provider API Methods
Using the Sats Connect methods is the easiest way to format the request strings that get passed down to our actual provider method parameters. Below is all of the methods we support directly on the provider.
Provider Methods
Connect
Connect
Prompts a connection to a user's Magic Eden Wallet account.
Params
Without using Sats Connect, you could encode your request payload like below. However, getAddress takes care of this for you
Property
Type
Description
request
string
The json encoded payload
Response
Promise<getAddressRespose>
array
Array of the connected user’s Address
objects
Address
Response Properties
Address
Response Propertiesaddress
string
The user's BTC address
publicKey
string
A hex string representing the full publicKey of your BTC account. Your address is shortened from this
purpose
enum - 'payment' | 'ordinals'
The purpose of the address is used to indicate whether this address is preferrably used for payments or ordinals/runes
signMessage
signMessage
Prompts to sign a message with the user's connected Magic Eden Wallet account
Params
Without using Sats Connect, you could encode your request payload like below. However, signMessage takes care of this for you
Property
Type
Description
request
string
The json encoded payload
Where protocol accepts either 'BIP322'
or 'ECDSA'
and defaults to the former if no value is provided. By default all signatures will follow the up to date bip322 standard, but certain apps require legacy signing. Passing in 'ECDSA'
will ensure legacy signing only for segwit/payment addresses.
Response
Promise<string>
string
String containing the signature
signTransaction
signTransaction
Prompts to sign a PSBT with the user's connected Magic Eden Wallet account.
Params
Without using Sats Connect, you could encode your request payload like below. However, signTransaction takes care of this for you
Property
Type
Description
request
string
The json encoded payload
Response
Promise<SignTransactionResponse>
object
The returned psbt in base64 and the txId
SignTransactionResponse
Response Properties
SignTransactionResponse
Response PropertiespsbtBase64
string
The base64 encoded psbt string
txId
string
an optional transaction Id on success
sendBtcTransaction
sendBtcTransaction
Prompts to send BTC from the user's connected Magic Eden Wallet account.
Params
Without using Sats Connect, you could encode your request payload like below. However, sendBtcTransaction takes care of this for you
Property
Type
Description
request
string
The json encoded payload
Response
Promise<string>
string
String containing the transaction Id
signMultipleTransactions (custom)
signMultipleTransactions (custom)
Prompts to sign multiple PSBTs under one approval with the user's connected Magic Eden Wallet account. This is currently a private wallet method that is whitelisted to the magic eden marketplace domain
Params
This is a custom feature of the Magic Eden Wallet and thus cannot be invoked with sats-connect, as you have the choice to do with the other provider methods. Rather, you can call this method with a similar request string as signTransaction
You can then pass this stringified request into the provider method like so: window.magicEden.bitcoin.signMultipleTransactions(request)
Property
Type
Description
request
string
The json encoded payload
Response
Promise<SignTransactionResponse[]>
object
Array of the returned psbt in base64 and the txId
SignTransactionResponse
Response Properties
SignTransactionResponse
Response PropertiespsbtBase64
string
The base64 encoded psbt string
txId
string
an optional transaction Id on success
Last updated