GCScript API documentation

Type: object

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.

Type: object

These are all the Cardano and wallet-related functions that conform the GCScript API. Dapps or other agents combine them on scripts, that run wallet-side, and return the desired data results back to the calling agent or dapp.

Type: object

Go to function's documentation page

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.

Type: object

Go to function's documentation page

Nested block of code with a sequence of API functions or other sub-nested blocks of code to execute

Type: object

Go to function's documentation page

List of external data JSON files to load into the workflow

Type: object

Go to function's documentation page

List of external script JSON files to load into the workflow

Type: object

Go to function's documentation page

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.

Type: object

Go to function's documentation page

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.

Type: object

Go to function's documentation page

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:

  • powered by Emurgo's Cardano Serialization Lib: is a practical wrapper of this library, but callable through JSON arguments
  • automatic/manual coin selection algorithms: a healthy UTXO set is one managed by wallets, not by dapps
  • automatic/manual change output optimizers algorithms: a healthy UTXO set is one early-planned by wallets, not late-fixed by dapps
  • smart minimum coin values per output: only focus in what you need to send, protocol complexities will be solved by the wallet automatically to ensure transaction validity
  • friendly missing-balance error handling: a smart UI screen will appear to let users refill their wallets in order to continue with script execution gracefully
  • transport-agnostic solution: the first and only dapp connector API able to build transactions properly on-the-fly, allowing even static QR codes to trigger them on any user wallet. Yes, even multisig and plutus transactions! We really care for RealFi.
  • intelligent Plutus/Native script support: our internal script manager maps every transaction feature with it's plutus/native validator script, up to the point that some function arguments can be inferred automatically making developers life easier with such complex tasks.
  • developer-friendly plutus API: Things like enforcing and handling static input/mint/cert/reward indexes for redeemers is a thing of the past.
  • flexible plutus and multisig signature handling: several options allow you or the wallet to plan worst case scenario for reserving bytes for maximum amount of transaction witnesses.
  • workspace support: our multisig / script based wallet setups are totally integrated on transaction builder API allowing the most flexible and adaptive multisig wallet experience on Cardano ever experienced.
  • smart on-chain transaction features: title, descriptions, tags, parent reference, action-urls, and more are exclusive GameChanger Wallet features since 2021
  • and more...

Full documentation on how to build, sign and submit Transactions here.

Type: object

Go to function's documentation page

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.

Type: object

Go to function's documentation page

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.

Type: object

Go to function's documentation page

[Deprecated]. Please use submitTxs or await functions instead. Wait for a transaction to get confirmed on the blockchain.

Type: object

Go to function's documentation page

[Deprecated]. Please use signTxs function for simple and multisig transactions instead. Add missing signatures to an unsigned or half-signed transaction with user's private keys

Type: object

Go to function's documentation page

[Deprecated]. Please use submitTxs function instead. Submit a signed transaction

Type: object

Go to function's documentation page

Decrypt an arbitrary hexadecimal encoded data message from encryptedMessageHex string and a password password using ChaCha20-Poly1305 algorithm. Returns the hexadecimal encoded decrypted message.

Type: object

Go to function's documentation page

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.

Type: object

Go to function's documentation page

Verify CIP-8 signatures against a provided address. Compatible with CIP-30 specification.

Type: object

Go to function's documentation page

Sign arbitrary data dataHex with user's address obtaining a CIP-8 COSE1 data signature structure. Compatible with CIP-30 specification.

Type: object

Go to function's documentation page

Build data structures to be used by plutus scripts (or other purposes) and calculate plutus data hashes

Type: object

Go to function's documentation page

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.

Type: object

Go to function's documentation page

Build native scripts

Type: object

Go to function's documentation page

Build certificates

Type: object

Go to function's documentation page

Build Cardano Addresses. This 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.

Type: object

Go to function's documentation page

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

Type: object

Go to function's documentation page

Ask for current user's wallet staking public key

Type: object

Go to function's documentation page

Ask for current user's wallet spending public key

Type: object

Go to function's documentation page

Ask for a user's wallet current name

Type: object

Go to function's documentation page

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

Type: object

Go to function's documentation page

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

Type: object

Go to function's documentation page

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

Type: object

Go to function's documentation page

Ask for the current wallet address being used

Type: object

Go to function's documentation page

Fetch from a backend node the current network slot number (seconds)

Type: object

Go to function's documentation page

Build a list of transactions that once signed and submitted will create or update an existing fully onchain GameChanger File System (GCFS)

Type: object

Go to function's documentation page

Find files across all existing file systems based on a list of search parameters. Result will be a list of file URIs.

Type: object

Go to function's documentation page

Allows you to define an arbitrary data constant. Any valid JSON type can be used.

Type: object

Go to function's documentation page

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.

Type: object

Go to function's documentation page

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

Type: object

Go to function's documentation page

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

Type: object

Go to function's documentation page

Set the current wallet Workspace

Full documentation on how to create accounts, multisigs, keys and addresses with Workspaces here

Type: object

Go to function's documentation page

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.

Type: object

Go to function's documentation page

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

Type: object

Go to function's documentation page

Stops the execution of the script until a condition is met

Type: object

These are all the internal definitions, types and sub-schemas used by functions and GameChanger Wallet GCScript interpreter.

Type: object

Go to definition's documentation page

Inline Scripting Language (ISL) is a 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.

Usage:

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.