gamechanger.wallet

GCScript DSL / Quick Start

Running your first GCScript

First time using GameChanger Wallet? - Go to [GameChanger Wallet for Cardano Mainnet](https://beta-wallet.gamechanger.finance/) - Follow the automatic welcome wizard for creating your `Default` Burner Wallet - You now have a non-custodial but password-less Cardano wallet for quick developing and testing, no funds needed for now! - Instead, if you prefer to import or connect to a Browser Extension, Hardware, Mnemonic (seed phrase), or Express (QR code) wallet it's time to do so.

No more theory until next section, let’s run some GCScript right now!

Your first GCScript!:

{
    "type": "script",
    "title": "My first Cardano dapp!",
    "description":"This dapp is going to ask your wallet name and address. Click Continue to proceed.",
    "exportAs":"myWalletData",
    "run":{
        "name":{"type":"getName"},
        "address":{"type":"getCurrentAddress"},
        "message":{
            "type":"data",
            "value":"Hello Cardano!"
        }
    }
}

Run on Cardano Mainnet Run on Cardano Pre-Production Testnet

🔍 See also: script, getName, getCurrentAddress, data

You will capture back your first execution results, and they will look something like this:

example results:

{
  "exports": {
    "myWalletData": {
      "name": "Default",
      "address": "addr1q8aw6dzpw3cld828cqywp0sql4sxfw6syhzyh2kfcfccakddqwj2u3djrag0mene2cm9elu5mdqmcz9zc2rzgq7c5g6qshxn7l",
      "message": "Hello Cardano!"
    }
  }
}

In the next section you will understand this code syntax better, but basically you asked your own wallet some information, such as your own Cardano address, by establishing a compressed communication towards the wallet core and decompressing the response.

You sent compressed GCScript code (JSON) to the wallet core, it processed the code and it responded with compressed JSON results.

Deploying your first Dapp

You have been using a special transport called local transport, which is meant for launching in-wallet dapp connections or also for developing your own dapps, exactly what you are doing right now.

“Wait, what? this is not a dapp yet!”

Well, you have coded just a “dapp connection”, a communication towards a user wallet that will return useful data back to you.

Do you want now to create a full dapp to actually launch this communication from it but using the url transport?, in other words, to exit this “developer mode” and jump into real action?

“Let’s do it!”

“Wait, that’s it?”

Yes!

"How to do this on a Cardano Testnet?" GameChanger Wallet have a Cardano Pre-Production Testnet version. It even have a built-in tAda + tokens + nfts airdrop! - Go to [GameChanger Wallet for Cardano Pre-Production Testnet](https://beta-preprod-wallet.gamechanger.finance/) - Follow the same instructions you followed above, even use the same GCScript code To adapt a code in GCScript to work for a specific network you just need to use data or expect results specific for that network, for example for testnets you use addresses starting with `addr_test1`. Also when using the `url` and `qr` transports just take care of pointing to the right wallet URLs.

Coding your own frontend, backend or hardware integration to connect to the wallet

If you already know GCScript syntax, jump to Transactions / Quick Start for code snippets you can use to integrate GameChanger Wallet on stores, social and messaging platforms, and your frontend, backend or hardware applications.

Playground IDE automated the process of building and deploying a simple HTML + Javascript dapp for you, after you master more your GCScript skills you can start coding your own dapps using our Official NPM Library for Javascript/Typescript.

If you are working on a different language/platform such as on embedded hardware, you can still create your own URLs or QR codes to stablish communications by using standard building blocks available on all platforms and programming languages. Same building blocks will allow you to decode or decompress returning JSON data from the wallet to capture script results and use them on your applications.

Code editors and available tools

In addition to the in-wallet Playground IDE, you can create full projects using Inception IDE (Beta), a powerful GCScript and Helios code editor and development environment by M2Tec.

The Official NPM Library is also a CLI you can install. In both usage modes you can encode and decode these URLS and response URLs, and it even generates ready to use QR codes, HTML, React and NodeJS applications boilerplates to get you started or automate code generation.

Now it’s time for you to learn some GCScript syntax!

Previous: Overview Next: Syntax