/network/options

POST https://rosetta.s0.b.hmny.io/network/options

Overview

This endpoint returns the version information and allowed network-specific types for a shard's NetworkIdentifier on Harmony.
Note that not all shards support the same types/options.

Reference Rosetta Documentation

Harmony Specific Documentation

Version information:

  • rosetta_version is the spec version that the node currently implements.
  • node_version is the version of the node program that is running the Rosetta service.

The 'allowed' types for the Harmony network:

  • operation_types contains all the operations that can be done on the Harmony network:

    Operation TypeDiscriptionSupported Shard
    GasAll submitted transactions will incur an implicit gas operation. However, some on-chain effects (such as undelegation payout, or cross-shard transaction payout) will not incur gas as it was paid by the submitted transaction that caused said effect.All
    NativeTransferThis operation is for transferring native ONE tokens from one account to another in the same shard. All NativeTransfer operations come in pairs, one operation deducting an amount from an account, and the other operation crediting said amount to an account. Moreover, the 2 operations are related in one (and only one) direction.All
    NativeCrossShardTransferhis operation is for transferring native ONE tokens between different shards. Note that cross-shard transfer operations appear in pairs, but not in the same transaction/block. The first appearance will be on the submitted transaction on the source/from shard. The second appearance will be on the destination/to shard.All
    ContractCreationThis operation creates/instantiates a smart contract. All ContractCreation operations come in pairs, one operation deducting the native ONE tokens from the sender's account, the other operation crediting said amount to the contract's account (as dictated by the contract instantiation code).All
    GenesisThis is a special operation that is only valid for block 0. It indicates the initial funds of the shard.All
    UndelegationPayoutThis is a special operation that is only present on the last block of an Epoch. It represents any delegated/locked native ONE tokens that are refunded to an account.Beacon (0)
    CreateValidatorThis operation creates a validator on the Harmony network for the sender's account.Beacon (0)
    EditValidatorThis operation edits the sender's validator information or election status (i.e: validator name and/or being eligible for election).Beacon (0)
    DelegateThis operation delegates (or re-delegates from pending undelegations) native ONE tokens from the sender's account to a validator's account.Beacon (0)
    UndelegateThis operation removes delegation from a validator. Note that this operation does not immediately unlock the sender's tokens.Beacon (0)
    CollectRewardsThis operation credits all the staking rewards to the sender's account.Beacon (0)
  • operation_statuses contains all of the on-chain status for any of the operation_types on Harmony:

    StatusDiscription
    successThis indicates that the transaction's operation and associated EVM code was executed successfully.
    contract_failureThis indicates that the smart contract code associated with a transaction's operation failed to execute.
    failureThis indicates that a transaction's operation (not related to smart contract) failed.
  • errors contains all of the supported Rosetta errors:

    CodeDiscription
    0Catch all/fallback errors.
    1Sanity check errors.
    2Invalid network errors.
    3Plain transaction submission errors.
    4Staking transaction submission errors.
    5Block not found errors.
    6Plain or staking transaction not found errors.
    7Receipt not found errors.
    8Singing curve type not supported errors.
    9Invalid transaction construction errors.
  • historical_balance_lookup is only true for nodes running in archival mode.

Request Body

{"network_identifier"=>{"blockchain"=>"Harmony", "network"=>"Testnet", "sub_network_identifier"=>{"network"=>"shard 1", "metadata"=>{"is_beacon"=>false}}}}

RESPONSES

status: OK

{"version":{"rosetta_version":"1.4.6","node_version":"Harmony (C) 2020. harmony, version v6478-v2.3.7-121-g46bbe894 (jenkins@ 2020-10-28T12:53:59+0000)"},"allow":{"operation_statuses":[{"status":"success","successful":true},{"status":"failure","successful":false},{"status":"contract_failure","successful":false}],"operation_types":["Gas","NativeTransfer","NativeCrossShardTransfer","ContractCreation","Genesis","PreStakingBlockReward","UndelegationPayout","CreateValidator","EditValidator","Delegate","Undelegate","CollectRewards"],"errors":[{"code":0,"message":"catch all error","retriable":false},{"code":1,"message":"sanity check error","retriable":false},{"code":2,"message":"invalid network error","retriable":false},{"code":3,"message":"transaction submission error","retriable":true},{"code":5,"message":"block not found error","retriable":false},{"code":6,"message":"transaction or staking transaction not found","retriable":false},{"code":7,"message":"receipt not found","retriable":false},{"code":8,"message":"unsupported curve type","retriable":false},{"code":9,"message":"invalid transaction construction","retriable":false},{"code":4,"message":"staking transaction submission error","retriable":true}],"historical_balance_lookup":true}}