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 addressbtc_address(string): Bitcoin addressord_public_key(string): Ordinals public keybtc_public_key(string): Bitcoin public keyprovider(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 addressnftAddress(string): Ordinals addresssign(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
Search for runes by name.
Parameters:
rune_name(string): The name of the rune to search forsell(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 spendruneName(string): Rune name (with spacers)address(string): Bitcoin addressthemeID?(string): Optional widget theme IDsell?(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 addresspublicKey(string): Bitcoin public keypaymentAddress(string): Payment addresspaymentPublicKey(string): Payment public keyruneName(string): Rune name (with spacers)utxos?(UTXO[]): Optional UTXOs to usefeeRate?(number): Optional fee rateslippage?(number): Optional slippage percentagethemeID?(string): Optional widget theme IDsell?(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 addresspublicKey(string): Bitcoin public keypaymentAddress(string): Payment addresspaymentPublicKey(string): Payment public keysignedPsbtBase64(string): Signed PSBT in base64 formatswapId(string): Swap ID (from getPSBT)runeName(string): Rune name (with spacers)themeID?(string): Optional widget theme IDsell?(boolean): Optional flag for sell orders (default: false)marketplaces?(string[]): Optional list of marketplaces to userbfProtection?(boolean): Optional RBF protection flag (default: false)signedRbfPsbtBase64?(string): Optional signed RBF protection PSBT in base64 format
Example:
Example Response:
Last updated