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

    Interface LedgerConfig

    Ledger configuration

    interface LedgerConfig {
        computeFeeFromBlocks: (
            ledger: Ledger,
            blocks: Block[],
            effects: ComputedEffectOfBlocks,
        ) => null | FeeAmountAndToken;
        initialTrustedAccount: Account;
        kind: LedgerKind;
        ledgerWriteMode?:
            | "bootstrap-only"
            | "read-only"
            | "read-write"
            | "no-voting";
        log?: (...args: any[]) => any;
        network: bigint;
        operations?: {
            enableTokenAdminModifyBalance?: boolean;
            setRep?: (
                account: GenericAccount,
                rep: null | Account<ECDSA_SECP256K1 | ED25519 | ECDSA_SECP256R1>,
            ) => Promise<boolean>;
        };
        privateKey?: Account<ECDSA_SECP256K1 | ED25519 | ECDSA_SECP256R1>;
        storageDriver: LedgerStorageAPI;
        storageOptions?: any;
        subnet?: bigint;
        transactionRetries?:
            | { maxRetries?: undefined; timeout?: number }
            | { maxRetries?: number; timeout?: undefined };
    }
    Index

    Properties

    computeFeeFromBlocks: (
        ledger: Ledger,
        blocks: Block[],
        effects: ComputedEffectOfBlocks,
    ) => null | FeeAmountAndToken

    Provided function to compute fees for a given set of Blocks and computed effects

    initialTrustedAccount: Account

    Kind of ledger

    ledgerWriteMode?: "bootstrap-only" | "read-only" | "read-write" | "no-voting"

    Is this ledger in read-only mode ?

    bootstrap-only: Bootstrapping can still occur read-only: No bootstrapping, no voting read-write: Normal mode (read-write enabled) no-voting: Normal mode (read-write enabled), but no voting

    log?: (...args: any[]) => any

    Logging method

    network: bigint
    operations?: {
        enableTokenAdminModifyBalance?: boolean;
        setRep?: (
            account: GenericAccount,
            rep: null | Account<ECDSA_SECP256K1 | ED25519 | ECDSA_SECP256R1>,
        ) => Promise<boolean>;
    }

    Operation specific parameters

    Private key for the ledger if it is acting as a representative

    storageDriver: LedgerStorageAPI

    Storage mechanism

    storageOptions?: any

    Options to pass to the storage driver

    subnet?: bigint
    transactionRetries?:
        | { maxRetries?: undefined; timeout?: number }
        | { maxRetries?: number; timeout?: undefined }

    Timeout for storage operations