server

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2025 License: GPL-3.0 Imports: 33 Imported by: 0

README

EVMStaking Module

GetEVMStakingParams

URL: [GET] /evmstaking/params

Response Example
{
  "code": 200,
  "msg": {
    "params": {
      "max_withdrawal_per_block": 32,
      "max_sweep_per_block": 128,
      "min_partial_withdrawal_amount": "10000000",
      "ubi_withdraw_address": "0xcccccc0000000000000000000000000000000002"
    }
  },
  "error": ""
}

GetOperatorAddress

URL: [GET] /evmstaking/delegators/{delegator_address}/operator_address

Path Params
Name Type Example Required
delegator_address string 0x00a842dbd3d11176b4868dd753a552b8919d5a63

GetWithdrawAddress

URL: [GET] /evmstaking/delegators/{delegator_address}/withdraw_address

Path Params
Name Type Example Required
delegator_address string 0x00a842dbd3d11176b4868dd753a552b8919d5a63

GetRewardAddress

URL: [GET] /evmstaking/delegators/{delegator_address}/reward_address

Path Params
Name Type Example Required
delegator_address string 0x00a842dbd3d11176b4868dd753a552b8919d5a63

Staking Module

GetStakingParams

URL: [GET] /staking/params

Response Example
{
  "code": 200,
  "msg": {
    "params": {
      "unbonding_time": "10000000000",
      "max_validators": 32,
      "max_entries": 14,
      "historical_entries": 10000,
      "bond_denom": "stake",
      "min_commission_rate": "0.000000000000000000",
      "min_delegation": "1024",
      "periods": [
        {
          "duration": "0",
          "rewards_multiplier": "1.000000000000000000"
        },
        {
          "period_type": 1,
          "duration": "60000000000",
          "rewards_multiplier": "1.051000000000000000"
        },
        {
          "period_type": 2,
          "duration": "120000000000",
          "rewards_multiplier": "1.160000000000000000"
        },
        {
          "period_type": 3,
          "duration": "180000000000",
          "rewards_multiplier": "1.340000000000000000"
        }
      ],
      "token_types": [
        {
          "rewards_multiplier": "0.500000000000000000"
        },
        {
          "token_type": 1,
          "rewards_multiplier": "1.000000000000000000"
        }
      ]
    }
  },
  "error": ""
}

GetStakingPool

URL: [GET] /staking/pool

Response Example
{
  "code": 200,
  "msg": {
    "pool": {
      "not_bonded_tokens": "76461600000000",
      "bonded_tokens": "80110471008000000"
    }
  },
  "error": ""
}

GetHistoricalInfoByHeight

URL: [GET] /staking/historical_info/{height}

Path Params
Name Type Example Required
height integer 1

GetValidators

URL: [GET] /staking/validators

