Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Mina

Index

Type aliases

CurrentTransaction: undefined | { fetchMode: FetchMode; nextPartyIndex: number; parties: Party[]; sender?: PrivateKey }

Variables

currentTransaction: CurrentTransaction = undefined
nextTransactionId: { value: number } = ...

Type declaration

  • value: number

Functions

  • BerkeleyQANet(graphqlEndpoint: string): Mina
  • LocalBlockchain(__namedParameters?: { accountCreationFee: undefined | string | number }): MockMina
  • A mock Mina blockchain running locally and useful for testing.

    Parameters

    • __namedParameters: { accountCreationFee: undefined | string | number } = {}
      • accountCreationFee: undefined | string | number

    Returns MockMina

  • createTransaction(feePayer: undefined | PrivateKey | { fee?: string | number | UInt64; feePayerKey: PrivateKey }, f: () => unknown, __namedParameters?: { fetchMode: undefined | FetchMode }): Transaction
  • Parameters

    • feePayer: undefined | PrivateKey | { fee?: string | number | UInt64; feePayerKey: PrivateKey }
    • f: () => unknown
        • (): unknown
        • Returns unknown

    • __namedParameters: { fetchMode: undefined | FetchMode } = {}
      • fetchMode: undefined | FetchMode

    Returns Transaction

  • createUnsignedTransaction(f: () => unknown, __namedParameters?: { fetchMode: undefined | FetchMode }): Transaction
  • Parameters

    • f: () => unknown
        • (): unknown
        • Returns unknown

    • __namedParameters: { fetchMode: undefined | FetchMode } = {}
      • fetchMode: undefined | FetchMode

    Returns Transaction

  • sendTransaction(txn: Transaction): TransactionId
  • setActiveInstance(m: Mina): void
  • Set the currently used Mina instance.

    Parameters

    • m: Mina

    Returns void

  • transaction(f: () => void): Promise<Transaction>
  • transaction(sender: SenderSpec, f: () => void): Promise<Transaction>
  • Construct a smart contract transaction. Within the callback passed to this function, you can call into the methods of smart contracts.

    transaction(() => {
    myZkapp.update();
    someOtherZkapp.someOtherMethod();
    })

    Parameters

    • f: () => void
        • (): void
        • Returns void

    Returns Promise<Transaction>

    A transaction that can subsequently be submitted to the chain.

  • Parameters

    • sender: SenderSpec
    • f: () => void
        • (): void
        • Returns void

    Returns Promise<Transaction>

Generated using TypeDoc