LocalBlockchain
function LocalBlockchain(__namedParameters: {
enforceTransactionLimits: boolean;
proofsEnabled: boolean;
}): Promise<{
addAccount: (publicKey: PublicKey, balance: string) => void;
getNetworkId: () => NetworkId;
proofsEnabled: boolean;
testAccounts: [TestPublicKey, TestPublicKey, TestPublicKey, TestPublicKey, TestPublicKey, TestPublicKey, TestPublicKey, TestPublicKey, TestPublicKey, TestPublicKey];
applyJsonTransaction: void;
currentSlot: UInt32;
fetchActions: Promise<{
actions: string[][];
hash: string;
}[]>;
fetchEvents: Promise<any>;
getAccount: Account;
getActions: {
actions: string[][];
hash: string;
}[];
getNetworkConstants: {
accountCreationFee: UInt64;
genesisTimestamp: UInt64;
slotTime: UInt64;
};
getNetworkState: PreconditionBaseTypes<{}>;
hasAccount: boolean;
incrementGlobalSlot: void;
resetProofsEnabled: void;
sendTransaction: PendingTransactionPromise;
setBlockchainLength: void;
setGlobalSlot: void;
setProofsEnabled: void;
setTotalCurrency: void;
transaction: TransactionPromise<false, false>;
}>
Defined in: lib/mina/v1/local-blockchain.ts:67
A mock Mina blockchain running locally and useful for testing.
Parameters
__namedParameters
enforceTransactionLimits
boolean = true
proofsEnabled
boolean = true
Returns
Promise<{
addAccount: (publicKey: PublicKey, balance: string) => void;
getNetworkId: () => NetworkId;
proofsEnabled: boolean;
testAccounts: [TestPublicKey, TestPublicKey, TestPublicKey, TestPublicKey, TestPublicKey, TestPublicKey, TestPublicKey, TestPublicKey, TestPublicKey, TestPublicKey];
applyJsonTransaction: void;
currentSlot: UInt32;
fetchActions: Promise<{
actions: string[][];
hash: string;
}[]>;
fetchEvents: Promise<any>;
getAccount: Account;
getActions: {
actions: string[][];
hash: string;
}[];
getNetworkConstants: {
accountCreationFee: UInt64;
genesisTimestamp: UInt64;
slotTime: UInt64;
};
getNetworkState: PreconditionBaseTypes<{}>;
hasAccount: boolean;
incrementGlobalSlot: void;
resetProofsEnabled: void;
sendTransaction: PendingTransactionPromise;
setBlockchainLength: void;
setGlobalSlot: void;
setProofsEnabled: void;
setTotalCurrency: void;
transaction: TransactionPromise<false, false>;
}>