Query Params
Name Type Example Required
pagination.key string FPoybu9dO+FCSV562u9keKVgUwur
pagination.offset string 0
pagination.limit string 10
pagination.count_total boolean true
pagination.reverse boolean true
status string 3
Response Example
{
  "code": 200,
  "msg": {
    "validators": [
      {
        "operator_address": "0x00a842dbd3d11176b4868dd753a552b8919d5a63",
        "consensus_pubkey": {
          "type": "tendermint/PubKeySecp256k1",
          "value": "AvLo+lkg0UWozoI+pJzv1a7upt+HaMxZCdWgRxvZ8Cb1"
        },
        "status": 3,
        "tokens": "1000000",
        "delegator_shares": "1000000.000000000000000000",
        "description": {
          "moniker": "0x0FC41199CE588948861A8DA86D725A5A073AE91A"
        },
        "unbonding_time": "1970-01-01T00:00:00Z",
        "commission": {
          "commission_rates": {
            "rate": "0.070000000000000000",
            "max_rate": "0.100000000000000000",
            "max_change_rate": "0.010000000000000000"
          },
          "update_time": "2024-04-16T11:04:40.60280319Z"
        },
        "min_self_delegation": "1024000000000",
        "support_token_type": 1,
        "rewards_tokens": "1000000.000000000000000000",
        "delegator_rewards_shares": "1000000.000000000000000000"
      },
      {
        "operator_address": "0x13665369a8ad5163f0c023839323b5d015925de1",
        "consensus_pubkey": {
          "type": "tendermint/PubKeySecp256k1",
          "value": "AlZ/RRQCXVnTPjZWqxXdaZ0X0ZvJvJRDHu1R4UpgwzXl"
        },
        "status": 3,
        "tokens": "1000000",
        "delegator_shares": "1000000.000000000000000000",
        "description": {
          "moniker": "0x99C28AE30CBEFEFF75E91C66692FE0BD9279B861"
        },
        "unbonding_time": "1970-01-01T00:00:00Z",
        "commission": {
          "commission_rates": {
            "rate": "0.070000000000000000",
            "max_rate": "0.100000000000000000",
            "max_change_rate": "0.010000000000000000"
          },
          "update_time": "2024-04-16T11:04:40.60280319Z"
        },
        "min_self_delegation": "1024000000000",
        "support_token_type": 1,
        "rewards_tokens": "1000000.000000000000000000",
        "delegator_rewards_shares": "1000000.000000000000000000"
      },
      {
        "operator_address": "0x87f3cc50c84005f7130d37b849f6a71e05a8bf1f",
        "consensus_pubkey": {
          "type": "tendermint/PubKeySecp256k1",
          "value": "AzUWGMooEM92H8RCIOqXbjtbeur+2rOzgP9T/umnf1eA"
        },
        "status": 3,
        "tokens": "1000000",
        "delegator_shares": "1000000.000000000000000000",
        "description": {
          "moniker": "0x9DFC26A7662106EEEC5E87B20CBB690CFCE73A05"
        },
        "unbonding_time": "1970-01-01T00:00:00Z",
        "commission": {
          "commission_rates": {
            "rate": "0.070000000000000000",
            "max_rate": "0.100000000000000000",
            "max_change_rate": "0.010000000000000000"
          },
          "update_time": "2024-04-16T11:04:40.60280319Z"
        },
        "min_self_delegation": "1024000000000",
        "support_token_type": 1,
        "rewards_tokens": "1000000.000000000000000000",
        "delegator_rewards_shares": "1000000.000000000000000000"
      },
      {
        "operator_address": "0xc47c28f925179089b6b7b1b336ac1f943b240066",
        "consensus_pubkey": {
          "type": "tendermint/PubKeySecp256k1",
          "value": "AqCVQjEtIzN9q5sMgSgl4dDD27vx6wa528lp9rjNKZE/"
        },
        "status": 3,
        "tokens": "1000000",
        "delegator_shares": "1000000.000000000000000000",
        "description": {
          "moniker": "0x768A39103B552E7AE56635DD4E9B55922AAFC504"
        },
        "unbonding_time": "1970-01-01T00:00:00Z",
        "commission": {
          "commission_rates": {
            "rate": "0.070000000000000000",
            "max_rate": "0.100000000000000000",
            "max_change_rate": "0.010000000000000000"
          },
          "update_time": "2024-04-16T11:04:40.60280319Z"
        },
        "min_self_delegation": "1024000000000",
        "support_token_type": 1,
        "rewards_tokens": "1000000.000000000000000000",
        "delegator_rewards_shares": "1000000.000000000000000000"
      }
    ],
    "pagination": {
      "total": "4"
    }
  },
  "error": ""
}

GetValidator

URL: [GET] /staking/validators/{validator_addr}

Path Params
Name Type Example Required
validator_addr string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
Response Example
{
  "code": 200,
  "msg": {
    "validator": {
      "operator_address": "0x00a842dbd3d11176b4868dd753a552b8919d5a63",
      "consensus_pubkey": {
        "type": "tendermint/PubKeySecp256k1",
        "value": "AvLo+lkg0UWozoI+pJzv1a7upt+HaMxZCdWgRxvZ8Cb1"
      },
      "status": 3,
      "tokens": "1000000",
      "delegator_shares": "1000000.000000000000000000",
      "description": {
        "moniker": "0x0FC41199CE588948861A8DA86D725A5A073AE91A"
      },
      "unbonding_time": "1970-01-01T00:00:00Z",
      "commission": {
        "commission_rates": {
          "rate": "0.070000000000000000",
          "max_rate": "0.100000000000000000",
          "max_change_rate": "0.010000000000000000"
        },
        "update_time": "2024-04-16T11:04:40.60280319Z"
      },
      "min_self_delegation": "1024000000000",
      "support_token_type": 1,
      "rewards_tokens": "1000000.000000000000000000",
      "delegator_rewards_shares": "1000000.000000000000000000"
    }
  },
  "error": ""
}

GetValidatorDelegations

URL: [GET] /staking/validators/{validator_addr}/delegations

