View Source Radixir.Gateway (radixir v0.0.5)

Provides high level interaction with the Gateway API.

Link to this section Summary

Functions

Builds a transaction of one or more burn tokens actions.

Builds a transaction of one or more create token actions.

Builds a transaction of one or more mint tokens actions.

Builds a transaction of one or more register validator actions.

Builds a transaction of one or more stake tokens actions.

Builds a transaction of one or more unregister validator actions.

Gets the account address associated with the given public key.

Gets the Radix Resource Identifier of a token with the given symbol, created by an account with the given public key.

Gets the validator address associated with the given public key.

Gets a signed transaction payload and transaction identifier, from an unsigned transaction payload and signature.

Gets an account's available and staked token balances.

Gets user-initiated transactions involving the given account address which have been succesfully committed to the ledger.

Gets the Gateway API version, network and current ledger state.

Gets information about xrd, including its Radix Resource Identifier.

Gets the xrd which the account has in pending and active delegated stake positions with validators.

Gets information about any token, given its Radix Resource Identifier.

Gets the current rules used to build and validate transactions in the Radix Engine.

Gets the status and contents of the transaction with the given transaction identifier.

Gets the xrd which the account has in pending and temporarily-locked delegated unstake positions with validators.

Gets information about a validator, given a validator address.

Gets paginated results about the delegated stakes from accounts to a validator.

Gets information about all validators.

Submits a signed transaction payload to the network.

Link to this section Types

@type address() :: String.t()
@type burn_tokens_params() :: %{
  from_address: String.t(),
  amount: String.t(),
  token_rri: String.t()
}
@type create_token_params() :: %{
  name: String.t(),
  description: String.t(),
  icon_url: String.t(),
  url: String.t(),
  symbol: String.t(),
  is_supply_mutable: boolean(),
  granularity: String.t(),
  owner_address: String.t(),
  token_supply: String.t(),
  token_rri: String.t(),
  to_account_address: String.t()
}
@type error_message() :: String.t()
@type fee_payer_address() :: String.t()
@type mint_tokens_params() :: %{
  to_address: String.t(),
  amount: String.t(),
  token_rri: String.t()
}
@type options() :: keyword()
@type private_key() :: String.t()
@type public_key() :: String.t()
@type rri() :: String.t()
@type signature_bytes() :: String.t()
Link to this type

signature_public_key()

View Source
@type signature_public_key() :: String.t()
@type signed_transaction() :: String.t()
@type stake_tokens_params() :: %{
  from_address: String.t(),
  to_validator_address: String.t(),
  amount: String.t(),
  token_rri: String.t()
}
@type symbol() :: String.t()
@type transaction_hash() :: String.t()
Link to this type

transfer_tokens_params()

View Source
@type transfer_tokens_params() :: %{
  from_address: String.t(),
  to_address: String.t(),
  amount: String.t(),
  token_rri: String.t()
}
Link to this type

unsigned_transaction()

View Source
@type unsigned_transaction() :: String.t()
Link to this type

unstake_tokens_params()

View Source
@type unstake_tokens_params() :: %{
  from_validator_address: String.t(),
  to_address: String.t(),
  options:
    [amount: String.t(), token_rri: String.t()]
    | [{:unstake_percentage, integer()}]
}
@type validator_address() :: String.t()

Link to this section Functions

Link to this function

build_burn_tokens_transaction(burn_tokens_params_list, fee_payer_address, options \\ [])

View Source
@spec build_burn_tokens_transaction(
  [burn_tokens_params()],
  fee_payer_address(),
  options()
) :: {:ok, map()} | {:error, map() | error_message()}

Builds a transaction of one or more burn tokens actions.

parameters

Parameters

  • burn_tokens_params_list: List of burn tokens params
  • fee_payer_address: Fee payer address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
    • message (optional, string): Message to be included in transaction.
    • disable_token_mint_and_burn (optional, boolean): Disable Token Mint and Burn.
Link to this function

build_create_token_transaction(create_token_params_list, fee_payer_address, options \\ [])

View Source
@spec build_create_token_transaction(
  [create_token_params()],
  fee_payer_address(),
  options()
) ::
  {:ok, map()} | {:error, map() | error_message()}

Builds a transaction of one or more create token actions.

parameters

Parameters

  • create_token_params_list: List of create token params
  • fee_payer_address: Fee payer address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
    • message (optional, string): Message to be included in transaction.
    • disable_token_mint_and_burn (optional, boolean): Disable Token Mint and Burn.
Link to this function

build_mint_tokens_transaction(mint_tokens_params_list, fee_payer_address, options \\ [])

