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 |
|
| The json encoded payload |
Response
Property | Type | Description |
---|---|---|
|
| Array of the connected user’s |
Address
Response Properties
Address
Response PropertiesProperty | Type | Description |
---|---|---|
|
| The user's BTC address |
|
| A hex string representing the full publicKey of your BTC account. Your address is shortened from this |
|
| 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 |
|
| 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
Property | Type | Description |
---|---|---|
|
| 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 |
|
| The json encoded payload |
Response
Property | Type | Description |
---|---|---|
|
| The returned psbt in base64 and the txId |
SignTransactionResponse
Response Properties
SignTransactionResponse
Response PropertiesProperty | Type | Description |
---|---|---|
|
| The base64 encoded psbt 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 |
|
| The json encoded payload |
Response
Property | Type | Description |
---|---|---|
|
| 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 |
|
| The json encoded payload |
Response
Property | Type | Description |
---|---|---|
|
| Array of the returned psbt in base64 and the txId |
SignTransactionResponse
Response Properties
SignTransactionResponse
Response PropertiesProperty | Type | Description |
---|---|---|
|
| The base64 encoded psbt string |
|
| an optional transaction Id on success |
Last updated