API Reference

Methods

signIn


Register and authenticate a user with their Bitcoin and Ordinals addresses.

async signIn(params: SignInParams): Promise<SignInResponse>

Parameters:

  • ord_address (string): Ordinals address

  • btc_address (string): Bitcoin address

  • ord_public_key (string): Ordinals public key

  • btc_public_key (string): Bitcoin public key

  • provider (string): Wallet provider (e.g., 'xverse', 'unisat')

Example:

const signIn = await satsTerminal.signIn({
  ord_address: "bc1...",
  btc_address: "3Pc...",
  ord_public_key: "...",
  btc_public_key: "...",
  provider: "xverse"
});

bind


Bind a user's wallet to Unisat and DotSwap. This is required only once before performing transactions.

Parameters:

  • btcAddress (string): Bitcoin address

  • nftAddress (string): Ordinals address

  • sign (string): User's signature of the bind message

Example:

points


Get the user's accumulated Amber points balance.

Parameters:

  • ord_address (string): Ordinals address

Example:


Search for runes by name.

Parameters:

  • rune_name (string): The name of the rune to search for

  • sell (boolean, optional): Whether to search for sell orders

Example:

popularCollections


Fetch popular rune collections.

Example:

fetchQuote


Fetch a quote for a rune purchase.

Parameters:

  • btcAmount (number/string): Amount of BTC to spend

  • runeName (string): Rune name (with spacers)

  • address (string): Bitcoin address

  • themeID? (string): Optional widget theme ID

  • sell? (boolean): Optional flag for sell orders (default: false)

  • marketplaces? (string[]): Optional list of marketplaces to use (default: empty, uses all available)

  • rbfProtection? (boolean): Optional RBF protection flag (default: false)

  • fill? (boolean): Optional flag that, when true, will use the best AMM to fulfill the order if no order is found in the specified marketplaces (default: false)

Example:

Example Response:

getPSBT


Generate a Partially Signed Bitcoin Transaction (PSBT).

Parameters:

  • orders (RuneOrder[]): Array of orders to include (from fetchQuote)

  • address (string): Bitcoin address

  • publicKey (string): Bitcoin public key

  • paymentAddress (string): Payment address

  • paymentPublicKey (string): Payment public key

  • runeName (string): Rune name (with spacers)

  • utxos? (UTXO[]): Optional UTXOs to use

  • feeRate? (number): Optional fee rate

  • slippage? (number): Optional slippage percentage

  • themeID? (string): Optional widget theme ID

  • sell? (boolean): Optional flag for sell orders (default: false)

  • rbfProtection? (boolean): Optional RBF protection flag (default: false)

Example:

Example Response:

confirmPSBT


Confirm and broadcast a signed PSBT.

Parameters:

  • orders (RuneOrder[]): Array of orders (from fetchQuote)

  • address (string): Bitcoin address

  • publicKey (string): Bitcoin public key

  • paymentAddress (string): Payment address

  • paymentPublicKey (string): Payment public key

  • signedPsbtBase64 (string): Signed PSBT in base64 format

  • swapId (string): Swap ID (from getPSBT)

  • runeName (string): Rune name (with spacers)

  • themeID? (string): Optional widget theme ID

  • sell? (boolean): Optional flag for sell orders (default: false)

  • marketplaces? (string[]): Optional list of marketplaces to use

  • rbfProtection? (boolean): Optional RBF protection flag (default: false)

  • signedRbfPsbtBase64? (string): Optional signed RBF protection PSBT in base64 format

Example:

Example Response:

Last updated