Type Parameters

Constructors

Accessors

Methods

Constructors

  • Deserialize Merkle Patricia Tree

    Type Parameters

    Parameters

    • binary: MPTreeBinary

      Binary

    • encoding: E
    • tag: T

      Tag to use to decode value

    • unpEnt: {
          (encoded: `cs_${string}`): EntUnpacked & {
              tag: CallsMtree;
          };
          (encoded: `ss_${string}`): EntUnpacked & {
              tag: StateTrees;
          };
          (encoded: `pi_${string}`): EntUnpacked & {
              tag: TreesPoi;
          };
          <T>(encoded:
              | `kh_${string}`
              | `mh_${string}`
              | `bf_${string}`
              | `bx_${string}`
              | `bs_${string}`
              | `ch_${string}`
              | `ct_${string}`
              | `cb_${string}`
              | `ck_${string}`
              | `cv_${string}`
              | `tx_${string}`
              | `th_${string}`
              | `ok_${string}`
              | `ov_${string}`
              | `oq_${string}`
              | `or_${string}`
              | `ak_${string}`
              | `sk_${string}`
              | `sg_${string}`
              | `cm_${string}`
              | `pp_${string}`
              | `nm_${string}`
              | `st_${string}`
              | `pi_${string}`
              | `ss_${string}`
              | `cs_${string}`
              | `ba_${string}`, expectedTag?: T): EntUnpacked & {
              tag: T;
          };
      }

      Implementation of unpackEntry use to decode values

        • (encoded): EntUnpacked & {
              tag: CallsMtree;
          }
        • Parameters

          • encoded: `cs_${string}`

          Returns EntUnpacked & {
              tag: CallsMtree;
          }

        • (encoded): EntUnpacked & {
              tag: StateTrees;
          }
        • Parameters

          • encoded: `ss_${string}`

          Returns EntUnpacked & {
              tag: StateTrees;
          }

        • (encoded): EntUnpacked & {
              tag: TreesPoi;
          }
        • Parameters

          • encoded: `pi_${string}`

          Returns EntUnpacked & {
              tag: TreesPoi;
          }

        • <T>(encoded, expectedTag?): EntUnpacked & {
              tag: T;
          }
        • Unpack entry

          Type Parameters

          Parameters

          • encoded:
                | `kh_${string}`
                | `mh_${string}`
                | `bf_${string}`
                | `bx_${string}`
                | `bs_${string}`
                | `ch_${string}`
                | `ct_${string}`
                | `cb_${string}`
                | `ck_${string}`
                | `cv_${string}`
                | `tx_${string}`
                | `th_${string}`
                | `ok_${string}`
                | `ov_${string}`
                | `oq_${string}`
                | `or_${string}`
                | `ak_${string}`
                | `sk_${string}`
                | `sg_${string}`
                | `cm_${string}`
                | `pp_${string}`
                | `nm_${string}`
                | `st_${string}`
                | `pi_${string}`
                | `ss_${string}`
                | `cs_${string}`
                | `ba_${string}`

            Encoded entry

          • OptionalexpectedTag: T

            Expected entry type

          Returns EntUnpacked & {
              tag: T;
          }

          Params of entry

          entry builder

    Returns MPTree<E, T>

    Merkle Patricia Tree

Accessors

Methods

  • Retrieve value from Merkle Patricia Tree

    Parameters

    • key: `${E}_${string}`

      The key of the element to retrieve

    Returns undefined | (EntUnpacked & { tag: T; })

    Value associated to the specified key