diff --git a/ARCs/arc-0080.md b/ARCs/arc-0080.md index a455230c5..79e166a56 100644 --- a/ARCs/arc-0080.md +++ b/ARCs/arc-0080.md @@ -26,29 +26,29 @@ The scheme component specifies whether the URI is querying an application (`algo Query parameters define the specific data fields being requested. Parameters may contain characters outside the valid range. These must first be encoded in UTF-8, then percent-encoded according to RFC 3986. -### Application Query URI (`algorand:app://`) +### Application Query URI (`algorand://app`) The application URI allows querying the state of an application, including data from the application’s box storage, global storage, and local storage. And the teal program associated. Each storage type has specific requirements. -### Asset Query URI (`algorand:asset://`) +### Asset Query URI (`algorand://asset`) The asset URI enables retrieval of metadata and configuration details for a specific asset, such as its name, total supply, decimal precision, and associated addresses. ### ABNF Grammar ```abnf -algorandappurn = "algorand:app://" appid [ "?" noopparams ] +algorandappurn = "algorand://app/" appid [ "?" noopparams ] appid = *digit noopparams = noopparam [ "&" noopparams ] noopparam = [ boxparam / globalparam / localparam ] boxparam = "box=" *qbase64url globalparam = "global=" *qbase64url -localparam = "local=" *qbase64url "&"account=" *base32 +localparam = "local=" *qbase64url "&algorandaddress=" *base32 tealcodeparam = "tealcode" -algorandasseturn = "algorand:asset://" assetid [ "?" assetparam ] +algorandasseturn = "algorand://asset/" assetid [ "?" assetparam ] assetid = *digit assetparam = [ totalparam / decimalsparam / frozenparam / unitnameparam / assetnameparam / urlparam / hashparam / managerparam / reserveparam / freezeparam / clawbackparam ] totalparam = "total" @@ -57,16 +57,13 @@ frozenparam = "frozen" unitnameparam = "unitname" assetnameparam = "assetname" urlparam = "url" -hashparam = "metadatahash" +metadatahashparam = "metadatahash" managerparam = "manager" reserveparam = "reserve" freezeparam = "freeze" clawbackparam = "clawback" ``` -- "qchar" corresponds to valid characters of an RFC 3986 URI query component, excluding the "=" and "&" characters, which this specification takes as separators. -- "qbase64url" corresponds to valid characters of "base64url" encoding, as defined in RFC 4648 section 5 - ### Parameter Definitions #### Application Parameters @@ -74,7 +71,6 @@ clawbackparam = "clawback" - **`boxparam`**: Queries the application’s box storage with a key encoded in `base64url`. - **`globalparam`**: Queries the global storage of the application using a `base64url`-encoded key. - **`localparam`**: Queries local storage for a specified account. Requires an additional `algorandaddress` parameter, representing the account whose local storage is queried. -- **`account`**: Account to be used in Application NoOp method call foreign accounts array. #### Asset Parameters @@ -84,7 +80,7 @@ clawbackparam = "clawback" - **`unitnameparam`** (`unitname`): Queries the short name or unit symbol of the asset (e.g., "USDT"). - **`assetnameparam`** (`assetname`): Queries the full name of the asset (e.g., "Tether"). - **`urlparam`** (`url`): Queries the URL associated with the asset, providing more information. -- **`hashparam`** (`metadatahash`): Queries the metadata hash associated with the asset. +- **`metadatahashparam`** (`metadatahash`): Queries the metadata hash associated with the asset. - **`managerparam`** (`manager`): Queries the address of the asset manager. - **`reserveparam`** (`reserve`): Queries the reserve address holding non-minted units of the asset. - **`freezeparam`** (`freeze`): Queries the freeze address for the asset. @@ -113,19 +109,25 @@ For each parameter, the query key name is listed, followed by its purpose: 1. **Querying an Application’s Box Storage**: ``` - algorand:app://12345?box=YWxnb3JvbmQ= + algorand://app/2345?box=YWxnb3JvbmQ= ``` Queries box storage with a `base64url`-encoded key. 2. **Querying Global Storage**: ``` - algorand:app://12345?global=Z2xvYmFsX2tleQ== + algorand://app/12345?global=Z2xvYmFsX2tleQ== ``` Queries global storage with a `base64url`-encoded key. -3. **Querying Asset Details**: +3. **Querying Local Storage**: + ``` + algorand://app/12345?local=bG9jYWxfa2V5&algorandaddress=ABCDEFGHIJKLMNOPQRSTUVWXYZ234567 + ``` + Queries local storage with a `base64url`-encoded key and specifies the associated account. + +4. **Querying Asset Details**: ``` - algorand:asset://67890?total + algorand://asset/67890?total ``` Queries the total supply of an asset.