View Source Radixir.Core (radixir v0.0.4)

Provides high level interaction with the Core API.

Link to this section Summary

Functions

Builds amount map in operation where resource type is stake unit.

Builds amount map in operation where resource type is token.

Builds data map in operation where data object type is EpochData.

Builds data map in operation where data object type is PreparedValidatorFee.

Builds data map in operation where data object type is PreparedValidatorOwner.

Builds data map in operation where data object type is TokenMetaData.

Builds data map in operation where data object type is RoundData.

Builds data map in operation where data object type is TokenData.

Builds data map in operation where data object type is TokenMetaData.

Builds data map in operation where data object type is UnclaimedRadixEngineAddress.

Builds data map in operation where data object type is ValidatorAllowDelegation.

Builds data map in operation where data object type is ValidatorBFTData.

Builds data map in operation where data object type is ValidatorData.

Builds data map in operation where data object type is ValidatorMetadata.

Builds data map in operation where data object type is ValidatorSystemMetadata.

Builds entity identifier map in operation.

Builds an operation group.

Builds metadata map in operation.

Builds type map in an operation.

Derives PreparedUnstakes entity identifier.

Gets mempool transactions.

Gets network configuration.

Gets network status.

Gets public keys.

Link to this section Types

@type action() :: String.t()
@type address() :: String.t()
@type allow_delegation() :: boolean()
@type amount() :: String.t()
@type data() :: String.t()
@type epoch() :: integer()
@type epoch_unlock() :: integer()
@type error_message() :: String.t()
@type fee() :: integer()
@type fee_payer_address() :: String.t()
@type granularity() :: integer()
@type is_mutable() :: boolean()
@type name() :: String.t()
@type operation_groups() :: list()
@type options() :: keyword()
@type private_key() :: String.t()
@type proposals_completed() :: integer()
@type proposals_missed() :: integer()
@type public_key() :: String.t()
@type registered() :: boolean()
@type round() :: integer()
@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() :: boolean()
@type signed_transaction() :: String.t()
@type state_version() :: integer()
@type substate_data_hex() :: String.t()
@type substate_identifier() :: String.t()
@type substate_operation() :: String.t()
@type symbol() :: String.t()
@type timestamp() :: integer()
@type transaction() :: String.t()
@type transaction_hash() :: String.t()
@type type() :: String.t()
Link to this type

unsigned_transaction()

View Source
@type unsigned_transaction() :: String.t()
@type url() :: String.t()
@type validator_address() :: String.t()

Link to this section Functions

Link to this function

build_operation(type, entity_identifier, options \\ [])

View Source

Builds an operation.

parameters

Parameters

  • type: Type map.
  • entity_identifier: Entity identifier map.
  • options: Keyword list that contains
    • substate (optional, map): Substate map.
    • amount (optional, map): Amount map.
    • data (optional, map): Data map.
    • metadata (optional, map): Metadata map.
Link to this function

build_operation_amount_stake_unit(amount, validator_address)

View Source
@spec build_operation_amount_stake_unit(amount(), validator_address()) :: map()

Builds amount map in operation where resource type is stake unit.

parameters

Parameters

  • amount: Amount.
  • validator_address: Validator addres.
Link to this function

build_operation_amount_token(amount, rri)

View Source
@spec build_operation_amount_token(amount(), rri()) :: map()

Builds amount map in operation where resource type is token.

parameters

Parameters

  • amount: Amount.
  • rri: Token rri.
Link to this function

build_operation_data_epoch_data(action, epoch)

View Source
@spec build_operation_data_epoch_data(action(), epoch()) :: map()

Builds data map in operation where data object type is EpochData.

parameters

Parameters

  • action: Action - can be "CREATE" or "DELETE".
  • epoch: Epoch
Link to this function

build_operation_data_prepared_validator_fee(action, fee, options \\ [])

View Source
@spec build_operation_data_prepared_validator_fee(action(), fee(), options()) :: map()

Builds data map in operation where data object type is PreparedValidatorFee.

parameters

