diff --git a/ARCs/arc-0026.md b/ARCs/arc-0026.md index 1b0cf0604..f5c3ef672 100644 --- a/ARCs/arc-0026.md +++ b/ARCs/arc-0026.md @@ -27,13 +27,21 @@ Elements of the query component may contain characters outside the valid range. algorandurn = "algorand://" algorandaddress [ "?" algorandparams ] algorandaddress = *base32 algorandparams = algorandparam [ "&" algorandparams ] -algorandparam = [ amountparam / labelparam / noteparam / assetparam / otherparam ] +algorandparam = [ amountparam / labelparam / noteparam / assetparam / appparam / methodparam / argparam / boxparam / assetarrayparam / accountarrayparam / apparrayparam / otherparam ] amountparam = "amount=" *digit labelparam = "label=" *qchar assetparam = "asset=" *digit +appparam = "app=" *digit noteparam = (xnote | note) xnote = "xnote=" *qchar -note = "note=" *qchar +note = "note=" *qchar +methodparam = "method=" *qchar +boxparam = "box=" *qchar +argparam = "arg=" (*qchar | *digit) +feeparam = "fee=" *digit +accountarrayparam = "account=" *qchar +assetarrayparam = "asset=" *digit +apparrayparam = "app=" *digit otherparam = qchar *qchar [ "=" *qchar ] ``` @@ -41,6 +49,12 @@ Here, "qchar" corresponds to valid characters of an RFC 3986 URI query component The scheme component ("algorand:") is case-insensitive, and implementations must accept any combination of uppercase and lowercase letters. The rest of the URI is case-sensitive, including the query parameter keys. +Note 1: the first `app=` in the presence of the method interprets as the destination app ID and the next ones in sequence would be considered app array members. + +Note 2: the `asset=` in the presence of the method interprets as an asset array member. + +Note 3: The account address in case of method presence is the Sender account not the destination recipient as it is the case with all Algorand URIs without method. + !!! Caveat When it comes to generation of an address' QR, many exchanges and wallets encodes the address w/o the scheme component (“algorand:”). This is not a URI so it is OK. @@ -56,10 +70,25 @@ The scheme component ("algorand:") is case-insensitive, and implementations must - amount: microAlgos or smallest unit of asset -- asset: The asset id this request refers to (if Algos, simply omit this parameter) +- asset: The asset id this request refers to (if Algos, simply omit this parameter). When the method is available, the asset is an Asset Array member for the ABI call. + +- method: The full ABI method to call. E.g. claim(uint64,uint64)byte[] + +- arg: The argument to be added to ABI call arguments array. + +- box: The box name reference. + +- fee: Optional static transaction fee (in MicroAlgos) + +- app: The app id this request refers to. When method is available, first app is the destination app for ABI call and from second index app is an App Array member for ABI call. + +- account: The account address to add to accounts array after sender. Only when method is available. - (others): optional, for future extensions +### Template URI vs actionable URI +If the URI is constructed for templating only so that other dApps, wallets or protocols could user it for any user then the account address in URI must be ZeroAddress ("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ"). Since ZeroAddress cannot initiate any action this assumption is considered non-vulnerable and secure. + ### Transfer amount/size !!! Note @@ -99,12 +128,20 @@ Request 150 units of Asset ID 45 from an address algorand://TMTAD6N22HCS2LKH7677L2KFLT3PAQWY6M4JFQFXQS32ECBFC23F57RYX4?amount=150&asset=45 ``` +Call claim(uint64,uint64)byte[] method on contract 11111111 paying a fee of 10000 micro ALGO from an address + +``` +algorand://TMTAD6N22HCS2LKH7677L2KFLT3PAQWY6M4JFQFXQS32ECBFC23F57RYX4?app=11111111&method=claim(uint64,uint64)byte[]&arg=20000&arg=474567&asset=45&fee=10000 +``` + ## Rationale + + ## Security Considerations None. ## Copyright -Copyright and related rights waived via CCO. \ No newline at end of file +Copyright and related rights waived via CCO.