Path Params
Name Type Example Required
validator_addr string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
Query Params
Name Type Example Required
pagination.key string FPoybu9dO+FCSV562u9keKVgUwur
pagination.offset string 0
pagination.limit string 10
pagination.count_total boolean true
pagination.reverse boolean true
Response Example
{
  "code": 200,
  "msg": {
    "delegation_responses": [
      {
        "delegation": {
          "delegator_address": "0x00a842dbd3d11176b4868dd753a552b8919d5a63",
          "validator_address": "0x00a842dbd3d11176b4868dd753a552b8919d5a63",
          "shares": "1000000.000000000000000000",
          "rewards_shares": "1000000.000000000000000000"
        },
        "balance": {
          "denom": "stake",
          "amount": "1000000"
        }
      }
    ],
    "pagination": {
      "total": "1"
    }
  },
  "error": ""
}

GetValidatorDelegation

URL: [GET] /staking/validators/{validator_addr}/delegations/{delegator_addr}

Path Params
Name Type Example Required
validator_addr string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
delegator_addr string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
Response Example
{
  "code": 200,
  "msg": {
    "delegation_response": {
      "delegation": {
        "delegator_address": "0x00a842dbd3d11176b4868dd753a552b8919d5a63",
        "validator_address": "0x00a842dbd3d11176b4868dd753a552b8919d5a63",
        "shares": "1000000.000000000000000000",
        "rewards_shares": "1000000.000000000000000000"
      },
      "balance": {
        "denom": "stake",
        "amount": "1000000"
      }
    }
  },
  "error": ""
}

GetValidatorPeriodDelegations

URL: [GET] /staking/validators/{validator_addr}/delegators/{delegator_addr}/period_delegations

Path Params
Name Type Example Required
validator_addr string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
delegator_addr string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
Query Params
Name Type Example Required
pagination.key string FPoybu9dO+FCSV562u9keKVgUwur
pagination.offset string 0
pagination.limit string 10
pagination.count_total boolean true
pagination.reverse boolean true
Response Example
{
  "code": 200,
  "msg": {
    "period_delegation_responses": [
      {
        "period_delegation": {
          "delegator_address": "0x00a842dbd3d11176b4868dd753a552b8919d5a63",
          "validator_address": "0x00a842dbd3d11176b4868dd753a552b8919d5a63",
          "period_delegation_id": "0",
          "shares": "1025000000000.000000000000000000",
          "rewards_shares": "1025000000000.000000000000000000",
          "end_time": "2024-10-23T08:48:00.313756096Z"
        },
        "balance": {
          "denom": "stake",
          "amount": "1025000000000.000000000000000000"
        }
      }
    ],
    "pagination": {
      "next_key": "FN80AOspT3VnYmzjLPoXTD2DEC9B",
      "total": "66"
    }
  },
  "error": ""
}

GetValidatorPeriodDelegation

URL: [GET] /staking/validators/{validator_addr}/delegators/{delegator_addr}/period_delegations/{period_delegation_id}

Path Params
Name Type Example Required
validator_addr string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
delegator_addr string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
period_delegation_id string 0
Response Example
{
  "code": 200,
  "msg": {
    "period_delegation_response": {
      "period_delegation": {
        "delegator_address": "0x00a842dbd3d11176b4868dd753a552b8919d5a63",
        "validator_address": "0x00a842dbd3d11176b4868dd753a552b8919d5a63",
        "period_delegation_id": "0",
        "shares": "1025000000000.000000000000000000",
        "rewards_shares": "1025000000000.000000000000000000",
        "end_time": "2024-10-23T08:48:00.313756096Z"
      },
      "balance": {
        "denom": "stake",
        "amount": "1025000000000.000000000000000000"
      }
    }
  },
  "error": ""
}

GetValidatorUnbondingDelegations

URL: [GET] /staking/validators/{validator_addr}/unbonding_delegations

Path Params
Name Type Example Required
validator_addr string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
Query Params
Name Type Example Required
pagination.key string FPoybu9dO+FCSV562u9keKVgUwur
pagination.offset string 0
pagination.limit string 10
pagination.count_total boolean true
pagination.reverse boolean true
Response Example
{
  "code": 200,
  "msg": {
    "unbonding_responses": [
      {
        "delegator_address": "0x00a842dbd3d11176b4868dd753a552b8919d5a63",
        "validator_address": "0x00a842dbd3d11176b4868dd753a552b8919d5a63",
        "entries": [
          {
            "creation_height": "525632",
            "completion_time": "2024-11-27T08:26:13.41935718Z",
            "initial_balance": "1024000000000",
            "balance": "1024000000000",
            "unbonding_id": "53"
          }
        ]
      }
    ],
    "pagination": {
      "total": "1"
    }
  },
  "error": ""
}

GetValidatorUnbondingDelegation

URL: [GET] /staking/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation

Path Params
Name Type Example Required
validator_addr string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
delegator_addr string 0x00a842dbd3d11176b4868dd753a552b8919d5a63

