API provider definitions

class evmos.provider.AccountResponse[source]

Bases: TypedDict

Full response of account endpoint.

account: AccountResponseBody

Account full response content, wrapped in another dict.

class evmos.provider.AccountResponseBody[source]

Bases: TypedDict

Account body from response.

Also has “@type” key with corresponding str value.

base_account: BaseAccountResponse

Account response content.

code_hash: str

Response status.

class evmos.provider.BalanceByDenomResponse[source]

Bases: TypedDict

Response of balance endpoint.

balance: Coin

All coin balances of account.

class evmos.provider.BalancesResponse[source]

Bases: TypedDict

Response of balance endpoint.

balances: Sequence[Coin]

All coin balances of account.

pagination: PaginationResponse

Pagination part.

class evmos.provider.BaseAccountResponse[source]

Bases: TypedDict

base_account response field.

This is similar to evmos.transactions.common.Sender.

account_number: str

Account internal number.

address: str

Account address (bech32).

pub_key: NotRequired[PubkeyAccountResponse]

Account public key as dict.

sequence: str

Account nonce - number of previously sent transactions.

class evmos.provider.BroadcastMode(value)[source]

Bases: str, Enum

Broadcasting mode.

ASYNC = 'BROADCAST_MODE_ASYNC'

Broadcasting mode - asynchronous.

BLOCK = 'BROADCAST_MODE_BLOCK'

Broadcasting mode - block.

SYNC = 'BROADCAST_MODE_SYNC'

Broadcasting mode - synchronous.

UNSPECIFIED = 'BROADCAST_MODE_UNSPECIFIED'

Broadcasting mode unset.

class evmos.provider.BroadcastPostBody[source]

Bases: TypedDict

Body of POST request for transaction broadcasting.

mode: str

Broadcasting mode.

tx_bytes: str

base64-encoded transaction bytes.

class evmos.provider.ChannelsResponse[source]

Bases: TypedDict

Response type of channels endpoint.

channels: Sequence[IBCChannel]

Actual channels.

height: ChannelsResponseHeight

Response height.

pagination: PaginationResponse

Pagination block.

class evmos.provider.ChannelsResponseHeight[source]

Bases: TypedDict

height field type of channels endpoint response.

revision_height: str

Current revision height.

revision_number: str

Current revision number.

class evmos.provider.Claim[source]

Bases: TypedDict

Single claim record.

action: str

Claiming action.

claimable_amount: str

Amount to claim.

completed: bool

Whether claim is completed.

class evmos.provider.ClaimsRecordResponse[source]

Bases: TypedDict

Response of claims endpoint.

claims: Sequence[Claim]

All claims performed.

initial_claimable_amount: int

Amount available to claim before processing.

class evmos.provider.Coin[source]

Bases: TypedDict

Coin structure.

amount: str

Amount, as string (like ‘1000’).

denom: str

Coin denomination.

class evmos.provider.CounterParty[source]

Bases: TypedDict

IBC counterparty.

channel_id: str

IBC channel ID.

port_id: str

IBC port ID.

class evmos.provider.DelegationParams[source]

Bases: TypedDict

Parameters of delegation deal.

delegator_address: str

Address of delegator.

shares: str

Total delegator shares.

validator_address: str

Validator address.

class evmos.provider.DelegationResponse[source]

Bases: TypedDict

Single delegation item received from delegation endpoint.

balance: Coin

Balance of delegated coin.

delegation: DelegationParams

Deal options.

class evmos.provider.DistributionRewardsResponse[source]

Bases: TypedDict

Response type of rewards distribution endpoint.

rewards: Sequence[Reward]

Reward (in all coin types).

total: Sequence[Coin]

Total rewards (in all coin types).

class evmos.provider.GetDelegationsResponse[source]

Bases: TypedDict

Response type of delegation endpoint.

delegation_responses: Sequence[DelegationResponse]

All response blocks.

pagination: PaginationResponse

Pagination block.

class evmos.provider.GetUndelegationsResponse[source]

Bases: TypedDict

Response type of undelegation endpoint.

pagination: PaginationResponse

Pagination block.

unbonding_responses: Sequence[UndelegationResponse]

All responses as a sequence.

class evmos.provider.GetValidatorsResponse[source]

Bases: TypedDict

Response type of validators endpoint.

pagination: PaginationResponse

Pagination block.

validators: Sequence[Validator]

All validators present.

class evmos.provider.IBCChannel[source]

Bases: TypedDict

IBC channel.

channel_id: str

IBC channel id.

connection_hops: Sequence[str]

IBC channel connection hops.

counterparty: CounterParty

IBC channel counterparty.

ordering: str

IBC channel ordering.

port_id: str

IBC channel port id.

state: str

IBC channel state.

version: str

IBC channel version.

class evmos.provider.PaginationResponse[source]

Bases: TypedDict

Pagination response part.

next_key: str

Next key to fetch.

total: int

Total amount of records.

class evmos.provider.Proposal[source]

Bases: TypedDict

Single proposal.

content: ProposalContent

Proposal content.

deposit_end_time: str

Proposal deposit end time, as timestamp str.

final_tally_result: TallyResults

Proposal final voting results.

proposal_id: str

Internal proposal ID.

status: str

Proposal status.

submit_time: str

Proposal submission time, as timestamp str.

