跳到主要内容

txsByAccount

功能

获取对应 账户(account) 在 everPay 上所有交易记录,通过 分页(10条1页) 形式展示。

参数

everpay.txsByAccount(txsByAccountParams:TxsByAccountParams):TxsResult
查询字段是否必需描述
accountNOeverpay 账户地址,默认为 Everpay 实例创建时传递的 account 参数。
pageNO默认为 1。
tagNOtoken 的唯一标识,可通过 info 接口进行查看。
actionNO
  • 'mint'代表充值。
  • 'transfer'代表转账。
  • 'burn'代表提现。
  • 'bundle'代表批量转账。
withoutActionNO排除某种类型的交易。
  • 'mint'代表充值。
  • 'transfer'代表转账。
  • 'burn'代表提现。
  • 'bundle'代表批量转账。

返回

字段描述

字段描述
accideverPay 账户 ID,与传入 account 保持一致。
currentPage当前页数,与传入的 page 参数一致。
totalPages总共拥有多少页数据。
txs交易记录。字段信息可查看 系统概览 - 交易 - 交易记录

示例

const everpay1 = new Everpay({ debug: true })
everpay.txsByAccount({ page: 1, account: '0x26361130d5d6E798E9319114643AF8c868412859', action: 'transfer', tag: 'bsc-bnb-0x0000000000000000000000000000000000000000'}).then(console.log)

// 或者
const everpay2 = new Everpay({ account: '0x26361130d5d6E798E9319114643AF8c868412859', debug: true })
everpay.txsByAccount({ page: 1, action: 'transfer',tag: 'bsc-bnb-0x0000000000000000000000000000000000000000' }).then(console.log)

// 或者 查询另外一个 account
const everpay3 = new Everpay({ account: '0x2ca81e1253f9426c62Df68b39a22A377164eeC92', debug: true })
everpay3.txsByAccount({ account: '0x26361130d5d6E798E9319114643AF8c868412859', page: 1, action: 'transfer', tag: 'bsc-bnb-0x0000000000000000000000000000000000000000'}).then(console.log)

示例返回

{
accid: "0x26361130d5d6E798E9319114643AF8c868412859",
currentPage: 1,
totalPages: 1,
txs: [
{
"rawId": 799,
"id": "4DkSUp7YcCRotEwNArDIgIP62UAs4Yk7EU1FBhiKcYM",
"tokenSymbol": "BNB",
"action": "transfer",
"from": "0xA9302EC2F7023C788921C452d18B09f507FA3C91",
"to": "0x26361130d5d6E798E9319114643AF8c868412859",
"amount": "10000000000",
"fee": "0",
"feeRecipient": "0x6451eB7f668de69Fb4C943Db72bCF2A73DeeC6B1",
"nonce": 1670835018466,
"tokenID": "0x0000000000000000000000000000000000000000",
"chainType": "bsc",
"chainID": "97",
"data": "",
"version": "v1",
"sig": "0xa494b900b3a5dd783b2eeb84dba04bceeea7e782a009afeee816505966a8436220da1c5623a5324368b362baae0683f1352e8cb0a0d7f020befa471efd3bb49a01",
"everHash": "0x17f037b0f377c1acdaa48802187d55e2761cd1947aa799cb1047b15c0143361f",
"status": "packaged",
"internalStatus": "{\"status\":\"success\"}",
"timestamp": 1670835536000,
"targetChainTxHash": "",
"express": {
"chainTxHash": "",
"withdrawFee": "",
"refundEverHash": "",
"err": ""
}
},
{
"rawId": 798,
"id": "4DkSUp7YcCRotEwNArDIgIP62UAs4Yk7EU1FBhiKcYM",
"tokenSymbol": "BNB",
"action": "transfer",
"from": "0x26361130d5d6E798E9319114643AF8c868412859",
"to": "0xA9302EC2F7023C788921C452d18B09f507FA3C91",
"amount": "100000000000",
"fee": "0",
"feeRecipient": "0x6451eB7f668de69Fb4C943Db72bCF2A73DeeC6B1",
"nonce": 1670834582075,
"tokenID": "0x0000000000000000000000000000000000000000",
"chainType": "bsc",
"chainID": "97",
"data": "",
"version": "v1",
"sig": "0x3ae52ae8c9b691c1f70ada8b1f9ecfd00f96635b9d03881de3bda707907a2eab364fa2898fa95c67cec84e67b58dfb7f90f16a367d9165db351523c0e8f167481b",
"everHash": "0x028fdf1502eac1bf3e642b8de81eb94d466cdfab3d96a58ebaafa09b9005aa3d",
"status": "packaged",
"internalStatus": "{\"status\":\"success\"}",
"timestamp": 1670835536000,
"targetChainTxHash": "",
"express": {
"chainTxHash": "",
"withdrawFee": "",
"refundEverHash": "",
"err": ""
}
}
// etc.
]
}

信息

txsByAccount 接口获取 everPay 上 对应账户的交易记录,返回结果中存在 accId 字段。