Before using wallet functions you must create wallet:
./micro-cli createwallet wallet_name
It's important to remember that after node restart wallet must be loaded:
./micro-cli loadwallet wallet_name
Wallet info can be checked using getwalletinfo:
./micro-cli -rpcwallet=wallet_name getwalletinfo
Output:
{
"walletname": "wallet_name",
"walletversion": 169900,
"format": "bdb",
"balance": 0.0000,
"unconfirmed_balance": 0.0000,
"immature_balance": 0.0000,
"txcount": 0,
"keypoololdest": 1749240587,
"keypoolsize": 1000,
"hdseedid": "e13633ebb7143868cc89ff60f2f8d5e949d52cc7",
"keypoolsize_hd_internal": 1000,
"paytxfee": 0.0000,
"private_keys_enabled": true,
"avoid_reuse": false,
"scanning": false,
"descriptors": false
}New address can be generated by running getnewaddress:
./micro-cli -rpcwallet=wallet_name getnewaddress
Output:
mbc1quf8fcjf4k5aw4j8e6t8clv54fy9eh2dcvy87ux
Wallet balance can be checked using getbalance:
./micro-cli -rpcwallet=wallet_name getbalance
Output:
100.0000
Wallet transactons can be fetched using listtransactions method:
./micro-cli -rpcwallet=wallet_name listtransactions
Output:
[
{
"address": "mbc1qjpcwdm5l26lplgxnvur7ea8vsj9xgt4p7vs2q4",
"category": "receive",
"amount": 0.1000,
"label": "",
"vout": 2,
"confirmations": 1281022,
"blockhash": "1f7e0c037be1248026d6c80686341dd4c4495c1e1a908f2a69ad3044f28d8356",
"blockheight": 1672552,
"blockindex": 1,
"blocktime": 1671814128,
"txid": "b6a52f4b39a308629fa22586197222b7f3213f96baac10671f662da3b61edd93",
"walletconflicts": [
],
"time": 1671814056,
"timereceived": 1671814056,
"bip125-replaceable": "no"
},
{
"category": "send",
"amount": 0.0000,
"vout": 1,
"fee": -0.0184,
"confirmations": 80078,
"blockhash": "38a0937a0ad22718f60f35de4949dcad6f0877350f6eea5e6a3c55b42c0bfa03",
"blockheight": 2873496,
"blockindex": 1,
"blocktime": 1744403819,
"txid": "4a56b8048aad1d0588e712561932c4e216d439e7e303bf11aaaf86c2b3b51cf8",
"walletconflicts": [
],
"time": 1744403763,
"timereceived": 1744403763,
"bip125-replaceable": "no",
"abandoned": false
}
]You can validate address using getaddressinfo method:
./micro-cli -rpcwallet=wallet_name validateaddress mbc1quf8fcjf4k5aw4j8e6t8clv54fy9eh2dcvy87ux
Output:
{
"address": "mbc1quf8fcjf4k5aw4j8e6t8clv54fy9eh2dcvy87ux",
"scriptPubKey": "0014e24e9c4935b53aeac8f9d2cf8fb295490b9ba9b8",
"ismine": true,
"solvable": true,
"desc": "wpkh([9b181dbc/0'/0'/0']0200bfe7881a35f0f1e07117a2c028c9620b51dc007430899c6b2eeeb0446f8f86)#74kpxld9",
"iswatchonly": false,
"isscript": false,
"iswitness": true,
"witness_version": 0,
"witness_program": "e24e9c4935b53aeac8f9d2cf8fb295490b9ba9b8",
"pubkey": "0200bfe7881a35f0f1e07117a2c028c9620b51dc007430899c6b2eeeb0446f8f86",
"ischange": false,
"timestamp": 1749240587,
"hdkeypath": "m/0'/0'/0'",
"hdseedid": "e13633ebb7143868cc89ff60f2f8d5e949d52cc7",
"hdmasterfingerprint": "9b181dbc",
"labels": [
""
]
}