total_deposit: Sequence[Coin]

Proposal total deposit, as str number.

voting_end_time: str

Proposal voting end time, as timestamp str.

voting_start_time: str

Proposal voting start time, as timestamp str.

class evmos.provider.ProposalContent[source]

Bases: TypedDict

Proposal content.

Also has “@type” key with corresponding str value.

description: str

Proposal description.

title: str

Proposal title.

class evmos.provider.ProposalStatus(value)[source]

Bases: str, Enum

Proposal status.

DEPOSIT = 'PROPOSAL_STATUS_DEPOSIT_PERIOD'

Proposal during deposit period.

FAILED = 'PROPOSAL_STATUS_FAILED'

Proposal failed.

PASSED = 'PROPOSAL_STATUS_PASSED'

Proposal passed.

REJECTED = 'PROPOSAL_STATUS_REJECTED'

Proposal rejected.

UNSPECIFIED = 'PROPOSAL_STATUS_UNSPECIFIED'

Proposal status unset.

VOTING = 'PROPOSAL_STATUS_VOTING_PERIOD'

Proposal during voting period.

class evmos.provider.ProposalsResponse[source]

Bases: TypedDict

Response type of proposals endpoint.

pagination: PaginationResponse

Pagination block.

proposals: Sequence[Proposal]

Response of proposals endpoint.

class evmos.provider.PubkeyAccountResponse[source]

Bases: TypedDict

Response with account public key.

Also has “@type” key with corresponding str value.

key: str

Account public key (base64 encoded).

class evmos.provider.Reward[source]

Bases: TypedDict

Reward.

reward: Sequence[Coin]

Reward (in all coin types).

validator_address: str

Validator address.

class evmos.provider.TallyResponse[source]

Bases: TypedDict

Response type of tally endpoint.

tally: TallyResults

Results.

class evmos.provider.TallyResults[source]

Bases: TypedDict

Tally results for a single proposal.

abstain: str

Number of abstain votes, as string (like ‘1234’).

no: str

Number of negative votes, as string (like ‘1234’).

no_with_veto: str

Number of negative votes with veto, as string (like ‘1234’).

yes: str

Number of positive votes, as string (like ‘1234’).

class evmos.provider.UndelegationEntry[source]

Bases: TypedDict

Undelegation entry.

balance: str

Resulting owner balance.

completion_time: str

Completion time.

creation_height: str

Height of block when this item was created.

initial_balance: str

Initial owner balance.

class evmos.provider.UndelegationResponse[source]

Bases: TypedDict

Single undelegation item received from delegation endpoint.

delegator_address: str

Delegator address.

entries: Sequence[UndelegationEntry]

Actual undelegation descriptions.

validator_address: str

Validator address.

class evmos.provider.Validator[source]

Bases: TypedDict

Validator definition.

commission: ValidatorCommission

Validator commissions.

consensus_pubkey: PubkeyAccountResponse

Consensus public key.

delegator_shares: str

Total delegator shares.

description: ValidatorDescription

Description.

jailed: bool

Whether validator is jailed.

min_self_delegation: str

Minimal self delegation amount, int as str.

operator_address: str

Operator address.

status: str

Validator status.

tokens: str

Validator tokens.

unbonding_height: str

Validator unbounding height.

unbonding_time: str

Validator unbounding time.

class evmos.provider.ValidatorCommission[source]

Bases: TypedDict

Commission rates of validator.

commission_rates: ValidatorCommissionRates

Actual rates.

update_time: str

Last update time, as str timestamp.

class evmos.provider.ValidatorCommissionRates[source]

Bases: TypedDict

Validator commission rates.

max_change_rate: str

Max change rate, number as str.

max_rate: str

Max overall rate, number as str.

rate: str

Rate, number as str.

class evmos.provider.ValidatorDescription[source]

Bases: TypedDict

Validator details.

details: str

Validator details.

identity: str

Validator identity.

moniker: str

Validator moniker.

security_contact: str

Validator security contact.

website: str

Validator website.

evmos.provider.generate_endpoint_account(address: str) str[source]

Generate endpoint for account details.

evmos.provider.generate_endpoint_balance_by_denom(address: str, denom: str) str[source]

Generate endpoint for undelegation.

evmos.provider.generate_endpoint_balances(address: str) str[source]

Generate endpoint for account balances.

evmos.provider.generate_endpoint_broadcast() str[source]

Generate endpoint for broadcasting.

evmos.provider.generate_endpoint_claims_record(address: str) str[source]

Generate endpoint for record claims.

evmos.provider.generate_endpoint_distribution_rewards_by_address(address: str) str[source]

Generate endpoint for rewards distribution.

evmos.provider.generate_endpoint_get_delegations(delegator_address: str) str[source]

Generate endpoint for delegation.

evmos.provider.generate_endpoint_get_undelegations(delegator_address: str) str[source]

Generate endpoint for undelegation.

evmos.provider.generate_endpoint_get_validators() str[source]

Generate endpoint for validators list.

evmos.provider.generate_endpoint_ibc_channels() str[source]

Get all the IBC channels.

evmos.provider.generate_endpoint_proposal_tally(proposal_id: str) str[source]

Generate endpoint for tally proposals.

evmos.provider.generate_endpoint_proposals() str[source]

Generate proposals endpoint.

Note

This returns all the proposals.