GetDelegatorValidators

URL: [GET] /staking/delegators/{delegator_addr}/validators

Path Params
Name Type Example Required
delegator_addr string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
Query Params
Name Type Example Required
pagination.key string FPoybu9dO+FCSV562u9keKVgUwur
pagination.offset string 0
pagination.limit array 10
pagination.count_total boolean true
pagination.reverse boolean true
Response Example
{
  "code": 200,
  "msg": {
    "validators": [
      {
        "operator_address": "0x00a842dbd3d11176b4868dd753a552b8919d5a63",
        "consensus_pubkey": {
          "type": "tendermint/PubKeySecp256k1",
          "value": "AvLo+lkg0UWozoI+pJzv1a7upt+HaMxZCdWgRxvZ8Cb1"
        },
        "status": 3,
        "tokens": "1000000",
        "delegator_shares": "1000000.000000000000000000",
        "description": {
          "moniker": "0x0FC41199CE588948861A8DA86D725A5A073AE91A"
        },
        "unbonding_time": "1970-01-01T00:00:00Z",
        "commission": {
          "commission_rates": {
            "rate": "0.070000000000000000",
            "max_rate": "0.100000000000000000",
            "max_change_rate": "0.010000000000000000"
          },
          "update_time": "2024-04-16T11:04:40.60280319Z"
        },
        "min_self_delegation": "1024000000000",
        "support_token_type": 1,
        "rewards_tokens": "1000000.000000000000000000",
        "delegator_rewards_shares": "1000000.000000000000000000"
      }
    ],
    "pagination": {
      "total": "1"
    }
  },
  "error": ""
}

GetDelegatorValidator

URL: [GET] /staking/delegators/{delegator_addr}/validators/{validator_addr}

Path Params
Name Type Example Required
delegator_addr string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
validator_addr string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
Response Example
{
  "code": 200,
  "msg": {
    "validator": {
      "operator_address": "0x00a842dbd3d11176b4868dd753a552b8919d5a63",
      "consensus_pubkey": {
        "type": "tendermint/PubKeySecp256k1",
        "value": "A3ljgjHsCTGAxbqOtMjkQ66DudEruUyCrXFgYkYI4geh"
      },
      "jailed": true,
      "status": 1,
      "tokens": "5722800000000",
      "delegator_shares": "6024000000000.000000000000000000",
      "description": {
        "moniker": "validator-04-create"
      },
      "unbonding_height": "4859",
      "unbonding_time": "2024-10-22T12:32:13.342436482Z",
      "commission": {
        "commission_rates": {
          "rate": "0.100000000000000000",
          "max_rate": "0.500000000000000000",
          "max_change_rate": "0.010000000000000000"
        },
        "update_time": "2024-10-22T12:16:08.070117612Z"
      },
      "min_self_delegation": "1024",
      "unbonding_ids": [
        "147"
      ],
      "support_token_type": 1,
      "rewards_tokens": "5772412800000.000000000000000000",
      "delegator_rewards_shares": "6076224000000.000000000000000000"
    }
  },
  "error": ""
}

GetDelegatorDelegations

URL: [GET] /staking/delegations/{delegator_addr}

Path Params
Name Type Example Required
delegator_addr string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
Query Params
Name Type Example Required
pagination.key string FPoybu9dO+FCSV562u9keKVgUwur
pagination.offset string 0
pagination.limit string 10
pagination.count_total boolean true
pagination.reverse boolean true
Response Example
{
  "code": 200,
  "msg": {
    "delegation_responses": [
      {
        "delegation": {
          "delegator_address": "0x00a842dbd3d11176b4868dd753a552b8919d5a63",
          "validator_address": "0x00a842dbd3d11176b4868dd753a552b8919d5a63",
          "shares": "1000000.000000000000000000",
          "rewards_shares": "1000000.000000000000000000"
        },
        "balance": {
          "denom": "stake",
          "amount": "1000000"
        }
      }
    ],
    "pagination": {
      "total": "1"
    }
  },
  "error": ""
}

GetDelegatorRedelegations

URL: [GET] /staking/delegators/{delegator_addr}/redelegations

Path Params
Name Type Example Required
delegator_addr string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
Query Params
Name Type Example Required
pagination.key string FPoybu9dO+FCSV562u9keKVgUwur
pagination.offset string 0
pagination.limit array 10
pagination.count_total boolean true
pagination.reverse boolean true
src_validator_addr string 0x87f3cc50c84005f7130d37b849f6a71e05a8bf1f
dst_validator_addr string 0xc47c28f925179089b6b7b1b336ac1f943b240066

