GCScript initial block of code

Type: object

GameChanger Wallet uses a Domain Specific Language called GCScript as it's dapp connector API. This pure JSON code get's packed inside URLs and other transports to connect the wallet with dapps, hardware and other agents. This is the definition of the initial block of code containing other GCScript functions or nested blocks of code.

No Additional Properties

Type: const
Specific value: "script"


Type: object

Pass any kind of data as arguments to this script. During runtime, script code will be able to access it using inline macro getter this way {get('args.foo.bar')}


Examples:

{
    "foo": {
        "bar": "Hello World!",
        "baz": 3
    }
}
"Hello World"
5
Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)


List or Key-Value Map of Script Argument List. Each child script will have read access to it's corresponding arguments referenced by with same key. Use inline macro on args parameter like this inside each imported script "args":"{get('args')}". Script args parameter will act as default arguments if key is not present on the list

Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting
Type: array

Must contain a minimum of 1 items

Each item of this array must be:


Type: object

Pass any kind of data as arguments to this script. During runtime, script code will be able to access it using inline macro getter this way {get('args.foo.bar')}

Same definition as Script arguments
Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting
Type: object
No Additional Properties

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression:

Type: object

Pass any kind of data as arguments to this script. During runtime, script code will be able to access it using inline macro getter this way {get('args.foo.bar')}

Same definition as Script arguments
Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting
Type: object
No Additional Properties

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression:

Type: object

Pass any kind of data as arguments to this script. During runtime, script code will be able to access it using inline macro getter this way {get('args.foo.bar')}

Same definition as Script arguments
Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting

Type: object

Type: object

Will return null. Is like a void function in most programming languages

No Additional Properties

Type: const
Specific value: "none"
Type: object

Will return all it children code block results. This is the default behaviour

No Additional Properties

Type: const
Specific value: "all"
Type: object

Will return the result of it's first child code block.

No Additional Properties

Type: const
Specific value: "first"
Type: object

Will return the result of it's last child code block.

No Additional Properties

Type: const
Specific value: "last"
Type: object

Will return the result of one child code block, the one in the key name or position argument.

No Additional Properties

Type: const
Specific value: "one"


Type: string
Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting
Type: object

Will return the result of some children code blocks, the ones in the keys name or position list argument.

No Additional Properties

Type: const
Specific value: "some"


Type: array of string

Each item of this array must be:

Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting
Type: object

Will return the result of the execution of an inline macro. Usefull for formatting, debugging results and for using data without leaking it.

No Additional Properties

Type: const
Specific value: "macro"

Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting

Type: string

When set, it allows you return all the results of this script back to the DAPP under a property with this string as name

Type: boolean Default: false

If true, this block of code isolates it's cache scope as if it where the only one existing on context, making the rest of the code outside of it unreacheable from within. Usefull to keep variable paths absolute (for get() macro function for ex.), no matter if the block is the root block of an entire script of it is nested inside others.

Type: string

Title of the script


Examples:

"NFT Minting Request"
"Pay 5 ADA to Charles"

Type: string

Description of the script


List of API functions or nested Blocks of Code to execute

Type: array

Must contain a minimum of 1 items

Each item of this array must be:


Type: object

Stops the execution of the script until a condition is met

No Additional Properties

Type: const
Specific value: "await"


List or Key-Value Map of Conditions

Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting
Type: array

Must contain a minimum of 1 items

Each item of this array must be:


Type: object

Type: object

Returns true on timeout

No Additional Properties


Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting


Type: enum (of null) Default: "seconds"

Must be one of:

  • null
Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting


Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting
Type: object

Returns true once wallet asset balance mets a condition. If address is not specify, will use current address. If ìs is not specified, will default to greater-or-equal

No Additional Properties


Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting


Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting


Type: enum (of string) Default: "greater-or-equal"

Must be one of:

  • "less"
  • "less-or-equal"
  • "equal"
  • "greater-or-equal"
  • "greater"
Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting


Type: object

Type: object

Definition of a Cardano asset. Using an ASCII asset name encoding as argument

No Additional Properties


Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting


Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting
Type: object

Definition of a Cardano asset. Using an hexadecimal asset name encoding as argument

No Additional Properties


Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting


Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting
Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting
Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting
Type: object
No Additional Properties

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression:

Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting
Type: object
No Additional Properties

All properties whose name matches the following regular expression must respect the following conditions

Property name regular expression:

Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting
Type: object

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

No Additional Properties

Type: const
Specific value: "getPublicKeys"

Default: "{kind}-{accountIndex}-{addressIndex}"

Pattern for naming each key of the resulting key-value mapping. You can use variables wrapped between { and }. Available templating variables are limit, offset, index, position, count, maxOffset, sort, artifactKind, artifactRef, artifactKey, artifactName, pubKeyHashHex, kind, accountIndex, addressIndex, path.

Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting

