signatureSubscribe RPC 메소드
주어진 서명을 가진 트랜잭션이 지정된 커밋 레벨에 도달할 때 알림을 받기 위해 구독합니다.
이것은 단일 알림에 대한 구독입니다. RPC에서 알림인 signatureNotification
가
전송되면 서버에 의해 자동으로 취소됩니다.
{"jsonrpc": "2.0","id": 1,"method": "signatureSubscribe","params": ["2EBVM6cB8vAAD93Ktr6Vd8p67XPbQzCJX47MpReuiCXJAtcjaxpvWpcg9Ege1Nr5Tk3a2GFrByT7WPBjdsTycY9b",{"commitment": "finalized","enableReceivedNotification": false}]}
params
objectoptional
다음 필드를 포함하는 구성 객체:
result
Response
{"jsonrpc": "2.0","result": 0,"id": 1}
integer
구독 ID (구독 취소에 필요)
알림 형식:
알림은 다음 내용을 포함하는 객체 값이 있는 RpcResponse JSON 객체입니다:
slot: <u64>
- 해당 slot.value: <object|string>
- 알림 값은RpcSignatureResult
이며, 다음 중 하나의 결과가 됩니다:enableReceivedNotification
가true
이고 서명이 수신된 경우: 문자열"receivedSignature"
, 또는- 서명이 처리된 경우:
err: <object|null>
:- 트랜잭션이 지정된 커밋 레벨에서 성공적으로 처리된 경우
null
, 또는 - 트랜잭션이 실패한 경우
TransactionError
- 트랜잭션이 지정된 커밋 레벨에서 성공적으로 처리된 경우
응답 예시:
다음은 성공적으로 처리된 트랜잭션의 알림 응답 예시입니다:
{"jsonrpc": "2.0","method": "signatureNotification","params": {"result": {"context": {"slot": 5207624},"value": {"err": null}},"subscription": 24006}}
다음은 성공적으로 수신된 트랜잭션 서명의 알림 응답 예시입니다:
{"jsonrpc": "2.0","method": "signatureNotification","params": {"result": {"context": {"slot": 5207624},"value": "receivedSignature"},"subscription": 24006}}
Is this page helpful?