TON SDK Documentation - v15.3.1duck0.0.3
    Preparing search index...

    Class Dictionary<K, V>

    Type Parameters

    Index

    Properties

    Keys: {
        Address: () => DictionaryKey<Address>;
        BigInt: (bits: number) => DictionaryKey<bigint>;
        BigUint: (bits: number) => DictionaryKey<bigint>;
        BitString: (bits: number) => DictionaryKey<BitString>;
        Buffer: (bytes: number) => DictionaryKey<Buffer>;
        Int: (bits: number) => DictionaryKey<number>;
        Uint: (bits: number) => DictionaryKey<number>;
    }

    Type declaration

    Values: {
        Address: () => DictionaryValue<Address>;
        BigInt: (bits: number) => DictionaryValue<bigint>;
        BigUint: (bits: number) => DictionaryValue<bigint>;
        BigVarInt: (bits: number) => DictionaryValue<bigint>;
        BigVarUint: (bits: number) => DictionaryValue<bigint>;
        BitString: (bits: number) => DictionaryValue<BitString>;
        Bool: () => DictionaryValue<boolean>;
        Buffer: (bytes: number) => DictionaryValue<Buffer>;
        Cell: () => DictionaryValue<Cell>;
        Dictionary: <K_1 extends DictionaryKeyTypes, V_1>(
            key: DictionaryKey<K_1>,
            value: DictionaryValue<V_1>,
        ) => DictionaryValue<Dictionary<K_1, V_1>>;
        Int: (bits: number) => DictionaryValue<number>;
        Uint: (bits: number) => DictionaryValue<number>;
    }

    Type declaration

    Accessors

    • get size(): number

      Returns number

    Methods

    • Returns IterableIterator<[K, V]>

    • Returns void

    • Parameters

      • key: K

      Returns boolean

    • Generate merkle proof for multiple keys in the dictionary

      Parameters

      • keys: K[]

        an array of the keys

      Returns Cell

      generated merkle proof cell

    • Low level method for generating pruned dictionary directly. The result can be used as a part of a bigger merkle proof

      Parameters

      • keys: K[]

        an array of the keys

      Returns Cell

      cell that contains the pruned dictionary

    • Parameters

      • key: K
      • newValue: V

      Returns Cell

    • Parameters

      • key: K

      Returns undefined | V

    • Parameters

      • key: K

      Returns boolean

    • Returns K[]

    • Parameters

      • key: K
      • value: V

      Returns this

    • Returns V[]