Examples:

"Item-{artifactName}"
"{artifactKind} {index}/{maxOffset}"
"{artifactKind} {position}/{count}"


Type: number

Value must be greater or equal to 0

Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting


Type: number

Value must be greater or equal to 0

Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting


Type: enum (of string)

Must be one of:

  • "ascending"
  • "descending"
Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting


Type: object
No Additional Properties


Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting


Type: enum (of string)

Must be one of:

  • "spend"
  • "stake"
Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting


Type: number

Value must be greater or equal to 0

Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting


Type: number

Value must be greater or equal to 0

Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting


Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting


Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting


Type: string

GCScript Inline Scripting Language

Inline scripting language function definitions

set

The function set allows you to set arbitrary data on script context for later reuse.

Arguments:

  • path (string) - path of the value to set
  • value (any) - variable to store

Note: Use get to return the value later

get

The function get allows you to get arbitrary data from script context.

Arguments:

  • path (string) - path of the value to retrieve

Note: Use set to set this values in first place

getArray

Returns an array with each provided argument as an item

Arguments:

  • values (any) - items of the array separated by comma

console

Dumps to console a message (or object)

Arguments:

  • type ('log'|'info'|'warn'|'error') - value to pretty print in the logs
  • value (any) - value to pretty print in the logs

jsonToObj

Parses a JSON string and returns an object

Arguments:

  • value (string) - string value to parse, must be a valid JSON string

objToJson

Turns an object into a valid JSON string

Arguments:

  • value (any) - object to serialize as a JSON string

strToHex

Encodes a utf-8 text string into hexadecimal string

Arguments:

  • value (string) - utf-8 text string

hexToStr

Decodes an hexadecimal string into the former utf-8 text string

Arguments:

  • value (string) - hexadecimal encoded string

strToBase64

Encodes a utf-8 text string into base64 string

Arguments:

  • value (string) - utf-8 text string

base64ToStr

Decodes a base64 string into a utf-8 text string

Arguments:

  • value (string) - base64 encoded string

strToMetadataStr

Automatically splits a utf-8 text string into a list of 64 bytes long strings if value length is bigger than 64 bytes
Otherwise, it returns the original string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string) - string to be adapted for metadata usage

metadataStrToStr

If a list of strings ( produced by strToMetadataStr ) is provided, joins it into a single string
If a string is provided, returns the string

Strings in transaction's auxiliary data (metadata) can't be longer than 64 bytes.
Many standards use a list of short strings as a workaround.
You can use strToMetadataStr and metadataStrToStr to work with metadata strings.

Arguments:

  • value (string | [string]) - string or list of strings produced by strToMetadataStr

truncate

Truncates a string from start to prefixLength characters, attaches a separator string, and finally adds the last suffixLength characters of the string
Usefull for truncating long texts, or hashes and addresses when you want to keep the beginning and the end of them and discard the middle.

Example:

addr1qzk45...gkwg (prefixLength=10 ,suffixLength=4, separator="...")

Arguments:

  • value (string) - string to be truncated
  • prefixLength (number) - initial number of characters to be included in resulting string
  • suffixLength (number) - final number of charactes to be included in resulting string
  • separator (string) - string to be included between prefix and suffix parts of the string

replaceAll

Replaces all match ocurrencies inside str by value

Arguments:

  • str (string) - string where to search and replace
  • match (string) - exact string that will be searched for and replaced by value
  • value (string) - value to replaced with

delay

Pauses the execution for interval milliseconds

Arguments:

  • value (any) - object to serialize as a JSON string

getAddressInfo

Get address information as an object with many usefull properties

Arguments:

  • address (string) - a valid cardano address

sha512

Calculates SHA512 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha256

Calculates SHA256 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

sha1

Calculates SHA1 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

md5

Calculates MD5 hash of data string

Arguments:

  • data (string) - arbitrary string to be hashed

uuid

Generates a random RFC4122 UUID v4

Arguments:

addBigNum

Adds extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the sum as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - addends separated by comma (BigNum)

subBigNum

Substracts extraArgs subtrahends numbers from an initial value minuend. Fails on underflow.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the substraction as a BigNum string.

Arguments:

  • value (string | number) - minuend, initial value (BigNum)
  • extraArgs ([string | number]) - subtrahends separated by comma (BigNum)

mulBigNum

Multiplies extraArgs numbers to an initial value.

BigNum are big positive integers provided as strings.
This function also convert numbers on arguments into BigNum string

Returns the multiplication as a BigNum string.

Arguments:

  • value (string | number) - initial value (BigNum)
  • extraArgs ([string | number]) - Multipliers separated by comma (BigNum)

Same definition as GCScript Inline Scripting