Encode a contract to the arkcontract string format.
Format: arkcontract={type}&{key1}={value1}&{key2}={value2}...
This format is compatible with NArk and allows contracts to be shared/imported across different Ark implementations.
const contract: Contract = { type: "vhtlc", params: { sender: "ab12...", receiver: "cd34...", ... }, // ...};const encoded = encodeArkContract(contract);// "arkcontract=vhtlc&sender=ab12...&receiver=cd34...&..." Copy
const contract: Contract = { type: "vhtlc", params: { sender: "ab12...", receiver: "cd34...", ... }, // ...};const encoded = encodeArkContract(contract);// "arkcontract=vhtlc&sender=ab12...&receiver=cd34...&..."
Encode a contract to the arkcontract string format.
Format: arkcontract={type}&{key1}={value1}&{key2}={value2}...
This format is compatible with NArk and allows contracts to be shared/imported across different Ark implementations.