Keeta LogoKeeta Logo@keetanetwork/keetanet-client
    Preparing search index...

    The core Ledger components

    Implements

    Index

    Constructors

    Properties

    baseToken: TokenAddress
    initialTrustedAccount: Account
    networkAddress: NetworkAddress
    node?: Node
    isInstance: (obj: any, strict?: boolean) => obj is Ledger = ...
    Kind: typeof LedgerKind = LedgerKind

    Accessors

    • get ledgerWriteMode(): NonNullable<
          undefined
          | "bootstrap-only"
          | "read-only"
          | "read-write"
          | "no-voting",
      >

      Returns NonNullable<
          undefined
          | "bootstrap-only"
          | "read-only"
          | "read-write"
          | "no-voting",
      >

    Methods

    • Parameters

      • ...args: [votesAndBlocks: VoteStaple, from?: string]

      Returns Promise<BlockHash[]>

    • Parameters

      • ...args: []

      Returns Promise<boolean>

    • Parameters

      Returns Promise<VoteStaple[]>

    • Execute some code with a transaction held, if the code fails the transaction is aborted, otherwise it is committed

      Type Parameters

      • T

      Parameters

      • identifier: string
      • code: (transaction: LedgerAtomicInterface) => Promise<T>

        Code to run

      • OptionalreadOnly: boolean

      Returns Promise<T>

      The return value from "code"

    • Parameters

      • ...args: [blockPrevHashes?: string[] | BlockHash[]]

      Returns Promise<BlockHash[]>

    • Type Parameters

      • T

      Parameters

      Returns Promise<T>

    • Parameters

      • ...args: [blocks: Block[], otherVotes?: Vote[]]

      Returns Promise<Vote>