Class Account
An internal implementation of IAccount.
Inheritance
Namespace: Libplanet.Action.State
Assembly: Libplanet.Action.dll
Syntax
public class Account : object, IAccount, IAccountState
Constructors
| Improve this Doc View SourceAccount(IAccountState)
An internal implementation of IAccount.
Declaration
public Account(IAccountState state)
Parameters
Type | Name | Description |
---|---|---|
IAccountState | state |
Properties
| Improve this Doc View SourceTrie
The ITrie of the IAccountState.
Declaration
public ITrie Trie { get; }
Property Value
Type | Description |
---|---|
ITrie |
Methods
| Improve this Doc View SourceGetState(Address)
Gets the account state of the given address
.
Declaration
public IValue? GetState(Address address)
Parameters
Type | Name | Description |
---|---|---|
Address | address | The Address referring the account to get its state. |
Returns
Type | Description |
---|---|
System.Nullable<IValue> | The account state of the given |
GetStates(IReadOnlyList<Address>)
Gets multiple account states associated with the specified addresses
at once.
Declaration
public IReadOnlyList<IValue?> GetStates(IReadOnlyList<Address> addresses)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyList<Address> | addresses | The Addresses associated with states to get. |
Returns
Type | Description |
---|---|
IReadOnlyList<System.Nullable<IValue>> | The states associated to the specified |
RemoveState(Address)
Gets a new instance that the account state of the given
address
is removed.
Declaration
public IAccount RemoveState(Address address)
Parameters
Type | Name | Description |
---|---|---|
Address | address | The Address referring the account to remove its state. |
Returns
Type | Description |
---|---|
IAccount | A new IAccount instance that
the account state of the given |
Remarks
This method does not manipulate the instance, but returns a new IAccount instance with updated states instead.
SetState(Address, IValue)
Gets a new instance that the account state of the given
address
is set to the given
state
.
Declaration
public IAccount SetState(Address address, IValue state)
Parameters
Type | Name | Description |
---|---|---|
Address | address | The Address referring the account to set its state. |
IValue | state | The new state to fill the account with. |
Returns
Type | Description |
---|---|
IAccount | A new IAccount instance that
the account state of the given |
Remarks
This method does not manipulate the instance, but returns a new IAccount instance with updated states instead.