Parameters

  • action: Action - can be "CREATE" or "DELETE".
  • fee: Validator fee.
  • options: Keyword list that contains
    • epoch (optional, integer): Epoch.
Link to this function

build_operation_data_prepared_validator_owner(action, address, options \\ [])

View Source
@spec build_operation_data_prepared_validator_owner(action(), address(), options()) ::
  map()

Builds data map in operation where data object type is PreparedValidatorOwner.

parameters

Parameters

  • action: Action - can be "CREATE" or "DELETE".
  • address: Owner address
  • options: Keyword list that contains
    • sub_entity_address (optional, string): Sub entity address.
    • validator_address (optional, string): Validator address.
    • epoch_unlock (optional, integer): Epoch unlock.
Link to this function

build_operation_data_prepared_validator_registered(action, registered, options \\ [])

View Source
@spec build_operation_data_prepared_validator_registered(
  action(),
  registered(),
  options()
) :: map()

Builds data map in operation where data object type is TokenMetaData.

parameters

Parameters

  • action: Action - can be "CREATE" or "DELETE".
  • symbol: Token symbol
  • options: Keyword list that contains
    • epoch (options, integer): Epoch.
Link to this function

build_operation_data_round_data(action, round, timestamp)

View Source
@spec build_operation_data_round_data(action(), round(), timestamp()) :: map()

Builds data map in operation where data object type is RoundData.

parameters

Parameters

  • action: Action - can be "CREATE" or "DELETE".
  • round: Round
  • timestamp: Timestamp
Link to this function

build_operation_data_token_data(action, granularity, is_mutable, options \\ [])

View Source
@spec build_operation_data_token_data(
  action(),
  granularity(),
  is_mutable(),
  options()
) :: map()

Builds data map in operation where data object type is TokenData.

parameters

Parameters

  • action: Action - can be "CREATE" or "DELETE".
  • granularity: Granularity
  • is_mutable: If the token is mutable.
  • options: Keyword list that contains
    • address (optional, string): Owner address
    • sub_entity_address (optional, string): Sub entity address.
    • validator_address (optional, string): Validator address.
    • epoch_unlock (optional, integer): Epoch unlock.
Link to this function

build_operation_data_token_metadata(action, symbol, options \\ [])

View Source
@spec build_operation_data_token_metadata(action(), symbol(), options()) :: map()

Builds data map in operation where data object type is TokenMetaData.

parameters

Parameters

  • action: Action - can be "CREATE" or "DELETE".
  • symbol: Token symbol
  • options: Keyword list that contains
    • name (optional, string): Token name.
    • description (optional, string): Token description.
    • url (optional, string): Token url.
    • icon_url (optional, string): Token icon_url.
Link to this function

build_operation_data_unclaimed_radix_engine_address(action)

View Source
@spec build_operation_data_unclaimed_radix_engine_address(action()) :: map()

Builds data map in operation where data object type is UnclaimedRadixEngineAddress.

parameters

Parameters

  • action: Action - can be "CREATE" or "DELETE".
Link to this function

build_operation_data_validator_allow_delegation(action, allow_delegation)

View Source
@spec build_operation_data_validator_allow_delegation(action(), allow_delegation()) ::
  map()

Builds data map in operation where data object type is ValidatorAllowDelegation.

parameters

Parameters

  • action: Action - can be "CREATE" or "DELETE".
  • allow_delegation: If validator allows delegation.
Link to this function

build_operation_data_validator_bft_data(action, proposals_completed, proposals_missed)

View Source
@spec build_operation_data_validator_bft_data(
  action(),
  proposals_completed(),
  proposals_missed()
) ::
  map()

Builds data map in operation where data object type is ValidatorBFTData.

parameters

Parameters

  • action: Action - can be "CREATE" or "DELETE".
  • proposals_completed: Number of completed proposals by this validator as a leader in the current epoch.
  • proposals_missed: Number of missed proposals by this validator as a leader in the current epoch.
Link to this function

build_operation_data_validator_data(action, address, registered, fee, options \\ [])

