GameChanger Wallet uses a domain specific language called GCScript DSL as it's dapp connector API.
This pure JSON code can be packed inside URLs and other transports to connect the wallet with dapps, hardware and other agents.
This is a list of references to all the schema files that conform the entire API of the GCScript DSL specification.
For General Documentation about
and many other topics please go to GameChanger Wallet Official Github Repository .
These are the 43 Cardano and wallet-related functions that conform the dapp connector API or GCScript DSL language. Dapps or other agents call them on scripts, that run wallet-side, and return the desired data results back to the calling agent or dapp.
Go to function documentation page: script
When you code on GCScript, you always start by calling this function first. This is the initial block of code containing a sequence of GCScript functions or other sub-nested blocks of code.
Go to GCScript DSL and ISL documentation pages for syntax guide and more.
Return type: api
Go to function documentation page: importAsData
List of external data JSON files to load into the workflow
Return type: importAsData
Go to function documentation page: importAsScript
List of external script JSON files to load into the workflow
Return type: importAsScript
Go to function documentation page: macro
JSON templates using Inline Scripting Language (ISL), useful for formatting, processing or debugging results.
Will directly return the result of the execution of an ISL block of code if a ISL string value is provided or all the results of nested ISL strings values inside a JSON object or list.
Function inputs and outputs are isomorphic, only ISL code gets replaced by it's results, keeping the former input JSON structure.
You can also provide non ISL valid strings, and these will be treated as string constants instead.
Go to GCScript DSL and ISL for syntax guides and documentation.
Return type: macro
Go to function documentation page: walletGenerator
Generates multiple password encrypted wallet files to be imported by GameChanger Wallet.
These wallets will be flagged as ̣burned, ethical feature that is used on UI to tell end users that these wallets has been created by someone else with a proper suggestion about moving to a fully owned wallet type.
If these wallet files are encoded as a QR code ( qr=true), they became the famous Gift Wallets that GameChanger offers to onboard family, friends and users on events into Cardano.
When running with system privileges and secrets is set to true this function returns also wallet secrets like password, wallet mnemonics and root private key.
Wallet addresses are returned in results, meaning you can use these addresses directly on the same script to airdrop funds to them.
Wallet files are currently network agnostic, meaning you can import these wallets on mainnet and testnets as well.
Return type: walletGenerator
Go to function documentation page: buildTx
Builds an unsigned transaction that once signed and submitted will send funds, store arbitrary data on-chain, mint tokens and nfts, manage stake delegation and rewards, execute smart contracts, among all the amazing Cardano protocol features you can consume with it.
You can combine all these transactions capabilities on a single transaction as long as you don't hit the maximum transaction size value specified on protocol parameters.
This is a powerful and flexible transaction-building API. These are it's key features:
Full documentation on how to build, sign and submit Transactions here .
Return type: buildTx
Go to function documentation page: signTxs
Sign a list of unsigned or half-signed transactions. These can be multi-signature transactions, or single-user transactions, either case you can use the multisig argument to specify a custom strategy (combining self-signing and or multi-signature plugins) to sign, import external and share existing signatures with other peers. The most powerful and flexible transaction multi-signature API available on Cardano.
Full documentation on how to build, sign and submit Transactions here .
Return type: signTxs
Go to function documentation page: submitTxs
Submit a list of signed transactions to Cardano blockchain. It can be done in several modes, and modes that can saturate backend services with large number of transactions will self-adapt in runtime in order to protect them while still fulfilling the task.
Full documentation on how to build, sign and submit Transactions here .
Return type: submitTxs
Go to function documentation page: encrypt
Encrypt an arbitrary hexadecimal encoded data messageHex with a password password using ChaCha20-Poly1305 algorithm. salt and nonce are optional arguments, and will be provided if not set. Returns an encrypted hexadecimal encoded message.
Return type: encrypt
Go to function documentation page: verifySignatureWithAddress
Verify CIP-8 signatures against a provided address. Compatible with CIP-30 specification.
Return type: verifySignatureWithAddress
Go to function documentation page: signDataWithAddress
Sign arbitrary data dataHex with user's address obtaining a CIP-8 COSE1 data signature structure. Compatible with CIP-30 specification.
Return type: signDataWithAddress
Go to function documentation page: plutusData
Build data structures to be used by plutus scripts (or other purposes) and calculate plutus data hashes
Return type: plutusData
Go to function documentation page: plutusScript
Import or compile Plutus Validator Scripts (Cardano Smart Contracts) from built CBOR, or from source code using languages like Helios.
When importing an already built Plutus Script providing CBOR, this function will also try to deserialize it and calculate it's hash.
When building from source code like with Helios language, you are compiling Plutus Validators on-the-fly during dapp connection, and this have advantages like instant parametrization of built code, and reusability of code-artifacts like datums produced in-language. This can reduce incompatibilities as each language may use their own preferred data type formats. This function also will calculate the hash of the new compiled script.
A common design pattern is to use the produced hash scriptHashHex to built smart contract addresses for example, while using the produced CBOR scriptHex and script reference CBOR scriptRefHex to deploy the contract on-chain or use it inlined on a transaction.
Return type: plutusScript
Go to function documentation page: nativeScript
Build native scripts
Return type: nativeScript
Go to function documentation page: certificate
Build certificates
Return type: certificate
Go to function documentation page: buildAddress
Build Cardano Addresses. These addresses are called Volatile Addresses and imply a potential loss of user funds because they may become unreachable if the construction technique is not properly persisted or handled. It's recommended to use saveConfig and loadConfig for creating addresses to ensure users can reconstruct them in the future.
Return type: buildAddress
Go to function documentation page: deriveKeys
Bulk derive child keys from user's root private key. This are Volatile Keys, keys which derivation path may not be persisted or handled properly, implying a potential loss of signability, minting, spending or staking rights. It's recommended to use saveConfig and loadConfig for creating keys to ensure users can reconstruct them in the future. Resulting object properties will be named after argument indexes or property names
Return type: deriveKeys
Go to function documentation page: getStakingPublicKey
Ask for current user's wallet staking public key
Return type: getStakingPublicKey
Go to function documentation page: getSpendingPublicKey
Ask for current user's wallet spending public key
Return type: getSpendingPublicKey
Go to function documentation page: getMainIdentity
Ask for the identity of the main wallet address. An Address Identity is a deterministic default Native Script generated out of Cardano Shelley Address stake and payment credentials. The only incompatible credentials are Plutus Script Hash credentials, Public Key Hash and Native Script Hash credentials are supported. If an address contains at least one supported credential type, an identity can be generated. For Native Script Hash credentials it's required to save the former Native Scripts on current Workspace to became available for generating the address identity
Return type: getMainIdentity
Go to function documentation page: getCurrentIdentity
Ask for the identity of the current wallet address being used. An Address Identity is a deterministic default Native Script generated out of Cardano Shelley Address stake and payment credentials. The only incompatible credentials are Plutus Script Hash credentials, Public Key Hash and Native Script Hash credentials are supported. If an address contains at least one supported credential type, an identity can be generated. For Native Script Hash credentials it's required to save the former Native Scripts on current Workspace to became available for generating the address identity
Return type: getCurrentIdentity
Go to function documentation page: getMainAddress
Ask for the main wallet address. This is a Shelley Base Address using accountIndex=0 and addressIndex=0 for both, Spend and Stake credentials. This is the legacy default wallet address in GameChanger Wallet
Return type: getMainAddress
Go to function documentation page: getCurrentAddress
Ask for the current wallet address being used
Return type: getCurrentAddress
Go to function documentation page: getNetworkInfo
Fetch from device storage current network information. Current network is the current selected network, the one the wallet UI shows on it's footer
Return type: getNetworkInfo
Go to function documentation page: getCurrentSlot
Fetch from a backend node the current network slot number (seconds)
Return type: getCurrentSlot
Go to function documentation page: buildFsTxs
Build a list of transactions that once signed and submitted will create or update an existing fully onchain GameChanger File System (GCFS)
Return type: buildFsTxs
Go to function documentation page: enableTerminalMode
Adapt your configuration to work better on public terminal devices. Encrypted private keys wont be persisted on browser storage, and wallet types depending on this feature will not be available, among other changes. This action cannot be undone.
Return type: enableTerminalMode
Go to function documentation page: saveConfig
Save different workspaces, each with it's own set of keys, addresses, stake delegations and more.
Full documentation on how to create accounts, multisigs, keys and addresses with Workspaces here
Return type: saveConfig
Go to function documentation page: loadConfig
Configure different workspaces, each with it's own set of keys, addresses, stake delegations, and more.
Full documentation on how to create accounts, multisigs, keys and addresses with Workspaces here
Return type: loadConfig
Go to function documentation page: setCurrentWorkspace
Set the current wallet Workspace
Full documentation on how to create accounts, multisigs, keys and addresses with Workspaces here
Return type: setCurrentWorkspace
Go to function documentation page: getAddresses
Get Addresses from current workspace artifacts stored on wallet local storage, applying a search filter and allowing the customization of the resulting key-value map using keyPattern to name the keyed results, offset and limit numbers to paginate results, and sort to sort the keys of the resulting map.
Return type: getAddresses
Go to function documentation page: getPublicKeys
Get Public Keys from current workspace artifacts stored on wallet local storage, applying a search filter and allowing the customization of the resulting key-value map using keyPattern to name the keyed results, offset and limit numbers to paginate results, and sort to sort the keys of the resulting map
Return type: getPublicKeys
These are the 4 internal definitions ( types and sub-schemas ) used by functions and GameChanger Wallet GCScript interpreter.
Go to definition documentation page: common
Common API definitions and types used by functions
Go to definition documentation page: permissions
Permissions names, description and properties that are used by functions and GameChanger Wallet GCScript interpreter on every dapp connection.
Go to definition documentation page: lang
Complementary programming language to process, format, reuse, link, or pipe GCScript function results with other function arguments, designed to avoid bad practices such as deep nested code and complex code logic expressed in JSON.
Code functions help you to perform memory, string, arithmetic, cryptographic, encoding, logging, debugging, and other useful secondary operations not supported by primary GCScript API functions.
Almost all GCScript function arguments supports ISL.
All arguments passing a string value starting with { and terminating with } and containing calls of one or many ISL functions separated with ; will be interpreted as an ISL code block and will be executed.
The entire ISL code block will be replaced by it's results prior executing the GCScript function, key behavior that makes GCScript more flexible and dynamic.
Otherwise, if syntax rules are not met on GCScript function arguments, interpreter will use these strings as string values instead of ISL executable code.
ISL syntax is a subset of Javascript syntax. It's a deterministic, non-turing complete language, same as GCScript language itself.
null undefined true false Go to ISL documentation page for syntax guide and more.