Taquito TypeDocs
    Preparing search index...

    Class BigMapAbstraction

    Index
    • Fetch one value in a big map

      Type Parameters

      • T

      Parameters

      • keyToEncode: BigMapKeyType

        Key to query (will be encoded properly according to the schema)

      • Optionalblock: BlockIdentifier

        optional block level to fetch the values from (head will be use by default)

      Returns Promise<T | undefined>

      Return a well formatted json object of a big map value or undefined if the key is not found in the big map

    • Fetch multiple values in a big map All values will be fetched on the same block level. If a block is specified in the request, the values will be fetched at it. Otherwise, a first request will be done to the node to fetch the level of the head and all values will be fetched at this level. If one of the keys does not exist in the big map, its value will be set to undefined.

      Type Parameters

      • T

      Parameters

      • keysToEncode: BigMapKeyType[]

        Array of keys to query (will be encoded properly according to the schema)

      • Optionalblock: BlockIdentifier

        optional block level to fetch the values from

      • batchSize: number = 5

        optional batch size representing the number of requests to execute in parallel

      Returns Promise<MichelsonMap<MichelsonMapKey, T | undefined>>

      A MichelsonMap containing the keys queried in the big map and their value in a well-formatted JSON object format

    • Check if the big map has no values, with a single request that reads at most one value RPC errors, including 404 for an unknown big-map ID, are not converted.

      Parameters

      • Optionalblock: BlockIdentifier

        optional block level to check (default to the block of this abstraction, then head)

      Returns Promise<boolean>

      UnsupportedActionError if the storage provider cannot read big-map values

      BigMapValuesAccessDeniedError if the RPC node refuses the big-map values endpoint (HTTP 401 or 403)

      RpcError if the read provider returns an invalid response