listtransactions - 查询钱包交易
listtransactions
调用返回最近发生的钱包交易。
Elements中的listtransactions类似于Bitcoin Core中的同名调用,但是可以 输出额外的Elements特定的交易信息,例如私密交易输出和多种资产类型。
调用参数
- Account:要查询的账户名称,字符串,可选,未设置时使用默认账户
- Count:返回的交易记录数量,数值,可选,默认值:10
- Skip:略过的记录数量,数值,可选,默认值:0
- IncludeWatchOnly:是否包含watch-only地址,布尔值,可选,默认值:false
返回结果
listtransactions
调用返回钱包交易数组,每个成员的结构如下:
- account:账户
- address:地址
- category:交易分类
- amount:金额
- amountblinder:金额盲化因子
- asset:资产标识符
- assetblinder:资产盲化器
- label:备注标签
- vout:交易输出序号
- fee:交易手续费
- confirmations:交易确认数
- trusted:是否可消费的未确认交易
- generated:是否币基交易
- blockhash:区块华西
- blockindex:交易在区块内的序号
- blocktime:区块时间戳
- txid:交易ID
- walletconflicts:与本交易冲突的其他交易ID,数组
- time:发生时间戳
- timereceived:收到时间戳
- comment:备注
- to:备注to
- otheraccount:其他账户
- bip125-replacable:是否bip125可替换
- abandoned:是否已废弃
示例代码
请求:
~$ elements-cli listtransactions
响应结果:
[
{
"account": "",
"address": "2deEkkAxz9q4vrNcP13QbBGcfqPB1UymRFu",
"category": "send",
"amount": -0.10000000,
"amountblinder": "49bfc4682b2d94b6f11363fee9cc0e5546a56dedf756f51e471baa7e027a4123",
"asset": "09f663de96be771f50cab5ded00256ffe63773e2eaa9a604092951cc3d7c6621",
"assetblinder": "771ade3ddd5a7e405cb153911c027649156d838a07482273b5b113c5af2698cf",
"vout": 1,
"fee": -0.00038660,
"confirmations": 0,
"trusted": true,
"txid": "7b8236c687e5424f65662fecce4e07523054e89a05b731ef05b6c0235ee5ec04",
"walletconflicts": [
],
"time": 1498416700,
"timereceived": 1498416700,
"bip125-replaceable": "yes",
"abandoned": false
}
]