View Source
@spec build_mint_tokens_transaction(
  [mint_tokens_params()],
  fee_payer_address(),
  options()
) :: {:ok, map()} | {:error, map() | error_message()}

Builds a transaction of one or more mint tokens actions.

parameters

Parameters

  • mint_tokens_params_list: List of mint tokens params
  • fee_payer_address: Fee payer address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
    • message (optional, string): Message to be included in transaction.
    • disable_token_mint_and_burn (optional, boolean): Disable Token Mint and Burn.
Link to this function

build_register_validator_transaction(validator_addresses_list, fee_payer_address, options \\ [])

View Source
@spec build_register_validator_transaction(
  [validator_address()],
  fee_payer_address(),
  options()
) :: {:ok, map()} | {:error, map() | error_message()}

Builds a transaction of one or more register validator actions.

parameters

Parameters

  • validator_addresses_list: List of validator addresses
  • fee_payer_address: Fee payer address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
    • message (optional, string): Message to be included in transaction.
    • disable_token_mint_and_burn (optional, boolean): Disable Token Mint and Burn.
Link to this function

build_stake_tokens_transaction(stake_tokens_params_list, fee_payer_address, options \\ [])

View Source
@spec build_stake_tokens_transaction(
  [stake_tokens_params()],
  fee_payer_address(),
  options()
) :: {:ok, map()} | {:error, map() | error_message()}

Builds a transaction of one or more stake tokens actions.

parameters

Parameters

  • stake_tokens_params_list: List of stake tokens params
  • fee_payer_address: Fee payer address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
    • message (optional, string): Message to be included in transaction.
    • disable_token_mint_and_burn (optional, boolean): Disable Token Mint and Burn.
Link to this function

build_transfer_tokens_transaction(transfer_tokens_params_list, fee_payer_address, options \\ [])

View Source
@spec build_transfer_tokens_transaction(
  [transfer_tokens_params()],
  fee_payer_address(),
  options()
) :: {:ok, map()} | {:error, map() | error_message()}

Builds a transaction of one or more transfer tokens actions.

parameters

Parameters

  • transfer_tokens_params_list: List of transfer tokens params
  • fee_payer_address: Fee payer address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
    • message (optional, string): Message to be included in transaction.
    • disable_token_mint_and_burn (optional, boolean): Disable Token Mint and Burn.
Link to this function

build_unregister_validator_transaction(validator_addresses_list, fee_payer_address, options \\ [])

View Source
@spec build_unregister_validator_transaction(
  [validator_address()],
  fee_payer_address(),
  options()
) :: {:ok, map()} | {:error, map() | error_message()}

Builds a transaction of one or more unregister validator actions.

parameters

Parameters

  • validator_addresses_list: List of validator addresses
  • fee_payer_address: Fee payer address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
    • message (optional, string): Message to be included in transaction.
    • disable_token_mint_and_burn (optional, boolean): Disable Token Mint and Burn.
Link to this function

build_unstake_tokens_transaction(unstake_tokens_params_list, fee_payer_address, options \\ [])

View Source
@spec build_unstake_tokens_transaction(
  [unstake_tokens_params()],
  fee_payer_address(),
  options()
) :: {:ok, map()} | {:error, map() | error_message()}

Builds a transaction of one or more unstake tokens actions.

parameters

Parameters

  • unstake_tokens_params_list: List of unstake tokens params
  • fee_payer_address: Fee payer address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
    • message (optional, string): Message to be included in transaction.
    • disable_token_mint_and_burn (optional, boolean): Disable Token Mint and Burn.
Link to this function

burn_tokens(burn_tokens_params_list, fee_payer_address, private_key, options \\ [])

View Source
@spec burn_tokens(
  [burn_tokens_params()],
  fee_payer_address(),
  private_key(),
  options()
) :: {:ok, map()} | {:error, map() | error_message()}

Burn tokens.

parameters

Parameters

  • burn_tokens_params_list: List of burn tokens params
  • fee_payer_address: Fee payer address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
    • message (optional, string): Message to be included in transaction.
    • disable_token_mint_and_burn (optional, boolean): Disable Token Mint and Burn.
Link to this function

create_token(create_token_params_list, fee_payer_address, private_key, options \\ [])

View Source
@spec create_token(
  [create_token_params()],
  fee_payer_address(),
  private_key(),
  options()
) :: {:ok, map()} | {:error, map() | error_message()}

Creates tokens.

parameters

Parameters

  • create_token_params_list: List of create token params
  • fee_payer_address: Fee payer address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
    • message (optional, string): Message to be included in transaction.
    • disable_token_mint_and_burn (optional, boolean): Disable Token Mint and Burn.
Link to this function

derive_account_identifier(public_key, options \\ [])

