GetApplication
Get details and state of an application.
Request Parameters
Name | Type | Description |
---|---|---|
app | number | The ID of the application. |
user | string | OPTIONAL. The address of the account of which the local state should be fetched. |
Responses
Regular response
Name | Type | Description |
---|---|---|
info | {creator: string} | Object containing the address of the creator of the application. |
globalState | {[k: string]: string |number} | The global state of the application as a key value store. All keys are encoded in base64. If the value is a bytestring, it is returned as a base64 encoded string. If otherwise it is an uint64, it is returned as a number. |
localState | {[k: string]: string |number} | OPTIONAL. The local state of the application with relation to the provided user address. |
Example Usage
const response = await fetch('https://api.preprod.decash.com/v1/GetApplication', {
method: 'POST',
body: JSON.stringify({
app: 98115918,
user: 'NMREIQPDPKKB3NCRORRKT4DEXUAB7EGK3G3DPQ5GTAYKZ2PGLQGTWLXKH4',
})
})
const data = await response.json();
Example Success Response
{
"info": {
"creatror": "NMREIQPDPKKB3NCRORRKT4DEXUAB7EGK3G3DPQ5GTAYKZ2PGLQGTWLXKH4"
},
"globalState": {
"Y29uZmlnQAAAAAAAKBmgQAAAAAAAAAPo": 100,
"Y29uZmlnQAAAAAAAKBmgQAAAAAAAAAfQ": 200,
"ZXNjcm93": "q3+1gX6Qwls8/tCilQY3nROwbm5Y2k5KgWBW9NQJtbU="
},
"localState": {
"bWluX3N0YWtlZA": 1000,
},
}