gamechanger.wallet

GCScript DSL / Overview

Introduction

GCScript DSL is an intent-based, JSON-based domain-specific language for describing and executing wallet workflows. Applications express what they want to accomplish, and the wallet resolves those instructions using its capabilities, the user’s wallet context, and the permissions granted by the user.

GCScript was originally created and implemented in GameChanger Wallet. Its foundations date to the wallet’s API design in 2021, which evolved into GCScript in 2022. The language is not designed exclusively for GameChanger Wallet or the Cardano blockchain. This documentation covers language and syntax while using current GameChanger Wallet implementation for Cardano; available functions and blockchain capabilities depend on the implementation.

The original design principles applied for Web3:

The GCScript DSL

Applications and other calling agents send GCScript as JSON to a compatible wallet (runner). Its interpreter validates the script, executes the requested operations under the wallet’s permission model, and returns explicitly exported results as JSON.

An intent describes a requested action or workflow. It can read wallet data, build a transaction, request signatures, submit transactions, or combine several operations. An intent is distinct from an on-chain transaction: several intents can contribute to one transaction, while one workflow can produce multiple transactions.

DSL provides native Cardano and wallet-related functions ruled by permissions, with Inline Scripting Language (ISL) for transforming data, validating inputs, and passing results between steps in a permission-less way. Applications can leave transaction construction, balancing, and wallet-specific details to the wallet while users retain control over authorization and signing.

The mechanism used to package and exchange scripts and their JSON results is called a transport. The language is transport-agnostic; GameChanger Wallet’s Universal Dapp Connector delivers these workflows through URLs and QR codes, among other supported transports.

Benefits

What is it for?

Use GCScript to build payment links and checkout flows, token and NFT tools, dapps, backend, and static screen/paper integrations, DeFi and smart-contract interactions, staking operations, wallet onboarding, and workflows involving multiple transactions and wallet generation for events and classrooms. It connects websites, mobile applications, hardware, and AI agents to wallet capabilities while keeping authorization with the user.

For working Cardano integrations, explore the example catalog. The Quick Start explains how to run your first script.

Basic Properties

Hello World

A simple “Hello World” example in GCScript:

{
    "type": "script",
    "title": "Example",
    "description": "This dapp connection once executed on a wallet will return 'Hello World!' ",
    "exportAs": "myResults",
    "run": {
        "myVariable":{
            "type":"data",
            "value":"Hello World!"
        }
    }
}

Run on Cardano Mainnet Run on Cardano Pre-Production Testnet

🔍 See also: script, data

and the isomorphic results:

{
  "exports": {
    "myResults": {
      "myVariable": "Hello World!"
    }
  }
}
Do you know Javascript? Here is a free interpretation on how the code would look like in Javascript: ```js let exports={} function data(value){ return value; } function script(title,description,exportAs){ let cache={}; cache["myVariable"]=data("Hello World!"); exports[exportAs]=cache; return cache; } script( "Example", "This dapp connection once executed on a wallet will return 'Hello World!'", "myResults"); ```
Previous: GCScript DSL Next: Quick Start