View Source
@spec derive_account_identifier(public_key(), options()) ::
  {:ok, map()} | {:error, map() | error_message()}

Gets the account address associated with the given public key.

parameters

Parameters

  • public_key: Public key
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
Link to this function

derive_token_identifier(public_key, symbol, options \\ [])

View Source
@spec derive_token_identifier(public_key(), symbol(), options()) ::
  {:ok, map()} | {:error, map() | error_message()}

Gets the Radix Resource Identifier of a token with the given symbol, created by an account with the given public key.

parameters

Parameters

  • public_key: Public key
  • symbol: Token symbol
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
Link to this function

derive_validator_identifier(public_key, options \\ [])

View Source
@spec derive_validator_identifier(public_key(), options()) ::
  {:ok, map()} | {:error, map() | error_message()}

Gets the validator address associated with the given public key.

parameters

Parameters

  • public_key: Public key
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
Link to this function

finalize_transaction(unsigned_transaction, signature_public_key, signature_bytes, options \\ [])

View Source
@spec finalize_transaction(
  unsigned_transaction(),
  signature_public_key(),
  signature_bytes(),
  options()
) ::
  {:ok, map()} | {:error, map() | error_message()}

Gets a signed transaction payload and transaction identifier, from an unsigned transaction payload and signature.

parameters

Parameters

  • unsigned_transaction: Unsigned transaction
  • signature_public_key: Public key that will sign transaction
  • signature_bytes: Bytes of signature
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • submit (optional, boolean): If true, the transaction is immediately submitted after finalization.
Link to this function

get_account_balances(address, options \\ [])

View Source
@spec get_account_balances(address(), options()) ::
  {:ok, map()} | {:error, map() | error_message()}

Gets an account's available and staked token balances.

parameters

Parameters

  • address: Radix address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
Link to this function

get_account_transactions(address, options \\ [])

View Source
@spec get_account_transactions(address(), options()) ::
  {:ok, map()} | {:error, map() | error_message()}

Gets user-initiated transactions involving the given account address which have been succesfully committed to the ledger.

parameters

Parameters

  • address: Radix address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
    • cursor (optional, string): Cursor allows forward pagination, by providing the cursor from the previous request.
    • limit (optional, integer): Page size requested. The maximum value is 30 at present.

Gets the Gateway API version, network and current ledger state.

parameters

Parameters

  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
Link to this function

get_native_token_info(options \\ [])

View Source
@spec get_native_token_info(options()) ::
  {:ok, map()} | {:error, map() | error_message()}

Gets information about xrd, including its Radix Resource Identifier.

parameters

Parameters

  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
Link to this function

get_stake_positions(address, options \\ [])

View Source
@spec get_stake_positions(address(), options()) ::
  {:ok, map()} | {:error, map() | error_message()}

Gets the xrd which the account has in pending and active delegated stake positions with validators.

parameters

Parameters

  • address: Radix address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
Link to this function

get_token_info(rri, options \\ [])

View Source
@spec get_token_info(rri(), options()) ::
  {:ok, map()} | {:error, map() | error_message()}

Gets information about any token, given its Radix Resource Identifier.

parameters

Parameters

  • rri: Radix Resource Identifier
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
Link to this function

get_transaction_rules(options \\ [])

View Source
@spec get_transaction_rules(options()) ::
  {:ok, map()} | {:error, map() | error_message()}

Gets the current rules used to build and validate transactions in the Radix Engine.

parameters

Parameters

  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
Link to this function

get_transaction_status(transaction_hash, options \\ [])

View Source
@spec get_transaction_status(transaction_hash(), options()) ::
  {:ok, map()} | {:error, map() | error_message()}

Gets the status and contents of the transaction with the given transaction identifier.

parameters

Parameters

  • transaction_hash: Transaction hash
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
Link to this function

get_unstake_positions(address, options \\ [])

View Source
@spec get_unstake_positions(address(), options()) ::
  {:ok, map()} | {:error, map() | error_message()}

Gets the xrd which the account has in pending and temporarily-locked delegated unstake positions with validators.

parameters

Parameters

  • address: Radix address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
Link to this function

get_validator(address, options \\ [])

View Source
@spec get_validator(address(), options()) ::
  {:ok, map()} | {:error, map() | error_message()}

Gets information about a validator, given a validator address.

parameters

Parameters

  • address: Radix address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
Link to this function

get_validator_stakes(address, options \\ [])

View Source
@spec get_validator_stakes(address(), options()) ::
  {:ok, map()} | {:error, map() | error_message()}

Gets paginated results about the delegated stakes from accounts to a validator.

parameters

