Wallet Exists?
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
http://127.0.0.1:31567/wallet/address
Fetch your public key
"tp1q7n4l3dldcv69wfyqm32mpkwvf56q5kjdv7ma5p2668z05ljcv2gsq3ke4q"
Asset Balances
http://127.0.0.1:31567/wallet/balance
[
{
"asset": "asset",
"balance": 2147483649
}
]
Received by address
http://127.0.0.1:31567/wallet/receivedbyaddress
Transaction received by address
Address Output
http://127.0.0.1:31567/wallet/addressoutputs
Address Balance
http://127.0.0.1:31567/wallet/addressbalance
Path Parameters
Address you want to check the balance of
Remove Wallet
http://127.0.0.1:31567//wallet/remove
Remove wallet
Zen Public Key (XPUB)
http://127.0.0.1:31567/wallet/zenpublickey
Return the Zen public key (XPUB)
Resync
http://127.0.0.1:31567/wallet/resync
Transaction Count
http://127.0.0.1:31567/wallet/transactioncount
Get transaction count (used for pagination)
Transaction History
http://127.0.0.1:31567/wallet/transactions
Retreive the transaction history
An array of tx objects, where each transaction can have a single or multiple tx deltas or incoming or outgoing assets.
[
{
"txHash": "txHash",
"asset": "00",
"amount": 0,
"confirmations": "someConfrimation"
}
]
Remember to add the parameters skip and take
Import Wallet
http://127.0.0.1:31567/wallet/import
Path Parameters
A list of 12 or 24 bip39 compliant words
Body Parameters
A password to encrypt your mnemonic phrase
The account was imported correctly
Public Key
http://127.0.0.1:31567/wallet/publickey
Get the public key paired with the path
Send Transaction
http://127.0.0.1:31567/wallet/send
Send a transaction to another regular wallet address
Body Parameters
compose of address, asset and amount
Return the transaction hash of the send transaction
4f49f18a0575e701661d95cd221feb4399dc25e6f8230d37c4e2860cbd248fb9
Sign
http://127.0.0.1:31567/wallet/sign
Check Password
http://127.0.0.1:31567/wallet/checkpassword
Retrive Mnemonic Phrase
http://127.0.0.1:31567/wallet/mnemonicphrase
Create Hex Transaction
http://127.0.0.1:31567/wallet/createrawtransaction
Create a hex transaction
Body Parameters
composed of address asset and amount
Return the raw transaction
0000000001014f49f18a0575e701661d95cd221feb4399dc25e6f8230d37c4e2860cbd248fb901020220afea2e549bc52e05673396161e175ba8b5d9afca75c658ec3c4739fc4feeca020000370220ecc94205df8142d81f469eb7c62db9b65f58a3e186250908ec855a32c5d1b466007e0001740ca8163200010162010360c63d3a8228f6ba18f10b487bc1e2526479db65b866cd408c9c6f2fe1e423cb2c0e82ef5cf046ad5c814e5404ad7fe2b7edfd76d0cb359a484ddda8e7ca9fd1356150ef28a1d2fc59115510fd38c5125f17f12b80661b168bf342e181df4810
Create raw transaction
http://127.0.0.1:31567/wallet/rawtransaction/create
Create an unsigned raw transaction
Path Parameters
composed of address asset and amount
Sign Raw Transaction
http://127.0.0.1:31567/wallet/rawtransaction/sign
Receive a raw transaction and sign it
Body Parameters
tx transaction in hex format
Sign Raw Transaction
http://127.0.0.1:31567/wallet/rawtransaction/sign
Receive a raw transaction and sign it
Body Parameters
tx transaction in hex format
Get Wallet Keys
http://127.0.0.1:31567/wallet/keys
Get imported public keys
[
{
"publicKey": string,
"path": "m/44'/258'/0'/1/0"
}
]
Publish Raw Transaction
http://127.0.0.1:31567/wallet/rawtransaction/publish
Parse a transaction from raw, verify that is fully signed and then publish the transaction
Import watchonly address
http://127.0.0.1:31567/wallet/importwatchonlyaddress
Body Parameters
Address to add as watchonly
Get new address
http://127.0.0.1:31567/wallet/getnewaddress
Get a new address
Restore new address
http://127.0.0.1:31567/wallet/restorenewaddresses
Import Zen Public Key
http://127.0.0.1:31567/wallet/importzenpublickey
Import Zen Public Key
​
Execute Contract
http://127.0.0.1:31567/wallet/contract/execute
Run a smart contract with parameters
Body Parameters
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
}
send the contract some data
Trigger one of the functions in the contract such as:
"buy" / "redeem"
Activate Contract
http://127.0.0.1:31567/wallet/contract/activate
This how you activate a contract
Body Parameters
zebra's rlimit for recording hints
The number of blocks you want to activate your contract for
Send valid fstar code, for example:
let main _ _ _ _ _ _ _ _ = Zen.ResultT.failw \"This contract does nothing\"\nlet cf _ _ _ _ _ _ _ = Zen.Cost.ret (1 <: nat)
Cake successfully retrieved.
{
"address": "ctzn1qqqqqqqym4kfe8y5qg5tazkgjwn4qpesj05x6mqsvd5auwmzkhhs444fnkvwxhahr",
"contractId": "000000009bad939392804517d1591274ea00e6127d0dad820c6d3bc76c56bde15ad533b3"
}
Could not find a matching in the query.
Extend Contract
http://127.0.0.1:31567/wallet/contract/extend
This is to extend a contract
Body Parameters
Number of block until when the contract will be active
Execute CGP Contract
http://127.0.0.1:31567/wallet/contract/cgp
Execute the CGP contract at the payout block