Wallet API
Both the wallet and server use JSON-RPC over the same endpoint.
CLI commands accept an optional --wallet parameter to specify which wallet to use. If not specified, it defaults to default.
RPC commands differ from their CLI counterparts due to legacy compatibility reasons. This may be harmonized in future releases.
Create wallet
walletcreate creates and loads a new wallet
name
string
Wallet name
space-cli createwallet -w newwalletcurl -X POST http://127.0.0.1:7225 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"walletcreate","params":["newwallet"],"id":1}'Example Response
nullLoad wallet
walletload creates and loads a new wallet
name
string
Wallet name
space-cli loadwalletcurl -X POST http://127.0.0.1:7225 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"walletload","params":["default"],"id":1}'Example Response
nullExport wallet
walletexport exports the wallet in JSON format. CLI command saves the response to the target file.
Params
name
string
Wallet name
Example Response
Import wallet
importwallet imports the wallet from JSON description. CLI command loads the description from the source file.
Params
Example Response
Get Wallet Info
getwalletinfo retrieve the wallet info
Params
name
string
Wallet name
Example Response
Get Balance
balance gets the wallet balance
Params
name
string
Wallet name
Example Response
Get New Address
CLI has separate commands instead for different kind values.
getnewaddress gets a new Bitcoin address suitable for receiving coins compatible with most bitcoin wallets.
getnewspaceaddress gets a new Bitcoin address suitable for receiving spaces and coins (Spaces compatible bitcoin wallets only).
Params
name
string
Wallet name
kind
string
Coin or Space
Example Response
Send Request
walletsendrequest send one or multiple requests
CLI has separate commands instead: open, bid, register, transfer, renew and createbidouts
Params
name
string
Wallet name
Batch Request Type
bidouts
number (optional)
Create the specified number of auction outputs. These are output pairs used during the bidding process. If null, it will create several to satisfy the requests.
fee_rate
number (optional)
Fee rate in sat/vB. If null, it will attempt to use estimatesmartfee instead.
dust
number (optional)
Custom dust amount to use for auction outputs
force
bool
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)
confirmed_only
bool
Use only confirmed UTXOs
skip_tx_check
bool
Skip tx checker (not recommended)
Wallet Request Type
A single wallet request
request
string
The transaction/request type. Can be open, bid, register, transfer, sendcoins or execute.
name
string
The space name. Required for open, bid and register transactions.
spaces
array of strings
The spaces names. Required for transfer transaction.
amount
string
Amount in satoshis. Required for open, bid and sendcoins transactions.
to
string
Recipient Bitcoin address or a space name. Required for transfer and sendcoins requests. Optional for register transactions.
Response
Bump Fee
bumpfee bumps the fee for the given wallet transaction
Params
name
string
Wallet name
txid
string
The transaction id as a hex string
fee_rate
number (optional)
Fee rate in sat/vB
skip_tx_check
bool
Skip tx checker (not recommended)
Response
Sell
walletsell creates PSBT which can be used to sell the space
Params
name
string
Wallet name
space
string
The space name
price
number
Price in satoshis
Example Response
Verify Listing
verifylisting verify the space sale listing
Params
listing
object
The walletsell output
Example Response
Buy
walletbuy buy space using the sell output
Params
name
string
Wallet name
listing
object
The walletsell output
fee_rate
number (optional)
Fee rate in sat/vB
skip_tx_check
bool
Skip tx checker (not recommended)
Example Response
Sign Message
walletsignmessage signs the message
Params
name
string
Wallet name
space
string
The space name
message
string
Message as hex string
Example Response
Verify Message
verifymessage verify a signed message
Params
space
string
The space name
message
string
Message as hex string
signature
string
Signature as hex string
Example Response
List Spaces
walletlistspaces list all spaces currently owned by the wallet including ones actively in auction
Params
name
string
Wallet name
Response
List Unspent
walletlistunspent list unspent transaction outputs
Params
name
string
Wallet name
Response
List Auction Outputs
walletlistbidouts lists all output pairs that can be used during bids
Params
name
string
Wallet name
Response
List Transactions
listtransactions lists all the transactions starting from the most recent one
Params
name
string
Wallet name
count
number
The maximum number of transactions to be shown
skip
number
The number of transactions to be skipped from the beginning
Response
Last updated
Was this helpful?