View Source
@spec build_operation_data_validator_data(
  action(),
  address(),
  registered(),
  fee(),
  options()
) :: map()

Builds data map in operation where data object type is ValidatorData.

parameters

Parameters

  • action: Action - can be "CREATE" or "DELETE".
  • address: Owner address
  • registered: If validator is registered or not.
  • fee: Validator fee.
  • options: Keyword list that contains
    • sub_entity_address (optional, string): Sub entity address.
    • validator_address (optional, string): Validator address.
    • epoch_unlock (optional, integer): Epoch unlock.
Link to this function

build_operation_data_validator_metadata(action, name, url)

View Source
@spec build_operation_data_validator_metadata(action(), name(), url()) :: map()

Builds data map in operation where data object type is ValidatorMetadata.

parameters

Parameters

  • action: Action - can be "CREATE" or "DELETE".
  • name: Validator name.
  • url: Validator url.
Link to this function

build_operation_data_validator_system_metadata(action, data)

View Source
@spec build_operation_data_validator_system_metadata(action(), data()) :: map()

Builds data map in operation where data object type is ValidatorSystemMetadata.

parameters

Parameters

  • action: Action - can be "CREATE" or "DELETE".
  • data: Hex encoded byte array.
Link to this function

build_operation_entity_identifier(address, options \\ [])

View Source
@spec build_operation_entity_identifier(address(), options()) :: map()

Builds entity identifier map in operation.

parameters

Parameters

  • address: Radix address.
  • options: Keyword list that contains
    • sub_entity_address (optional, string): Sub entity address.
    • validator_address (optional, string): Validator address.
    • epoch_unlock (optional, integer): Epoch unlock.
Link to this function

build_operation_group(operations)

View Source
@spec build_operation_group([map()]) :: map()

Builds an operation group.

parameters

Parameters

  • operations: List of operation maps.
Link to this function

build_operation_metadata(substate_data_hex)

View Source
@spec build_operation_metadata(substate_data_hex()) :: map()

Builds metadata map in operation.

parameters

Parameters

  • substate_data_hex: Substate data hex.
Link to this function

build_operation_substate(substate_operation, substate_identifier)

View Source
@spec build_operation_substate(substate_operation(), substate_identifier()) :: map()

Builds substate map in operation.

parameters

Parameters

  • substate_operation: Substate operation - can be "BOOTUP" or "SHUTDOWN".
  • substate_identifier: Substate identifier
Link to this function

build_operation_type(type)

View Source
@spec build_operation_type(type()) :: map()

Builds type map in an operation.

parameters

Parameters

  • type: Can be Resource, Data, or ResourceAndData.
Link to this function

build_transaction(operation_groups, fee_payer_address, options \\ [])

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

Builds a transaction.

parameters

Parameters

  • operation_groups: Operation groups.
  • 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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • sub_entity_address (optional, string): Sub entity address.
    • validator_address (optional, string): Validator address.
    • epoch_unlock (optional, integer): Epoch unlock.
    • message (optional, string): Message to be included in transaction.
    • disable_resource_allocate_and_destroy (optional, boolean): Disable resource allocate and destroy.

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

Link to this function

derive_account_entity_identifier(public_key, options \\ [])

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

Derives Account entity identifier.

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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

Link to this function

derive_exiting_unstakes_entity_identifier(public_key, validator_address, epoch_unlock, options \\ [])

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

Derives ExitingUnstakes entity identifier.

parameters

Parameters

  • public_key: Public key.
  • validator_address: Radix address.
  • epoch_unlock: Epoch unlock.
  • 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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • sub_entity_address (optional, string): Sub entity address.
    • validator_address (optional, string): Validator address.
    • epoch_unlock (optional, integer): Epoch unlock.

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

Link to this function

derive_prepared_stakes_entity_identifier(public_key, validator_address, options \\ [])

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

Derives PreparedStakes entity identifier.

parameters

Parameters

  • public_key: Public key.
  • validator_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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • sub_entity_address (optional, string): Sub entity address.
    • validator_address (optional, string): Validator address.
    • epoch_unlock (optional, integer): Epoch unlock.

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

