├── .github ├── dependabot.yml └── workflows │ └── test.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── Makefile ├── README.md ├── TODO.md ├── docs ├── diagram_python_SDK.png ├── getting_started_with_the_greenfield_python_sdk.md ├── index.md └── under_the_hood_of_the_greenfield_python_sdk.md ├── examples ├── basic_blockchain.py ├── basic_greenfield.py ├── basic_storage.py ├── demo.py └── img.png ├── greenfield_python_sdk ├── __init__.py ├── __version__.py ├── blockchain │ ├── __init__.py │ ├── _cosmos │ │ ├── __init__.py │ │ ├── auth.py │ │ ├── authz.py │ │ ├── bank.py │ │ ├── crosschain.py │ │ ├── distribution.py │ │ ├── evidence.py │ │ ├── feegrant.py │ │ ├── gov.py │ │ ├── mint.py │ │ ├── oracle.py │ │ ├── params.py │ │ ├── slashing.py │ │ ├── staking.py │ │ ├── tx.py │ │ └── upgrade.py │ ├── bridge.py │ ├── challenge.py │ ├── cosmos.py │ ├── payment.py │ ├── permission.py │ ├── sp.py │ ├── storage.py │ ├── tendermint.py │ ├── utils.py │ └── virtual_group.py ├── blockchain_client.py ├── config.py ├── go_library │ └── README.md ├── greenfield │ ├── __init__.py │ ├── account.py │ ├── basic.py │ ├── bucket.py │ ├── challenge.py │ ├── crosschain.py │ ├── distribution.py │ ├── feegrant.py │ ├── group.py │ ├── object.py │ ├── payment.py │ ├── proposal.py │ ├── storage_provider.py │ ├── validator.py │ └── virtual_group.py ├── greenfield_client.py ├── key_manager.py ├── models │ ├── __init__.py │ ├── account.py │ ├── basic.py │ ├── broadcast.py │ ├── bucket.py │ ├── const.py │ ├── eip712_messages │ │ ├── __init__.py │ │ ├── authz │ │ │ ├── __init__.py │ │ │ └── msg_grant.py │ │ ├── bank │ │ │ ├── __init__.py │ │ │ ├── msg_multi_send.py │ │ │ └── msg_send.py │ │ ├── base.py │ │ ├── challenge │ │ │ ├── __init__.py │ │ │ └── msg_submit.py │ │ ├── crosschain │ │ │ ├── __init__.py │ │ │ └── msg_transfer_out.py │ │ ├── distribution │ │ │ ├── __init__.py │ │ │ ├── msg_fund_community_pool.py │ │ │ ├── msg_set_withdraw_address.py │ │ │ ├── msg_withdraw_delegator_reward.py │ │ │ └── msg_withdraw_validator_commission.py │ │ ├── feegrant │ │ │ ├── __init__.py │ │ │ ├── msg_grant_allowance.py │ │ │ └── msg_revoke_allowance.py │ │ ├── gov │ │ │ ├── __init__.py │ │ │ └── msg_submit_proposal.py │ │ ├── group │ │ │ ├── __init__.py │ │ │ ├── group_url.py │ │ │ ├── msg_create_group.py │ │ │ ├── msg_delete_group.py │ │ │ ├── msg_leave_group.py │ │ │ ├── msg_renew_group_member.py │ │ │ └── msg_update_group_member.py │ │ ├── payment │ │ │ ├── __init__.py │ │ │ ├── msg_create_payment_account.py │ │ │ ├── msg_deposit.py │ │ │ ├── msg_disable_refund.py │ │ │ └── msg_withdraw.py │ │ ├── proposal │ │ │ ├── __init__.py │ │ │ ├── msg_submit_proposal.py │ │ │ ├── msg_vote_proposal.py │ │ │ └── proposal_url.py │ │ ├── slashing │ │ │ ├── __init__.py │ │ │ ├── msg_impeach.py │ │ │ └── msg_unjail.py │ │ ├── sp │ │ │ ├── __init__.py │ │ │ ├── msg_create_sp.py │ │ │ ├── msg_grant.py │ │ │ ├── msg_update_sp_status.py │ │ │ ├── msg_update_sp_storage_price.py │ │ │ └── sp_url.py │ │ ├── staking │ │ │ ├── __init__.py │ │ │ ├── msg_begin_redelegate.py │ │ │ ├── msg_cancel_unbonding_delegation.py │ │ │ ├── msg_create_validator.py │ │ │ ├── msg_delegate.py │ │ │ ├── msg_edit_validator.py │ │ │ ├── msg_undelegate.py │ │ │ └── staking_url.py │ │ └── storage │ │ │ ├── __init__.py │ │ │ ├── bucket_url.py │ │ │ ├── msg_cancel_create_object.py │ │ │ ├── msg_create_bucket.py │ │ │ ├── msg_create_object.py │ │ │ ├── msg_delete_bucket.py │ │ │ ├── msg_delete_object.py │ │ │ ├── msg_delete_policy.py │ │ │ ├── msg_migrate_bucket.py │ │ │ ├── msg_mirror_bucket.py │ │ │ ├── msg_mirror_group.py │ │ │ ├── msg_mirror_object.py │ │ │ ├── msg_put_policy.py │ │ │ ├── msg_set_tag.py │ │ │ ├── msg_update_bucket_info.py │ │ │ ├── msg_update_object_info.py │ │ │ ├── object_url.py │ │ │ └── policy_url.py │ ├── group.py │ ├── object.py │ ├── payment.py │ ├── proposal.py │ ├── request.py │ ├── storage_provider.py │ └── transaction.py ├── protos │ ├── __init__.py │ ├── amino │ │ └── __init__.py │ ├── cosmos │ │ ├── __init__.py │ │ ├── app │ │ │ ├── __init__.py │ │ │ ├── runtime │ │ │ │ ├── __init__.py │ │ │ │ └── v1alpha1 │ │ │ │ │ └── __init__.py │ │ │ └── v1alpha1 │ │ │ │ └── __init__.py │ │ ├── auth │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ ├── authz │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ ├── autocli │ │ │ ├── __init__.py │ │ │ └── v1 │ │ │ │ └── __init__.py │ │ ├── bank │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ ├── base │ │ │ ├── __init__.py │ │ │ ├── abci │ │ │ │ ├── __init__.py │ │ │ │ └── v1beta1 │ │ │ │ │ └── __init__.py │ │ │ ├── kv │ │ │ │ ├── __init__.py │ │ │ │ └── v1beta1 │ │ │ │ │ └── __init__.py │ │ │ ├── node │ │ │ │ ├── __init__.py │ │ │ │ └── v1beta1 │ │ │ │ │ └── __init__.py │ │ │ ├── query │ │ │ │ ├── __init__.py │ │ │ │ └── v1beta1 │ │ │ │ │ └── __init__.py │ │ │ ├── reflection │ │ │ │ ├── __init__.py │ │ │ │ ├── v1beta1 │ │ │ │ │ └── __init__.py │ │ │ │ └── v2alpha1 │ │ │ │ │ └── __init__.py │ │ │ ├── snapshots │ │ │ │ ├── __init__.py │ │ │ │ └── v1beta1 │ │ │ │ │ └── __init__.py │ │ │ ├── store │ │ │ │ ├── __init__.py │ │ │ │ └── v1beta1 │ │ │ │ │ └── __init__.py │ │ │ ├── tendermint │ │ │ │ ├── __init__.py │ │ │ │ └── v1beta1 │ │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ ├── capability │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ ├── consensus │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1 │ │ │ │ └── __init__.py │ │ ├── crisis │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ ├── crosschain │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1 │ │ │ │ └── __init__.py │ │ ├── crypto │ │ │ ├── __init__.py │ │ │ ├── ed25519 │ │ │ │ └── __init__.py │ │ │ ├── eth │ │ │ │ ├── __init__.py │ │ │ │ ├── bls │ │ │ │ │ └── __init__.py │ │ │ │ └── ethsecp256k1 │ │ │ │ │ └── __init__.py │ │ │ ├── hd │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ ├── keyring │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ ├── multisig │ │ │ │ ├── __init__.py │ │ │ │ └── v1beta1 │ │ │ │ │ └── __init__.py │ │ │ ├── secp256k1 │ │ │ │ └── __init__.py │ │ │ └── secp256r1 │ │ │ │ └── __init__.py │ │ ├── distribution │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ ├── evidence │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ ├── feegrant │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ ├── gashub │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ ├── genutil │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ ├── gov │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ ├── v1 │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ ├── group │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1 │ │ │ │ └── __init__.py │ │ ├── mint │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ ├── msg │ │ │ ├── __init__.py │ │ │ └── v1 │ │ │ │ └── __init__.py │ │ ├── nft │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ ├── oracle │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1 │ │ │ │ └── __init__.py │ │ ├── orm │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1alpha1 │ │ │ │ │ └── __init__.py │ │ │ ├── query │ │ │ │ ├── __init__.py │ │ │ │ └── v1alpha1 │ │ │ │ │ └── __init__.py │ │ │ ├── v1 │ │ │ │ └── __init__.py │ │ │ └── v1alpha1 │ │ │ │ └── __init__.py │ │ ├── params │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ ├── query │ │ │ ├── __init__.py │ │ │ └── v1 │ │ │ │ └── __init__.py │ │ ├── reflection │ │ │ ├── __init__.py │ │ │ └── v1 │ │ │ │ └── __init__.py │ │ ├── slashing │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ ├── staking │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ ├── tx │ │ │ ├── __init__.py │ │ │ ├── config │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ ├── signing │ │ │ │ ├── __init__.py │ │ │ │ └── v1beta1 │ │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ ├── upgrade │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ │ ├── __init__.py │ │ │ │ └── v1 │ │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ │ └── __init__.py │ │ └── vesting │ │ │ ├── __init__.py │ │ │ ├── module │ │ │ ├── __init__.py │ │ │ └── v1 │ │ │ │ └── __init__.py │ │ │ └── v1beta1 │ │ │ └── __init__.py │ ├── cosmos_proto │ │ └── __init__.py │ ├── gogoproto │ │ └── __init__.py │ ├── google │ │ ├── __init__.py │ │ └── api │ │ │ └── __init__.py │ ├── greenfield │ │ ├── __init__.py │ │ ├── bridge │ │ │ └── __init__.py │ │ ├── challenge │ │ │ └── __init__.py │ │ ├── common │ │ │ └── __init__.py │ │ ├── gensp │ │ │ └── __init__.py │ │ ├── payment │ │ │ └── __init__.py │ │ ├── permission │ │ │ └── __init__.py │ │ ├── resource │ │ │ └── __init__.py │ │ ├── sp │ │ │ └── __init__.py │ │ ├── storage │ │ │ └── __init__.py │ │ └── virtualgroup │ │ │ └── __init__.py │ └── tendermint │ │ ├── __init__.py │ │ ├── abci │ │ └── __init__.py │ │ ├── blocksync │ │ └── __init__.py │ │ ├── consensus │ │ └── __init__.py │ │ ├── crypto │ │ └── __init__.py │ │ ├── libs │ │ ├── __init__.py │ │ └── bits │ │ │ └── __init__.py │ │ ├── mempool │ │ └── __init__.py │ │ ├── p2p │ │ └── __init__.py │ │ ├── privval │ │ └── __init__.py │ │ ├── rpc │ │ ├── __init__.py │ │ └── grpc │ │ │ └── __init__.py │ │ ├── services │ │ ├── __init__.py │ │ ├── block │ │ │ ├── __init__.py │ │ │ └── v1 │ │ │ │ └── __init__.py │ │ ├── block_results │ │ │ ├── __init__.py │ │ │ └── v1 │ │ │ │ └── __init__.py │ │ ├── pruning │ │ │ ├── __init__.py │ │ │ └── v1 │ │ │ │ └── __init__.py │ │ └── version │ │ │ ├── __init__.py │ │ │ └── v1 │ │ │ └── __init__.py │ │ ├── state │ │ └── __init__.py │ │ ├── statesync │ │ └── __init__.py │ │ ├── store │ │ └── __init__.py │ │ ├── types │ │ └── __init__.py │ │ ├── version │ │ └── __init__.py │ │ └── votepool │ │ └── __init__.py ├── storage_client.py ├── storage_provider │ ├── __init__.py │ ├── bucket.py │ ├── group.py │ ├── object.py │ ├── request.py │ └── utils.py └── utils │ ├── sign_utils.py │ └── type_url_exception_utils.py ├── poetry.lock ├── proto ├── amino │ └── amino.proto ├── buf.gen.yaml ├── buf.lock ├── buf.yaml ├── cosmos │ ├── app │ │ ├── runtime │ │ │ └── v1alpha1 │ │ │ │ └── module.proto │ │ └── v1alpha1 │ │ │ ├── config.proto │ │ │ ├── module.proto │ │ │ └── query.proto │ ├── auth │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1beta1 │ │ │ ├── auth.proto │ │ │ ├── genesis.proto │ │ │ ├── query.proto │ │ │ └── tx.proto │ ├── authz │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1beta1 │ │ │ ├── authz.proto │ │ │ ├── event.proto │ │ │ ├── genesis.proto │ │ │ ├── query.proto │ │ │ └── tx.proto │ ├── autocli │ │ └── v1 │ │ │ ├── options.proto │ │ │ └── query.proto │ ├── bank │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1beta1 │ │ │ ├── authz.proto │ │ │ ├── bank.proto │ │ │ ├── genesis.proto │ │ │ ├── query.proto │ │ │ └── tx.proto │ ├── base │ │ ├── abci │ │ │ └── v1beta1 │ │ │ │ └── abci.proto │ │ ├── kv │ │ │ └── v1beta1 │ │ │ │ └── kv.proto │ │ ├── node │ │ │ └── v1beta1 │ │ │ │ └── query.proto │ │ ├── query │ │ │ └── v1beta1 │ │ │ │ └── pagination.proto │ │ ├── reflection │ │ │ ├── v1beta1 │ │ │ │ └── reflection.proto │ │ │ └── v2alpha1 │ │ │ │ └── reflection.proto │ │ ├── snapshots │ │ │ └── v1beta1 │ │ │ │ └── snapshot.proto │ │ ├── store │ │ │ └── v1beta1 │ │ │ │ ├── commit_info.proto │ │ │ │ └── listening.proto │ │ ├── tendermint │ │ │ └── v1beta1 │ │ │ │ ├── query.proto │ │ │ │ └── types.proto │ │ └── v1beta1 │ │ │ └── coin.proto │ ├── capability │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1beta1 │ │ │ ├── capability.proto │ │ │ └── genesis.proto │ ├── consensus │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1 │ │ │ ├── query.proto │ │ │ └── tx.proto │ ├── crisis │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1beta1 │ │ │ ├── genesis.proto │ │ │ └── tx.proto │ ├── crosschain │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1 │ │ │ ├── crosschain.proto │ │ │ ├── event.proto │ │ │ ├── genesis.proto │ │ │ ├── query.proto │ │ │ └── tx.proto │ ├── crypto │ │ ├── ed25519 │ │ │ └── keys.proto │ │ ├── eth │ │ │ ├── bls │ │ │ │ └── keys.proto │ │ │ └── ethsecp256k1 │ │ │ │ └── keys.proto │ │ ├── hd │ │ │ └── v1 │ │ │ │ └── hd.proto │ │ ├── keyring │ │ │ └── v1 │ │ │ │ └── record.proto │ │ ├── multisig │ │ │ ├── keys.proto │ │ │ └── v1beta1 │ │ │ │ └── multisig.proto │ │ ├── secp256k1 │ │ │ └── keys.proto │ │ └── secp256r1 │ │ │ └── keys.proto │ ├── distribution │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1beta1 │ │ │ ├── distribution.proto │ │ │ ├── genesis.proto │ │ │ ├── query.proto │ │ │ └── tx.proto │ ├── evidence │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1beta1 │ │ │ ├── evidence.proto │ │ │ ├── genesis.proto │ │ │ ├── query.proto │ │ │ └── tx.proto │ ├── feegrant │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1beta1 │ │ │ ├── feegrant.proto │ │ │ ├── genesis.proto │ │ │ ├── query.proto │ │ │ └── tx.proto │ ├── gashub │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1beta1 │ │ │ ├── event.proto │ │ │ ├── gashub.proto │ │ │ ├── genesis.proto │ │ │ ├── query.proto │ │ │ └── tx.proto │ ├── genutil │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1beta1 │ │ │ └── genesis.proto │ ├── gov │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ ├── v1 │ │ │ ├── genesis.proto │ │ │ ├── gov.proto │ │ │ ├── query.proto │ │ │ └── tx.proto │ │ └── v1beta1 │ │ │ ├── genesis.proto │ │ │ ├── gov.proto │ │ │ ├── query.proto │ │ │ └── tx.proto │ ├── group │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1 │ │ │ ├── events.proto │ │ │ ├── genesis.proto │ │ │ ├── query.proto │ │ │ ├── tx.proto │ │ │ └── types.proto │ ├── mint │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1beta1 │ │ │ ├── genesis.proto │ │ │ ├── mint.proto │ │ │ ├── query.proto │ │ │ └── tx.proto │ ├── msg │ │ └── v1 │ │ │ └── msg.proto │ ├── nft │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1beta1 │ │ │ ├── event.proto │ │ │ ├── genesis.proto │ │ │ ├── nft.proto │ │ │ ├── query.proto │ │ │ └── tx.proto │ ├── oracle │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1 │ │ │ ├── event.proto │ │ │ ├── genesis.proto │ │ │ ├── oracle.proto │ │ │ ├── query.proto │ │ │ └── tx.proto │ ├── orm │ │ ├── module │ │ │ └── v1alpha1 │ │ │ │ └── module.proto │ │ ├── query │ │ │ └── v1alpha1 │ │ │ │ └── query.proto │ │ ├── v1 │ │ │ └── orm.proto │ │ └── v1alpha1 │ │ │ └── schema.proto │ ├── params │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1beta1 │ │ │ ├── params.proto │ │ │ └── query.proto │ ├── query │ │ └── v1 │ │ │ └── query.proto │ ├── reflection │ │ └── v1 │ │ │ └── reflection.proto │ ├── slashing │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1beta1 │ │ │ ├── genesis.proto │ │ │ ├── query.proto │ │ │ ├── slashing.proto │ │ │ └── tx.proto │ ├── staking │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1beta1 │ │ │ ├── authz.proto │ │ │ ├── genesis.proto │ │ │ ├── query.proto │ │ │ ├── staking.proto │ │ │ └── tx.proto │ ├── tx │ │ ├── config │ │ │ └── v1 │ │ │ │ └── config.proto │ │ ├── signing │ │ │ └── v1beta1 │ │ │ │ └── signing.proto │ │ └── v1beta1 │ │ │ ├── service.proto │ │ │ └── tx.proto │ ├── upgrade │ │ ├── module │ │ │ └── v1 │ │ │ │ └── module.proto │ │ └── v1beta1 │ │ │ ├── query.proto │ │ │ └── upgrade.proto │ └── vesting │ │ ├── module │ │ └── v1 │ │ │ └── module.proto │ │ └── v1beta1 │ │ ├── tx.proto │ │ └── vesting.proto ├── greenfield │ ├── bridge │ │ ├── event.proto │ │ ├── genesis.proto │ │ ├── params.proto │ │ ├── query.proto │ │ └── tx.proto │ ├── challenge │ │ ├── events.proto │ │ ├── genesis.proto │ │ ├── params.proto │ │ ├── query.proto │ │ ├── tx.proto │ │ └── types.proto │ ├── common │ │ ├── approval.proto │ │ └── wrapper.proto │ ├── gensp │ │ ├── genesis.proto │ │ ├── params.proto │ │ ├── query.proto │ │ └── tx.proto │ ├── payment │ │ ├── auto_resume_record.proto │ │ ├── auto_settle_record.proto │ │ ├── delayed_withdrawal_record.proto │ │ ├── events.proto │ │ ├── genesis.proto │ │ ├── out_flow.proto │ │ ├── params.proto │ │ ├── payment_account.proto │ │ ├── payment_account_count.proto │ │ ├── query.proto │ │ ├── stream_record.proto │ │ └── tx.proto │ ├── permission │ │ ├── common.proto │ │ ├── events.proto │ │ ├── genesis.proto │ │ ├── params.proto │ │ ├── query.proto │ │ ├── tx.proto │ │ └── types.proto │ ├── resource │ │ └── types.proto │ ├── sp │ │ ├── authz.proto │ │ ├── events.proto │ │ ├── genesis.proto │ │ ├── params.proto │ │ ├── query.proto │ │ ├── tx.proto │ │ └── types.proto │ ├── storage │ │ ├── common.proto │ │ ├── events.proto │ │ ├── genesis.proto │ │ ├── params.proto │ │ ├── query.proto │ │ ├── tx.proto │ │ └── types.proto │ └── virtualgroup │ │ ├── events.proto │ │ ├── genesis.proto │ │ ├── params.proto │ │ ├── query.proto │ │ ├── tx.proto │ │ └── types.proto └── tendermint │ ├── abci │ └── types.proto │ ├── blocksync │ └── types.proto │ ├── consensus │ ├── types.proto │ └── wal.proto │ ├── crypto │ ├── keys.proto │ └── proof.proto │ ├── libs │ └── bits │ │ └── types.proto │ ├── mempool │ └── types.proto │ ├── p2p │ ├── conn.proto │ ├── pex.proto │ └── types.proto │ ├── privval │ └── types.proto │ ├── rpc │ └── grpc │ │ └── types.proto │ ├── state │ └── types.proto │ ├── statesync │ └── types.proto │ ├── store │ └── types.proto │ ├── types │ ├── block.proto │ ├── canonical.proto │ ├── events.proto │ ├── evidence.proto │ ├── params.proto │ ├── types.proto │ └── validator.proto │ └── version │ └── types.proto ├── pyproject.toml ├── pytest.ini ├── setup.cfg └── tests ├── __init__.py ├── conftest.py ├── e2e ├── __init__.py ├── greenfield │ ├── __init__.py │ ├── doc │ │ └── upload_file.txt │ ├── test_account.py │ ├── test_basic.py │ ├── test_bucket.py │ ├── test_challenge.py │ ├── test_crosschain.py │ ├── test_distribution.py │ ├── test_feegrant.py │ ├── test_group.py │ ├── test_object.py │ ├── test_payment.py │ ├── test_proposal.py │ ├── test_storage_provider.py │ ├── test_validators.py │ ├── test_virtual_group.py │ └── util.py └── test_blockchain_client.py ├── fixtures.py └── unit ├── __init__.py ├── blockchain ├── test_bridge.py ├── test_challenge.py ├── test_payment.py ├── test_permission.py ├── test_sp.py └── test_storage.py ├── test_blockchain_client.py └── test_config.py /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | 2 | version: 2 3 | updates: 4 | # Python 5 | - package-ecosystem: "pip" 6 | directory: "/" 7 | schedule: 8 | interval: "daily" 9 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | 2 | name: run tests 3 | 4 | on: 5 | push: 6 | branches: 7 | - master 8 | - main 9 | 10 | pull_request: 11 | branches: 12 | - master 13 | - main 14 | - rc-* 15 | 16 | 17 | jobs: 18 | build: 19 | runs-on: ubuntu-latest 20 | strategy: 21 | fail-fast: false 22 | matrix: 23 | python-version: ["3.9", "3.10", "3.11"] 24 | 25 | steps: 26 | - uses: actions/checkout@v3 27 | 28 | - name: Set up Python ${{ matrix.python-version }} 29 | uses: actions/setup-python@v3 30 | with: 31 | python-version: ${{ matrix.python-version }} 32 | 33 | - name: Install Poetry 34 | run: | 35 | curl -sSL https://install.python-poetry.org | python3 - 36 | 37 | - name: Configure Poetry 38 | run: | 39 | poetry config virtualenvs.in-project true 40 | 41 | - name: Install dependencies 42 | run: | 43 | poetry install 44 | 45 | - name: Run tests 46 | run: | 47 | poetry run pytest tests -m "not unit and not requires_config and not go_library and not localnet" --asyncio-mode=auto -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | # TODO, FIXME... 2 | 3 | ## Blockchain 4 | 5 | - [X] `Build_tx` move custom type_url messages editions to other file (sp_approval) 6 | - [ ] Add broadcast mode to `blockchain_client.broadcast_raw_tx` 7 | - [X] `convert_value_to_json` move custom type_url messages editions to other file 8 | - [X] `get_signatures` move custom type_url messages editions to other file 9 | 10 | ## Storage Provider 11 | 12 | - [ ] Find a way to not use the go library 13 | 14 | ## Greenfield 15 | 16 | - [X] Implement `multi_transfer` 17 | - [ ] Add pagination to feegrant `get_allowances` 18 | - [ ] Add pagination to feegrant `get_allowances_by_granter` 19 | - [ ] Add `content_type` enums for `CreateObjectOptions` and `PutObjectOptions` 20 | - [ ] Implement test_claims 21 | - [ ] Add positive test case for `test_mirror_object`, `test_mirror_bucket`, `test_mirror_group` 22 | - [ ] Solve issues with the test cases `test_impeach_validator`, `test_unjail_validator`, `test_undelegate`, `test_begin_redelegate` 23 | -------------------------------------------------------------------------------- /docs/diagram_python_SDK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/docs/diagram_python_SDK.png -------------------------------------------------------------------------------- /examples/basic_blockchain.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | import logging 3 | 4 | from greenfield_python_sdk.blockchain.utils import wait_for_block_height 5 | from greenfield_python_sdk.blockchain_client import BlockchainClient 6 | from greenfield_python_sdk.config import NetworkConfiguration, NetworkTestnet 7 | 8 | logging.basicConfig(level=logging.INFO) 9 | logger = logging.getLogger(__name__) 10 | 11 | async def main(): 12 | async with BlockchainClient(NetworkConfiguration(**NetworkTestnet().model_dump())) as client: 13 | 14 | response = await client.tendermint.get_node_info() 15 | logger.info(f"Node info moniker: {response.default_node_info.moniker}, version: {response.default_node_info.version}") 16 | 17 | response = await client.tendermint.get_latest_block() 18 | logger.info(f"Latest block header: {response.sdk_block.header}") 19 | 20 | height_before = response.sdk_block.header.height 21 | logger.info(f"Waiting for block height: {height_before}") 22 | 23 | await wait_for_block_height(client, height_before + 1) 24 | 25 | height = await client.tendermint.get_latest_block_height() 26 | logger.info(f"Current block height: {height}") 27 | 28 | if __name__ == "__main__": 29 | asyncio.run(main()) 30 | -------------------------------------------------------------------------------- /examples/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/examples/img.png -------------------------------------------------------------------------------- /greenfield_python_sdk/__init__.py: -------------------------------------------------------------------------------- 1 | import warnings 2 | 3 | from greenfield_python_sdk.blockchain_client import BlockchainClient 4 | from greenfield_python_sdk.config import ( 5 | NetworkConfiguration, 6 | NetworkLocalnet, 7 | NetworkMainnet, 8 | NetworkTestnet, 9 | get_account_configuration, 10 | ) 11 | from greenfield_python_sdk.greenfield_client import GreenfieldClient 12 | from greenfield_python_sdk.key_manager import BLSKeyManager, KeyManager 13 | 14 | warnings.filterwarnings("ignore") 15 | 16 | __all__ = [ 17 | "BlockchainClient", 18 | "GreenfieldClient", 19 | "NetworkConfiguration", 20 | "KeyManager", 21 | "BLSKeyManager", 22 | "NetworkMainnet", 23 | "NetworkTestnet", 24 | "NetworkLocalnet", 25 | "get_account_configuration", 26 | ] 27 | __author__ = "BNB Chain" 28 | -------------------------------------------------------------------------------- /greenfield_python_sdk/__version__.py: -------------------------------------------------------------------------------- 1 | __version__ = "v0.4.0" 2 | -------------------------------------------------------------------------------- /greenfield_python_sdk/blockchain/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/blockchain/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/blockchain/_cosmos/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/blockchain/_cosmos/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/blockchain/_cosmos/authz.py: -------------------------------------------------------------------------------- 1 | from grpclib.client import Channel 2 | 3 | from greenfield_python_sdk.protos.cosmos.authz.v1beta1 import ( 4 | QueryGranteeGrantsRequest, 5 | QueryGranteeGrantsResponse, 6 | QueryGranterGrantsRequest, 7 | QueryGranterGrantsResponse, 8 | QueryGrantsRequest, 9 | QueryGrantsResponse, 10 | QueryStub, 11 | ) 12 | 13 | 14 | class Authz: 15 | def __init__(self, channel: Channel): 16 | self.query_stub = QueryStub(channel) 17 | 18 | async def get_grants(self, request: QueryGrantsRequest) -> QueryGrantsResponse: 19 | response = await self.query_stub.grants(request) 20 | return response 21 | 22 | async def get_granter_grants(self, request: QueryGranterGrantsRequest) -> QueryGranterGrantsResponse: 23 | response = await self.query_stub.granter_grants(request) 24 | return response 25 | 26 | async def get_grantee_grants(self, request: QueryGranteeGrantsRequest) -> QueryGranteeGrantsResponse: 27 | response = await self.query_stub.grantee_grants(request) 28 | return response 29 | -------------------------------------------------------------------------------- /greenfield_python_sdk/blockchain/_cosmos/evidence.py: -------------------------------------------------------------------------------- 1 | from grpclib.client import Channel 2 | 3 | from greenfield_python_sdk.protos.cosmos.evidence.v1beta1 import ( 4 | QueryAllEvidenceRequest, 5 | QueryAllEvidenceResponse, 6 | QueryEvidenceRequest, 7 | QueryEvidenceResponse, 8 | QueryStub, 9 | ) 10 | 11 | 12 | class Evidence: 13 | def __init__(self, channel: Channel): 14 | self.query_stub = QueryStub(channel) 15 | 16 | async def get_evidence(self, request: QueryEvidenceRequest) -> QueryEvidenceResponse: 17 | response = await self.query_stub.evidence(request) 18 | return response 19 | 20 | async def all_evidence( 21 | self, request: QueryAllEvidenceRequest = QueryAllEvidenceRequest() 22 | ) -> QueryAllEvidenceResponse: 23 | response = await self.query_stub.all_evidence(request) 24 | return response 25 | -------------------------------------------------------------------------------- /greenfield_python_sdk/blockchain/_cosmos/feegrant.py: -------------------------------------------------------------------------------- 1 | from grpclib.client import Channel 2 | 3 | from greenfield_python_sdk.protos.cosmos.feegrant.v1beta1 import ( 4 | QueryAllowanceRequest, 5 | QueryAllowanceResponse, 6 | QueryAllowancesByGranterRequest, 7 | QueryAllowancesByGranterResponse, 8 | QueryAllowancesRequest, 9 | QueryAllowancesResponse, 10 | QueryStub, 11 | ) 12 | 13 | 14 | class FeeGrant: 15 | def __init__(self, channel: Channel): 16 | self.query_stub = QueryStub(channel) 17 | 18 | async def get_allowance(self, query_allowance_request: QueryAllowanceRequest) -> QueryAllowanceResponse: 19 | response = await self.query_stub.allowance(query_allowance_request) 20 | return response 21 | 22 | async def get_allowances(self, query_allowances_request: QueryAllowancesRequest) -> QueryAllowancesResponse: 23 | response = await self.query_stub.allowances(query_allowances_request) 24 | return response 25 | 26 | async def get_allowances_by_granter( 27 | self, query_allowances_by_granter_request: QueryAllowancesByGranterRequest 28 | ) -> QueryAllowancesByGranterResponse: 29 | response = await self.query_stub.allowances_by_granter(query_allowances_by_granter_request) 30 | return response 31 | -------------------------------------------------------------------------------- /greenfield_python_sdk/blockchain/_cosmos/mint.py: -------------------------------------------------------------------------------- 1 | from grpclib.client import Channel 2 | 3 | from greenfield_python_sdk.protos.cosmos.mint.v1beta1 import ( 4 | QueryAnnualProvisionsRequest, 5 | QueryAnnualProvisionsResponse, 6 | QueryInflationRequest, 7 | QueryInflationResponse, 8 | QueryParamsRequest, 9 | QueryParamsResponse, 10 | QueryStub, 11 | ) 12 | 13 | 14 | class Mint: 15 | def __init__(self, channel: Channel): 16 | self.query_stub = QueryStub(channel) 17 | 18 | async def get_params(self) -> QueryParamsResponse: 19 | request = QueryParamsRequest() 20 | response = await self.query_stub.params(request) 21 | return response 22 | 23 | async def get_inflation(self) -> QueryInflationResponse: 24 | request = QueryInflationRequest() 25 | response = await self.query_stub.inflation(request) 26 | return response 27 | 28 | async def get_annual_provisions(self) -> QueryAnnualProvisionsResponse: 29 | request = QueryAnnualProvisionsRequest() 30 | response = await self.query_stub.annual_provisions(request) 31 | return response 32 | -------------------------------------------------------------------------------- /greenfield_python_sdk/blockchain/_cosmos/oracle.py: -------------------------------------------------------------------------------- 1 | from grpclib.client import Channel 2 | 3 | from greenfield_python_sdk.protos.cosmos.oracle.v1 import ( 4 | QueryInturnRelayerRequest, 5 | QueryInturnRelayerResponse, 6 | QueryParamsRequest, 7 | QueryParamsResponse, 8 | QueryStub, 9 | ) 10 | 11 | 12 | class Oracle: 13 | def __init__(self, channel: Channel): 14 | self.query_stub = QueryStub(channel) 15 | 16 | async def get_params(self) -> QueryParamsResponse: 17 | request = QueryParamsRequest() 18 | response = await self.query_stub.params(request) 19 | return response 20 | 21 | async def get_inturn_relayer(self) -> QueryInturnRelayerResponse: 22 | request = QueryInturnRelayerRequest() 23 | response = await self.query_stub.inturn_relayer(request) 24 | return response 25 | -------------------------------------------------------------------------------- /greenfield_python_sdk/blockchain/_cosmos/params.py: -------------------------------------------------------------------------------- 1 | from grpclib.client import Channel 2 | 3 | from greenfield_python_sdk.protos.cosmos.params.v1beta1 import ( 4 | QueryParamsRequest, 5 | QueryParamsResponse, 6 | QueryStub, 7 | QuerySubspacesRequest, 8 | QuerySubspacesResponse, 9 | ) 10 | 11 | 12 | class Params: 13 | def __init__(self, channel: Channel): 14 | self.query_stub = QueryStub(channel) 15 | 16 | async def get_params(self, request: QueryParamsRequest) -> QueryParamsResponse: 17 | response = await self.query_stub.params(request) 18 | return response 19 | 20 | async def get_subspaces(self) -> QuerySubspacesResponse: 21 | request = QuerySubspacesRequest() 22 | response = await self.query_stub.subspaces(request) 23 | return response 24 | -------------------------------------------------------------------------------- /greenfield_python_sdk/blockchain/_cosmos/slashing.py: -------------------------------------------------------------------------------- 1 | from grpclib.client import Channel 2 | 3 | from greenfield_python_sdk.protos.cosmos.slashing.v1beta1 import ( 4 | QueryParamsRequest, 5 | QueryParamsResponse, 6 | QuerySigningInfoRequest, 7 | QuerySigningInfoResponse, 8 | QuerySigningInfosRequest, 9 | QuerySigningInfosResponse, 10 | QueryStub, 11 | ) 12 | 13 | 14 | class Slashing: 15 | def __init__(self, channel: Channel): 16 | self.query_stub = QueryStub(channel) 17 | 18 | async def get_params(self) -> QueryParamsResponse: 19 | request = QueryParamsRequest() 20 | response = await self.query_stub.params(request) 21 | return response 22 | 23 | async def get_signing_info(self, request: QuerySigningInfoRequest) -> QuerySigningInfoResponse: 24 | response = await self.query_stub.signing_info(request) 25 | return response 26 | 27 | async def get_signing_infos( 28 | self, request: QuerySigningInfosRequest = QuerySigningInfosRequest() 29 | ) -> QuerySigningInfosResponse: 30 | response = await self.query_stub.signing_infos(request) 31 | return response 32 | -------------------------------------------------------------------------------- /greenfield_python_sdk/blockchain/_cosmos/tx.py: -------------------------------------------------------------------------------- 1 | from grpclib.client import Channel 2 | 3 | from greenfield_python_sdk.protos.cosmos.tx.v1beta1 import ( 4 | GetBlockWithTxsRequest, 5 | GetBlockWithTxsResponse, 6 | GetTxRequest, 7 | GetTxResponse, 8 | GetTxsEventRequest, 9 | GetTxsEventResponse, 10 | ServiceStub, 11 | SimulateRequest, 12 | SimulateResponse, 13 | ) 14 | 15 | 16 | class Tx: 17 | def __init__(self, channel: Channel): 18 | self.query_stub = ServiceStub(channel) 19 | 20 | async def get_txs_event(self, request: GetTxsEventRequest) -> GetTxsEventResponse: 21 | response = await self.query_stub.get_txs_event(request) 22 | return response 23 | 24 | async def simulate(self, request: SimulateRequest) -> SimulateResponse: 25 | response = await self.query_stub.simulate(request) 26 | return response 27 | 28 | async def get_tx(self, request: GetTxRequest) -> GetTxResponse: 29 | response = await self.query_stub.get_tx(request) 30 | return response 31 | 32 | async def get_block_with_txs(self, request: GetBlockWithTxsRequest) -> GetBlockWithTxsResponse: 33 | response = await self.query_stub.get_block_with_txs(request) 34 | return response 35 | -------------------------------------------------------------------------------- /greenfield_python_sdk/blockchain/bridge.py: -------------------------------------------------------------------------------- 1 | from grpclib.client import Channel 2 | 3 | from greenfield_python_sdk.protos.greenfield.bridge import QueryParamsRequest, QueryParamsResponse, QueryStub 4 | 5 | 6 | class Bridge: 7 | def __init__(self, channel: Channel): 8 | self.query_stub = QueryStub(channel) 9 | 10 | async def get_params(self) -> QueryParamsResponse: 11 | request = QueryParamsRequest() 12 | response = await self.query_stub.params(request) 13 | return response 14 | -------------------------------------------------------------------------------- /greenfield_python_sdk/blockchain/cosmos.py: -------------------------------------------------------------------------------- 1 | from grpclib.client import Channel 2 | 3 | from greenfield_python_sdk.blockchain._cosmos import ( 4 | auth, 5 | authz, 6 | bank, 7 | crosschain, 8 | distribution, 9 | evidence, 10 | feegrant, 11 | gov, 12 | mint, 13 | oracle, 14 | params, 15 | slashing, 16 | staking, 17 | tx, 18 | upgrade, 19 | ) 20 | 21 | 22 | class Cosmos: 23 | def __init__(self, channel: Channel): 24 | self.auth = auth.Auth(channel) 25 | self.authz = authz.Authz(channel) 26 | self.bank = bank.Bank(channel) 27 | self.crosschain = crosschain.Crosschain(channel) 28 | self.distribution = distribution.Distribution(channel) 29 | self.evidence = evidence.Evidence(channel) 30 | self.feegrant = feegrant.FeeGrant(channel) 31 | self.gov = gov.Gov(channel) 32 | self.mint = mint.Mint(channel) 33 | self.params = params.Params(channel) 34 | self.slashing = slashing.Slashing(channel) 35 | self.staking = staking.Staking(channel) 36 | self.oracle = oracle.Oracle(channel) 37 | self.tx = tx.Tx(channel) 38 | self.upgrade = upgrade.Upgrade(channel) 39 | -------------------------------------------------------------------------------- /greenfield_python_sdk/blockchain/permission.py: -------------------------------------------------------------------------------- 1 | from grpclib.client import Channel 2 | 3 | from greenfield_python_sdk.protos.greenfield.permission import QueryParamsRequest, QueryParamsResponse, QueryStub 4 | 5 | 6 | class Permission: 7 | def __init__(self, channel: Channel): 8 | self.query_stub = QueryStub(channel) 9 | 10 | async def get_params(self) -> QueryParamsResponse: 11 | request = QueryParamsRequest() 12 | response = await self.query_stub.params(request) 13 | return response 14 | -------------------------------------------------------------------------------- /greenfield_python_sdk/blockchain/virtual_group.py: -------------------------------------------------------------------------------- 1 | from grpclib.client import Channel 2 | 3 | from greenfield_python_sdk.protos.greenfield.virtualgroup import ( 4 | QueryGlobalVirtualGroupFamilyRequest, 5 | QueryGlobalVirtualGroupFamilyResponse, 6 | QueryStub, 7 | ) 8 | 9 | 10 | class VirtualGroup: 11 | def __init__(self, channel: Channel): 12 | self.query_stub = QueryStub(channel) 13 | 14 | async def global_virtual_group_family( 15 | self, request=QueryGlobalVirtualGroupFamilyRequest 16 | ) -> QueryGlobalVirtualGroupFamilyResponse: 17 | return await self.query_stub.global_virtual_group_family(request) 18 | -------------------------------------------------------------------------------- /greenfield_python_sdk/config.py: -------------------------------------------------------------------------------- 1 | from functools import lru_cache 2 | 3 | from pydantic import BaseModel 4 | from pydantic_settings import BaseSettings 5 | 6 | GREENFIELD_VERSION = "v1.2.0" 7 | 8 | 9 | class NetworkMainnet(BaseModel): 10 | host: str = "https://greenfield-chain.bnbchain.org" 11 | port: int = 443 12 | chain_id: int = 1017 13 | 14 | 15 | class NetworkTestnet(BaseModel): 16 | host: str = "https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org" 17 | port: int = 443 18 | chain_id: int = 5600 19 | 20 | 21 | class NetworkLocalnet(BaseModel): 22 | host: str = "http://localhost" 23 | port: int = 26750 24 | chain_id: int = 9000 25 | 26 | 27 | class NetworkConfiguration(BaseSettings): 28 | host: str 29 | port: int 30 | chain_id: int 31 | 32 | class Config: 33 | env_file = ".env" 34 | env_file_encoding = "utf-8" 35 | 36 | 37 | class AccountConfiguration(BaseSettings): 38 | private_key: str # private key of the account, hex encoded, i.e. 3460f... 39 | 40 | class Config: 41 | env_file = ".env" 42 | env_file_encoding = "utf-8" 43 | 44 | 45 | @lru_cache(maxsize=1) 46 | def get_account_configuration() -> AccountConfiguration: 47 | return AccountConfiguration() 48 | -------------------------------------------------------------------------------- /greenfield_python_sdk/go_library/README.md: -------------------------------------------------------------------------------- 1 | Once you generate the go_library, paste the files here. 2 | -------------------------------------------------------------------------------- /greenfield_python_sdk/greenfield/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/greenfield/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/greenfield/virtual_group.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.blockchain_client import BlockchainClient 2 | from greenfield_python_sdk.key_manager import KeyManager 3 | from greenfield_python_sdk.protos.greenfield.virtualgroup import ( 4 | GlobalVirtualGroupFamily, 5 | QueryGlobalVirtualGroupFamilyRequest, 6 | ) 7 | 8 | 9 | class VirtualGroup: 10 | blockchain_client: BlockchainClient 11 | key_manager: KeyManager 12 | 13 | def __init__(self, blockchain_client, key_manager): 14 | self.blockchain_client = blockchain_client 15 | self.key_manager = key_manager 16 | 17 | async def get_virtual_group_family(self, family_id: int) -> GlobalVirtualGroupFamily: 18 | response = await self.blockchain_client.virtual_group.global_virtual_group_family( 19 | QueryGlobalVirtualGroupFamilyRequest(family_id=family_id) 20 | ) 21 | if response.global_virtual_group_family is None: 22 | raise Exception("Virtual group family not found") 23 | 24 | return response.global_virtual_group_family 25 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/models/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/models/account.py: -------------------------------------------------------------------------------- 1 | from typing import Optional 2 | 3 | from pydantic import BaseModel 4 | 5 | 6 | class PaginationParams(BaseModel): 7 | key: Optional[bytes] = None 8 | limit: Optional[int] = None 9 | reverse: Optional[bool] = None 10 | 11 | 12 | class TransferDetails(BaseModel): 13 | to_address: str 14 | amount: str 15 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/broadcast.py: -------------------------------------------------------------------------------- 1 | from enum import IntEnum 2 | 3 | 4 | class BroadcastMode(IntEnum): 5 | "zero-value for mode ordering" 6 | BROADCAST_MODE_UNSPECIFIED = 0 7 | """ 8 | DEPRECATED: use BROADCAST_MODE_SYNC instead, 9 | BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. 10 | Deprecated: Do not use. 11 | """ 12 | BROADCAST_MODE_BLOCK = 1 13 | """ 14 | BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits 15 | for a CheckTx execution response only. 16 | """ 17 | BROADCAST_MODE_SYNC = 2 18 | """ 19 | BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client 20 | returns immediately. 21 | """ 22 | BROADCAST_MODE_ASYNC = 3 23 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/__init__.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.models.eip712_messages import ( 2 | authz, 3 | bank, 4 | challenge, 5 | crosschain, 6 | distribution, 7 | feegrant, 8 | gov, 9 | group, 10 | payment, 11 | proposal, 12 | slashing, 13 | sp, 14 | staking, 15 | storage, 16 | ) 17 | 18 | TYPES_MAP = { 19 | **bank.TYPES_MAP, 20 | **challenge.TYPES_MAP, 21 | **crosschain.TYPES_MAP, 22 | **distribution.TYPES_MAP, 23 | **feegrant.TYPES_MAP, 24 | **gov.TYPES_MAP, 25 | **staking.TYPES_MAP, 26 | **group.TYPES_MAP, 27 | **payment.TYPES_MAP, 28 | **proposal.TYPES_MAP, 29 | **sp.TYPES_MAP, 30 | **storage.TYPES_MAP, 31 | **authz.TYPES_MAP, 32 | **slashing.TYPES_MAP, 33 | } 34 | 35 | URL_TO_PROTOS_TYPE_MAP = { 36 | **feegrant.URL_TO_PROTOS_TYPE_MAP, 37 | **proposal.URL_TO_PROTOS_TYPE_MAP, 38 | **sp.URL_TO_PROTOS_TYPE_MAP, 39 | **storage.URL_TO_PROTOS_TYPE_MAP, 40 | **staking.URL_TO_PROTOS_TYPE_MAP, 41 | } 42 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/authz/__init__.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.models.eip712_messages.authz import msg_grant 2 | 3 | TYPES_MAP = { 4 | msg_grant.TYPE_URL: msg_grant.TYPES, 5 | } 6 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/authz/msg_grant.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/cosmos.auth.v1beta1.MsgGrant" 2 | TYPES = { 3 | "Msg1": [ 4 | {"name": "type", "type": "string"}, 5 | {"name": "grantee", "type": "string"}, 6 | {"name": "granter", "type": "string"}, 7 | {"name": "grant", "type": "TypeMsg1Grant"}, 8 | ], 9 | "TypeMsg1Grant": [{"name": "authorization", "type": "TypeAny"}, {"name": "expiration", "type": "string"}], 10 | "TypeAny": [{"name": "type", "type": "string"}, {"name": "value", "type": "bytes"}], 11 | } 12 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/bank/__init__.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.models.eip712_messages.bank import msg_multi_send, msg_send 2 | 3 | TYPES_MAP = { 4 | msg_send.TYPE_URL: msg_send.TYPES, 5 | msg_multi_send.TYPE_URL: msg_multi_send.TYPES, 6 | } 7 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/bank/msg_multi_send.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/cosmos.bank.v1beta1.MsgMultiSend" 2 | TYPES = { 3 | "Msg1": [ 4 | {"name": "inputs", "type": "TypeMsg1Inputs[]"}, 5 | {"name": "outputs", "type": "TypeMsg1Outputs[]"}, 6 | {"name": "type", "type": "string"}, 7 | ], 8 | "TypeMsg1Inputs": [{"name": "address", "type": "string"}, {"name": "coins", "type": "TypeMsg1InputsCoins[]"}], 9 | "TypeMsg1InputsCoins": [{"name": "amount", "type": "string"}, {"name": "denom", "type": "string"}], 10 | "TypeMsg1Outputs": [{"name": "address", "type": "string"}, {"name": "coins", "type": "TypeMsg1OutputsCoins[]"}], 11 | "TypeMsg1OutputsCoins": [{"name": "amount", "type": "string"}, {"name": "denom", "type": "string"}], 12 | } 13 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/bank/msg_send.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/cosmos.bank.v1beta1.MsgSend" 2 | TYPES = { 3 | "Msg1": [ 4 | {"name": "amount", "type": "TypeMsg1Amount[]"}, 5 | {"name": "from_address", "type": "string"}, 6 | {"name": "to_address", "type": "string"}, 7 | {"name": "type", "type": "string"}, 8 | ], 9 | "TypeMsg1Amount": [{"name": "amount", "type": "string"}, {"name": "denom", "type": "string"}], 10 | } 11 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/base.py: -------------------------------------------------------------------------------- 1 | BASE_TYPES = { 2 | "Coin": [{"name": "amount", "type": "uint256"}, {"name": "denom", "type": "string"}], 3 | "EIP712Domain": [ 4 | {"name": "chainId", "type": "uint256"}, 5 | {"name": "name", "type": "string"}, 6 | {"name": "salt", "type": "string"}, 7 | {"name": "verifyingContract", "type": "string"}, 8 | {"name": "version", "type": "string"}, 9 | ], 10 | "Fee": [ 11 | {"name": "amount", "type": "Coin[]"}, 12 | {"name": "gas_limit", "type": "uint256"}, 13 | {"name": "granter", "type": "string"}, 14 | {"name": "payer", "type": "string"}, 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/challenge/__init__.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.models.eip712_messages.challenge import msg_submit 2 | 3 | TYPES_MAP = { 4 | msg_submit.TYPE_URL: msg_submit.TYPES, 5 | } 6 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/challenge/msg_submit.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/greenfield.challenge.MsgSubmit" 2 | TYPES = { 3 | "Msg1": [ 4 | {"name": "type", "type": "string"}, 5 | {"name": "challenger", "type": "string"}, 6 | {"name": "sp_operator_address", "type": "string"}, 7 | {"name": "bucket_name", "type": "string"}, 8 | {"name": "object_name", "type": "string"}, 9 | {"name": "segment_index", "type": "uint32"}, 10 | {"name": "random_index", "type": "bool"}, 11 | ], 12 | } 13 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/crosschain/__init__.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.models.eip712_messages.crosschain import msg_transfer_out 2 | 3 | TYPES_MAP = { 4 | msg_transfer_out.TYPE_URL: msg_transfer_out.TYPES, 5 | } 6 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/crosschain/msg_transfer_out.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/greenfield.bridge.MsgTransferOut" 2 | TYPES = { 3 | "Msg1": [ 4 | {"name": "type", "type": "string"}, 5 | {"name": "from", "type": "string"}, 6 | {"name": "to", "type": "string"}, 7 | {"name": "amount", "type": "TypeMsg1Amount"}, 8 | ], 9 | "TypeMsg1Amount": [{"name": "denom", "type": "string"}, {"name": "amount", "type": "string"}], 10 | } 11 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/distribution/__init__.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.models.eip712_messages.distribution import ( 2 | msg_fund_community_pool, 3 | msg_set_withdraw_address, 4 | msg_withdraw_delegator_reward, 5 | msg_withdraw_validator_commission, 6 | ) 7 | 8 | TYPES_MAP = { 9 | msg_set_withdraw_address.TYPE_URL: msg_set_withdraw_address.TYPES, 10 | msg_withdraw_validator_commission.TYPE_URL: msg_withdraw_validator_commission.TYPES, 11 | msg_withdraw_delegator_reward.TYPE_URL: msg_withdraw_delegator_reward.TYPES, 12 | msg_fund_community_pool.TYPE_URL: msg_fund_community_pool.TYPES, 13 | } 14 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/distribution/msg_fund_community_pool.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/cosmos.distribution.v1beta1.MsgFundCommunityPool" 2 | 3 | TYPES = { 4 | "Msg1": [ 5 | {"name": "type", "type": "string"}, 6 | {"name": "depositor", "type": "string"}, 7 | {"name": "amount", "type": "Coin[]"}, 8 | ], 9 | "Coin": [{"name": "denom", "type": "string"}, {"name": "amount", "type": "uint256"}], 10 | } 11 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/distribution/msg_set_withdraw_address.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress" 2 | TYPES = { 3 | "Msg1": [ 4 | {"name": "type", "type": "string"}, 5 | {"name": "delegator_address", "type": "string"}, 6 | {"name": "withdraw_address", "type": "string"}, 7 | ], 8 | } 9 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/distribution/msg_withdraw_delegator_reward.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward" 2 | TYPES = { 3 | "Msg1": [ 4 | {"name": "type", "type": "string"}, 5 | {"name": "delegator_address", "type": "string"}, 6 | {"name": "validator_address", "type": "string"}, 7 | ], 8 | } 9 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/distribution/msg_withdraw_validator_commission.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission" 2 | TYPES = { 3 | "Msg1": [{"name": "type", "type": "string"}, {"name": "validator_address", "type": "string"}], 4 | } 5 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/feegrant/__init__.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.models.eip712_messages.feegrant import msg_grant_allowance, msg_revoke_allowance 2 | 3 | TYPES_MAP = { 4 | msg_grant_allowance.TYPE_URL: msg_grant_allowance.TYPES, 5 | msg_revoke_allowance.TYPE_URL: msg_revoke_allowance.TYPES, 6 | } 7 | 8 | URL_TO_PROTOS_TYPE_MAP = {**msg_grant_allowance.URL_TO_PROTOS_TYPE_MAP} 9 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/feegrant/msg_grant_allowance.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.protos.cosmos.feegrant.v1beta1 import BasicAllowance, PeriodicAllowance 2 | 3 | TYPE_URL = "/cosmos.feegrant.v1beta1.MsgGrantAllowance" 4 | 5 | TYPES = { 6 | "Msg1": [ 7 | {"name": "allowance", "type": "TypeAny"}, 8 | {"name": "grantee", "type": "string"}, 9 | {"name": "granter", "type": "string"}, 10 | {"name": "type", "type": "string"}, 11 | ], 12 | "TypeAny": [{"name": "type", "type": "string"}, {"name": "value", "type": "bytes"}], 13 | } 14 | 15 | URL_TO_PROTOS_TYPE_MAP = { 16 | "/cosmos.feegrant.v1beta1.BasicAllowance": BasicAllowance, 17 | "/cosmos.feegrant.v1beta1.PeriodicAllowance": PeriodicAllowance, 18 | } 19 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/feegrant/msg_revoke_allowance.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.protos.cosmos.feegrant.v1beta1 import BasicAllowance, PeriodicAllowance 2 | 3 | TYPE_URL = "/cosmos.feegrant.v1beta1.MsgRevokeAllowance" 4 | 5 | TYPES = { 6 | "Msg1": [ 7 | {"name": "type", "type": "string"}, 8 | {"name": "granter", "type": "string"}, 9 | {"name": "grantee", "type": "string"}, 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/gov/__init__.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.models.eip712_messages.gov import msg_submit_proposal 2 | 3 | TYPES_MAP = { 4 | msg_submit_proposal.TYPE_URL: msg_submit_proposal.TYPES, 5 | } 6 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/gov/msg_submit_proposal.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/cosmos.gov.v1.MsgSubmitProposal" 2 | TYPES = { 3 | "Msg1": [ 4 | {"name": "type", "type": "string"}, 5 | {"name": "messages", "type": "TypeAny[]"}, 6 | {"name": "initial_deposit", "type": "TypeMsg1Amount[]"}, 7 | {"name": "proposer", "type": "string"}, 8 | {"name": "metadata", "type": "string"}, 9 | {"name": "title", "type": "string"}, 10 | {"name": "summary", "type": "string"}, 11 | ], 12 | "TypeAny": [{"name": "type", "type": "string"}, {"name": "value", "type": "bytes"}], 13 | "TypeMsg1Amount": [{"name": "denom", "type": "string"}, {"name": "amount", "type": "string"}], 14 | } 15 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/group/__init__.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.models.eip712_messages.group import ( 2 | msg_create_group, 3 | msg_delete_group, 4 | msg_leave_group, 5 | msg_renew_group_member, 6 | msg_update_group_member, 7 | ) 8 | from greenfield_python_sdk.models.eip712_messages.group.group_url import ( 9 | CREATE_GROUP, 10 | DELETE_GROUP, 11 | LEAVE_GROUP, 12 | RENEW_GROUP_MEMBER, 13 | UPDATE_GROUP_MEMBER, 14 | ) 15 | 16 | TYPES_MAP = { 17 | CREATE_GROUP: msg_create_group.TYPES, 18 | DELETE_GROUP: msg_delete_group.TYPES, 19 | UPDATE_GROUP_MEMBER: msg_update_group_member.TYPES, 20 | LEAVE_GROUP: msg_leave_group.TYPES, 21 | RENEW_GROUP_MEMBER: msg_renew_group_member.TYPES, 22 | } 23 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/group/group_url.py: -------------------------------------------------------------------------------- 1 | CREATE_GROUP = "/greenfield.storage.MsgCreateGroup" 2 | DELETE_GROUP = "/greenfield.storage.MsgDeleteGroup" 3 | UPDATE_GROUP_MEMBER = "/greenfield.storage.MsgUpdateGroupMember" 4 | LEAVE_GROUP = "/greenfield.storage.MsgLeaveGroup" 5 | RENEW_GROUP_MEMBER = "/greenfield.storage.MsgRenewGroupMember" 6 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/group/msg_create_group.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "type", "type": "string"}, 4 | {"name": "creator", "type": "string"}, 5 | {"name": "group_name", "type": "string"}, 6 | {"name": "extra", "type": "string"}, 7 | ], 8 | } 9 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/group/msg_delete_group.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "type", "type": "string"}, 4 | {"name": "operator", "type": "string"}, 5 | {"name": "group_name", "type": "string"}, 6 | ], 7 | } 8 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/group/msg_leave_group.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "type", "type": "string"}, 4 | {"name": "member", "type": "string"}, 5 | {"name": "group_owner", "type": "string"}, 6 | {"name": "group_name", "type": "string"}, 7 | ], 8 | } 9 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/group/msg_renew_group_member.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "group_name", "type": "string"}, 4 | {"name": "group_owner", "type": "string"}, 5 | {"name": "members", "type": "TypeMsg1Members[]"}, 6 | {"name": "operator", "type": "string"}, 7 | {"name": "type", "type": "string"}, 8 | ], 9 | "TypeMsg1Members": [ 10 | {"name": "expiration_time", "type": "string"}, 11 | {"name": "member", "type": "string"}, 12 | ], 13 | } 14 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/group/msg_update_group_member.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "type", "type": "string"}, 4 | {"name": "operator", "type": "string"}, 5 | {"name": "group_owner", "type": "string"}, 6 | {"name": "group_name", "type": "string"}, 7 | {"name": "members_to_add", "type": "TypeMsg1MembersToAdd[]"}, 8 | {"name": "members_to_delete", "type": "string[]"}, 9 | ], 10 | "TypeMsg1MembersToAdd": [ 11 | {"name": "expiration_time", "type": "string"}, 12 | {"name": "member", "type": "string"}, 13 | ], 14 | } 15 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/payment/__init__.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.models.eip712_messages.payment import ( 2 | msg_create_payment_account, 3 | msg_deposit, 4 | msg_disable_refund, 5 | msg_withdraw, 6 | ) 7 | 8 | TYPES_MAP = { 9 | msg_create_payment_account.TYPE_URL: msg_create_payment_account.TYPES, 10 | msg_deposit.TYPE_URL: msg_deposit.TYPES, 11 | msg_withdraw.TYPE_URL: msg_withdraw.TYPES, 12 | msg_disable_refund.TYPE_URL: msg_disable_refund.TYPES, 13 | } 14 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/payment/msg_create_payment_account.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/greenfield.payment.MsgCreatePaymentAccount" 2 | TYPES = { 3 | "Msg1": [ 4 | {"name": "type", "type": "string"}, 5 | {"name": "creator", "type": "string"}, 6 | ], 7 | } 8 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/payment/msg_deposit.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/greenfield.payment.MsgDeposit" 2 | TYPES = { 3 | "Msg1": [ 4 | {"name": "type", "type": "string"}, 5 | {"name": "creator", "type": "string"}, 6 | {"name": "to", "type": "string"}, 7 | {"name": "amount", "type": "string"}, 8 | ], 9 | } 10 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/payment/msg_disable_refund.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/greenfield.payment.MsgDisableRefund" 2 | TYPES = { 3 | "Msg1": [ 4 | {"name": "type", "type": "string"}, 5 | {"name": "owner", "type": "string"}, 6 | {"name": "addr", "type": "string"}, 7 | ], 8 | } 9 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/payment/msg_withdraw.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/greenfield.payment.MsgWithdraw" 2 | TYPES = { 3 | "Msg1": [ 4 | {"name": "type", "type": "string"}, 5 | {"name": "creator", "type": "string"}, 6 | {"name": "from", "type": "string"}, 7 | {"name": "amount", "type": "string"}, 8 | ], 9 | } 10 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/proposal/__init__.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.models.eip712_messages.proposal import msg_submit_proposal, msg_vote_proposal 2 | from greenfield_python_sdk.models.eip712_messages.proposal.proposal_url import PROPOSAL, VOTE 3 | 4 | TYPES_MAP = { 5 | PROPOSAL: msg_submit_proposal.TYPES, 6 | VOTE: msg_vote_proposal.TYPES, 7 | } 8 | 9 | URL_TO_PROTOS_TYPE_MAP = {**msg_submit_proposal.URL_TO_PROTOS_TYPE_MAP} 10 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/proposal/msg_submit_proposal.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.protos.cosmos.staking.v1beta1 import MsgCreateValidator 2 | from greenfield_python_sdk.protos.greenfield.sp import MsgCreateStorageProvider 3 | 4 | TYPES = { 5 | "Msg1": [ 6 | {"name": "initial_deposit", "type": "TypeMsg1InitialDeposit[]"}, 7 | {"name": "messages", "type": "TypeAny[]"}, 8 | {"name": "metadata", "type": "string"}, 9 | {"name": "proposer", "type": "string"}, 10 | {"name": "summary", "type": "string"}, 11 | {"name": "title", "type": "string"}, 12 | {"name": "type", "type": "string"}, 13 | ], 14 | "TypeAny": [{"name": "type", "type": "string"}, {"name": "value", "type": "bytes"}], 15 | "TypeMsg1InitialDeposit": [ 16 | {"name": "denom", "type": "string"}, 17 | {"name": "amount", "type": "string"}, 18 | ], 19 | } 20 | 21 | URL_TO_PROTOS_TYPE_MAP = { 22 | "/greenfield.sp.MsgCreateStorageProvider": MsgCreateStorageProvider, 23 | "/cosmos.staking.v1beta1.MsgCreateValidator": MsgCreateValidator, 24 | } 25 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/proposal/msg_vote_proposal.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "type", "type": "string"}, 4 | {"name": "proposal_id", "type": "uint64"}, 5 | {"name": "voter", "type": "string"}, 6 | {"name": "option", "type": "string"}, 7 | {"name": "metadata", "type": "string"}, 8 | ], 9 | } 10 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/proposal/proposal_url.py: -------------------------------------------------------------------------------- 1 | PROPOSAL = "/cosmos.gov.v1.MsgSubmitProposal" 2 | VOTE = "/cosmos.gov.v1.MsgVote" 3 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/slashing/__init__.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.models.eip712_messages.slashing import msg_impeach, msg_unjail 2 | 3 | TYPES_MAP = { 4 | msg_unjail.TYPE_URL: msg_unjail.TYPES, 5 | msg_impeach.TYPE_URL: msg_impeach.TYPES, 6 | } 7 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/slashing/msg_impeach.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/cosmos.slashing.v1beta1.MsgImpeach" 2 | TYPES = { 3 | "Msg1": [ 4 | {"name": "type", "type": "string"}, 5 | {"name": "from", "type": "string"}, 6 | {"name": "validator_address", "type": "string"}, 7 | ], 8 | } 9 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/slashing/msg_unjail.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/cosmos.slashing.v1beta1.MsgUnjail" 2 | TYPES = { 3 | "Msg1": [ 4 | {"name": "type", "type": "string"}, 5 | {"name": "validator_addr", "type": "string"}, 6 | ], 7 | } 8 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/sp/__init__.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.models.eip712_messages.sp import ( 2 | msg_create_sp, 3 | msg_grant, 4 | msg_update_sp_status, 5 | msg_update_sp_storage_price, 6 | ) 7 | from greenfield_python_sdk.models.eip712_messages.sp.sp_url import ( 8 | COSMOS_GRANT, 9 | SUBMIT_PROPOSAL, 10 | UPDATE_SP_STATUS, 11 | UPDATE_SP_STORAGE_PRICE, 12 | ) 13 | 14 | TYPES_MAP = { 15 | COSMOS_GRANT: msg_grant.TYPES, 16 | SUBMIT_PROPOSAL: msg_create_sp.TYPES, 17 | UPDATE_SP_STORAGE_PRICE: msg_update_sp_storage_price.TYPES, 18 | UPDATE_SP_STATUS: msg_update_sp_status.TYPES, 19 | } 20 | 21 | URL_TO_PROTOS_TYPE_MAP = {**msg_grant.URL_TO_PROTOS_TYPE_MAP, **msg_create_sp.URL_TO_PROTOS_TYPE_MAP} 22 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/sp/msg_create_sp.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.models.eip712_messages.sp.sp_url import CREATE_STORAGE_PROVIDER 2 | from greenfield_python_sdk.protos.greenfield.sp import MsgCreateStorageProvider 3 | 4 | TYPES = { 5 | "Msg1": [ 6 | {"name": "type", "type": "string"}, 7 | {"name": "messages", "type": "TypeAny[]"}, 8 | {"name": "initial_deposit", "type": "TypeMsg1InitialDeposit[]"}, 9 | {"name": "proposer", "type": "string"}, 10 | {"name": "metadata", "type": "string"}, 11 | {"name": "title", "type": "string"}, 12 | {"name": "summary", "type": "string"}, 13 | ], 14 | "TypeAny": [{"name": "type", "type": "string"}, {"name": "value", "type": "bytes"}], 15 | "TypeMsg1InitialDeposit": [ 16 | {"name": "denom", "type": "string"}, 17 | {"name": "amount", "type": "string"}, 18 | ], 19 | } 20 | 21 | URL_TO_PROTOS_TYPE_MAP = {CREATE_STORAGE_PROVIDER: MsgCreateStorageProvider} 22 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/sp/msg_grant.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.models.eip712_messages.sp.sp_url import GRANT_DEPOSIT 2 | from greenfield_python_sdk.protos.greenfield.sp import DepositAuthorization 3 | 4 | TYPES = { 5 | "Msg1": [ 6 | {"name": "type", "type": "string"}, 7 | {"name": "granter", "type": "string"}, 8 | {"name": "grantee", "type": "string"}, 9 | {"name": "grant", "type": "TypeMsg1Grant"}, 10 | ], 11 | "TypeAny": [{"name": "type", "type": "string"}, {"name": "value", "type": "bytes"}], 12 | "TypeMsg1Grant": [{"name": "authorization", "type": "TypeAny"}, {"name": "expiration", "type": "string"}], 13 | } 14 | 15 | URL_TO_PROTOS_TYPE_MAP = {GRANT_DEPOSIT: DepositAuthorization} 16 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/sp/msg_update_sp_status.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "duration", "type": "string"}, 4 | {"name": "sp_address", "type": "string"}, 5 | {"name": "status", "type": "string"}, 6 | {"name": "type", "type": "string"}, 7 | ], 8 | } 9 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/sp/msg_update_sp_storage_price.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "type", "type": "string"}, 4 | {"name": "sp_address", "type": "string"}, 5 | {"name": "read_price", "type": "string"}, 6 | {"name": "free_read_quota", "type": "uint64"}, 7 | {"name": "store_price", "type": "string"}, 8 | ], 9 | } 10 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/sp/sp_url.py: -------------------------------------------------------------------------------- 1 | COSMOS_GRANT = "/cosmos.authz.v1beta1.MsgGrant" 2 | CREATE_STORAGE_PROVIDER = "/greenfield.sp.MsgCreateStorageProvider" 3 | GRANT_DEPOSIT = "/greenfield.sp.DepositAuthorization" 4 | SUBMIT_PROPOSAL = "/cosmos.gov.v1.MsgSubmitProposal" 5 | UPDATE_SP_STORAGE_PRICE = "/greenfield.sp.MsgUpdateSpStoragePrice" 6 | UPDATE_SP_STATUS = "/greenfield.sp.MsgUpdateStorageProviderStatus" 7 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/staking/__init__.py: -------------------------------------------------------------------------------- 1 | from greenfield_python_sdk.models.eip712_messages.staking import ( 2 | msg_begin_redelegate, 3 | msg_cancel_unbonding_delegation, 4 | msg_create_validator, 5 | msg_delegate, 6 | msg_edit_validator, 7 | msg_undelegate, 8 | ) 9 | from greenfield_python_sdk.models.eip712_messages.staking.staking_url import ( 10 | BEGIN_REDELEGATE, 11 | CANCEL_UNBONDING_DELEGATION, 12 | CREATE_VALIDATOR, 13 | DELEGATE, 14 | EDIT_VALIDATOR, 15 | UNDELEGATE, 16 | ) 17 | 18 | TYPES_MAP = { 19 | BEGIN_REDELEGATE: msg_begin_redelegate.TYPES, 20 | CANCEL_UNBONDING_DELEGATION: msg_cancel_unbonding_delegation.TYPES, 21 | CREATE_VALIDATOR: msg_create_validator.TYPES, 22 | DELEGATE: msg_delegate.TYPES, 23 | EDIT_VALIDATOR: msg_edit_validator.TYPES, 24 | UNDELEGATE: msg_undelegate.TYPES, 25 | } 26 | 27 | URL_TO_PROTOS_TYPE_MAP = {**msg_create_validator.URL_TO_PROTOS_TYPE_MAP} 28 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/staking/msg_begin_redelegate.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "type", "type": "string"}, 4 | {"name": "delegator_address", "type": "string"}, 5 | {"name": "validator_src_address", "type": "string"}, 6 | {"name": "validator_dst_address", "type": "string"}, 7 | {"name": "amount", "type": "TypeMsg1Amount"}, 8 | ], 9 | "TypeMsg1Amount": [{"name": "denom", "type": "string"}, {"name": "amount", "type": "string"}], 10 | } 11 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/staking/msg_cancel_unbonding_delegation.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "type", "type": "string"}, 4 | {"name": "delegator_address", "type": "string"}, 5 | {"name": "validator_address", "type": "string"}, 6 | {"name": "amount", "type": "TypeMsg1Amount"}, 7 | {"name": "creation_height", "type": "int64"}, 8 | ], 9 | "TypeMsg1Amount": [{"name": "denom", "type": "string"}, {"name": "amount", "type": "string"}], 10 | } 11 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/staking/msg_delegate.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "type", "type": "string"}, 4 | {"name": "delegator_address", "type": "string"}, 5 | {"name": "validator_address", "type": "string"}, 6 | {"name": "amount", "type": "TypeMsg1Amount"}, 7 | ], 8 | "TypeMsg1Amount": [{"name": "denom", "type": "string"}, {"name": "amount", "type": "string"}], 9 | } 10 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/staking/msg_edit_validator.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "type", "type": "string"}, 4 | {"name": "description", "type": "TypeMsg1Description"}, 5 | {"name": "validator_address", "type": "string"}, 6 | {"name": "commission_rate", "type": "string"}, 7 | {"name": "min_self_delegation", "type": "string"}, 8 | {"name": "relayer_address", "type": "string"}, 9 | {"name": "challenger_address", "type": "string"}, 10 | {"name": "bls_key", "type": "string"}, 11 | ], 12 | "TypeMsg1Description": [ 13 | {"name": "moniker", "type": "string"}, 14 | {"name": "identity", "type": "string"}, 15 | {"name": "website", "type": "string"}, 16 | {"name": "security_contact", "type": "string"}, 17 | {"name": "details", "type": "string"}, 18 | ], 19 | } 20 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/staking/msg_undelegate.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "type", "type": "string"}, 4 | {"name": "delegator_address", "type": "string"}, 5 | {"name": "validator_address", "type": "string"}, 6 | {"name": "amount", "type": "TypeMsg1Amount"}, 7 | ], 8 | "TypeMsg1Amount": [{"name": "denom", "type": "string"}, {"name": "amount", "type": "string"}], 9 | } 10 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/staking/staking_url.py: -------------------------------------------------------------------------------- 1 | BEGIN_REDELEGATE = "/cosmos.staking.v1beta1.MsgBeginRedelegate" 2 | CANCEL_UNBONDING_DELEGATION = "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation" 3 | CREATE_VALIDATOR = "/cosmos.staking.v1beta1.MsgCreateValidator" 4 | DELEGATE = "/cosmos.staking.v1beta1.MsgDelegate" 5 | EDIT_VALIDATOR = "/cosmos.staking.v1beta1.MsgEditValidator" 6 | PUBKEY = "/cosmos.crypto.ed25519.PubKey" 7 | STAKE_AUTHORIZATION = "/cosmos.staking.v1beta1.StakeAuthorization" 8 | UNDELEGATE = "/cosmos.staking.v1beta1.MsgUndelegate" 9 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/storage/bucket_url.py: -------------------------------------------------------------------------------- 1 | CREATE_BUCKET = "/greenfield.storage.MsgCreateBucket" 2 | DELETE_BUCKET = "/greenfield.storage.MsgDeleteBucket" 3 | UPDATE_BUCKET_INFO = "/greenfield.storage.MsgUpdateBucketInfo" 4 | MIGRATE_BUCKET = "/greenfield.storage.MsgMigrateBucket" 5 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/storage/msg_cancel_create_object.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "type", "type": "string"}, 4 | {"name": "operator", "type": "string"}, 5 | {"name": "bucket_name", "type": "string"}, 6 | {"name": "object_name", "type": "string"}, 7 | ], 8 | } 9 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/storage/msg_delete_bucket.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "type", "type": "string"}, 4 | {"name": "operator", "type": "string"}, 5 | {"name": "bucket_name", "type": "string"}, 6 | ], 7 | } 8 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/storage/msg_delete_object.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "type", "type": "string"}, 4 | {"name": "operator", "type": "string"}, 5 | {"name": "bucket_name", "type": "string"}, 6 | {"name": "object_name", "type": "string"}, 7 | ], 8 | } 9 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/storage/msg_delete_policy.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "type", "type": "string"}, 4 | {"name": "operator", "type": "string"}, 5 | {"name": "principal", "type": "TypeMsg1Principal"}, 6 | {"name": "resource", "type": "string"}, 7 | ], 8 | "TypeMsg1Principal": [{"name": "type", "type": "string"}, {"name": "value", "type": "string"}], 9 | } 10 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/storage/msg_migrate_bucket.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "bucket_name", "type": "string"}, 4 | {"name": "dst_primary_sp_approval", "type": "TypeMsg1DstPrimarySpApproval"}, 5 | {"name": "dst_primary_sp_id", "type": "uint32"}, 6 | {"name": "operator", "type": "string"}, 7 | {"name": "type", "type": "string"}, 8 | ], 9 | "TypeMsg1DstPrimarySpApproval": [ 10 | {"name": "expired_height", "type": "uint64"}, 11 | {"name": "global_virtual_group_family_id", "type": "uint32"}, 12 | {"name": "sig", "type": "bytes"}, 13 | ], 14 | } 15 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/storage/msg_mirror_bucket.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/greenfield.storage.MsgMirrorBucket" 2 | TYPES = { 3 | "Msg1": [ 4 | {"name": "type", "type": "string"}, 5 | {"name": "operator", "type": "string"}, 6 | {"name": "id", "type": "string"}, 7 | {"name": "bucket_name", "type": "string"}, 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/storage/msg_mirror_group.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/greenfield.storage.MsgMirrorGroup" 2 | TYPES = { 3 | "Msg1": [ 4 | {"name": "type", "type": "string"}, 5 | {"name": "id", "type": "string"}, 6 | {"name": "group_name", "type": "string"}, 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/storage/msg_mirror_object.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/greenfield.storage.MsgMirrorObject" 2 | TYPES = { 3 | "Msg1": [ 4 | {"name": "type", "type": "string"}, 5 | {"name": "operator", "type": "string"}, 6 | {"name": "id", "type": "string"}, 7 | {"name": "bucket_name", "type": "string"}, 8 | {"name": "object_name", "type": "string"}, 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/storage/msg_set_tag.py: -------------------------------------------------------------------------------- 1 | TYPE_URL = "/greenfield.storage.MsgSetTag" 2 | TYPES = { 3 | "Msg1": [ 4 | {"name": "type", "type": "string"}, 5 | {"name": "operator", "type": "string"}, 6 | {"name": "resource", "type": "string"}, 7 | {"name": "tags", "type": "TypeMsg1Tags"}, 8 | ], 9 | "TypeMsg1Tags": [ 10 | {"name": "tags", "type": "TypeMsg1TagsTags[]"}, 11 | ], 12 | "TypeMsg1TagsTags": [ 13 | {"name": "key", "type": "string"}, 14 | {"name": "value", "type": "string"}, 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/storage/msg_update_bucket_info.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | {"name": "type", "type": "string"}, 4 | {"name": "operator", "type": "string"}, 5 | {"name": "bucket_name", "type": "string"}, 6 | {"name": "charged_read_quota", "type": "TypeMsg1ChargedReadQuota"}, 7 | {"name": "payment_address", "type": "string"}, 8 | {"name": "visibility", "type": "string"}, 9 | ], 10 | "TypeMsg1ChargedReadQuota": [{"name": "value", "type": "uint64"}], 11 | } 12 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/storage/msg_update_object_info.py: -------------------------------------------------------------------------------- 1 | TYPES = { 2 | "Msg1": [ 3 | { 4 | "name": "type", 5 | "type": "string", 6 | }, 7 | { 8 | "name": "operator", 9 | "type": "string", 10 | }, 11 | { 12 | "name": "bucket_name", 13 | "type": "string", 14 | }, 15 | { 16 | "name": "object_name", 17 | "type": "string", 18 | }, 19 | { 20 | "name": "visibility", 21 | "type": "string", 22 | }, 23 | ], 24 | } 25 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/storage/object_url.py: -------------------------------------------------------------------------------- 1 | CREATE_OBJECT = "/greenfield.storage.MsgCreateObject" 2 | DELETE_OBJECT = "/greenfield.storage.MsgDeleteObject" 3 | CANCEL_CREATE_OBJECT = "/greenfield.storage.MsgCancelCreateObject" 4 | SEAL_OBJECT = "/greenfield.storage.MsgSealObject" 5 | UPDATE_OBJECT_INFO = "/greenfield.storage.MsgUpdateObjectInfo" 6 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/eip712_messages/storage/policy_url.py: -------------------------------------------------------------------------------- 1 | PUT_POLICY = "/greenfield.storage.MsgPutPolicy" 2 | DELETE_POLICY = "/greenfield.storage.MsgDeletePolicy" 3 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/payment.py: -------------------------------------------------------------------------------- 1 | from typing import Optional 2 | 3 | from pydantic import BaseModel 4 | 5 | from greenfield_python_sdk.protos.greenfield.payment import StreamRecord 6 | 7 | 8 | class ListUserPaymentAccountsOptions(BaseModel): 9 | account: Optional[str] = "" 10 | endpoint: Optional[str] = "" 11 | sp_address: Optional[str] = "" 12 | 13 | 14 | class PaymentAccount(BaseModel): 15 | address: str 16 | owner: str 17 | refundable: bool 18 | update_at: int 19 | update_time: int 20 | 21 | 22 | class ListUserPaymentAccountsResult(BaseModel): 23 | payment_account: Optional[PaymentAccount] = None 24 | stream_record: Optional[StreamRecord] = None 25 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/proposal.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | 3 | 4 | class ProposalOptions(BaseModel): 5 | metadata: str = "" 6 | -------------------------------------------------------------------------------- /greenfield_python_sdk/models/storage_provider.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | from datetime import datetime 3 | from typing import Optional 4 | 5 | import betterproto 6 | from pydantic import BaseModel 7 | 8 | 9 | class GrantDepositOptions(BaseModel): 10 | expiration: datetime = None 11 | 12 | 13 | @dataclass(eq=False, repr=False) 14 | class Any(betterproto.Message): 15 | type: str = betterproto.string_field(1) 16 | value: bytes = betterproto.bytes_field(2) 17 | 18 | 19 | class CreateStorageProviderOptions(BaseModel): 20 | read_price: Optional[int] = None 21 | free_read_quota: Optional[int] = None 22 | store_price: Optional[int] = None 23 | proposal_deposit_amount: Optional[int] = None 24 | proposal_title: Optional[str] = None 25 | proposal_summary: Optional[str] = None 26 | proposal_meta_data: Optional[str] = None 27 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/amino/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: amino/amino.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/app/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/app/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/app/runtime/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/app/runtime/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/auth/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/auth/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/auth/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/auth/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/authz/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/authz/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/authz/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/authz/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/authz/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/authz/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """Module is the config object of the authz module.""" 13 | 14 | pass 15 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/autocli/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/autocli/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/bank/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/bank/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/bank/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/bank/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/bank/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/bank/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | from typing import List 7 | 8 | import betterproto 9 | 10 | 11 | @dataclass(eq=False, repr=False) 12 | class Module(betterproto.Message): 13 | """Module is the config object of the bank module.""" 14 | 15 | blocked_module_accounts_override: List[str] = betterproto.string_field(1) 16 | """ 17 | blocked_module_accounts configures exceptional module accounts which should be 18 | blocked from receiving funds. 19 | If left empty it defaults to the list of account names supplied in the auth module 20 | configuration as 21 | module_account_permissions 22 | """ 23 | 24 | authority: str = betterproto.string_field(2) 25 | """ 26 | authority defines the custom module authority. If not set, defaults to the 27 | governance module. 28 | """ 29 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/base/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/base/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/base/abci/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/base/abci/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/base/kv/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/base/kv/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/base/kv/v1beta1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/base/kv/v1beta1/kv.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | from typing import List 7 | 8 | import betterproto 9 | 10 | 11 | @dataclass(eq=False, repr=False) 12 | class Pairs(betterproto.Message): 13 | """Pairs defines a repeated slice of Pair objects.""" 14 | 15 | pairs: List["Pair"] = betterproto.message_field(1) 16 | 17 | 18 | @dataclass(eq=False, repr=False) 19 | class Pair(betterproto.Message): 20 | """Pair defines a key/value bytes tuple.""" 21 | 22 | key: bytes = betterproto.bytes_field(1) 23 | value: bytes = betterproto.bytes_field(2) 24 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/base/node/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/base/node/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/base/query/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/base/query/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/base/reflection/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/base/reflection/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/base/snapshots/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/base/snapshots/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/base/store/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/base/store/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/base/tendermint/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/base/tendermint/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/capability/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/capability/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/capability/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/capability/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/capability/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/capability/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """Module is the config object of the capability module.""" 13 | 14 | seal_keeper: bool = betterproto.bool_field(1) 15 | """ 16 | seal_keeper defines if keeper.Seal() will run on BeginBlock() to prevent further 17 | modules from creating a scoped 18 | keeper. For more details check x/capability/keeper.go. 19 | """ 20 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/consensus/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/consensus/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/consensus/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/consensus/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/consensus/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/consensus/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """Module is the config object of the consensus module.""" 13 | 14 | authority: str = betterproto.string_field(1) 15 | """ 16 | authority defines the custom module authority. If not set, defaults to the 17 | governance module. 18 | """ 19 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/crisis/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/crisis/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/crisis/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/crisis/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/crisis/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/crisis/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """Module is the config object of the crisis module.""" 13 | 14 | fee_collector_name: str = betterproto.string_field(1) 15 | """fee_collector_name is the name of the FeeCollector ModuleAccount.""" 16 | 17 | authority: str = betterproto.string_field(2) 18 | """ 19 | authority defines the custom module authority. If not set, defaults to the 20 | governance module. 21 | """ 22 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/crosschain/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/crosschain/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/crosschain/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/crosschain/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/crosschain/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/crosschain/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """Module is the config object of the crosschain module.""" 13 | 14 | authority: str = betterproto.string_field(1) 15 | """ 16 | authority defines the custom module authority. If not set, defaults to the 17 | governance module. 18 | """ 19 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/crypto/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/crypto/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/crypto/ed25519/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/crypto/ed25519/keys.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class PubKey(betterproto.Message): 12 | """ 13 | PubKey is an ed25519 public key for handling Tendermint keys in SDK. 14 | It's needed for Any serialization and SDK compatibility. 15 | It must not be used in a non Tendermint key context because it doesn't implement 16 | ADR-28. Nevertheless, you will like to use ed25519 in app user level 17 | then you must create a new proto message and follow ADR-28 for Address construction. 18 | """ 19 | 20 | key: bytes = betterproto.bytes_field(1) 21 | 22 | 23 | @dataclass(eq=False, repr=False) 24 | class PrivKey(betterproto.Message): 25 | """ 26 | Deprecated: PrivKey defines a ed25519 private key. 27 | NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator 28 | context. 29 | """ 30 | 31 | key: bytes = betterproto.bytes_field(1) 32 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/crypto/eth/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/crypto/eth/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/crypto/eth/bls/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/crypto/eth/bls/keys.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class PubKey(betterproto.Message): 12 | """ 13 | PubKey defines a bls public key 14 | Key is the compressed form of the pubkey. 15 | """ 16 | 17 | key: bytes = betterproto.bytes_field(1) 18 | """key is the public key in byte form""" 19 | 20 | 21 | @dataclass(eq=False, repr=False) 22 | class PrivKey(betterproto.Message): 23 | """PrivKey defines a bls private key.""" 24 | 25 | key: bytes = betterproto.bytes_field(1) 26 | """key is the private key in byte form""" 27 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/crypto/eth/ethsecp256k1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/crypto/eth/ethsecp256k1/keys.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class PubKey(betterproto.Message): 12 | """ 13 | PubKey defines a type alias for an ecdsa.PublicKey that implements 14 | Tendermint's PubKey interface. It represents the 33-byte compressed public 15 | key format. 16 | """ 17 | 18 | key: bytes = betterproto.bytes_field(1) 19 | 20 | 21 | @dataclass(eq=False, repr=False) 22 | class PrivKey(betterproto.Message): 23 | """ 24 | PrivKey defines a type alias for an ecdsa.PrivateKey that implements 25 | Tendermint's PrivateKey interface. 26 | """ 27 | 28 | key: bytes = betterproto.bytes_field(1) 29 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/crypto/hd/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/crypto/hd/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/crypto/hd/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/crypto/hd/v1/hd.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Bip44Params(betterproto.Message): 12 | """BIP44Params is used as path field in ledger item in Record.""" 13 | 14 | purpose: int = betterproto.uint32_field(1) 15 | """ 16 | purpose is a constant set to 44' (or 0x8000002C) following the BIP43 recommendation 17 | """ 18 | 19 | coin_type: int = betterproto.uint32_field(2) 20 | """coin_type is a constant that improves privacy""" 21 | 22 | account: int = betterproto.uint32_field(3) 23 | """account splits the key space into independent user identities""" 24 | 25 | change: bool = betterproto.bool_field(4) 26 | """ 27 | change is a constant used for public derivation. Constant 0 is used for external 28 | chain and constant 1 for internal 29 | chain. 30 | """ 31 | 32 | address_index: int = betterproto.uint32_field(5) 33 | """address_index is used as child index in BIP32 derivation""" 34 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/crypto/keyring/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/crypto/keyring/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/crypto/multisig/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/crypto/multisig/keys.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | from typing import List 7 | 8 | import betterproto 9 | import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf 10 | 11 | 12 | @dataclass(eq=False, repr=False) 13 | class LegacyAminoPubKey(betterproto.Message): 14 | """ 15 | LegacyAminoPubKey specifies a public key type 16 | which nests multiple public keys and a threshold, 17 | it uses legacy amino address rules. 18 | """ 19 | 20 | threshold: int = betterproto.uint32_field(1) 21 | public_keys: List["betterproto_lib_google_protobuf.Any"] = betterproto.message_field(2) 22 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/crypto/multisig/v1beta1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/crypto/multisig/v1beta1/multisig.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | from typing import List 7 | 8 | import betterproto 9 | 10 | 11 | @dataclass(eq=False, repr=False) 12 | class MultiSignature(betterproto.Message): 13 | """ 14 | MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. 15 | See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers 16 | signed and with which modes. 17 | """ 18 | 19 | signatures: List[bytes] = betterproto.bytes_field(1) 20 | 21 | 22 | @dataclass(eq=False, repr=False) 23 | class CompactBitArray(betterproto.Message): 24 | """ 25 | CompactBitArray is an implementation of a space efficient bit array. 26 | This is used to ensure that the encoded data takes up a minimal amount of 27 | space after proto encoding. 28 | This is not thread safe, and is not intended for concurrent usage. 29 | """ 30 | 31 | extra_bits_stored: int = betterproto.uint32_field(1) 32 | elems: bytes = betterproto.bytes_field(2) 33 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/crypto/secp256k1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/crypto/secp256k1/keys.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class PubKey(betterproto.Message): 12 | """ 13 | PubKey defines a secp256k1 public key 14 | Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte 15 | if the y-coordinate is the lexicographically largest of the two associated with 16 | the x-coordinate. Otherwise the first byte is a 0x03. 17 | This prefix is followed with the x-coordinate. 18 | """ 19 | 20 | key: bytes = betterproto.bytes_field(1) 21 | 22 | 23 | @dataclass(eq=False, repr=False) 24 | class PrivKey(betterproto.Message): 25 | """PrivKey defines a secp256k1 private key.""" 26 | 27 | key: bytes = betterproto.bytes_field(1) 28 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/crypto/secp256r1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/crypto/secp256r1/keys.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class PubKey(betterproto.Message): 12 | """PubKey defines a secp256r1 ECDSA public key.""" 13 | 14 | key: bytes = betterproto.bytes_field(1) 15 | """ 16 | Point on secp256r1 curve in a compressed representation as specified in section 17 | 4.3.6 of ANSI X9.62: https://webstore.ansi.org/standards/ascx9/ansix9621998 18 | """ 19 | 20 | 21 | @dataclass(eq=False, repr=False) 22 | class PrivKey(betterproto.Message): 23 | """PrivKey defines a secp256r1 ECDSA private key.""" 24 | 25 | secret: bytes = betterproto.bytes_field(1) 26 | """secret number serialized using big-endian encoding""" 27 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/distribution/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/distribution/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/distribution/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/distribution/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/distribution/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/distribution/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """Module is the config object of the distribution module.""" 13 | 14 | fee_collector_name: str = betterproto.string_field(1) 15 | authority: str = betterproto.string_field(2) 16 | """ 17 | authority defines the custom module authority. If not set, defaults to the 18 | governance module. 19 | """ 20 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/evidence/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/evidence/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/evidence/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/evidence/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/evidence/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/evidence/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """Module is the config object of the evidence module.""" 13 | 14 | pass 15 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/feegrant/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/feegrant/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/feegrant/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/feegrant/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/feegrant/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/feegrant/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """Module is the config object of the feegrant module.""" 13 | 14 | pass 15 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/gashub/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/gashub/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/gashub/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/gashub/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/gashub/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/gashub/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """Module is the config object of the gashub module.""" 13 | 14 | authority: str = betterproto.string_field(1) 15 | """ 16 | authority defines the custom module authority. If not set, defaults to the 17 | governance module. 18 | """ 19 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/genutil/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/genutil/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/genutil/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/genutil/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/genutil/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/genutil/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """Module is the config object for the genutil module.""" 13 | 14 | pass 15 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/genutil/v1beta1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/genutil/v1beta1/genesis.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | from typing import List 7 | 8 | import betterproto 9 | 10 | 11 | @dataclass(eq=False, repr=False) 12 | class GenesisState(betterproto.Message): 13 | """GenesisState defines the raw genesis transaction in JSON.""" 14 | 15 | gen_txs: List[bytes] = betterproto.bytes_field(1) 16 | """gen_txs defines the genesis transactions.""" 17 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/gov/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/gov/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/gov/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/gov/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/gov/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/gov/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """Module is the config object of the gov module.""" 13 | 14 | max_metadata_len: int = betterproto.uint64_field(1) 15 | """ 16 | max_metadata_len defines the maximum proposal metadata length. 17 | Defaults to 255 if not explicitly set. 18 | """ 19 | 20 | authority: str = betterproto.string_field(2) 21 | """ 22 | authority defines the custom module authority. If not set, defaults to the 23 | governance module. 24 | """ 25 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/group/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/group/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/group/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/group/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/group/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/group/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | from datetime import timedelta 7 | 8 | import betterproto 9 | 10 | 11 | @dataclass(eq=False, repr=False) 12 | class Module(betterproto.Message): 13 | """Module is the config object of the group module.""" 14 | 15 | max_execution_period: timedelta = betterproto.message_field(1) 16 | """ 17 | max_execution_period defines the max duration after a proposal's voting period ends 18 | that members can send a MsgExec 19 | to execute the proposal. 20 | """ 21 | 22 | max_metadata_len: int = betterproto.uint64_field(2) 23 | """ 24 | max_metadata_len defines the max length of the metadata bytes field for various 25 | entities within the group module. 26 | Defaults to 255 if not explicitly set. 27 | """ 28 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/mint/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/mint/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/mint/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/mint/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/mint/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/mint/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """Module is the config object of the mint module.""" 13 | 14 | fee_collector_name: str = betterproto.string_field(1) 15 | authority: str = betterproto.string_field(2) 16 | """ 17 | authority defines the custom module authority. If not set, defaults to the 18 | governance module. 19 | """ 20 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/msg/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/msg/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/msg/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/msg/v1/msg.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/nft/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/nft/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/nft/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/nft/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/nft/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/nft/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """Module is the config object of the nft module.""" 13 | 14 | pass 15 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/oracle/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/oracle/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/oracle/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/oracle/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/oracle/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/oracle/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """Module is the config object of the oracle module.""" 13 | 14 | fee_collector_name: str = betterproto.string_field(2) 15 | """fee_collector_name is the name of the FeeCollector ModuleAccount.""" 16 | 17 | authority: str = betterproto.string_field(3) 18 | """ 19 | authority defines the custom module authority. If not set, defaults to the 20 | governance module. 21 | """ 22 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/orm/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/orm/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/orm/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/orm/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/orm/module/v1alpha1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/orm/module/v1alpha1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """ 13 | Module defines the ORM module which adds providers to the app container for 14 | module-scoped DB's. In the future it may provide gRPC services for interacting 15 | with ORM data. 16 | """ 17 | 18 | pass 19 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/orm/query/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/orm/query/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/params/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/params/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/params/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/params/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/params/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/params/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """Module is the config object of the params module.""" 13 | 14 | pass 15 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/query/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/query/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/query/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/query/v1/query.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/reflection/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/reflection/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/slashing/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/slashing/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/slashing/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/slashing/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/slashing/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/slashing/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """Module is the config object of the slashing module.""" 13 | 14 | authority: str = betterproto.string_field(1) 15 | """ 16 | authority defines the custom module authority. If not set, defaults to the 17 | governance module. 18 | """ 19 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/staking/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/staking/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/staking/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/staking/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/staking/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/staking/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | from typing import List 7 | 8 | import betterproto 9 | 10 | 11 | @dataclass(eq=False, repr=False) 12 | class Module(betterproto.Message): 13 | """Module is the config object of the staking module.""" 14 | 15 | hooks_order: List[str] = betterproto.string_field(1) 16 | """ 17 | hooks_order specifies the order of staking hooks and should be a list 18 | of module names which provide a staking hooks instance. If no order is 19 | provided, then hooks will be applied in alphabetical order of module names. 20 | """ 21 | 22 | authority: str = betterproto.string_field(2) 23 | """ 24 | authority defines the custom module authority. If not set, defaults to the 25 | governance module. 26 | """ 27 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/tx/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/tx/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/tx/config/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/tx/config/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/tx/config/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/tx/config/v1/config.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Config(betterproto.Message): 12 | """Config is the config object of the x/auth/tx package.""" 13 | 14 | skip_ante_handler: bool = betterproto.bool_field(1) 15 | """ 16 | skip_ante_handler defines whether the ante handler registration should be skipped in 17 | case an app wants to override 18 | this functionality. 19 | """ 20 | 21 | skip_post_handler: bool = betterproto.bool_field(2) 22 | """ 23 | skip_post_handler defines whether the post handler registration should be skipped in 24 | case an app wants to override 25 | this functionality. 26 | """ 27 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/tx/signing/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/tx/signing/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/upgrade/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/upgrade/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/upgrade/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/upgrade/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/upgrade/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/upgrade/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """Module is the config object of the upgrade module.""" 13 | 14 | pass 15 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/vesting/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/vesting/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/vesting/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/cosmos/vesting/module/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/cosmos/vesting/module/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cosmos/vesting/module/v1/module.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Module(betterproto.Message): 12 | """Module is the config object of the vesting module.""" 13 | 14 | pass 15 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/gogoproto/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: gogoproto/gogo.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/google/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/google/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/greenfield/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/greenfield/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/greenfield/resource/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: greenfield/resource/types.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | class ResourceType(betterproto.Enum): 11 | RESOURCE_TYPE_UNSPECIFIED = 0 12 | RESOURCE_TYPE_BUCKET = 1 13 | RESOURCE_TYPE_OBJECT = 2 14 | RESOURCE_TYPE_GROUP = 3 15 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/tendermint/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/tendermint/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/tendermint/libs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/tendermint/libs/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/tendermint/libs/bits/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: tendermint/libs/bits/types.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | from typing import List 7 | 8 | import betterproto 9 | 10 | 11 | @dataclass(eq=False, repr=False) 12 | class BitArray(betterproto.Message): 13 | bits: int = betterproto.int64_field(1) 14 | elems: List[int] = betterproto.uint64_field(2) 15 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/tendermint/mempool/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: tendermint/mempool/types.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | from typing import List 7 | 8 | import betterproto 9 | 10 | 11 | @dataclass(eq=False, repr=False) 12 | class Txs(betterproto.Message): 13 | txs: List[bytes] = betterproto.bytes_field(1) 14 | 15 | 16 | @dataclass(eq=False, repr=False) 17 | class Message(betterproto.Message): 18 | txs: "Txs" = betterproto.message_field(1, group="sum") 19 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/tendermint/rpc/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/tendermint/rpc/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/tendermint/services/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/tendermint/services/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/tendermint/services/block/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/tendermint/services/block/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/tendermint/services/block_results/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/tendermint/services/block_results/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/tendermint/services/pruning/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/tendermint/services/pruning/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/tendermint/services/version/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/protos/tendermint/services/version/__init__.py -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/tendermint/store/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: tendermint/store/types.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class BlockStoreState(betterproto.Message): 12 | base: int = betterproto.int64_field(1) 13 | height: int = betterproto.int64_field(2) 14 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/tendermint/version/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: tendermint/version/types.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class App(betterproto.Message): 12 | """ 13 | App includes the protocol and software version for the application. 14 | This information is included in ResponseInfo. The App.Protocol can be 15 | updated in ResponseEndBlock. 16 | """ 17 | 18 | protocol: int = betterproto.uint64_field(1) 19 | software: str = betterproto.string_field(2) 20 | 21 | 22 | @dataclass(eq=False, repr=False) 23 | class Consensus(betterproto.Message): 24 | """ 25 | Consensus captures the consensus rules for processing a block in the blockchain, 26 | including all blockchain data structures and the rules of the application's 27 | state transition machine. 28 | """ 29 | 30 | block: int = betterproto.uint64_field(1) 31 | app: int = betterproto.uint64_field(2) 32 | -------------------------------------------------------------------------------- /greenfield_python_sdk/protos/tendermint/votepool/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: tendermint/votepool/types.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | from dataclasses import dataclass 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class Vote(betterproto.Message): 12 | pub_key: bytes = betterproto.bytes_field(1) 13 | signature: bytes = betterproto.bytes_field(2) 14 | event_type: int = betterproto.uint32_field(3) 15 | event_hash: bytes = betterproto.bytes_field(4) 16 | 17 | 18 | @dataclass(eq=False, repr=False) 19 | class Message(betterproto.Message): 20 | vote: "Vote" = betterproto.message_field(1, group="sum") 21 | -------------------------------------------------------------------------------- /greenfield_python_sdk/storage_provider/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/greenfield_python_sdk/storage_provider/__init__.py -------------------------------------------------------------------------------- /proto/buf.gen.yaml: -------------------------------------------------------------------------------- 1 | version: v1 2 | plugins: 3 | - name: python_betterproto 4 | out: ../greenfield_python_sdk/protos 5 | strategy: all 6 | opt: 7 | - pydantic_dataclasses 8 | -------------------------------------------------------------------------------- /proto/buf.lock: -------------------------------------------------------------------------------- 1 | # Generated by buf. DO NOT EDIT. 2 | version: v1 3 | deps: 4 | - remote: buf.build 5 | owner: cosmos 6 | repository: cosmos-proto 7 | commit: 1935555c206d4afb9e94615dfd0fad31 8 | - remote: buf.build 9 | owner: cosmos 10 | repository: gogo-proto 11 | commit: 34d970b699f84aa382f3c29773a60836 12 | - remote: buf.build 13 | owner: googleapis 14 | repository: googleapis 15 | commit: c0b37eaf6f1f43ecacbc85e4e4d1a440 16 | -------------------------------------------------------------------------------- /proto/buf.yaml: -------------------------------------------------------------------------------- 1 | version: v1 2 | name: buf.build/bnb-chain/python-sdk 3 | deps: 4 | - buf.build/cosmos/cosmos-proto 5 | - buf.build/cosmos/gogo-proto 6 | - buf.build/googleapis/googleapis 7 | breaking: 8 | use: 9 | - FILE 10 | lint: 11 | use: 12 | - DEFAULT 13 | - COMMENTS 14 | - FILE_LOWER_SNAKE_CASE 15 | except: 16 | - UNARY_RPC 17 | - COMMENT_FIELD 18 | - SERVICE_SUFFIX 19 | - PACKAGE_VERSION_SUFFIX 20 | - RPC_REQUEST_STANDARD_NAME 21 | 22 | -------------------------------------------------------------------------------- /proto/cosmos/app/v1alpha1/query.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.app.v1alpha1; 4 | 5 | import "cosmos/app/v1alpha1/config.proto"; 6 | 7 | // Query is the app module query service. 8 | service Query { 9 | 10 | // Config returns the current app config. 11 | rpc Config(QueryConfigRequest) returns (QueryConfigResponse) {} 12 | } 13 | 14 | // QueryConfigRequest is the Query/Config request type. 15 | message QueryConfigRequest {} 16 | 17 | // QueryConfigRequest is the Query/Config response type. 18 | message QueryConfigResponse { 19 | 20 | // config is the current app config. 21 | Config config = 1; 22 | } 23 | -------------------------------------------------------------------------------- /proto/cosmos/auth/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.auth.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object for the auth module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/auth" 11 | }; 12 | 13 | // bech32_prefix is the bech32 account prefix for the app. 14 | string bech32_prefix = 1; 15 | 16 | // module_account_permissions are module account permissions. 17 | repeated ModuleAccountPermission module_account_permissions = 2; 18 | 19 | // authority defines the custom module authority. If not set, defaults to the governance module. 20 | string authority = 3; 21 | } 22 | 23 | // ModuleAccountPermission represents permissions for a module account. 24 | message ModuleAccountPermission { 25 | // account is the name of the module. 26 | string account = 1; 27 | 28 | // permissions are the permissions this module has. Currently recognized 29 | // values are minter, burner and staking. 30 | repeated string permissions = 2; 31 | } 32 | -------------------------------------------------------------------------------- /proto/cosmos/auth/v1beta1/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.auth.v1beta1; 3 | 4 | import "google/protobuf/any.proto"; 5 | import "gogoproto/gogo.proto"; 6 | import "cosmos/auth/v1beta1/auth.proto"; 7 | import "amino/amino.proto"; 8 | 9 | option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; 10 | 11 | // GenesisState defines the auth module's genesis state. 12 | message GenesisState { 13 | // params defines all the parameters of the module. 14 | Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; 15 | 16 | // accounts are the accounts present at genesis. 17 | repeated google.protobuf.Any accounts = 2; 18 | } 19 | -------------------------------------------------------------------------------- /proto/cosmos/authz/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.authz.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the authz module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/authz" 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /proto/cosmos/authz/v1beta1/event.proto: -------------------------------------------------------------------------------- 1 | // Since: cosmos-sdk 0.43 2 | syntax = "proto3"; 3 | package cosmos.authz.v1beta1; 4 | 5 | import "cosmos_proto/cosmos.proto"; 6 | 7 | option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; 8 | 9 | // EventGrant is emitted on Msg/Grant 10 | message EventGrant { 11 | // Msg type URL for which an autorization is granted 12 | string msg_type_url = 2; 13 | // Granter account address 14 | string granter = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; 15 | // Grantee account address 16 | string grantee = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; 17 | } 18 | 19 | // EventRevoke is emitted on Msg/Revoke 20 | message EventRevoke { 21 | // Msg type URL for which an autorization is revoked 22 | string msg_type_url = 2; 23 | // Granter account address 24 | string granter = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; 25 | // Grantee account address 26 | string grantee = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; 27 | } 28 | -------------------------------------------------------------------------------- /proto/cosmos/authz/v1beta1/genesis.proto: -------------------------------------------------------------------------------- 1 | // Since: cosmos-sdk 0.43 2 | syntax = "proto3"; 3 | package cosmos.authz.v1beta1; 4 | 5 | import "gogoproto/gogo.proto"; 6 | import "cosmos/authz/v1beta1/authz.proto"; 7 | import "amino/amino.proto"; 8 | 9 | option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; 10 | 11 | // GenesisState defines the authz module's genesis state. 12 | message GenesisState { 13 | repeated GrantAuthorization authorization = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; 14 | } 15 | -------------------------------------------------------------------------------- /proto/cosmos/autocli/v1/query.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.autocli.v1; 4 | 5 | import "cosmos/autocli/v1/options.proto"; 6 | import "cosmos/query/v1/query.proto"; 7 | 8 | option go_package = "cosmossdk.io/api/cosmos/base/cli/v1;cliv1"; 9 | 10 | // RemoteInfoService provides clients with the information they need 11 | // to build dynamically CLI clients for remote chains. 12 | service Query { 13 | // AppOptions returns the autocli options for all of the modules in an app. 14 | rpc AppOptions(AppOptionsRequest) returns (AppOptionsResponse) { 15 | // NOTE: autocli options SHOULD NOT be part of consensus and module_query_safe 16 | // should be kept as false. 17 | option (cosmos.query.v1.module_query_safe) = false; 18 | } 19 | } 20 | 21 | // AppOptionsRequest is the RemoteInfoService/AppOptions request type. 22 | message AppOptionsRequest {} 23 | 24 | // AppOptionsResponse is the RemoteInfoService/AppOptions response type. 25 | message AppOptionsResponse { 26 | // module_options is a map of module name to autocli module options. 27 | map module_options = 1; 28 | } 29 | -------------------------------------------------------------------------------- /proto/cosmos/bank/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.bank.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the bank module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/bank" 11 | }; 12 | 13 | // blocked_module_accounts configures exceptional module accounts which should be blocked from receiving funds. 14 | // If left empty it defaults to the list of account names supplied in the auth module configuration as 15 | // module_account_permissions 16 | repeated string blocked_module_accounts_override = 1; 17 | 18 | // authority defines the custom module authority. If not set, defaults to the governance module. 19 | string authority = 2; 20 | } -------------------------------------------------------------------------------- /proto/cosmos/bank/v1beta1/authz.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.bank.v1beta1; 3 | 4 | import "amino/amino.proto"; 5 | import "gogoproto/gogo.proto"; 6 | import "cosmos_proto/cosmos.proto"; 7 | import "cosmos/base/v1beta1/coin.proto"; 8 | 9 | option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; 10 | 11 | // SendAuthorization allows the grantee to spend up to spend_limit coins from 12 | // the granter's account. 13 | // 14 | // Since: cosmos-sdk 0.43 15 | message SendAuthorization { 16 | option (cosmos_proto.implements_interface) = "cosmos.authz.v1beta1.Authorization"; 17 | option (amino.name) = "cosmos-sdk/SendAuthorization"; 18 | 19 | repeated cosmos.base.v1beta1.Coin spend_limit = 1 [ 20 | (gogoproto.nullable) = false, 21 | (amino.dont_omitempty) = true, 22 | (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" 23 | ]; 24 | 25 | // allow_list specifies an optional list of addresses to whom the grantee can send tokens on behalf of the 26 | // granter. If omitted, any recipient is allowed. 27 | // 28 | // Since: cosmos-sdk 0.47 29 | repeated string allow_list = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; 30 | } 31 | -------------------------------------------------------------------------------- /proto/cosmos/base/kv/v1beta1/kv.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.base.kv.v1beta1; 3 | 4 | import "gogoproto/gogo.proto"; 5 | 6 | option go_package = "github.com/cosmos/cosmos-sdk/types/kv"; 7 | 8 | // Pairs defines a repeated slice of Pair objects. 9 | message Pairs { 10 | repeated Pair pairs = 1 [(gogoproto.nullable) = false]; 11 | } 12 | 13 | // Pair defines a key/value bytes tuple. 14 | message Pair { 15 | bytes key = 1; 16 | bytes value = 2; 17 | } 18 | -------------------------------------------------------------------------------- /proto/cosmos/base/node/v1beta1/query.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.base.node.v1beta1; 3 | 4 | import "google/api/annotations.proto"; 5 | 6 | option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/node"; 7 | 8 | // Service defines the gRPC querier service for node related queries. 9 | service Service { 10 | // Config queries for the operator configuration. 11 | rpc Config(ConfigRequest) returns (ConfigResponse) { 12 | option (google.api.http).get = "/cosmos/base/node/v1beta1/config"; 13 | } 14 | } 15 | 16 | // ConfigRequest defines the request structure for the Config gRPC query. 17 | message ConfigRequest {} 18 | 19 | // ConfigResponse defines the response structure for the Config gRPC query. 20 | message ConfigResponse { 21 | string minimum_gas_price = 1; 22 | } 23 | -------------------------------------------------------------------------------- /proto/cosmos/base/store/v1beta1/commit_info.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.base.store.v1beta1; 3 | 4 | import "gogoproto/gogo.proto"; 5 | import "google/protobuf/timestamp.proto"; 6 | 7 | option go_package = "github.com/cosmos/cosmos-sdk/store/types"; 8 | 9 | // CommitInfo defines commit information used by the multi-store when committing 10 | // a version/height. 11 | message CommitInfo { 12 | int64 version = 1; 13 | repeated StoreInfo store_infos = 2 [(gogoproto.nullable) = false]; 14 | google.protobuf.Timestamp timestamp = 3 15 | [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; 16 | } 17 | 18 | // StoreInfo defines store-specific commit information. It contains a reference 19 | // between a store name and the commit ID. 20 | message StoreInfo { 21 | string name = 1; 22 | CommitID commit_id = 2 [(gogoproto.nullable) = false]; 23 | } 24 | 25 | // CommitID defines the commitment information when a specific store is 26 | // committed. 27 | message CommitID { 28 | option (gogoproto.goproto_stringer) = false; 29 | 30 | int64 version = 1; 31 | bytes hash = 2; 32 | } 33 | -------------------------------------------------------------------------------- /proto/cosmos/capability/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.capability.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the capability module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/capability" 11 | }; 12 | 13 | // seal_keeper defines if keeper.Seal() will run on BeginBlock() to prevent further modules from creating a scoped 14 | // keeper. For more details check x/capability/keeper.go. 15 | bool seal_keeper = 1; 16 | } -------------------------------------------------------------------------------- /proto/cosmos/capability/v1beta1/capability.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.capability.v1beta1; 3 | 4 | option go_package = "github.com/cosmos/cosmos-sdk/x/capability/types"; 5 | 6 | import "gogoproto/gogo.proto"; 7 | import "amino/amino.proto"; 8 | 9 | // Capability defines an implementation of an object capability. The index 10 | // provided to a Capability must be globally unique. 11 | message Capability { 12 | option (gogoproto.goproto_stringer) = false; 13 | 14 | uint64 index = 1; 15 | } 16 | 17 | // Owner defines a single capability owner. An owner is defined by the name of 18 | // capability and the module name. 19 | message Owner { 20 | option (gogoproto.goproto_stringer) = false; 21 | option (gogoproto.goproto_getters) = false; 22 | 23 | string module = 1; 24 | string name = 2; 25 | } 26 | 27 | // CapabilityOwners defines a set of owners of a single Capability. The set of 28 | // owners must be unique. 29 | message CapabilityOwners { 30 | repeated Owner owners = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; 31 | } 32 | -------------------------------------------------------------------------------- /proto/cosmos/capability/v1beta1/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.capability.v1beta1; 3 | 4 | import "gogoproto/gogo.proto"; 5 | import "cosmos/capability/v1beta1/capability.proto"; 6 | import "amino/amino.proto"; 7 | 8 | option go_package = "github.com/cosmos/cosmos-sdk/x/capability/types"; 9 | 10 | // GenesisOwners defines the capability owners with their corresponding index. 11 | message GenesisOwners { 12 | // index is the index of the capability owner. 13 | uint64 index = 1; 14 | 15 | // index_owners are the owners at the given index. 16 | CapabilityOwners index_owners = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; 17 | } 18 | 19 | // GenesisState defines the capability module's genesis state. 20 | message GenesisState { 21 | // index is the capability global index. 22 | uint64 index = 1; 23 | 24 | // owners represents a map from index to owners of the capability index 25 | // index key is string to allow amino marshalling. 26 | repeated GenesisOwners owners = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; 27 | } 28 | -------------------------------------------------------------------------------- /proto/cosmos/consensus/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.consensus.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the consensus module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/consensus" 11 | }; 12 | 13 | // authority defines the custom module authority. If not set, defaults to the governance module. 14 | string authority = 1; 15 | } 16 | -------------------------------------------------------------------------------- /proto/cosmos/consensus/v1/query.proto: -------------------------------------------------------------------------------- 1 | // Since: cosmos-sdk 0.47 2 | syntax = "proto3"; 3 | package cosmos.consensus.v1; 4 | 5 | import "google/api/annotations.proto"; 6 | import "tendermint/types/params.proto"; 7 | 8 | option go_package = "github.com/cosmos/cosmos-sdk/x/consensus/types"; 9 | 10 | // Query defines the gRPC querier service. 11 | service Query { 12 | // Params queries the parameters of x/consensus_param module. 13 | rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { 14 | option (google.api.http).get = "/cosmos/consensus/v1/params"; 15 | } 16 | } 17 | 18 | // QueryParamsRequest defines the request type for querying x/consensus parameters. 19 | message QueryParamsRequest {} 20 | 21 | // QueryParamsResponse defines the response type for querying x/consensus parameters. 22 | message QueryParamsResponse { 23 | // params are the tendermint consensus params stored in the consensus module. 24 | // Please note that `params.version` is not populated in this response, it is 25 | // tracked separately in the x/upgrade module. 26 | tendermint.types.ConsensusParams params = 1; 27 | } 28 | -------------------------------------------------------------------------------- /proto/cosmos/crisis/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.crisis.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the crisis module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/crisis" 11 | }; 12 | 13 | // fee_collector_name is the name of the FeeCollector ModuleAccount. 14 | string fee_collector_name = 1; 15 | 16 | // authority defines the custom module authority. If not set, defaults to the governance module. 17 | string authority = 2; 18 | } -------------------------------------------------------------------------------- /proto/cosmos/crisis/v1beta1/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.crisis.v1beta1; 3 | 4 | option go_package = "github.com/cosmos/cosmos-sdk/x/crisis/types"; 5 | 6 | import "gogoproto/gogo.proto"; 7 | import "cosmos/base/v1beta1/coin.proto"; 8 | import "amino/amino.proto"; 9 | 10 | // GenesisState defines the crisis module's genesis state. 11 | message GenesisState { 12 | // constant_fee is the fee used to verify the invariant in the crisis 13 | // module. 14 | cosmos.base.v1beta1.Coin constant_fee = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; 15 | } 16 | -------------------------------------------------------------------------------- /proto/cosmos/crosschain/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.crosschain.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the crosschain module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/crosschain" 11 | }; 12 | 13 | // authority defines the custom module authority. If not set, defaults to the governance module. 14 | string authority = 1; 15 | } 16 | -------------------------------------------------------------------------------- /proto/cosmos/crosschain/v1/crosschain.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.crosschain.v1; 3 | 4 | import "cosmos_proto/cosmos.proto"; 5 | import "gogoproto/gogo.proto"; 6 | import "amino/amino.proto"; 7 | 8 | option go_package = "github.com/cosmos/cosmos-sdk/x/crosschain/types"; 9 | 10 | // Params holds parameters for the cross chain module. 11 | message Params { 12 | option (amino.name) = "cosmos-sdk/x/crosschain/Params"; 13 | 14 | // initial balance to mint for crosschain module when the chain starts 15 | string init_module_balance = 1 [ 16 | (cosmos_proto.scalar) = "cosmos.Int", 17 | (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", 18 | (gogoproto.nullable) = false 19 | ]; 20 | } 21 | 22 | // ChannelPermission defines the fields of the channel permission 23 | message ChannelPermission { 24 | // destination chain id 25 | uint32 dest_chain_id = 1; 26 | // channel id 27 | uint32 channel_id = 2; 28 | // permission status, 1 for allow, 0 for forbidden 29 | uint32 permission = 3; 30 | } -------------------------------------------------------------------------------- /proto/cosmos/crosschain/v1/event.proto: -------------------------------------------------------------------------------- 1 | // Since: cosmos-sdk 0.43 2 | syntax = "proto3"; 3 | package cosmos.crosschain.v1; 4 | 5 | option go_package = "github.com/cosmos/cosmos-sdk/x/crosschain/types"; 6 | 7 | // EventCrossChain is emitted when there is a cross chain package created 8 | message EventCrossChain { 9 | // Source chain id of the cross chain package 10 | uint32 src_chain_id = 1; 11 | // Destination chain id of the cross chainpackage 12 | uint32 dest_chain_id = 2; 13 | // Channel id of the cross chain package 14 | uint32 channel_id = 3; 15 | // Sequence of the cross chain package 16 | uint64 sequence = 4; 17 | // Package type of the cross chain package, like SYN, ACK and FAIL_ACK 18 | uint32 package_type = 5; 19 | // Timestamp of the cross chain package 20 | uint64 timestamp = 6; 21 | // Payload of the cross chain package 22 | string package_load = 7; 23 | // Relayer fee for the cross chain package 24 | string relayer_fee = 8; 25 | // Relayer fee for the ACK or FAIL_ACK package of this cross chain package 26 | string ack_relayer_fee = 9; 27 | } 28 | -------------------------------------------------------------------------------- /proto/cosmos/crosschain/v1/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.crosschain.v1; 3 | 4 | option go_package = "github.com/cosmos/cosmos-sdk/x/crosschain/types"; 5 | 6 | import "gogoproto/gogo.proto"; 7 | import "cosmos/crosschain/v1/crosschain.proto"; 8 | 9 | // GenesisState defines the oracle module's genesis state. 10 | message GenesisState { 11 | // params defines all the parameters of related to oracle module. 12 | Params params = 1 [(gogoproto.nullable) = false]; 13 | } 14 | -------------------------------------------------------------------------------- /proto/cosmos/crypto/eth/bls/keys.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.crypto.eth.bls; 3 | 4 | import "gogoproto/gogo.proto"; 5 | 6 | option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/eth/bls"; 7 | 8 | // PubKey defines a bls public key 9 | // Key is the compressed form of the pubkey. 10 | message PubKey { 11 | option (gogoproto.goproto_stringer) = false; 12 | 13 | // key is the public key in byte form 14 | bytes key = 1; 15 | } 16 | 17 | // PrivKey defines a bls private key. 18 | message PrivKey { 19 | // key is the private key in byte form 20 | bytes key = 1; 21 | } -------------------------------------------------------------------------------- /proto/cosmos/crypto/eth/ethsecp256k1/keys.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.crypto.eth.ethsecp256k1; 3 | 4 | import "gogoproto/gogo.proto"; 5 | 6 | option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/eth/ethsecp256k1"; 7 | 8 | // PubKey defines a type alias for an ecdsa.PublicKey that implements 9 | // Tendermint's PubKey interface. It represents the 33-byte compressed public 10 | // key format. 11 | message PubKey { 12 | option (gogoproto.goproto_stringer) = false; 13 | 14 | bytes key = 1; 15 | } 16 | 17 | // PrivKey defines a type alias for an ecdsa.PrivateKey that implements 18 | // Tendermint's PrivateKey interface. 19 | message PrivKey { bytes key = 1; } 20 | -------------------------------------------------------------------------------- /proto/cosmos/crypto/hd/v1/hd.proto: -------------------------------------------------------------------------------- 1 | // Since: cosmos-sdk 0.46 2 | syntax = "proto3"; 3 | package cosmos.crypto.hd.v1; 4 | 5 | import "amino/amino.proto"; 6 | import "gogoproto/gogo.proto"; 7 | 8 | option go_package = "github.com/cosmos/cosmos-sdk/crypto/hd"; 9 | option (gogoproto.goproto_getters_all) = false; 10 | 11 | // BIP44Params is used as path field in ledger item in Record. 12 | message BIP44Params { 13 | option (amino.name) = "crypto/keys/hd/BIP44Params"; 14 | 15 | option (gogoproto.goproto_stringer) = false; 16 | // purpose is a constant set to 44' (or 0x8000002C) following the BIP43 recommendation 17 | uint32 purpose = 1; 18 | // coin_type is a constant that improves privacy 19 | uint32 coin_type = 2; 20 | // account splits the key space into independent user identities 21 | uint32 account = 3; 22 | // change is a constant used for public derivation. Constant 0 is used for external chain and constant 1 for internal 23 | // chain. 24 | bool change = 4; 25 | // address_index is used as child index in BIP32 derivation 26 | uint32 address_index = 5; 27 | } 28 | -------------------------------------------------------------------------------- /proto/cosmos/crypto/multisig/v1beta1/multisig.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.crypto.multisig.v1beta1; 3 | 4 | import "gogoproto/gogo.proto"; 5 | 6 | option go_package = "github.com/cosmos/cosmos-sdk/crypto/types"; 7 | 8 | // MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. 9 | // See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers 10 | // signed and with which modes. 11 | message MultiSignature { 12 | option (gogoproto.goproto_unrecognized) = true; 13 | repeated bytes signatures = 1; 14 | } 15 | 16 | // CompactBitArray is an implementation of a space efficient bit array. 17 | // This is used to ensure that the encoded data takes up a minimal amount of 18 | // space after proto encoding. 19 | // This is not thread safe, and is not intended for concurrent usage. 20 | message CompactBitArray { 21 | option (gogoproto.goproto_stringer) = false; 22 | 23 | uint32 extra_bits_stored = 1; 24 | bytes elems = 2; 25 | } 26 | -------------------------------------------------------------------------------- /proto/cosmos/crypto/secp256r1/keys.proto: -------------------------------------------------------------------------------- 1 | // Since: cosmos-sdk 0.43 2 | syntax = "proto3"; 3 | package cosmos.crypto.secp256r1; 4 | 5 | import "gogoproto/gogo.proto"; 6 | 7 | option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1"; 8 | option (gogoproto.messagename_all) = true; 9 | option (gogoproto.goproto_stringer_all) = false; 10 | option (gogoproto.goproto_getters_all) = false; 11 | 12 | // PubKey defines a secp256r1 ECDSA public key. 13 | message PubKey { 14 | // Point on secp256r1 curve in a compressed representation as specified in section 15 | // 4.3.6 of ANSI X9.62: https://webstore.ansi.org/standards/ascx9/ansix9621998 16 | bytes key = 1 [(gogoproto.customtype) = "ecdsaPK"]; 17 | } 18 | 19 | // PrivKey defines a secp256r1 ECDSA private key. 20 | message PrivKey { 21 | // secret number serialized using big-endian encoding 22 | bytes secret = 1 [(gogoproto.customtype) = "ecdsaSK"]; 23 | } 24 | -------------------------------------------------------------------------------- /proto/cosmos/distribution/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.distribution.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the distribution module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/distribution" 11 | }; 12 | 13 | string fee_collector_name = 1; 14 | 15 | // authority defines the custom module authority. If not set, defaults to the governance module. 16 | string authority = 2; 17 | } -------------------------------------------------------------------------------- /proto/cosmos/evidence/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.evidence.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the evidence module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/evidence" 11 | }; 12 | } -------------------------------------------------------------------------------- /proto/cosmos/evidence/v1beta1/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.evidence.v1beta1; 3 | 4 | option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; 5 | 6 | import "google/protobuf/any.proto"; 7 | 8 | // GenesisState defines the evidence module's genesis state. 9 | message GenesisState { 10 | // evidence defines all the evidence at genesis. 11 | repeated google.protobuf.Any evidence = 1; 12 | } 13 | -------------------------------------------------------------------------------- /proto/cosmos/feegrant/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.feegrant.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the feegrant module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/feegrant" 11 | }; 12 | } -------------------------------------------------------------------------------- /proto/cosmos/feegrant/v1beta1/genesis.proto: -------------------------------------------------------------------------------- 1 | // Since: cosmos-sdk 0.43 2 | syntax = "proto3"; 3 | package cosmos.feegrant.v1beta1; 4 | 5 | import "gogoproto/gogo.proto"; 6 | import "cosmos/feegrant/v1beta1/feegrant.proto"; 7 | import "amino/amino.proto"; 8 | 9 | option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; 10 | 11 | // GenesisState contains a set of fee allowances, persisted from the store 12 | message GenesisState { 13 | repeated Grant allowances = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; 14 | } 15 | -------------------------------------------------------------------------------- /proto/cosmos/gashub/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.gashub.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the gashub module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/gashub" 11 | }; 12 | 13 | // authority defines the custom module authority. If not set, defaults to the governance module. 14 | string authority = 1; 15 | } 16 | -------------------------------------------------------------------------------- /proto/cosmos/gashub/v1beta1/event.proto: -------------------------------------------------------------------------------- 1 | // Since: cosmos-sdk 0.43 2 | syntax = "proto3"; 3 | package cosmos.gashub.v1beta1; 4 | 5 | option go_package = "github.com/cosmos/cosmos-sdk/x/gashub/types"; 6 | 7 | // EventUpdateMsgGasParams is emitted when updating a message's gas params 8 | message EventUpdateMsgGasParams { 9 | // msg_type_url is the type url of the message 10 | string msg_type_url = 1; 11 | // from_value is the previous gas params 12 | string from_value = 2; 13 | // to_value is the new gas params 14 | string to_value = 3; 15 | } 16 | -------------------------------------------------------------------------------- /proto/cosmos/gashub/v1beta1/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.gashub.v1beta1; 3 | 4 | import "gogoproto/gogo.proto"; 5 | import "cosmos/gashub/v1beta1/gashub.proto"; 6 | import "amino/amino.proto"; 7 | 8 | option go_package = "github.com/cosmos/cosmos-sdk/x/gashub/types"; 9 | 10 | // GenesisState defines the gashub module's genesis state. 11 | message GenesisState { 12 | // params defines all the parameters of the module. 13 | Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; 14 | 15 | // msg_gas_params defines the gas consumption for a msg type. 16 | repeated MsgGasParams msg_gas_params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; 17 | } 18 | -------------------------------------------------------------------------------- /proto/cosmos/genutil/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.genutil.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object for the genutil module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/genutil" 11 | }; 12 | } -------------------------------------------------------------------------------- /proto/cosmos/genutil/v1beta1/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.genutil.v1beta1; 3 | 4 | import "gogoproto/gogo.proto"; 5 | import "amino/amino.proto"; 6 | 7 | option go_package = "github.com/cosmos/cosmos-sdk/x/genutil/types"; 8 | 9 | // GenesisState defines the raw genesis transaction in JSON. 10 | message GenesisState { 11 | // gen_txs defines the genesis transactions. 12 | repeated bytes gen_txs = 1 [ 13 | (gogoproto.casttype) = "encoding/json.RawMessage", 14 | (gogoproto.jsontag) = "gentxs", 15 | (amino.field_name) = "gentxs", 16 | (amino.dont_omitempty) = true 17 | ]; 18 | } 19 | -------------------------------------------------------------------------------- /proto/cosmos/gov/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.gov.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the gov module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/gov" 11 | }; 12 | 13 | // max_metadata_len defines the maximum proposal metadata length. 14 | // Defaults to 255 if not explicitly set. 15 | uint64 max_metadata_len = 1; 16 | 17 | // authority defines the custom module authority. If not set, defaults to the governance module. 18 | string authority = 2; 19 | } -------------------------------------------------------------------------------- /proto/cosmos/group/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.group.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | import "gogoproto/gogo.proto"; 7 | import "google/protobuf/duration.proto"; 8 | import "amino/amino.proto"; 9 | 10 | // Module is the config object of the group module. 11 | message Module { 12 | option (cosmos.app.v1alpha1.module) = { 13 | go_import: "github.com/cosmos/cosmos-sdk/x/group" 14 | }; 15 | 16 | // max_execution_period defines the max duration after a proposal's voting period ends that members can send a MsgExec 17 | // to execute the proposal. 18 | google.protobuf.Duration max_execution_period = 1 19 | [(gogoproto.stdduration) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; 20 | 21 | // max_metadata_len defines the max length of the metadata bytes field for various entities within the group module. 22 | // Defaults to 255 if not explicitly set. 23 | uint64 max_metadata_len = 2; 24 | } 25 | -------------------------------------------------------------------------------- /proto/cosmos/group/v1/genesis.proto: -------------------------------------------------------------------------------- 1 | // Since: cosmos-sdk 0.46 2 | syntax = "proto3"; 3 | 4 | package cosmos.group.v1; 5 | 6 | option go_package = "github.com/cosmos/cosmos-sdk/x/group"; 7 | 8 | import "cosmos/group/v1/types.proto"; 9 | 10 | // GenesisState defines the group module's genesis state. 11 | message GenesisState { 12 | 13 | // group_seq is the group table orm.Sequence, 14 | // it is used to get the next group ID. 15 | uint64 group_seq = 1; 16 | 17 | // groups is the list of groups info. 18 | repeated GroupInfo groups = 2; 19 | 20 | // group_members is the list of groups members. 21 | repeated GroupMember group_members = 3; 22 | 23 | // group_policy_seq is the group policy table orm.Sequence, 24 | // it is used to generate the next group policy account address. 25 | uint64 group_policy_seq = 4; 26 | 27 | // group_policies is the list of group policies info. 28 | repeated GroupPolicyInfo group_policies = 5; 29 | 30 | // proposal_seq is the proposal table orm.Sequence, 31 | // it is used to get the next proposal ID. 32 | uint64 proposal_seq = 6; 33 | 34 | // proposals is the list of proposals. 35 | repeated Proposal proposals = 7; 36 | 37 | // votes is the list of votes. 38 | repeated Vote votes = 8; 39 | } -------------------------------------------------------------------------------- /proto/cosmos/mint/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.mint.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the mint module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/mint" 11 | }; 12 | 13 | string fee_collector_name = 1; 14 | 15 | // authority defines the custom module authority. If not set, defaults to the governance module. 16 | string authority = 2; 17 | } -------------------------------------------------------------------------------- /proto/cosmos/mint/v1beta1/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.mint.v1beta1; 3 | 4 | import "gogoproto/gogo.proto"; 5 | import "cosmos/mint/v1beta1/mint.proto"; 6 | import "amino/amino.proto"; 7 | 8 | option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; 9 | 10 | // GenesisState defines the mint module's genesis state. 11 | message GenesisState { 12 | // minter is a space for holding current inflation information. 13 | Minter minter = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; 14 | 15 | // params defines all the parameters of the module. 16 | Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; 17 | } 18 | -------------------------------------------------------------------------------- /proto/cosmos/nft/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.nft.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the nft module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/nft" 11 | }; 12 | } -------------------------------------------------------------------------------- /proto/cosmos/nft/v1beta1/event.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.nft.v1beta1; 3 | 4 | option go_package = "github.com/cosmos/cosmos-sdk/x/nft"; 5 | 6 | // EventSend is emitted on Msg/Send 7 | message EventSend { 8 | // class_id associated with the nft 9 | string class_id = 1; 10 | 11 | // id is a unique identifier of the nft 12 | string id = 2; 13 | 14 | // sender is the address of the owner of nft 15 | string sender = 3; 16 | 17 | // receiver is the receiver address of nft 18 | string receiver = 4; 19 | } 20 | 21 | // EventMint is emitted on Mint 22 | message EventMint { 23 | // class_id associated with the nft 24 | string class_id = 1; 25 | 26 | // id is a unique identifier of the nft 27 | string id = 2; 28 | 29 | // owner is the owner address of the nft 30 | string owner = 3; 31 | } 32 | 33 | // EventBurn is emitted on Burn 34 | message EventBurn { 35 | // class_id associated with the nft 36 | string class_id = 1; 37 | 38 | // id is a unique identifier of the nft 39 | string id = 2; 40 | 41 | // owner is the owner address of the nft 42 | string owner = 3; 43 | } 44 | -------------------------------------------------------------------------------- /proto/cosmos/nft/v1beta1/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.nft.v1beta1; 3 | 4 | import "cosmos/nft/v1beta1/nft.proto"; 5 | 6 | option go_package = "github.com/cosmos/cosmos-sdk/x/nft"; 7 | 8 | // GenesisState defines the nft module's genesis state. 9 | message GenesisState { 10 | // class defines the class of the nft type. 11 | repeated cosmos.nft.v1beta1.Class classes = 1; 12 | 13 | // entry defines all nft owned by a person. 14 | repeated Entry entries = 2; 15 | } 16 | 17 | // Entry Defines all nft owned by a person 18 | message Entry { 19 | // owner is the owner address of the following nft 20 | string owner = 1; 21 | 22 | // nfts is a group of nfts of the same owner 23 | repeated cosmos.nft.v1beta1.NFT nfts = 2; 24 | } 25 | -------------------------------------------------------------------------------- /proto/cosmos/nft/v1beta1/tx.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.nft.v1beta1; 3 | 4 | option go_package = "github.com/cosmos/cosmos-sdk/x/nft"; 5 | 6 | import "cosmos_proto/cosmos.proto"; 7 | import "cosmos/msg/v1/msg.proto"; 8 | 9 | // Msg defines the nft Msg service. 10 | service Msg { 11 | option (cosmos.msg.v1.service) = true; 12 | 13 | // Send defines a method to send a nft from one account to another account. 14 | rpc Send(MsgSend) returns (MsgSendResponse); 15 | } 16 | 17 | // MsgSend represents a message to send a nft from one account to another account. 18 | message MsgSend { 19 | option (cosmos.msg.v1.signer) = "sender"; 20 | 21 | // class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 22 | string class_id = 1; 23 | 24 | // id defines the unique identification of nft 25 | string id = 2; 26 | 27 | // sender is the address of the owner of nft 28 | string sender = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; 29 | 30 | // receiver is the receiver address of nft 31 | string receiver = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; 32 | } 33 | // MsgSendResponse defines the Msg/Send response type. 34 | message MsgSendResponse {} -------------------------------------------------------------------------------- /proto/cosmos/oracle/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.oracle.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the oracle module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/oracle" 11 | }; 12 | 13 | // fee_collector_name is the name of the FeeCollector ModuleAccount. 14 | string fee_collector_name = 2; 15 | 16 | // authority defines the custom module authority. If not set, defaults to the governance module. 17 | string authority = 3; 18 | } 19 | -------------------------------------------------------------------------------- /proto/cosmos/oracle/v1/event.proto: -------------------------------------------------------------------------------- 1 | // Since: cosmos-sdk 0.43 2 | syntax = "proto3"; 3 | package cosmos.oracle.v1; 4 | 5 | option go_package = "github.com/cosmos/cosmos-sdk/x/oracle/types"; 6 | 7 | // EventPackageClaim is emitted when a cross chain package is processed 8 | message EventPackageClaim { 9 | // Source chain id of the package 10 | uint32 src_chain_id = 1; 11 | // Destination chain id of the package 12 | uint32 dest_chain_id = 2; 13 | // Channel id of the package 14 | uint32 channel_id = 3; 15 | // Package type of the package, like SYN, ACK and FAIL_ACK 16 | uint32 package_type = 4; 17 | // Receive sequence of the package 18 | uint64 receive_sequence = 5; 19 | // Send sequence of the corresponding ACK package or FAIL_ACK package 20 | int64 send_sequence = 6; 21 | // Crash status for the handle of this package 22 | bool crash = 7; 23 | // Error message for the handle of this package 24 | string error_msg = 8; 25 | // Relayer fee paid for this package 26 | string relayer_fee = 9; 27 | // Relayer fee paid for the ACK or FAIL_ACK package 28 | string ack_relayer_fee = 10; 29 | } -------------------------------------------------------------------------------- /proto/cosmos/oracle/v1/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.oracle.v1; 3 | 4 | option go_package = "github.com/cosmos/cosmos-sdk/x/oracle/types"; 5 | 6 | import "gogoproto/gogo.proto"; 7 | import "cosmos/oracle/v1/oracle.proto"; 8 | 9 | // GenesisState defines the oracle module's genesis state. 10 | message GenesisState { 11 | // params defines all the parameters of related to oracle module. 12 | Params params = 1 [(gogoproto.nullable) = false]; 13 | } 14 | -------------------------------------------------------------------------------- /proto/cosmos/oracle/v1/oracle.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.oracle.v1; 3 | 4 | option go_package = "github.com/cosmos/cosmos-sdk/x/oracle/types"; 5 | 6 | // Params holds parameters for the oracle module. 7 | message Params { 8 | // Timeout for the in turn relayer in seconds 9 | uint64 relayer_timeout = 1; 10 | // RelayInterval is for in-turn relayer in seconds 11 | uint64 relayer_interval = 2; 12 | // Reward share for the relayer sends the claim message, 13 | // the other relayers signed the bls message will share the reward evenly. 14 | uint32 relayer_reward_share = 3; // in percentage 15 | } 16 | 17 | // RelayInterval holds start and end(exclusive) time of in-turn relayer, [start, end) 18 | message RelayInterval { 19 | uint64 start = 1; 20 | uint64 end = 2; 21 | } 22 | -------------------------------------------------------------------------------- /proto/cosmos/orm/module/v1alpha1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.orm.module.v1alpha1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module defines the ORM module which adds providers to the app container for 8 | // module-scoped DB's. In the future it may provide gRPC services for interacting 9 | // with ORM data. 10 | message Module { 11 | option (cosmos.app.v1alpha1.module) = { 12 | go_import: "github.com/cosmos/cosmos-sdk/orm" 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /proto/cosmos/params/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.params.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the params module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/params" 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /proto/cosmos/params/v1beta1/params.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package cosmos.params.v1beta1; 3 | 4 | option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal"; 5 | option (gogoproto.equal_all) = true; 6 | 7 | import "gogoproto/gogo.proto"; 8 | import "cosmos_proto/cosmos.proto"; 9 | import "amino/amino.proto"; 10 | 11 | // ParameterChangeProposal defines a proposal to change one or more parameters. 12 | message ParameterChangeProposal { 13 | option (gogoproto.goproto_getters) = false; 14 | option (gogoproto.goproto_stringer) = false; 15 | option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; 16 | option (amino.name) = "cosmos-sdk/ParameterChangeProposal"; 17 | 18 | string title = 1; 19 | string description = 2; 20 | repeated ParamChange changes = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; 21 | } 22 | 23 | // ParamChange defines an individual parameter change, for use in 24 | // ParameterChangeProposal. 25 | message ParamChange { 26 | option (gogoproto.goproto_stringer) = false; 27 | 28 | string subspace = 1; 29 | string key = 2; 30 | string value = 3; 31 | } 32 | -------------------------------------------------------------------------------- /proto/cosmos/reflection/v1/reflection.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.reflection.v1; 4 | 5 | import "google/protobuf/descriptor.proto"; 6 | import "cosmos/query/v1/query.proto"; 7 | 8 | // Package cosmos.reflection.v1 provides support for inspecting protobuf 9 | // file descriptors. 10 | service ReflectionService { 11 | // FileDescriptors queries all the file descriptors in the app in order 12 | // to enable easier generation of dynamic clients. 13 | rpc FileDescriptors(FileDescriptorsRequest) returns (FileDescriptorsResponse) { 14 | // NOTE: file descriptors SHOULD NOT be part of consensus because they 15 | // include changes to doc commands and module_query_safe should be kept as false. 16 | option (cosmos.query.v1.module_query_safe) = false; 17 | } 18 | } 19 | 20 | // FileDescriptorsRequest is the Query/FileDescriptors request type. 21 | message FileDescriptorsRequest {} 22 | 23 | // FileDescriptorsResponse is the Query/FileDescriptors response type. 24 | message FileDescriptorsResponse { 25 | // files is the file descriptors. 26 | repeated google.protobuf.FileDescriptorProto files = 1; 27 | } 28 | -------------------------------------------------------------------------------- /proto/cosmos/slashing/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.slashing.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the slashing module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/slashing" 11 | }; 12 | 13 | // authority defines the custom module authority. If not set, defaults to the governance module. 14 | string authority = 1; 15 | } 16 | -------------------------------------------------------------------------------- /proto/cosmos/staking/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.staking.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the staking module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/staking" 11 | }; 12 | 13 | // hooks_order specifies the order of staking hooks and should be a list 14 | // of module names which provide a staking hooks instance. If no order is 15 | // provided, then hooks will be applied in alphabetical order of module names. 16 | repeated string hooks_order = 1; 17 | 18 | // authority defines the custom module authority. If not set, defaults to the governance module. 19 | string authority = 2; 20 | } 21 | -------------------------------------------------------------------------------- /proto/cosmos/tx/config/v1/config.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.tx.config.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Config is the config object of the x/auth/tx package. 8 | message Config { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/auth/tx" 11 | }; 12 | 13 | // skip_ante_handler defines whether the ante handler registration should be skipped in case an app wants to override 14 | // this functionality. 15 | bool skip_ante_handler = 1; 16 | 17 | // skip_post_handler defines whether the post handler registration should be skipped in case an app wants to override 18 | // this functionality. 19 | bool skip_post_handler = 2; 20 | } -------------------------------------------------------------------------------- /proto/cosmos/upgrade/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.upgrade.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the upgrade module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/upgrade" 11 | }; 12 | } -------------------------------------------------------------------------------- /proto/cosmos/vesting/module/v1/module.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cosmos.vesting.module.v1; 4 | 5 | import "cosmos/app/v1alpha1/module.proto"; 6 | 7 | // Module is the config object of the vesting module. 8 | message Module { 9 | option (cosmos.app.v1alpha1.module) = { 10 | go_import: "github.com/cosmos/cosmos-sdk/x/auth/vesting" 11 | }; 12 | } -------------------------------------------------------------------------------- /proto/greenfield/bridge/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.bridge; 3 | 4 | import "gogoproto/gogo.proto"; 5 | import "greenfield/bridge/params.proto"; 6 | 7 | option go_package = "github.com/bnb-chain/greenfield/x/bridge/types"; 8 | 9 | // GenesisState defines the bridge module's genesis state. 10 | message GenesisState { 11 | // Params defines all the paramaters of the module. 12 | Params params = 1 [(gogoproto.nullable) = false]; 13 | } 14 | -------------------------------------------------------------------------------- /proto/greenfield/bridge/params.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.bridge; 3 | 4 | import "cosmos_proto/cosmos.proto"; 5 | import "gogoproto/gogo.proto"; 6 | 7 | option go_package = "github.com/bnb-chain/greenfield/x/bridge/types"; 8 | 9 | // Params defines the parameters for the module. 10 | message Params { 11 | // Relayer fee for the cross chain transfer out tx to bsc 12 | string bsc_transfer_out_relayer_fee = 1 [ 13 | (cosmos_proto.scalar) = "cosmos.Int", 14 | (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", 15 | (gogoproto.nullable) = false 16 | ]; 17 | // Relayer fee for the ACK or FAIL_ACK package of the cross chain transfer out tx to bsc 18 | string bsc_transfer_out_ack_relayer_fee = 2 [ 19 | (cosmos_proto.scalar) = "cosmos.Int", 20 | (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", 21 | (gogoproto.nullable) = false 22 | ]; 23 | } 24 | -------------------------------------------------------------------------------- /proto/greenfield/bridge/query.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.bridge; 3 | 4 | import "cosmos/base/query/v1beta1/pagination.proto"; 5 | import "gogoproto/gogo.proto"; 6 | import "google/api/annotations.proto"; 7 | import "greenfield/bridge/params.proto"; 8 | 9 | option go_package = "github.com/bnb-chain/greenfield/x/bridge/types"; 10 | 11 | // Query defines the gRPC querier service. 12 | service Query { 13 | // Parameters queries the parameters of the module. 14 | rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { 15 | option (google.api.http).get = "/greenfield/bridge/params"; 16 | } 17 | } 18 | 19 | // QueryParamsRequest is request type for the Query/Params RPC method. 20 | message QueryParamsRequest {} 21 | 22 | // QueryParamsResponse is response type for the Query/Params RPC method. 23 | message QueryParamsResponse { 24 | // params holds all the parameters of this module. 25 | Params params = 1 [(gogoproto.nullable) = false]; 26 | } 27 | -------------------------------------------------------------------------------- /proto/greenfield/challenge/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.challenge; 3 | 4 | import "gogoproto/gogo.proto"; 5 | import "greenfield/challenge/params.proto"; 6 | import "greenfield/challenge/types.proto"; 7 | 8 | option go_package = "github.com/bnb-chain/greenfield/x/challenge/types"; 9 | 10 | // GenesisState defines the challenge module's genesis state. 11 | message GenesisState { 12 | Params params = 1 [(gogoproto.nullable) = false]; 13 | } 14 | -------------------------------------------------------------------------------- /proto/greenfield/common/approval.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package greenfield.common; 4 | 5 | import "cosmos_proto/cosmos.proto"; 6 | import "gogoproto/gogo.proto"; 7 | import "google/protobuf/any.proto"; 8 | 9 | option go_package = "github.com/bnb-chain/greenfield/types/common"; 10 | 11 | // Approval is the signature information returned by the Primary Storage Provider (SP) to the user 12 | // after allowing them to create a bucket or object, which is then used for verification on the chain 13 | // to ensure agreement between the Primary SP and the user. 14 | message Approval { 15 | // expired_height is the block height at which the signature expires. 16 | uint64 expired_height = 1; 17 | // global_virtual_group_family_id is the family id that stored. 18 | uint32 global_virtual_group_family_id = 2; 19 | // The signature needs to conform to the EIP 712 specification. 20 | bytes sig = 3; 21 | } 22 | -------------------------------------------------------------------------------- /proto/greenfield/gensp/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.gensp; 3 | 4 | import "gogoproto/gogo.proto"; 5 | 6 | option go_package = "github.com/bnb-chain/greenfield/x/gensp/types"; 7 | 8 | // GenesisState defines the gensp module's genesis state. 9 | // GenesisState defines the raw genesis transaction in JSON. 10 | message GenesisState { 11 | // gen_txs defines the genesis transactions. 12 | repeated bytes gensp_txs = 1 [ 13 | (gogoproto.casttype) = "encoding/json.RawMessage", 14 | (gogoproto.jsontag) = "gensptxs" 15 | ]; 16 | } 17 | -------------------------------------------------------------------------------- /proto/greenfield/gensp/params.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.gensp; 3 | 4 | import "gogoproto/gogo.proto"; 5 | 6 | option go_package = "github.com/bnb-chain/greenfield/x/gensp/types"; 7 | 8 | // Params defines the parameters for the module. 9 | message Params { 10 | option (gogoproto.goproto_stringer) = false; 11 | } 12 | -------------------------------------------------------------------------------- /proto/greenfield/gensp/query.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.gensp; 3 | 4 | import "cosmos/base/query/v1beta1/pagination.proto"; 5 | import "gogoproto/gogo.proto"; 6 | import "google/api/annotations.proto"; 7 | import "greenfield/gensp/params.proto"; 8 | 9 | option go_package = "github.com/bnb-chain/greenfield/x/gensp/types"; 10 | 11 | // Query defines the gRPC querier service. 12 | service Query { 13 | // Parameters queries the parameters of the module. 14 | rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { 15 | option (google.api.http).get = "/bnb-chain/greenfield/gensptx/params"; 16 | } 17 | } 18 | 19 | // QueryParamsRequest is request type for the Query/Params RPC method. 20 | message QueryParamsRequest {} 21 | 22 | // QueryParamsResponse is response type for the Query/Params RPC method. 23 | message QueryParamsResponse { 24 | // params holds all the parameters of this module. 25 | Params params = 1 [(gogoproto.nullable) = false]; 26 | } 27 | -------------------------------------------------------------------------------- /proto/greenfield/gensp/tx.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.gensp; 3 | 4 | option go_package = "github.com/bnb-chain/greenfield/x/gensp/types"; 5 | 6 | // Msg defines the Msg service. 7 | service Msg {} 8 | -------------------------------------------------------------------------------- /proto/greenfield/payment/auto_resume_record.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.payment; 3 | 4 | import "cosmos_proto/cosmos.proto"; 5 | 6 | option go_package = "github.com/bnb-chain/greenfield/x/payment/types"; 7 | 8 | // AutoResumeRecord is the record keeps the auto resume information. 9 | // The EndBlocker of payment module will scan the list of AutoResumeRecord 10 | // and resume the stream account one by one. 11 | message AutoResumeRecord { 12 | // timestamp is the unix timestamp to order the records 13 | int64 timestamp = 1; 14 | // the stream account address 15 | string addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; 16 | } 17 | -------------------------------------------------------------------------------- /proto/greenfield/payment/auto_settle_record.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.payment; 3 | 4 | import "cosmos_proto/cosmos.proto"; 5 | 6 | option go_package = "github.com/bnb-chain/greenfield/x/payment/types"; 7 | 8 | // AutoSettleRecord is the record keeps the auto settle information. 9 | // The EndBlocker of payment module will scan the list of AutoSettleRecord 10 | // and settle the stream account if the timestamp is less than the current time. 11 | message AutoSettleRecord { 12 | // timestamp is the unix timestamp when the stream account will be settled. 13 | int64 timestamp = 1; 14 | // A stream account address 15 | string addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; 16 | } 17 | -------------------------------------------------------------------------------- /proto/greenfield/payment/delayed_withdrawal_record.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.payment; 3 | 4 | import "cosmos_proto/cosmos.proto"; 5 | import "gogoproto/gogo.proto"; 6 | 7 | option go_package = "github.com/bnb-chain/greenfield/x/payment/types"; 8 | 9 | message DelayedWithdrawalRecord { 10 | // the withdrawal address 11 | string addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; 12 | // the withdrawal amount 13 | string amount = 2 [ 14 | (cosmos_proto.scalar) = "cosmos.Int", 15 | (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", 16 | (gogoproto.nullable) = false 17 | ]; 18 | // the withdrawal from payment account address 19 | string from = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; 20 | // unlock timestamp is the unix timestamp to unlock the withdrawal 21 | int64 unlock_timestamp = 4; 22 | } 23 | -------------------------------------------------------------------------------- /proto/greenfield/payment/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package greenfield.payment; 4 | 5 | import "gogoproto/gogo.proto"; 6 | import "greenfield/payment/auto_settle_record.proto"; 7 | import "greenfield/payment/params.proto"; 8 | import "greenfield/payment/payment_account.proto"; 9 | import "greenfield/payment/payment_account_count.proto"; 10 | import "greenfield/payment/stream_record.proto"; 11 | 12 | option go_package = "github.com/bnb-chain/greenfield/x/payment/types"; 13 | 14 | // GenesisState defines the payment module's genesis state. 15 | message GenesisState { 16 | Params params = 1 [(gogoproto.nullable) = false]; 17 | repeated StreamRecord stream_record_list = 2 [(gogoproto.nullable) = false]; 18 | repeated PaymentAccountCount payment_account_count_list = 3 [(gogoproto.nullable) = false]; 19 | repeated PaymentAccount payment_account_list = 4 [(gogoproto.nullable) = false]; 20 | repeated AutoSettleRecord auto_settle_record_list = 5 [(gogoproto.nullable) = false]; 21 | } 22 | -------------------------------------------------------------------------------- /proto/greenfield/payment/out_flow.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.payment; 3 | 4 | import "cosmos_proto/cosmos.proto"; 5 | import "gogoproto/gogo.proto"; 6 | 7 | option go_package = "github.com/bnb-chain/greenfield/x/payment/types"; 8 | 9 | // OutFlowStatus defines the status of a out flow 10 | enum OutFlowStatus { 11 | option (gogoproto.goproto_enum_prefix) = false; 12 | 13 | // OUT_FLOW_STATUS_ACTIVE defines the active status of a out flow. 14 | OUT_FLOW_STATUS_ACTIVE = 0; 15 | // OUT_FLOW_STATUS_FROZEN defines the frozen status of a out flow. 16 | OUT_FLOW_STATUS_FROZEN = 1; 17 | } 18 | 19 | // OutFlow defines the accumulative outflow stream rate in BNB 20 | // from a stream account to a Storage Provider 21 | message OutFlow { 22 | // stream account address who receives the flow, usually SP(service provider) 23 | string to_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; 24 | // flow rate 25 | string rate = 2 [ 26 | (cosmos_proto.scalar) = "cosmos.Int", 27 | (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", 28 | (gogoproto.nullable) = false 29 | ]; 30 | // status 31 | OutFlowStatus status = 3; 32 | } 33 | -------------------------------------------------------------------------------- /proto/greenfield/payment/payment_account.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.payment; 3 | 4 | import "cosmos_proto/cosmos.proto"; 5 | 6 | option go_package = "github.com/bnb-chain/greenfield/x/payment/types"; 7 | 8 | // PaymentAccount defines a payment account 9 | message PaymentAccount { 10 | // the address of the payment account 11 | string addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; 12 | // the owner address of the payment account 13 | string owner = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; 14 | // whether the payment account is refundable 15 | bool refundable = 3; 16 | } 17 | -------------------------------------------------------------------------------- /proto/greenfield/payment/payment_account_count.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.payment; 3 | 4 | import "cosmos_proto/cosmos.proto"; 5 | 6 | option go_package = "github.com/bnb-chain/greenfield/x/payment/types"; 7 | 8 | // PaymentAccountCount defines the state struct which stores the number of payment accounts for an account 9 | message PaymentAccountCount { 10 | // owner is the account address 11 | string owner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; 12 | // count is the number of payment accounts for the account 13 | uint64 count = 2; 14 | } 15 | -------------------------------------------------------------------------------- /proto/greenfield/permission/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.permission; 3 | 4 | import "gogoproto/gogo.proto"; 5 | import "greenfield/permission/params.proto"; 6 | 7 | option go_package = "github.com/bnb-chain/greenfield/x/permission/types"; 8 | 9 | // GenesisState defines the permission module's genesis state. 10 | message GenesisState { 11 | Params params = 1 [(gogoproto.nullable) = false]; 12 | } 13 | -------------------------------------------------------------------------------- /proto/greenfield/permission/params.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.permission; 3 | 4 | import "gogoproto/gogo.proto"; 5 | 6 | option go_package = "github.com/bnb-chain/greenfield/x/permission/types"; 7 | 8 | // Params defines the parameters for the module. 9 | message Params { 10 | // maximum_statements_num defines the maximum number of statements allowed in a policy 11 | uint64 maximum_statements_num = 1; 12 | // maximum_group_num used to set the upper limit on the number of groups to which a resource can grant access permissions. 13 | // By placing a cap on the number of group permissions, permission control policies can be made more robust and better 14 | // enforced, thereby reducing the chances of DDos and other security incidents. 15 | uint64 maximum_group_num = 2; 16 | // the maximum iteration number of `RemoveExpiredPolicies` loops in endblocker 17 | uint64 maximum_remove_expired_policies_iteration = 3; 18 | } 19 | -------------------------------------------------------------------------------- /proto/greenfield/permission/query.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.permission; 3 | 4 | import "cosmos/base/query/v1beta1/pagination.proto"; 5 | import "gogoproto/gogo.proto"; 6 | import "google/api/annotations.proto"; 7 | import "greenfield/permission/params.proto"; 8 | 9 | option go_package = "github.com/bnb-chain/greenfield/x/permission/types"; 10 | 11 | // Query defines the gRPC querier service. 12 | service Query { 13 | // Parameters queries the parameters of the module. 14 | rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { 15 | option (google.api.http).get = "/greenfield/permission/params"; 16 | } 17 | } 18 | 19 | // QueryParamsRequest is request type for the Query/Params RPC method. 20 | message QueryParamsRequest {} 21 | 22 | // QueryParamsResponse is response type for the Query/Params RPC method. 23 | message QueryParamsResponse { 24 | // params holds all the parameters of this module. 25 | Params params = 1 [(gogoproto.nullable) = false]; 26 | } 27 | -------------------------------------------------------------------------------- /proto/greenfield/resource/types.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.resource; 3 | 4 | import "cosmos_proto/cosmos.proto"; 5 | import "gogoproto/gogo.proto"; 6 | 7 | option go_package = "github.com/bnb-chain/greenfield/types/resource"; 8 | 9 | enum ResourceType { 10 | option (gogoproto.goproto_enum_prefix) = false; 11 | 12 | RESOURCE_TYPE_UNSPECIFIED = 0; 13 | RESOURCE_TYPE_BUCKET = 1; 14 | RESOURCE_TYPE_OBJECT = 2; 15 | RESOURCE_TYPE_GROUP = 3; 16 | } 17 | -------------------------------------------------------------------------------- /proto/greenfield/sp/authz.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.sp; 3 | 4 | import "cosmos/base/v1beta1/coin.proto"; 5 | import "cosmos_proto/cosmos.proto"; 6 | import "gogoproto/gogo.proto"; 7 | 8 | option go_package = "github.com/bnb-chain/greenfield/x/sp/types"; 9 | 10 | // DepositAuthorization defines authorization for sp deposit. 11 | message DepositAuthorization { 12 | // max_deposit specifies the maximum amount of tokens can be deposit to a storage provider. If it is 13 | // empty, there is no spend limit and any amount of coins can be deposit. 14 | cosmos.base.v1beta1.Coin max_deposit = 1; 15 | 16 | // sp_address is the operator address of storage provider. 17 | string sp_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; 18 | } 19 | -------------------------------------------------------------------------------- /proto/greenfield/sp/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.sp; 3 | 4 | import "gogoproto/gogo.proto"; 5 | import "greenfield/sp/params.proto"; 6 | import "greenfield/sp/types.proto"; 7 | 8 | option go_package = "github.com/bnb-chain/greenfield/x/sp/types"; 9 | 10 | // GenesisState defines the sp module's genesis state. 11 | message GenesisState { 12 | Params params = 1 [(gogoproto.nullable) = false]; 13 | // this used by starport scaffolding # genesis/proto/state 14 | repeated StorageProvider storage_providers = 2 [(gogoproto.nullable) = false]; 15 | repeated SpStoragePrice sp_storage_price_list = 3 [(gogoproto.nullable) = false]; 16 | } 17 | -------------------------------------------------------------------------------- /proto/greenfield/storage/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.storage; 3 | 4 | import "gogoproto/gogo.proto"; 5 | import "greenfield/storage/params.proto"; 6 | 7 | option go_package = "github.com/bnb-chain/greenfield/x/storage/types"; 8 | 9 | // GenesisState defines the bridge module's genesis state. 10 | message GenesisState { 11 | Params params = 1 [(gogoproto.nullable) = false]; 12 | } 13 | -------------------------------------------------------------------------------- /proto/greenfield/virtualgroup/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.virtualgroup; 3 | 4 | import "gogoproto/gogo.proto"; 5 | import "greenfield/virtualgroup/params.proto"; 6 | 7 | option go_package = "github.com/bnb-chain/greenfield/x/virtualgroup/types"; 8 | 9 | // GenesisState defines the virtualgroup module's genesis state. 10 | // GenesisState defines the raw genesis transaction in JSON. 11 | message GenesisState { 12 | Params params = 1 [(gogoproto.nullable) = false]; 13 | } 14 | -------------------------------------------------------------------------------- /proto/greenfield/virtualgroup/params.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package greenfield.virtualgroup; 3 | 4 | import "cosmos_proto/cosmos.proto"; 5 | import "gogoproto/gogo.proto"; 6 | 7 | option go_package = "github.com/bnb-chain/greenfield/x/virtualgroup/types"; 8 | 9 | // Params defines the parameters for the module. 10 | message Params { 11 | option (gogoproto.equal) = true; 12 | option (gogoproto.goproto_stringer) = false; 13 | 14 | // deposit_denom defines the staking coin denomination. 15 | string deposit_denom = 1; 16 | // store price, in bnb wei per charge byte 17 | string gvg_staking_per_bytes = 2 [ 18 | (cosmos_proto.scalar) = "cosmos.Int", 19 | (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", 20 | (gogoproto.nullable) = false 21 | ]; 22 | // the max number of lvg which allowed in a bucket 23 | uint32 max_local_virtual_group_num_per_bucket = 3; 24 | // the max number of gvg which can exist in a family 25 | uint32 max_global_virtual_group_num_per_family = 4; 26 | // if the store size reach the exceed, the family is not allowed to sever more buckets 27 | uint64 max_store_size_per_family = 5; 28 | } 29 | -------------------------------------------------------------------------------- /proto/tendermint/blocksync/types.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package tendermint.blocksync; 3 | 4 | option go_package = "github.com/cometbft/cometbft/proto/tendermint/blocksync"; 5 | 6 | import "tendermint/types/block.proto"; 7 | 8 | // BlockRequest requests a block for a specific height 9 | message BlockRequest { 10 | int64 height = 1; 11 | } 12 | 13 | // NoBlockResponse informs the node that the peer does not have block at the requested height 14 | message NoBlockResponse { 15 | int64 height = 1; 16 | } 17 | 18 | // BlockResponse returns block to the requested 19 | message BlockResponse { 20 | tendermint.types.Block block = 1; 21 | } 22 | 23 | // StatusRequest requests the status of a peer. 24 | message StatusRequest { 25 | } 26 | 27 | // StatusResponse is a peer response to inform their status. 28 | message StatusResponse { 29 | int64 height = 1; 30 | int64 base = 2; 31 | } 32 | 33 | message Message { 34 | oneof sum { 35 | BlockRequest block_request = 1; 36 | NoBlockResponse no_block_response = 2; 37 | BlockResponse block_response = 3; 38 | StatusRequest status_request = 4; 39 | StatusResponse status_response = 5; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /proto/tendermint/crypto/keys.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package tendermint.crypto; 3 | 4 | option go_package = "github.com/cometbft/cometbft/proto/tendermint/crypto"; 5 | 6 | import "gogoproto/gogo.proto"; 7 | 8 | // PublicKey defines the keys available for use with Validators 9 | message PublicKey { 10 | option (gogoproto.compare) = true; 11 | option (gogoproto.equal) = true; 12 | 13 | oneof sum { 14 | bytes ed25519 = 1; 15 | bytes secp256k1 = 2; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /proto/tendermint/crypto/proof.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package tendermint.crypto; 3 | 4 | option go_package = "github.com/cometbft/cometbft/proto/tendermint/crypto"; 5 | 6 | import "gogoproto/gogo.proto"; 7 | 8 | message Proof { 9 | int64 total = 1; 10 | int64 index = 2; 11 | bytes leaf_hash = 3; 12 | repeated bytes aunts = 4; 13 | } 14 | 15 | message ValueOp { 16 | // Encoded in ProofOp.Key. 17 | bytes key = 1; 18 | 19 | // To encode in ProofOp.Data 20 | Proof proof = 2; 21 | } 22 | 23 | message DominoOp { 24 | string key = 1; 25 | string input = 2; 26 | string output = 3; 27 | } 28 | 29 | // ProofOp defines an operation used for calculating Merkle root 30 | // The data could be arbitrary format, providing nessecary data 31 | // for example neighbouring node hash 32 | message ProofOp { 33 | string type = 1; 34 | bytes key = 2; 35 | bytes data = 3; 36 | } 37 | 38 | // ProofOps is Merkle proof defined by the list of ProofOps 39 | message ProofOps { 40 | repeated ProofOp ops = 1 [(gogoproto.nullable) = false]; 41 | } 42 | -------------------------------------------------------------------------------- /proto/tendermint/libs/bits/types.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package tendermint.libs.bits; 3 | 4 | option go_package = "github.com/cometbft/cometbft/proto/tendermint/libs/bits"; 5 | 6 | message BitArray { 7 | int64 bits = 1; 8 | repeated uint64 elems = 2; 9 | } 10 | -------------------------------------------------------------------------------- /proto/tendermint/mempool/types.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package tendermint.mempool; 3 | 4 | option go_package = "github.com/cometbft/cometbft/proto/tendermint/mempool"; 5 | 6 | message Txs { 7 | repeated bytes txs = 1; 8 | } 9 | 10 | message Message { 11 | oneof sum { 12 | Txs txs = 1; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /proto/tendermint/p2p/conn.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package tendermint.p2p; 3 | 4 | option go_package = "github.com/cometbft/cometbft/proto/tendermint/p2p"; 5 | 6 | import "gogoproto/gogo.proto"; 7 | import "tendermint/crypto/keys.proto"; 8 | 9 | message PacketPing {} 10 | 11 | message PacketPong {} 12 | 13 | message PacketMsg { 14 | int32 channel_id = 1 [(gogoproto.customname) = "ChannelID"]; 15 | bool eof = 2 [(gogoproto.customname) = "EOF"]; 16 | bytes data = 3; 17 | } 18 | 19 | message Packet { 20 | oneof sum { 21 | PacketPing packet_ping = 1; 22 | PacketPong packet_pong = 2; 23 | PacketMsg packet_msg = 3; 24 | } 25 | } 26 | 27 | message AuthSigMessage { 28 | tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false]; 29 | bytes sig = 2; 30 | } 31 | -------------------------------------------------------------------------------- /proto/tendermint/p2p/pex.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package tendermint.p2p; 3 | 4 | option go_package = "github.com/cometbft/cometbft/proto/tendermint/p2p"; 5 | 6 | import "tendermint/p2p/types.proto"; 7 | import "gogoproto/gogo.proto"; 8 | 9 | message PexRequest {} 10 | 11 | message PexAddrs { 12 | repeated NetAddress addrs = 1 [(gogoproto.nullable) = false]; 13 | } 14 | 15 | message Message { 16 | oneof sum { 17 | PexRequest pex_request = 1; 18 | PexAddrs pex_addrs = 2; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /proto/tendermint/p2p/types.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package tendermint.p2p; 3 | 4 | option go_package = "github.com/cometbft/cometbft/proto/tendermint/p2p"; 5 | 6 | import "gogoproto/gogo.proto"; 7 | 8 | message NetAddress { 9 | string id = 1 [(gogoproto.customname) = "ID"]; 10 | string ip = 2 [(gogoproto.customname) = "IP"]; 11 | uint32 port = 3; 12 | } 13 | 14 | message ProtocolVersion { 15 | uint64 p2p = 1 [(gogoproto.customname) = "P2P"]; 16 | uint64 block = 2; 17 | uint64 app = 3; 18 | } 19 | 20 | message DefaultNodeInfo { 21 | ProtocolVersion protocol_version = 1 [(gogoproto.nullable) = false]; 22 | string default_node_id = 2 [(gogoproto.customname) = "DefaultNodeID"]; 23 | string listen_addr = 3; 24 | string network = 4; 25 | string version = 5; 26 | bytes channels = 6; 27 | string moniker = 7; 28 | DefaultNodeInfoOther other = 8 [(gogoproto.nullable) = false]; 29 | } 30 | 31 | message DefaultNodeInfoOther { 32 | string tx_index = 1; 33 | string rpc_address = 2 [(gogoproto.customname) = "RPCAddress"]; 34 | } 35 | -------------------------------------------------------------------------------- /proto/tendermint/rpc/grpc/types.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package tendermint.rpc.grpc; 3 | option go_package = "github.com/cometbft/cometbft/rpc/grpc;coregrpc"; 4 | 5 | import "tendermint/abci/types.proto"; 6 | 7 | //---------------------------------------- 8 | // Request types 9 | 10 | message RequestPing {} 11 | 12 | message RequestBroadcastTx { 13 | bytes tx = 1; 14 | } 15 | 16 | //---------------------------------------- 17 | // Response types 18 | 19 | message ResponsePing {} 20 | 21 | message ResponseBroadcastTx { 22 | tendermint.abci.ResponseCheckTx check_tx = 1; 23 | tendermint.abci.ResponseDeliverTx deliver_tx = 2; 24 | } 25 | 26 | //---------------------------------------- 27 | // Service Definition 28 | 29 | service BroadcastAPI { 30 | rpc Ping(RequestPing) returns (ResponsePing); 31 | rpc BroadcastTx(RequestBroadcastTx) returns (ResponseBroadcastTx); 32 | } 33 | -------------------------------------------------------------------------------- /proto/tendermint/statesync/types.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package tendermint.statesync; 3 | 4 | option go_package = "github.com/cometbft/cometbft/proto/tendermint/statesync"; 5 | 6 | message Message { 7 | oneof sum { 8 | SnapshotsRequest snapshots_request = 1; 9 | SnapshotsResponse snapshots_response = 2; 10 | ChunkRequest chunk_request = 3; 11 | ChunkResponse chunk_response = 4; 12 | } 13 | } 14 | 15 | message SnapshotsRequest {} 16 | 17 | message SnapshotsResponse { 18 | uint64 height = 1; 19 | uint32 format = 2; 20 | uint32 chunks = 3; 21 | bytes hash = 4; 22 | bytes metadata = 5; 23 | } 24 | 25 | message ChunkRequest { 26 | uint64 height = 1; 27 | uint32 format = 2; 28 | uint32 index = 3; 29 | } 30 | 31 | message ChunkResponse { 32 | uint64 height = 1; 33 | uint32 format = 2; 34 | uint32 index = 3; 35 | bytes chunk = 4; 36 | bool missing = 5; 37 | } 38 | -------------------------------------------------------------------------------- /proto/tendermint/store/types.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package tendermint.store; 3 | 4 | option go_package = "github.com/cometbft/cometbft/proto/tendermint/store"; 5 | 6 | message BlockStoreState { 7 | int64 base = 1; 8 | int64 height = 2; 9 | } 10 | -------------------------------------------------------------------------------- /proto/tendermint/types/block.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package tendermint.types; 3 | 4 | option go_package = "github.com/cometbft/cometbft/proto/tendermint/types"; 5 | 6 | import "gogoproto/gogo.proto"; 7 | import "tendermint/types/types.proto"; 8 | import "tendermint/types/evidence.proto"; 9 | 10 | message Block { 11 | Header header = 1 [(gogoproto.nullable) = false]; 12 | Data data = 2 [(gogoproto.nullable) = false]; 13 | tendermint.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false]; 14 | Commit last_commit = 4; 15 | } 16 | -------------------------------------------------------------------------------- /proto/tendermint/types/events.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package tendermint.types; 3 | 4 | option go_package = "github.com/cometbft/cometbft/proto/tendermint/types"; 5 | 6 | message EventDataRoundState { 7 | int64 height = 1; 8 | int32 round = 2; 9 | string step = 3; 10 | } 11 | -------------------------------------------------------------------------------- /proto/tendermint/types/validator.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package tendermint.types; 3 | 4 | option go_package = "github.com/cometbft/cometbft/proto/tendermint/types"; 5 | 6 | import "gogoproto/gogo.proto"; 7 | import "tendermint/crypto/keys.proto"; 8 | 9 | message ValidatorSet { 10 | repeated Validator validators = 1; 11 | Validator proposer = 2; 12 | int64 total_voting_power = 3; 13 | } 14 | 15 | message Validator { 16 | bytes address = 1; 17 | tendermint.crypto.PublicKey pub_key = 2 [(gogoproto.nullable) = false]; 18 | int64 voting_power = 3; 19 | int64 proposer_priority = 4; 20 | } 21 | 22 | message SimpleValidator { 23 | tendermint.crypto.PublicKey pub_key = 1; 24 | int64 voting_power = 2; 25 | } 26 | -------------------------------------------------------------------------------- /proto/tendermint/version/types.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package tendermint.version; 3 | 4 | option go_package = "github.com/cometbft/cometbft/proto/tendermint/version"; 5 | 6 | import "gogoproto/gogo.proto"; 7 | 8 | // App includes the protocol and software version for the application. 9 | // This information is included in ResponseInfo. The App.Protocol can be 10 | // updated in ResponseEndBlock. 11 | message App { 12 | uint64 protocol = 1; 13 | string software = 2; 14 | } 15 | 16 | // Consensus captures the consensus rules for processing a block in the blockchain, 17 | // including all blockchain data structures and the rules of the application's 18 | // state transition machine. 19 | message Consensus { 20 | option (gogoproto.equal) = true; 21 | 22 | uint64 block = 1; 23 | uint64 app = 2; 24 | } 25 | -------------------------------------------------------------------------------- /pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | markers = 3 | e2e: mark a test as end to end. 4 | unit: mark a test as unit test. 5 | slow: mark test as slow. 6 | tx: mark test as sending transaction. 7 | requires_config: mark test as requiring correct config. 8 | localnet: mark test as requiring local network settings. 9 | go_library: mark test as requiring go library. 10 | requires_validator_account: mark a test as requires_validator_account. 11 | requires_storage_provider: mark a test as requires_storage_provider. 12 | error: mark test as expecting an error. 13 | funds: mark as requiring a lot of tokens -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length = 120 3 | radon-max-cc = 20 4 | extend-ignore = E203 5 | exclude = greenfield_python_sdk/protos 6 | 7 | [mypy] 8 | ignore_missing_imports = True 9 | 10 | [mypy-greenfield_python_sdk.protos.*] 11 | ignore_errors = True -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/tests/__init__.py -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- 1 | pytest_plugins = [ 2 | "tests.fixtures", 3 | ] 4 | -------------------------------------------------------------------------------- /tests/e2e/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/tests/e2e/__init__.py -------------------------------------------------------------------------------- /tests/e2e/greenfield/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/tests/e2e/greenfield/__init__.py -------------------------------------------------------------------------------- /tests/e2e/greenfield/doc/upload_file.txt: -------------------------------------------------------------------------------- 1 | New Uploading file -------------------------------------------------------------------------------- /tests/e2e/greenfield/test_virtual_group.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | from greenfield_python_sdk import GreenfieldClient, KeyManager, NetworkConfiguration, NetworkTestnet 4 | from greenfield_python_sdk.protos.greenfield.virtualgroup import GlobalVirtualGroupFamily 5 | 6 | pytestmark = [pytest.mark.asyncio, pytest.mark.e2e] 7 | 8 | network_configuration = NetworkConfiguration(**NetworkTestnet().model_dump()) 9 | 10 | key_manager = KeyManager() 11 | 12 | 13 | async def test_get_virtual_group_family(): 14 | async with GreenfieldClient(network_configuration=network_configuration, key_manager=key_manager) as client: 15 | virtual_group_family = await client.virtual_group.get_virtual_group_family(1) 16 | assert virtual_group_family 17 | assert isinstance(virtual_group_family, GlobalVirtualGroupFamily) 18 | -------------------------------------------------------------------------------- /tests/fixtures.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | from greenfield_python_sdk.blockchain_client import CustomChannel 4 | from greenfield_python_sdk.protos.cosmos.base.query.v1beta1 import PageRequest 5 | from greenfield_python_sdk.protos.cosmos.base.v1beta1 import Coin 6 | from greenfield_python_sdk.protos.greenfield.sp import Description 7 | 8 | 9 | @pytest.fixture 10 | def mock_description(mocker): 11 | return mocker.MagicMock(spec=Description) 12 | 13 | 14 | @pytest.fixture 15 | def mock_coin(mocker): 16 | return mocker.MagicMock(spec=Coin) 17 | 18 | 19 | @pytest.fixture 20 | def mock_page_request(mocker): 21 | return mocker.MagicMock(spec=PageRequest) 22 | 23 | 24 | @pytest.fixture 25 | def mock_channel(mocker): 26 | return CustomChannel(host="localhost", port=9090) 27 | -------------------------------------------------------------------------------- /tests/unit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bnb-chain/greenfield-python-sdk/23dfd1f9d5460bad74e83e0d651f2fd963333968/tests/unit/__init__.py -------------------------------------------------------------------------------- /tests/unit/blockchain/test_bridge.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import AsyncMock 2 | 3 | import pytest 4 | 5 | from greenfield_python_sdk.blockchain.bridge import Bridge 6 | from greenfield_python_sdk.protos.greenfield.bridge import MsgTransferOut, QueryParamsRequest 7 | 8 | pytestmark = [pytest.mark.unit, pytest.mark.asyncio] 9 | 10 | 11 | @pytest.fixture 12 | def mock_bridge(mock_channel): 13 | bridge = Bridge(mock_channel) 14 | bridge.query_stub = AsyncMock() 15 | return bridge 16 | 17 | 18 | async def test_bridge_get_params(mock_bridge): 19 | await mock_bridge.get_params() 20 | mock_bridge.query_stub.params.assert_called_once_with(QueryParamsRequest()) 21 | -------------------------------------------------------------------------------- /tests/unit/blockchain/test_challenge.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import AsyncMock 2 | 3 | import pytest 4 | 5 | from greenfield_python_sdk.blockchain.challenge import Challenge 6 | from greenfield_python_sdk.protos.greenfield.challenge import ( 7 | MsgAttest, 8 | MsgSubmit, 9 | QueryLatestAttestedChallengesRequest, 10 | VoteResult, 11 | ) 12 | 13 | pytestmark = [pytest.mark.unit, pytest.mark.asyncio] 14 | 15 | 16 | @pytest.fixture 17 | def mock_challenge(mock_channel): 18 | challenge = Challenge(mock_channel) 19 | challenge.query_stub = AsyncMock() 20 | return challenge 21 | 22 | 23 | async def test_challenge_get_latest_attested_challenges(mock_challenge): 24 | await mock_challenge.get_latest_attested_challenges() 25 | mock_challenge.query_stub.latest_attested_challenges.assert_called_once_with(QueryLatestAttestedChallengesRequest()) 26 | -------------------------------------------------------------------------------- /tests/unit/blockchain/test_permission.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import MagicMock 2 | 3 | import pytest 4 | 5 | from greenfield_python_sdk.blockchain.permission import Permission 6 | from greenfield_python_sdk.protos.greenfield.permission import QueryParamsRequest, QueryStub 7 | 8 | pytestmark = [pytest.mark.unit, pytest.mark.asyncio] 9 | 10 | 11 | @pytest.fixture 12 | def mock_permission(mock_channel): 13 | permission = Permission(mock_channel) 14 | permission.query_stub = MagicMock(spec=QueryStub) 15 | return permission 16 | 17 | 18 | async def test_permission_get_params(mock_permission): 19 | await mock_permission.get_params() 20 | mock_permission.query_stub.params.assert_called_once_with(QueryParamsRequest()) 21 | -------------------------------------------------------------------------------- /tests/unit/blockchain/test_sp.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import MagicMock 2 | 3 | import pytest 4 | 5 | from greenfield_python_sdk.blockchain.sp import Sp 6 | from greenfield_python_sdk.protos.greenfield.sp import ( 7 | QueryStorageProviderRequest, 8 | QueryStorageProvidersRequest, 9 | QueryStub, 10 | ) 11 | 12 | pytestmark = [pytest.mark.unit, pytest.mark.asyncio] 13 | 14 | 15 | @pytest.fixture 16 | def mock_sp(mock_channel): 17 | sp = Sp(mock_channel) 18 | sp.query_stub = MagicMock(spec=QueryStub) 19 | return sp 20 | 21 | 22 | async def test_sp_get_storage_providers(mock_sp, mock_page_request): 23 | await mock_sp.get_storage_providers(QueryStorageProvidersRequest(pagination=mock_page_request)) 24 | mock_sp.query_stub.storage_providers.assert_called_once_with( 25 | QueryStorageProvidersRequest(pagination=mock_page_request) 26 | ) 27 | 28 | 29 | async def test_sp_get_storage_provider(mock_sp): 30 | sp_id = 1 31 | 32 | await mock_sp.get_storage_provider(QueryStorageProviderRequest(id=sp_id)) 33 | mock_sp.query_stub.storage_provider.assert_called_once_with(QueryStorageProviderRequest(id=sp_id)) 34 | -------------------------------------------------------------------------------- /tests/unit/test_config.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | from greenfield_python_sdk.config import NetworkConfiguration 4 | 5 | pytestmark = [pytest.mark.unit] 6 | 7 | 8 | def test_network_configuration_initialization(): 9 | host = "localhost" 10 | port = 443 11 | chain_id = 5000 12 | 13 | # Test default ssl value (False) 14 | network_config_default = NetworkConfiguration(host=host, port=port, chain_id=chain_id) 15 | assert network_config_default.host == host 16 | assert network_config_default.port == port 17 | 18 | # Test custom ssl value (True) 19 | network_config_custom = NetworkConfiguration(host=host, port=port, chain_id=chain_id) 20 | assert network_config_custom.host == host 21 | assert network_config_custom.port == port 22 | --------------------------------------------------------------------------------