GetDelegatorUnbondingDelegations

URL: [GET] /staking/delegators/{delegator_addr}/unbonding_delegations

Path Params
Name Type Example Required
delegator_addr string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
Query Params
Name Type Example Required
pagination.key string FPoybu9dO+FCSV562u9keKVgUwur
pagination.offset string 0
pagination.limit array 10
pagination.count_total boolean true
pagination.reverse boolean true

Auth Module

GetAuthParams

URL: [GET] /auth/params

Response Example
{
  "code": 200,
  "msg": {
    "params": {
      "max_memo_characters": "256",
      "tx_sig_limit": "7",
      "tx_size_cost_per_byte": "10",
      "sig_verify_cost_ed25519": "590",
      "sig_verify_cost_secp256k1": "1000"
    }
  },
  "error": ""
}

Bank Module

GetBankParams

URL: [GET] /bank/params

Response Example
{
  "code": 200,
  "msg": {
    "params": {}
  },
  "error": ""
}

GetSupplyByDenom

URL: [GET] /bank/supply/by_denom

Query Params
Name Type Example Required
denom string stake
Response Example
{
  "code": 200,
  "msg": {
    "amount": {
      "denom": "stake",
      "amount": "79748037587244392"
    }
  },
  "error": ""
}

GetBalancesByAddressDenom

URL: [GET] /bank/balances/{address}/by_denom

Path Params
Name Type Example Required
address string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
Query Params
Name Type Example Required
denom string stake
Response Example
{
  "code": 200,
  "msg": {
    "balance": {
      "denom": "stake",
      "amount": "50301746"
    }
  },
  "error": ""
}

GetSpendableBalancesByAddressDenom

URL: [GET] /bank/spendable_balances/{address}/by_denom

Path Params
Name Type Example Required
address string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
Query Params
Name Type Example Required
denom string stake
Response Example
{
  "code": 200,
  "msg": {
    "balance": {
      "denom": "stake",
      "amount": "50301746"
    }
  },
  "error": ""
}

Distribution Module

GetDistributionParams

URL: [GET] /distribution/params

Response Example
{
  "code": 200,
  "msg": {
    "params": {
      "ubi": "0.065000000000000000",
      "base_proposer_reward": "0.000000000000000000",
      "bonus_proposer_reward": "0.000000000000000000",
      "withdraw_addr_enabled": true
    }
  },
  "error": ""
}

GetValidatorCommissionByValidatorAddress

URL: [GET] /distribution/validators/{validator_address}/commission

Path Params
Name Type Example Required
validator_address string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
Response Example
{
  "code": 200,
  "msg": {
    "commission": {
      "commission": [
        {
          "denom": "stake",
          "amount": "11129810.318708930942711499"
        }
      ]
    }
  },
  "error": ""
}

GetValidatorOutstandingRewardsByValidatorAddress

URL: [GET] /distribution/validators/{validator_address}/outstanding_rewards

Path Params
Name Type Example Required
validator_address string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
Response Example
{
  "code": 200,
  "msg": {
    "rewards": {
      "rewards": [
        {
          "denom": "stake",
          "amount": "110356851.470660927219114823"
        }
      ]
    }
  },
  "error": ""
}

GetValidatorSlashesByValidatorAddress

URL: [GET] /distribution/validators/{validator_address}/slashes

Path Params
Name Type Example Required
validator_address string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
Query Params
Name Type Example Required
pagination.key string FPoybu9dO+FCSV562u9keKVgUwur
pagination.offset string 0
pagination.limit string 10
pagination.count_total boolean true
pagination.reverse boolean true
starting_height string 1
ending_height string 100
Response Example
{
  "code": 200,
  "msg": {
    "slashes": [],
    "pagination": {}
  },
  "error": ""
}

GetDistributionValidatorByValidatorAddress

URL: [GET] /distribution/validators/{validator_address}

Path Params
Name Type Example Required
validator_address string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
Response Example
{
  "code": 200,
  "msg": {
    "operator_address": "0x00a842dbd3d11176b4868dd753a552b8919d5a63",
    "self_bond_rewards": [
      {
        "denom": "stake",
        "amount": "82232804.757899250000000000"
      }
    ],
    "commission": [
      {
        "denom": "stake",
        "amount": "11129810.318708930942711499"
      }
    ]
  },
  "error": ""
}

GetDistributionValidatorsByDelegatorAddress

URL: [GET] /distribution/delegators/{delegator_address}/validators

