Skip to main content

Cardano Example Dapp

Simple Export​

Exports the wallet name, the current address, the spending and staking public keys and three data constants under a single export named 'wallet'. Shows how exportAs returns the results of a script to the dapp

Try it online:​

Source code:​

Dapp code was autogenerated by Playground IDE in GameChanger Wallet

GCScript code (dapp connection):​

{
"type": "script",
"title": "Simple Export",
"description": "Exports the wallet name, the current address, the spending and staking public keys and three data constants under a single export named 'wallet'. Shows how exportAs returns the results of a script to the dapp",
"exportAs": "wallet",
"returnURLPattern": "http://localhost:3000/demo/api/dapp",
"run": {
"name": {
"type": "getName"
},
"address": {
"type": "getCurrentAddress"
},
"spendPubKey": {
"type": "getSpendingPublicKey"
},
"stakePubKey": {
"type": "getStakingPublicKey"
},
"extra1": {
"type": "data",
"value": "data of 0"
},
"extra2": {
"type": "data",
"value": "data of 1"
},
"extra3": {
"type": "data",
"value": "data of 2"
}
}
}

Run standalone QR dapp connection:​

You can use Playground IDE in GameChanger Wallet in QR URL Transport mode to capture results

This GCScript/URL is too large! make it shorter uploading parts to GCFS. Unable to generate QR code

Resources​

License​

MIT