Interface IAccount
An interface to manipulate an account state with
maintaining
It is like a map which is virtually initialized such that every possible Address exists and is mapped to null. That means that:
Inherited Members
Namespace: Libplanet.Action.State
Assembly: Libplanet.Action.dll
Syntax
public interface IAccount : IAccountState
Remarks
This interface is immutable. SetState(Address, IValue) method does not manipulate the instance, but returns a new IAccount instance with updated states.
Methods
| Improve this Doc View SourceRemoveState(Address)
Gets a new instance that the account state of the given
address is removed.
Declaration
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
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.