Parameters

  • address: Radix address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
    • cursor (optional, string): Cursor allows forward pagination, by providing the cursor from the previous request.
    • limit (optional, integer): Page size requested. The maximum value is 30 at present.
Link to this function

get_validators(options \\ [])

View Source
@spec get_validators(options()) :: {:ok, map()} | {:error, map() | error_message()}

Gets information about all validators.

parameters

Parameters

  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
Link to this function

mint_tokens(mint_tokens_params_list, fee_payer_address, private_key, options \\ [])

View Source
@spec mint_tokens(
  [mint_tokens_params()],
  fee_payer_address(),
  private_key(),
  options()
) :: {:ok, map()} | {:error, map() | error_message()}

Mint tokens.

parameters

Parameters

  • mint_tokens_params_list: List of mint tokens params
  • fee_payer_address: Fee payer address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
    • message (optional, string): Message to be included in transaction.
    • disable_token_mint_and_burn (optional, boolean): Disable Token Mint and Burn.
Link to this function

register_validator(validator_addresses_list, fee_payer_address, private_key, options \\ [])

View Source
@spec register_validator(
  [validator_address()],
  fee_payer_address(),
  private_key(),
  options()
) :: {:ok, map()} | {:error, map() | error_message()}

Register validators.

parameters

Parameters

  • validator_addresses_list: List of validator addresses
  • fee_payer_address: Fee payer address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
    • message (optional, string): Message to be included in transaction.
    • disable_token_mint_and_burn (optional, boolean): Disable Token Mint and Burn.
Link to this function

stake_tokens(stake_tokens_params_list, fee_payer_address, private_key, options \\ [])

View Source
@spec stake_tokens(
  [stake_tokens_params()],
  fee_payer_address(),
  private_key(),
  options()
) :: {:ok, map()} | {:error, map() | error_message()}

Stakes tokens.

parameters

Parameters

  • stake_tokens_params_list: List of stake tokens params
  • fee_payer_address: Fee payer address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
    • message (optional, string): Message to be included in transaction.
    • disable_token_mint_and_burn (optional, boolean): Disable Token Mint and Burn.
Link to this function

submit_transaction(signed_transaction, options \\ [])

View Source
@spec submit_transaction(signed_transaction(), options()) ::
  {:ok, map()} | {:error, map() | error_message()}

Submits a signed transaction payload to the network.

parameters

Parameters

  • signed_transaction: Signed transaction
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
Link to this function

transfer_tokens(transfer_tokens_params_list, fee_payer_address, private_key, options \\ [])

View Source
@spec transfer_tokens(
  [transfer_tokens_params()],
  fee_payer_address(),
  private_key(),
  options()
) :: {:ok, map()} | {:error, map() | error_message()}

Transfers tokens.

parameters

Parameters

  • transfer_tokens_params_list: List of transfer tokens params
  • fee_payer_address: Fee payer address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
    • message (optional, string): Message to be included in transaction.
    • disable_token_mint_and_burn (optional, boolean): Disable Token Mint and Burn.
Link to this function

unregister_validator(validator_addresses_list, fee_payer_address, private_key, options \\ [])

View Source
@spec unregister_validator(
  [validator_address()],
  fee_payer_address(),
  private_key(),
  options()
) :: {:ok, map()} | {:error, map() | error_message()}

Unregister validators.

parameters

Parameters

  • validator_addresses_list: List of validator addresses
  • fee_payer_address: Fee payer address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
    • message (optional, string): Message to be included in transaction.
    • disable_token_mint_and_burn (optional, boolean): Disable Token Mint and Burn.
Link to this function

unstake_tokens(unstake_tokens_params_list, fee_payer_address, private_key, options \\ [])

View Source
@spec unstake_tokens(
  [unstake_tokens_params()],
  fee_payer_address(),
  private_key(),
  options()
) :: {:ok, map()} | {:error, map() | error_message()}

Unstakes tokens.

parameters

Parameters

  • unstake_tokens_params_list: List of unstake tokens params
  • fee_payer_address: Fee payer address
  • options: Keyword list that contains
    • api: Keyword list that contains
      • url (optional, string): If url is not in options then the url set in the configs will be used.
      • any other options one may want to pass along to the http layer - for example headers
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • version (optional, integer): Version key in at_state_identifier map.
    • timestamp (optional, string): Timestamp key in at_state_identifier map.
    • epoch (optional, integer): Epoch key in at_state_identifier map.
    • round (optional, integer): Round key in at_state_identifier map.
    • message (optional, string): Message to be included in transaction.
    • disable_token_mint_and_burn (optional, boolean): Disable Token Mint and Burn.
    • amount (optional, string): Amount to unstake.
    • unstake_percentage (optional, integer): Percentage of currently staked XRD to unstake.