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}]}