Account
- class Account
An Account with data that is stored on chain.
- Parameters:
lamports (int) – Lamports in the account.
data (bytes) – Data held in this account.
owner (Pubkey) – The program that owns this account. If executable, the program that loads this account.
executable (bool) – Whether this account’s data contains a loaded program (and is now read-only). Defaults to False.
epoch_info (int) – The epoch at which this account will next owe rent. Defaults to 0.
- data
Data held in this account.
- Type:
bytes
- executable
this account’s data contains a loaded program (and is now read-only)
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- lamports
lamports in the account
- owner
the program that owns this account. If executable, the program that loads this account.
- rent_epoch
the epoch at which this account will next owe rent
- to_json()
Convert to a JSON string.
- class AccountJSON
An Account with data that is stored on chain, where the data is parsed as a JSON string.
- Parameters:
lamports (int) – Lamports in the account.
data (solders.account_decoder.ParsedAccount) – Data held in this account.
owner (Pubkey) – The program that owns this account. If executable, the program that loads this account.
executable (bool) – Whether this account’s data contains a loaded program (and is now read-only). Defaults to False.
epoch_info (int) – The epoch at which this account will next owe rent. Defaults to 0.
- data
Data held in this account.
- executable
Whether this account’s data contains a loaded program (and is now read-only).
- Type:
bool
- static from_bytes(data)
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)
Build from a JSON string.
- lamports
Lamports in the account.
- Type:
int
- owner
The program that owns this account. If executable, the program that loads this account.
- Type:
- rent_epoch
The epoch at which this account will next owe rent.
- Type:
int
- to_json()
Convert to a JSON string.