Path Params
Name Type Example Required
delegator_address string story1f5zuqhmwy39cv64g6laeeg264ydz06txlfqtg3
Response Example
{
  "code": 200,
  "msg": {
    "validators": [
      "0x00a842dbd3d11176b4868dd753a552b8919d5a63"
    ]
  },
  "error": ""
}

GetDelegatorRewardsByDelegatorAddress

URL: [GET] /distribution/delegators/{delegator_address}/rewards

Path Params
Name Type Example Required
delegator_address string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
Response Example
{
  "code": 200,
  "msg": {
    "rewards": [
      {
        "validator_address": "0x00a842dbd3d11176b4868dd753a552b8919d5a63",
        "reward": [
          {
            "denom": "stake",
            "amount": "519497.220124590080000000"
          }
        ]
      }
    ],
    "total": [
      {
        "denom": "stake",
        "amount": "519497.220124590080000000"
      }
    ]
  },
  "error": ""
}

GetDelegatorRewardsByDelegatorAddressValidatorAddress

URL: [GET] /distribution/delegators/{delegator_address}/rewards/{validator_address}

Path Params
Name Type Example Required
delegator_address string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
validator_address string 0x00a842dbd3d11176b4868dd753a552b8919d5a63
Response Example
{
  "code": 200,
  "msg": {
    "rewards": [
      {
        "denom": "stake",
        "amount": "16994236.393259084134400000"
      }
    ]
  },
  "error": ""
}

Mint Module

GetMintParams

URL: [GET] /mint/params

Response Example
{
  "code": 200,
  "msg": {
    "params": {
      "mint_denom": "stake",
      "inflations_per_year": "24625000000000000.000000000000000000",
      "blocks_per_year": "10368000"
    }
  },
  "error": ""
}

Slashing Module

GetSlashingParams

URL: [GET] /slashing/params

Response Example
{
  "code": 200,
  "msg": {
    "params": {
      "signed_blocks_window": "200",
      "min_signed_per_window": "0.050000000000000000",
      "downtime_jail_duration": "60000000000",
      "slash_fraction_double_sign": "0.050000000000000000",
      "slash_fraction_downtime": "0.050000000000000000"
    }
  },
  "error": ""
}

GetSigningInfo

URL: [GET] /slashing/signing_infos/{pubkey}

Path Params
Name Type Example Required
pubkey string 0x03351618ca2810cf761fc44220ea976e3b5b7aeafedab3b380ff53fee9a77f5780

Upgrade Module

GetAppliedPlan

URL: [GET] /upgrade/applied_plan/{name}

Path Params
Name Type Example Required
name string upgrade-1

GetAuthority

URL: [GET] /upgrade/authority

GetCurrentPlan

URL: [GET] /upgrade/current_plan

GetModuleVersions

URL: [GET] /upgrade/module_versions

Query Params
Name Type Example Required
module_name string staking

Documentation

Index

Constants

View Source
const (
	// APIBlockHeightHeader is the API header for block height.
	APIBlockHeightHeader = "X-Block-Height"
)

Variables

This section is empty.

Functions

func BindFlags added in v0.14.0

func BindFlags(flags *pflag.FlagSet, cfg *Config)

BindFlags binds the provided flags to the corresponding fields in the Config struct.

Types

type Config added in v0.14.0

type Config struct {
	Enable            bool
	Address           string
	EnableUnsafeCORS  bool
	ReadTimeout       uint
	ReadHeaderTimeout uint
	WriteTimeout      uint
	IdleTimeout       uint
	MaxHeaderBytes    uint
}

func DefaultConfig added in v0.14.0

func DefaultConfig() Config

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(cfg *Config, store Store) (*Server, error)

func (*Server) GetAppliedPlan added in v0.10.0

func (s *Server) GetAppliedPlan(r *http.Request) (resp any, err error)

GetAppliedPlan queries a previously applied upgrade plan by its name.

func (*Server) GetAuthParams added in v0.10.0

func (s *Server) GetAuthParams(r *http.Request) (resp any, err error)

GetAuthParams queries all parameters of auth module.

func (*Server) GetAuthority added in v0.10.0

func (s *Server) GetAuthority(r *http.Request) (resp any, err error)

GetAuthority returns the account with authority to conduct upgrades.

func (*Server) GetBalancesByAddressDenom

func (s *Server) GetBalancesByAddressDenom(req *getBalancesByAddressDenomRequest, r *http.Request) (resp any, err error)

GetBalancesByAddressDenom queries the balance of a single coin for a single account.

func (*Server) GetBankParams added in v0.10.0

func (s *Server) GetBankParams(r *http.Request) (resp any, err error)

GetBankParams queries the parameters of x/bank module.

func (*Server) GetCurrentPlan added in v0.10.0

