Wallet
All of the wallet end points
Wallet Exists?
GET
http://127.0.0.1:31567/wallet/exists
Check if wallet has already been created / imported. Used for building a rich wallet client UI.
Public Address
GET
http://127.0.0.1:31567/wallet/address
Fetch your public key
Asset Balances
GET
http://127.0.0.1:31567/wallet/balance
Received by address
GET
http://127.0.0.1:31567/wallet/receivedbyaddress
Transaction received by address
Address Output
GET
http://127.0.0.1:31567/wallet/addressoutputs
Query Parameters
Name | Type | Description |
---|---|---|
address* | string |
Address Balance
GET
http://127.0.0.1:31567/wallet/addressbalance
Path Parameters
Name | Type | Description |
---|---|---|
address* | string | Address you want to check the balance of |
Remove Wallet
GET
http://127.0.0.1:31567/wallet/remove
Remove wallet
Request Body
Name | Type | Description |
---|---|---|
password | string | wallet password |
Zen Public Key (XPUB)
GET
http://127.0.0.1:31567/wallet/zenpublickey
Return the Zen public key (XPUB)
Resync
GET
http://127.0.0.1:31567/wallet/resync
Transaction Count
GET
http://127.0.0.1:31567/wallet/transactioncount
Get transaction count (used for pagination)
Path Parameters
Name | Type | Description |
---|---|---|
string |
Transaction History
GET
http://127.0.0.1:31567/wallet/transactions
Retreive the transaction history
Request Body
Name | Type | Description |
---|---|---|
take | number | |
skip | number |
Import Wallet
POST
http://127.0.0.1:31567/wallet/import
Path Parameters
Name | Type | Description |
---|---|---|
words | array | A list of 12 or 24 bip39 compliant words |
Request Body
Name | Type | Description |
---|---|---|
password | string | A password to encrypt your mnemonic phrase |
Public Key
POST
http://127.0.0.1:31567/wallet/publickey
Get the public key paired with the path
Request Body
Name | Type | Description |
---|---|---|
password | string | wallet password |
path | string | bit44 derivative path |
Send Transaction
POST
http://127.0.0.1:31567/wallet/send
Send a transaction to another regular wallet address
Request Body
Name | Type | Description |
---|---|---|
output | string | compose of address, asset and amount |
password | string | 1234 |
Sign
POST
http://127.0.0.1:31567/wallet/sign
Path Parameters
Name | Type | Description |
---|---|---|
password | string | wallet password |
message | string | txhash |
path | string | bit44 derivative path |
Check Password
POST
http://127.0.0.1:31567/wallet/checkpassword
Path Parameters
Name | Type | Description |
---|---|---|
password | string | wallet password |
Retrive Mnemonic Phrase
POST
http://127.0.0.1:31567/wallet/mnemonicphrase
Path Parameters
Name | Type | Description |
---|---|---|
password | string | wallet password |
Create Hex Transaction
POST
http://127.0.0.1:31567/wallet/createrawtransaction
Create a hex transaction
Request Body
Name | Type | Description |
---|---|---|
password | string | wallet password |
output | array | composed of address asset and amount |
Create raw transaction
POST
http://127.0.0.1:31567/wallet/rawtransaction/create
Create an unsigned raw transaction
Path Parameters
Name | Type | Description |
---|---|---|
outputs* | string | composed of address asset and amount |
Sign Raw Transaction
POST
http://127.0.0.1:31567/wallet/rawtransaction/sign
Receive a raw transaction and sign it
Request Body
Name | Type | Description |
---|---|---|
password* | string | wallet password |
tx* | string | tx transaction in hex format |
Get Wallet Keys
POST
http://127.0.0.1:31567/wallet/keys
Get imported public keys
Path Parameters
Name | Type | Description |
---|---|---|
password | string | wallet password |
Publish Raw Transaction
POST
http://127.0.0.1:31567/wallet/rawtransaction/publish
Parse a transaction from raw, verify that is fully signed and then publish the transaction
Request Body
Name | Type | Description |
---|---|---|
tx* | string | signed tx in hex format |
Import watchonly address
POST
http://127.0.0.1:31567/wallet/importwatchonlyaddress
Request Body
Name | Type | Description |
---|---|---|
address | string | Address to add as watchonly |
Get new address
POST
http://127.0.0.1:31567/wallet/getnewaddress
Get a new address
Restore new address
POST
http://127.0.0.1:31567/wallet/restorenewaddresses
Request Body
Name | Type | Description |
---|---|---|
max* | number |
Import Zen Public Key
POST
http://127.0.0.1:31567/wallet/importzenpublickey
Import Zen Public Key
Request Body
Name | Type | Description |
---|---|---|
publicKey | string | public key |
Execute Contract
POST
http://127.0.0.1:31567/wallet/contract/execute
Run a smart contract with parameters
Request Body
Name | Type | Description |
---|---|---|
sign* | string | path |
password* | string | wallet password |
returnAddress* | boolean | Execute the contract with some default arguments, such as: - returnAddress - allows the contract to automatically send funds back to in case it needs to. { "returnAddress" : true/false } |
message | string | send the contract some data |
contractId* | string | The contract address |
command* | string | Trigger one of the functions in the contract such as: "buy" / "redeem" |
spends* | array | an array of outputs |
Activate Contract
POST
http://127.0.0.1:31567/wallet/contract/activate
This how you activate a contract
Request Body
Name | Type | Description |
---|---|---|
rlimit | string | zebra's rlimit for recording hints |
password | string | wallet password |
numberOfBlocks | number | The number of blocks you want to activate your contract for |
code | string | Send valid fstar code, for example:
|
Extend Contract
POST
http://127.0.0.1:31567/wallet/contract/extend
This is to extend a contract
Request Body
Name | Type | Description |
---|---|---|
password* | string | wallet password |
numberOfBlocks* | string | Number of block until when the contract will be active |
address* | string | address of the contract |
Execute CGP Contract
POST
http://127.0.0.1:31567/wallet/contract/cgp
Execute the CGP contract at the payout block
Request Body
Name | Type | Description |
---|---|---|
password | string | wallet password |
Last updated