Link to this function

derive_prepared_unstakes_entity_identifier(public_key, options \\ [])

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

Derives PreparedUnstakes entity identifier.

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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

Link to this function

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

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

Derives Token entity identifier.

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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

Link to this function

derive_validator_entity_identifier(public_key, options \\ [])

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

Derives Validator entity identifier.

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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

Link to this function

derive_validator_system_entity_identifier(public_key, options \\ [])

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

Derives ValidatorSystem entity identifier.

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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

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()}

Finalizes a transaction.

parameters

Parameters

  • unsigned_transaction: Unsigned ransaction.
  • signature_public_key: Signature public key.
  • signature_bytes: Signature bytes.
  • 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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

Link to this function

get_committed_transactions(state_version, options \\ [])

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

Gets committed transactions.

parameters

Parameters

  • state_version: State version.
  • 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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • transaction_accumulator (optional, string): Transaction accumulator in state identifier map.
    • limit (optional, integer): Maximum number of transactions that will be returned.

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

Link to this function

get_entity_information(address, options \\ [])

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

Gets entity information.

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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • sub_entity_address (optional, string): Sub entity address.
    • validator_address (optional, string): Validator address.
    • epoch_unlock (optional, integer): Epoch unlock.

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

Link to this function

get_mempool_transaction(transaction_hash, options \\ [])

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

Gets mempool transaction.

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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

Link to this function

get_mempool_transactions(options \\ [])

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

Gets mempool transactions.

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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

Link to this function

get_network_configuration(options \\ [])

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

Gets network configuration.

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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

Link to this function

get_network_status(options \\ [])

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

Gets network status.

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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

Link to this function

get_public_keys(options \\ [])

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

Gets public keys.

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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

Link to this function

get_transaction_hash(signed_transaction, options \\ [])

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

Gets transaction hash.

parameters

Parameters

  • signed_transaction: Signed ransaction.
  • 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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

Link to this function

parse_transaction(transaction, signed, options \\ [])

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

Parses a transaction.

parameters

Parameters

  • transaction: Transaction to parse.
  • signed: Whether the transaction is signed or not.
  • 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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

Link to this function

send_transaction(operation_groups, fee_payer_address, private_key, options \\ [])

View Source
@spec send_transaction(
  operation_groups(),
  fee_payer_address(),
  private_key(),
  options()
) :: {:ok, map()} | {:error, map() | error_message()}

Sends a transaction.

parameters

Parameters

  • operation_groups: Operation groups.
  • fee_payer_address: Fee payer address.
  • private_key: Private key to sign 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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().
    • sub_entity_address (optional, string): Sub entity address.
    • validator_address (optional, string): Validator address.
    • epoch_unlock (optional, integer): Epoch unlock.
    • message (optional, string): Message to be included in transaction.
    • disable_resource_allocate_and_destroy (optional, boolean): Disable resource allocate and destroy.

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

Link to this function

sign_transaction(unsigned_transaction, public_key, options \\ [])

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

Signs a transaction.

parameters

Parameters

  • unsigned_transaction: Unsigned Transaction.
  • 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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.

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 transaction.

parameters

Parameters

  • signed_transaction: Signed ransaction.
  • 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
      • auth_index (optional, integer): Index of the username + password combo to be used for endpoint authentication.
      • username: (optional, string): Username to be used for endpoint authentication.
      • password: (optional, string): Password to be used for endpoint authentication.
    • network (optional, string): If network is not in options it will default to what is returned from Radixir.Config.network().

note

Note

  • Either username and password or auth_index must be provided.
  • If all three are provided auth_index is used.

If the following usernames and passwords are exported as follows:

export USERNAMES='admin, superadmin, metrics'
export PASSWORDS='funny cats very Jack 21!, harry Kack love h39! LW, monitor Kat darrel 23 Jack!'

then an auth_index of 0 would result in admin being used as the username and funny cats very Jack 21! being used as the password.