func (s *Server) GetCurrentPlan(r *http.Request) (resp any, err error)

GetCurrentPlan queries the current upgrade plan.

func (*Server) GetDelegationByValidatorAddressDelegatorAddress

func (s *Server) GetDelegationByValidatorAddressDelegatorAddress(r *http.Request) (resp any, err error)

GetDelegationByValidatorAddressDelegatorAddress queries delegate info for given validator delegator pair.

func (*Server) GetDelegationsByDelegatorAddress

func (s *Server) GetDelegationsByDelegatorAddress(req *getDelegationsByDelegatorAddressRequest, r *http.Request) (resp any, err error)

GetDelegationsByDelegatorAddress queries all delegations of a given delegator address.

func (*Server) GetDelegatorOperatorAddress added in v0.16.0

func (s *Server) GetDelegatorOperatorAddress(r *http.Request) (resp any, err error)

GetDelegatorOperatorAddress queries the operator address of a delegator.

func (*Server) GetDelegatorRewardAddress added in v0.16.0

func (s *Server) GetDelegatorRewardAddress(r *http.Request) (resp any, err error)

GetDelegatorRewardAddress queries the reward address of a delegator.

func (*Server) GetDelegatorRewardsByDelegatorAddress

func (s *Server) GetDelegatorRewardsByDelegatorAddress(r *http.Request) (resp any, err error)

GetDelegatorRewardsByDelegatorAddress queries the total rewards accrued by each validator.

func (*Server) GetDelegatorRewardsByDelegatorAddressValidatorAddress

func (s *Server) GetDelegatorRewardsByDelegatorAddressValidatorAddress(r *http.Request) (resp any, err error)

GetDelegatorRewardsByDelegatorAddressValidatorAddress queries the total rewards accrued by a delegation.

func (*Server) GetDelegatorUnbondingDelegation added in v0.10.0

func (s *Server) GetDelegatorUnbondingDelegation(r *http.Request) (resp any, err error)

GetDelegatorUnbondingDelegation queries unbonding info for given validator delegator pair.

func (*Server) GetDelegatorWithdrawAddress added in v0.16.0

func (s *Server) GetDelegatorWithdrawAddress(r *http.Request) (resp any, err error)

GetDelegatorWithdrawAddress queries the withdraw address of a delegator.

func (*Server) GetDistributionParams added in v0.10.0

func (s *Server) GetDistributionParams(r *http.Request) (resp any, err error)

GetDistributionParams queries params of the distribution module.

func (*Server) GetDistributionValidatorByValidatorAddress

func (s *Server) GetDistributionValidatorByValidatorAddress(r *http.Request) (resp any, err error)

GetDistributionValidatorByValidatorAddress queries validator commission and self-delegation rewards for validator.

func (*Server) GetDistributionValidatorsByDelegatorAddress

func (s *Server) GetDistributionValidatorsByDelegatorAddress(r *http.Request) (resp any, err error)

GetDistributionValidatorsByDelegatorAddress queries the validators of a delegator.

func (*Server) GetEvmStakingParams added in v0.10.0

func (s *Server) GetEvmStakingParams(r *http.Request) (resp any, err error)

GetEvmStakingParams queries the parameters of evmstaking module.

func (*Server) GetHistoricalInfoByHeight added in v0.10.0

func (s *Server) GetHistoricalInfoByHeight(r *http.Request) (resp any, err error)

GetHistoricalInfoByHeight queries the historical info for given height.

func (*Server) GetMintParams added in v0.12.0

func (s *Server) GetMintParams(r *http.Request) (resp any, err error)

GetMintParams queries params of the mint module.

func (*Server) GetPeriodDelegation added in v1.1.0

func (s *Server) GetPeriodDelegation(r *http.Request) (resp any, err error)

GetPeriodDelegation queries period delegation info for given validator delegator pair and period delegation id.

func (*Server) GetPeriodDelegations added in v1.1.0

func (s *Server) GetPeriodDelegations(req *getPeriodDelegationsRequest, r *http.Request) (resp any, err error)

GetPeriodDelegations queries period delegations info for given validator delegator pair.

func (*Server) GetRedelegationsByDelegatorAddress

func (s *Server) GetRedelegationsByDelegatorAddress(req *getRedelegationsByDelegatorAddressRequest, r *http.Request) (resp any, err error)

GetRedelegationsByDelegatorAddress queries redelegations of given address.

func (*Server) GetSigningInfo added in v0.10.0

func (s *Server) GetSigningInfo(r *http.Request) (resp any, err error)

GetSigningInfo queries the signing info of given cons address.

func (*Server) GetSlashingParams added in v0.10.0

