getSignaturesForAddress RPC 方法

返回包含指定地址的已确认交易的签名,这些交易的 accountKeys 列表中包含该地址。从提供的签名或最近确认的区块开始,按时间倒序返回签名。

$ curl https://api.devnet.solana.com -s -X \
> POST -H "Content-Type: application/json" -d '
> {
> "jsonrpc": "2.0",
> "id": 1,
> "method": "getSignaturesForAddress",
> "params": [
> "Vote111111111111111111111111111111111111111",
> {
> "commitment": "finalized",
> "limit": 1
> }
> ]
> }
> '

params

stringrequired

账户地址,使用 base-58 编码的字符串

objectoptional

包含以下字段的配置对象:

result

Response
{
"jsonrpc": "2.0",
"result": [
{
"signature": "5h6xBEauJ3PK6SWCZ1PGjBvj8vDdWG3KpwATGy1ARAXFSDwt8GFXM7W5Ncn16wmqokgpiKRLuS83KUxyZyv2sUYv",
"slot": 114,
"err": null,
"memo": null,
"blockTime": null,
"confirmationStatus": "finalized"
}
],
"id": 1
}
array

一个交易签名信息对象的数组,从最新最旧的交易排序,包含:

Is this page helpful?