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.
contractFromArkContract
contractFromArkContractWithAddress
The arkcontract string
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...", ... } } Copy
const parsed = decodeArkContract("arkcontract=vhtlc&sender=ab12...");// { type: "vhtlc", data: { sender: "ab12...", ... } }
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
contractFromArkContractorcontractFromArkContractWithAddressinstead.