func (s *Server) GetSlashingParams(r *http.Request) (resp any, err error)

GetSlashingParams queries the parameters of slashing module.

func (*Server) GetSpendableBalancesByAddressDenom added in v0.16.0

func (s *Server) GetSpendableBalancesByAddressDenom(req *getSpendableBalancesByAddressDenomRequest, r *http.Request) (resp any, err error)

GetSpendableBalancesByAddressDenom queries the spendable balance of a single coin for a single account.

func (*Server) GetStakingParams added in v0.10.0

func (s *Server) GetStakingParams(r *http.Request) (resp any, err error)

GetStakingParams queries the staking parameters.

func (*Server) GetStakingPool

func (s *Server) GetStakingPool(r *http.Request) (resp any, err error)

GetStakingPool queries the staking pool info.

func (*Server) GetSupplyByDenom

func (s *Server) GetSupplyByDenom(req *getSupplyByDenomRequest, r *http.Request) (resp any, err error)

GetSupplyByDenom queries the supply of a single coin.

func (*Server) GetUnbondingDelegationsByDelegatorAddress

func (s *Server) GetUnbondingDelegationsByDelegatorAddress(req *getUnbondingDelegationsByDelegatorAddressRequest, r *http.Request) (resp any, err error)

GetUnbondingDelegationsByDelegatorAddress queries all unbonding delegations of a given delegator address.

func (*Server) GetValidatorByValidatorAddress

func (s *Server) GetValidatorByValidatorAddress(r *http.Request) (resp any, err error)

GetValidatorByValidatorAddress queries validator info for given validator address.

func (*Server) GetValidatorCommissionByValidatorAddress

func (s *Server) GetValidatorCommissionByValidatorAddress(r *http.Request) (resp any, err error)

GetValidatorCommissionByValidatorAddress queries accumulated commission for a validator.

func (*Server) GetValidatorDelegationsByValidatorAddress

func (s *Server) GetValidatorDelegationsByValidatorAddress(req *getValidatorDelegationsByValidatorAddressRequest, r *http.Request) (resp any, err error)

GetValidatorDelegationsByValidatorAddress queries delegate info for given validator.

func (*Server) GetValidatorOutstandingRewardsByValidatorAddress

func (s *Server) GetValidatorOutstandingRewardsByValidatorAddress(r *http.Request) (resp any, err error)

GetValidatorOutstandingRewardsByValidatorAddress queries rewards of a validator address.

func (*Server) GetValidatorSlashesByValidatorAddress

func (s *Server) GetValidatorSlashesByValidatorAddress(req *getValidatorSlashesByValidatorAddressRequest, r *http.Request) (resp any, err error)

GetValidatorSlashesByValidatorAddress queries slash events of a validator.

func (*Server) GetValidatorUnbondingDelegations added in v0.10.0

func (s *Server) GetValidatorUnbondingDelegations(req *getValidatorUnbondingDelegationsRequest, r *http.Request) (resp any, err error)

GetValidatorUnbondingDelegations queries unbonding delegations of a validator.

func (*Server) GetValidators

func (s *Server) GetValidators(req *getValidatorsRequest, r *http.Request) (resp any, err error)

GetValidators queries all validators that match the given status.

func (*Server) GetValidatorsByDelegatorAddress

func (s *Server) GetValidatorsByDelegatorAddress(req *getValidatorsByDelegatorAddressRequest, r *http.Request) (resp any, err error)

GetValidatorsByDelegatorAddress queries all validators info for given delegator address.

func (*Server) GetValidatorsByDelegatorAddressValidatorAddress

func (s *Server) GetValidatorsByDelegatorAddressValidatorAddress(r *http.Request) (resp any, err error)

GetValidatorsByDelegatorAddressValidatorAddress queries validator info for given delegator validator pair.

func (*Server) ModuleVersions

func (s *Server) ModuleVersions(req *getModuleVersionsRequest, r *http.Request) (resp any, err error)

ModuleVersions queries the list of module versions from state.

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

type Store

type Store interface {
	CreateQueryContext(height int64, prove bool) (sdk.Context, error)
	GetEvmStakingKeeper() *evmstakingkeeper.Keeper
	GetStakingKeeper() *stakingkeeper.Keeper
	GetSlashingKeeper() slashingkeeper.Keeper
	GetAccountKeeper() authkeeper.AccountKeeper
	GetBankKeeper() bankkeeper.Keeper
	GetDistrKeeper() distrkeeper.Keeper
	GetUpgradeKeeper() *upgradekeeper.Keeper
	GetMintKeeper() mintkeeper.Keeper
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL