Wallet API

Both the wallet and server use RPC over same endpoint except that all wallet methods are prefixed with wallet.

Import wallet

walletexport retrieve the current state of the spaces daemon

Params

NameTypeDescription

content

string (json)

Same format as export wallet

Example Response

{
  "descriptor":"...",
  "spaces_descriptor":"....",
  "block_height":41530,
  "label":"walletname"
}

Export wallet

walletexport retrieve the current state of the spaces daemon

Params

NameTypeDescription

name

string

Wallet name

Example Response

{
  "descriptor":"...",
  "spaces_descriptor":"....",
  "block_height":41530,
  "label":"walletname"
}

Get Wallet Info

walletgetinfo retrieve the current state of the spaces daemon

Params

NameTypeDescription

name

string

Wallet name

Example Response

{
  "label": "default",
  "start_block": 41530,
  "tip": 41818,
  "descriptors": [
    ....
  ]
}

Get Balance

walletgetbalance get the wallet balance

Params

NameTypeDescription

wallet

string

Wallet name

Response

{
  "confirmed": {
    "total": 0,
    "spendable": 0,
    "immature": 0,
    "locked": 0
  },
  "unconfirmed": {
    "total": 0,
    "locked": 0
  }
}

Batch Request Type

Can be passed to walletsendrequest to create one or multiple transactions

PropertyTypeDescription

auction_outputs

number (optional)

Create the specified number of auction outputs. These are output pairs used during bid transactions . If null, it will create the minimum number required to satisfy the requests.

requests

JSON array of WalletRequests

Bundles one or multiple requests

fee_rate

number (optional)

Fee rate in sat/kwu. If null, it will attempt to use estimatesmartfee instead.

dust

number (optional)

Custom dust amount to use for auction outputs

force

bool (optional)

Forces the transaction to be created even if it will be rejected by the protocol or results in revoking the space (mainly used for testing)

Wallet Request Type

A single wallet request

PropertyTypeDescription

request

string

The transaction/request type. Can be open, bid, register, sendspaces, or sendcoins

name

string

The space name

amount

string

Amount in Satoshis. Required for open, bid and sendcoins transactions.

to

string

Required for sendspaces and sendcoins requests. Optional for register transactions.

Can be a Bitcoin address or a space name.

Send Request

walletsendrequest send one or multiple requests

Params

NameTypeDescription

wallet

string

Wallet name

body

JSON

A Batch Request object

Response

[
  {
    "txid": "1ea73982abb36cf2c62deced717fbe944c3af89abe768aa454642879b29e5adc",
    "tags": ["auction-outputs", "commitment"]
  },
  {
    "txid": "792a2fd221e4715d6c4f330fb46309d6f6a7ed4fd0f9c50471b77e643f9885d2",
    "tags": ["open"]
  }
]

Bump Fee

walletbumpfee bumps the fee for the given wallet transaction

Params

NameTypeDescription

wallet

string

Wallet name

txid

string

Transaction id as hex string

fee_rate

number

the new fee rate in sat/vb

List Spaces

walletlistspaces list all spaces currently owned by the wallet including ones actively in auction

Params

NameTypeDescription

wallet

string

Wallet name

List Unspent

walletlistunspent list unspent transaction outputs

Params

NameTypeDescription

wallet

string

Wallet name

List Auction Outputs

walletlistauctionouputs lists all output pairs the can be used during auctions

Params

NameTypeDescription

wallet

string

Wallet name

Last updated