Solana
signatureSubscribe10 额度
Subscribes to the status of a transaction signature; the subscription ends after the confirmation notification (WebSocket).
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| signature | string | First signature of the transaction (base-58). |
| config | Object | Optional configuration object. commitment: processed | confirmed | finalized (default finalized); enableReceivedNotification: boolean (default false), also notify when the node first receives the signature. (可选) |
返回值
类型
integer
Subscription id (integer). Pass it to signatureUnsubscribe; notifications arrive as signatureNotification messages.
代码示例
wscat -c wss://holy-burned-sky-solana-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7
> {"jsonrpc":"2.0","id":1,"method":"signatureSubscribe","params":["2EBVM6cB8vAAD93Ktr6Vd8p67XPbQzCJX47MpReuiCXJAtcjaxpvWpcg9Ege1Nr5Tk3a2GFrByT7WPBjdsTycY9b",{"commitment":"finalized","enableReceivedNotification":false}]}