AccountNotificationsApi
AccountNotificationsApi =
object
Methods
accountNotifications()
Call Signature
accountNotifications(
address
,config
):SolanaRpcResponse
<AccountInfoBase
&AccountInfoWithBase64EncodedData
>
Subscribe for notifications when there is a change in the Lamports or data of the account at the specified address.
The notification format is the same as seen in the GetAccountInfoApi.getAccountInfo RPC HTTP method.
If the account has data, it will be returned in the response as a tuple whose first element is a base64-encoded string.
Parameters
Parameter | Type |
---|---|
address | Address |
config | Readonly <{ commitment? : Commitment ; }> & Readonly <{ encoding : "base64" ; }> |
Returns
SolanaRpcResponse
<AccountInfoBase
& AccountInfoWithBase64EncodedData
>
See
https://solana.com/docs/rpc/websocket/accountsubscribe
Call Signature
accountNotifications(
address
,config
):SolanaRpcResponse
<AccountInfoBase
&AccountInfoWithBase64EncodedZStdCompressedData
>
Subscribe for notifications when there is a change in the Lamports or data of the account at the specified address.
The notification format is the same as seen in the GetAccountInfoApi.getAccountInfo RPC HTTP method.
If the account has data, it will first be compressed using ZStandard and the result will be returned in the response as a tuple whose first element is a base64-encoded string.
Parameters
Parameter | Type |
---|---|
address | Address |
config | Readonly <{ commitment? : Commitment ; }> & Readonly <{ encoding : "base64+zstd" ; }> |
Returns
SolanaRpcResponse
<AccountInfoBase
& AccountInfoWithBase64EncodedZStdCompressedData
>
See
https://solana.com/docs/rpc/websocket/accountsubscribe
Call Signature
accountNotifications(
address
,config
):SolanaRpcResponse
<AccountInfoBase
&AccountInfoWithJsonData
>
Subscribe for notifications when there is a change in the Lamports or data of the account at the specified address.
The notification format is the same as seen in the GetAccountInfoApi.getAccountInfo RPC HTTP method.
If the account has data, the server will attempt to process it using a parser specific to the account's owning program. If successful, the parsed data will be returned in the response as JSON. Otherwise, the raw account data will be returned in the response as a tuple whose first element is a base64-encoded string.
Parameters
Parameter | Type |
---|---|
address | Address |
config | Readonly <{ commitment? : Commitment ; }> & Readonly <{ encoding : "jsonParsed" ; }> |
Returns
SolanaRpcResponse
<AccountInfoBase
& AccountInfoWithJsonData
>
See
https://solana.com/docs/rpc/websocket/accountsubscribe
Call Signature
accountNotifications(
address
,config
):SolanaRpcResponse
<AccountInfoBase
&AccountInfoWithBase58EncodedData
>
Subscribe for notifications when there is a change in the Lamports or data of the account at the specified address.
The notification format is the same as seen in the GetAccountInfoApi.getAccountInfo RPC HTTP method.
If the account has data, it will be returned in the response as a tuple whose first element
is a base58-encoded string. If the account contains more than 129 bytes of data, the data
field will materialize as the string "error: data too large for bs58 encoding"
.
Parameters
Parameter | Type |
---|---|
address | Address |
config | Readonly <{ commitment? : Commitment ; }> & Readonly <{ encoding : "base58" ; }> |
Returns
SolanaRpcResponse
<AccountInfoBase
& AccountInfoWithBase58EncodedData
>
See
https://solana.com/docs/rpc/websocket/accountsubscribe
Call Signature
accountNotifications(
address
,config?
):SolanaRpcResponse
<AccountInfoBase
&AccountInfoWithBase58Bytes
>
Subscribe for notifications when there is a change in the Lamports or data of the account at the specified address.
The notification format is the same as seen in the GetAccountInfoApi.getAccountInfo RPC HTTP method.
If the account has data, it will be returned in the response as a base58-encoded string. If
the account contains more than 129 bytes of data, the data
field will materialize as the
string "error: data too large for bs58 encoding"
.
Parameters
Parameter | Type |
---|---|
address | Address |
config? | Readonly <{ commitment? : Commitment ; }> |
Returns
SolanaRpcResponse
<AccountInfoBase
& AccountInfoWithBase58Bytes
>