Ledger
Class: Ledger
Represents the Mina ledger.
Table of contents
Constructors
Methods
Constructors
constructor
• new Ledger()
Methods
addAccount
▸ addAccount(publicKey
, balance
): void
Adds an account and its balance to the ledger.
Parameters
Name | Type |
---|---|
publicKey | MlPublicKey |
balance | string |
Returns
void
Defined in
applyJsonTransaction
▸ applyJsonTransaction(txJson
, accountCreationFee
, networkState
): void
Applies a JSON transaction to the ledger.
Parameters
Name | Type |
---|---|
txJson | string |
accountCreationFee | string |
networkState | string |
Returns
void
Defined in
getAccount
▸ getAccount(publicKey
, tokenId
): undefined
| Account
Returns an account.
Parameters
Name | Type |
---|---|
publicKey | MlPublicKey |
tokenId | Uint8Array |
Returns
undefined
| Account
Defined in
create
▸ Static
create(): Ledger
Creates a fresh ledger.