Wallet

Last updated 5 months ago

All of the wallet end points

get
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.
Request
Response
200: OK
true

get
Public Address

http://127.0.0.1:31567
/wallet/address
Fetch your public key
Request
Response
200: OK
"tp1q7n4l3dldcv69wfyqm32mpkwvf56q5kjdv7ma5p2668z05ljcv2gsq3ke4q"

get
Asset Balances

http://127.0.0.1:31567
/wallet/balance
Request
Response
200: OK
[
{
"asset": "asset",
"balance": 2147483649
}
]

get
Public Key

http://127.0.0.1:31567
/wallet/publickey
Request
Response
Body Parameters
password
required
string
wallet password
path
required
string
bit44 derivative path
200: OK

get
Received by address

http://127.0.0.1:31567
/wallet/receivedbyaddress
Transaction received by address
Request
Response
200: OK

get
Address Output

http://127.0.0.1:31567
/wallet/addressoutputs
Request
Response
Body Parameters
address
required
string
200: OK
List of address outputs
400: Bad Request
Error
address is missing

get
Address Balance

http://127.0.0.1:31567
/wallet/addressbalance
Request
Response
Path Parameters
address
required
string
Address you want to check the balance of
200: OK

get
Remove Wallet

http://127.0.0.1:31567/
/wallet/remove
Remove wallet
Request
Response
Body Parameters
password
required
string
wallet password
200: OK

get
Zen Public Key

http://127.0.0.1:31567
/wallet/zenpublickey
Return the public key
Request
Response
200: OK

get
Resync

http://127.0.0.1:31567
/wallet/resync
Request
Response
200: OK

post
Import Wallet

http://127.0.0.1:31567
/wallet/import
Request
Response
Path Parameters
words
required
array
A list of 12 or 24 bip39 compliant words
Body Parameters
password
required
string
A password to encrypt your mnemonic phrase
200: OK
The account was imported correctly
400: Bad Request
Account already exist

post
Transaction History

http://127.0.0.1:31567
/wallet/transactions
Retreive the transaction history
Request
Response
Body Parameters
take
required
number
skip
required
number
200: OK
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"
}
]
400: Bad Request
Remember to add the parameters skip and take
Invalid input

post
Send Transaction

http://127.0.0.1:31567
/wallet/send
Send a transaction to another regular wallet address
Request
Response
Body Parameters
output
required
string
compose of address, asset and amount
password
required
string
1234
200: OK
Return the transaction hash of the send transaction
4f49f18a0575e701661d95cd221feb4399dc25e6f8230d37c4e2860cbd248fb9

post
Sign

http://127.0.0.1:31567
/wallet/sign
Request
Response
Path Parameters
password
required
string
wallet password
message
required
string
txhash
path
required
string
bit44 derivative path
200: OK

post
Check Password

http://127.0.0.1:31567
/wallet/checkpassword
Request
Response
Path Parameters
password
required
string
wallet password
200: OK
true

post
Retrive Mnemonic Phrase

http://127.0.0.1:31567
/wallet/mnemonicphrase
Request
Response
Path Parameters
password
required
string
wallet password
200: OK

post
Create Raw Transaction

http://127.0.0.1:31567
/wallet/createrawtransaction
Request
Response
Body Parameters
password
required
string
wallet password
output
required
array
composed of address asset and amount
200: OK
Return the raw transaction
0000000001014f49f18a0575e701661d95cd221feb4399dc25e6f8230d37c4e2860cbd248fb901020220afea2e549bc52e05673396161e175ba8b5d9afca75c658ec3c4739fc4feeca020000370220ecc94205df8142d81f469eb7c62db9b65f58a3e186250908ec855a32c5d1b466007e0001740ca8163200010162010360c63d3a8228f6ba18f10b487bc1e2526479db65b866cd408c9c6f2fe1e423cb2c0e82ef5cf046ad5c814e5404ad7fe2b7edfd76d0cb359a484ddda8e7ca9fd1356150ef28a1d2fc59115510fd38c5125f17f12b80661b168bf342e181df4810

post
Import watchonly address

http://127.0.0.1:31567
/wallet/importwatchonlyaddress
Request
Response
Body Parameters
address
optional
string
Address to add as watchonly
200: OK
added
400: Bad Request
Address already exist

post
Get new address

http://127.0.0.1:31567
/wallet/getnewaddress
Get a new address
Request
Response
200: OK
return a new address

post
Restore new address

http://127.0.0.1:31567
/wallet/restorenewaddresses
Request
Response
Body Parameters
max
required
number
200: OK

post
Import Zen Public Key

http://127.0.0.1:31567
/wallet/importzenpublickey
Import Zen Public Key
Request
Response
Body Parameters
publicKey
required
string
public key
200: OK