Cardano Example Dapp
Address Identity Tester
This demo will test addresses default native scripts or 'Identities', and explore differences between ways to obtain them
Try it online:
- Visit HTML+JS Dapp
- Visit HTML+React Dapp
- Visit Native HTML dapp
- Run Run in Wallet…Open in IDE…
Source code:
- dapp connection code: GCScript DSL
- frontend (using @gamechanger-finance/gc): HTML+JS dapp
- frontend (using @gamechanger-finance/gc): HTML+React dapp
- frontend (without official library): Native HTML dapp
Dapp code was autogenerated by Playground IDE in GameChanger Wallet
GCScript code (dapp connection):
{
"title": "Address Identity Tester",
"description": "This demo will test addresses default native scripts or 'Identities', and explore differences between ways to obtain them",
"type": "script",
"exportAs": "AddressIdentityDemo",
"returnURLPattern": "http://localhost:3000/demo/api/dapp",
"run": {
"withMainAddress": {
"type": "script",
"isolateCache": true,
"return": {
"mode": "some",
"keys": [
"address",
"infoIdentity",
"identity"
]
},
"run": {
"address": {
"type": "getMainAddress"
},
"info": {
"type": "macro",
"run": "{getAddressInfo(get('cache.address'))}"
},
"infoIdentity": {
"type": "macro",
"run": "{get('cache.info.identity')}"
},
"identity": {
"type": "getMainIdentity"
}
}
},
"withCurrentAddress": {
"type": "script",
"isolateCache": true,
"return": {
"mode": "some",
"keys": [
"address",
"infoIdentity",
"identity"
]
},
"run": {
"address": {
"type": "getCurrentAddress"
},
"info": {
"type": "macro",
"run": "{getAddressInfo(get('cache.address'))}"
},
"infoIdentity": {
"type": "macro",
"run": "{get('cache.info.identity')}"
},
"identity": {
"type": "getCurrentIdentity"
}
}
}
}
}
Run standalone QR dapp connection:
You can use Playground IDE in GameChanger Wallet in QR URL Transport mode to capture results
Resources
- How to connect?
- Docs and examples on Github
- GCScript documentation
- Playground IDE in GameChanger Wallet
- Tutorials on Youtube
- Support on Discord
- News on Twitter
- Website
License
MIT
