@arkade-os/sdk Documentation - v0.4.0-next.8
    Preparing search index...

    Function decodeArkContract

    • Decode an arkcontract string into raw type and data.

      This is a low-level function that parses the URL-encoded format. For creating typed Contract objects, use contractFromArkContract or contractFromArkContractWithAddress instead.

      Parameters

      • encoded: string

        The arkcontract string

      Returns ParsedArkContract

      Parsed type and key-value data

      If the string is not a valid arkcontract

      const parsed = decodeArkContract("arkcontract=vhtlc&sender=ab12...");
      // { type: "vhtlc", data: { sender: "ab12...", ... } }