Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ npm install persistenceonejs

| PersistenceJS | PersistenceCore |
|---------------|-----------------|
| v3.0.x | v14.x.x |
| v2.2.x | v9.x.x |
| v2.1.x | v8.x.x |
Rest of the versions are obsolete
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "persistenceonejs",
"version": "2.4.0-rc1",
"version": "3.0.0",
"description": "Client side JS libraries for persistenceSDK transaction generation, signing and broadcasting.",
"main": "main/index.js",
"module": "module/index.js",
Expand Down
7 changes: 6 additions & 1 deletion proto/amino/amino.proto
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,9 @@ extend google.protobuf.FieldOptions {
// out := AminoJSONEncoder(&f);
// out == {"baz":""}
bool dont_omitempty = 11110005;
}

// oneof_name sets the type name for the given field oneof field. This is used
// by the Amino JSON encoder to encode the type of the oneof field, and must be the same string in
// the RegisterConcrete() method usage used to register the concrete type.
string oneof_name = 11110006;
}
15 changes: 15 additions & 0 deletions proto/cosmos/app/runtime/v1alpha1/module.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ message Module {
// override_store_keys is an optional list of overrides for the module store keys
// to be used in keeper construction.
repeated StoreKeyConfig override_store_keys = 6;

// order_migrations defines the order in which module migrations are performed.
// If this is left empty, it uses the default migration order.
// https://pkg.go.dev/github.com/cosmos/cosmos-sdk@v0.47.0-alpha2/types/module#DefaultMigrationsOrder
repeated string order_migrations = 7;

// precommiters specifies the module names of the precommiters
// to call in the order in which they should be called. If this is left empty
// no precommit function will be registered.
repeated string precommiters = 8;

// prepare_check_staters specifies the module names of the prepare_check_staters
// to call in the order in which they should be called. If this is left empty
// no preparecheckstate function will be registered.
repeated string prepare_check_staters = 9;
}

// StoreKeyConfig may be supplied to override the default module store key, which
Expand Down
2 changes: 1 addition & 1 deletion proto/cosmos/app/v1alpha1/module.proto
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ message PackageReference {
//
// When a new version of a module is released and items are added to existing
// .proto files, these definitions should contain comments of the form
// "Since Revision N" where N is an integer revision.
// "Since: Revision N" where N is an integer revision.
//
// When the module runtime starts up, it will check the pinned proto
// image and panic if there are runtime protobuf definitions that are not
Expand Down
17 changes: 11 additions & 6 deletions proto/cosmos/auth/v1beta1/auth.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,24 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types";
// for basic account functionality. Any custom account type should extend this
// type for additional functionality (e.g. vesting).
message BaseAccount {
option (amino.name) = "cosmos-sdk/BaseAccount";
option (gogoproto.goproto_getters) = false;
option (gogoproto.equal) = false;
option (amino.name) = "cosmos-sdk/BaseAccount";
option (gogoproto.goproto_getters) = false;
option (gogoproto.equal) = false;

option (cosmos_proto.implements_interface) = "cosmos.auth.v1beta1.AccountI";

string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

google.protobuf.Any pub_key = 2 [(gogoproto.jsontag) = "public_key,omitempty", (amino.field_name) = "public_key"];
uint64 account_number = 3;
uint64 sequence = 4;

uint64 account_number = 3;
uint64 sequence = 4;
}

// ModuleAccount defines an account for modules that holds coins on a pool.
message ModuleAccount {
option (amino.name) = "cosmos-sdk/ModuleAccount";
option (amino.message_encoding) = "module_account";
option (gogoproto.goproto_getters) = false;
option (cosmos_proto.implements_interface) = "cosmos.auth.v1beta1.ModuleAccountI";

Expand All @@ -38,6 +42,7 @@ message ModuleAccount {
//
// Since: cosmos-sdk 0.47
message ModuleCredential {
option (amino.name) = "cosmos-sdk/GroupAccountCredential";
// module_name is the name of the module used for address derivation (passed into address.Module).
string module_name = 1;
// derivation_keys is for deriving a module account address (passed into address.Module)
Expand Down
2 changes: 1 addition & 1 deletion proto/cosmos/authz/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ message QueryGranterGrantsResponse {
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method.
// QueryGranteeGrantsRequest is the request type for the Query/GranteeGrants RPC method.
message QueryGranteeGrantsRequest {
string grantee = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

Expand Down
12 changes: 6 additions & 6 deletions proto/cosmos/authz/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ message MsgGrant {
cosmos.authz.v1beta1.Grant grant = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}

// MsgExecResponse defines the Msg/MsgExecResponse response type.
message MsgExecResponse {
repeated bytes results = 1;
}
// MsgGrantResponse defines the Msg/MsgGrant response type.
message MsgGrantResponse {}

// MsgExec attempts to execute the provided messages using
// authorizations granted to the grantee. Each message should have only
Expand All @@ -63,8 +61,10 @@ message MsgExec {
repeated google.protobuf.Any msgs = 2 [(cosmos_proto.accepts_interface) = "cosmos.base.v1beta1.Msg"];
}

// MsgGrantResponse defines the Msg/MsgGrant response type.
message MsgGrantResponse {}
// MsgExecResponse defines the Msg/MsgExecResponse response type.
message MsgExecResponse {
repeated bytes results = 1;
}

// MsgRevoke revokes any authorization with the provided sdk.Msg type on the
// granter's account with that has been granted to the grantee.
Expand Down
12 changes: 9 additions & 3 deletions proto/cosmos/bank/module/v1/module.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@ message Module {
go_import: "github.com/cosmos/cosmos-sdk/x/bank"
};

// blocked_module_accounts configures exceptional module accounts which should be blocked from receiving funds.
// If left empty it defaults to the list of account names supplied in the auth module configuration as
// blocked_module_accounts_override configures exceptional module accounts which should be blocked from receiving
// funds. If left empty it defaults to the list of account names supplied in the auth module configuration as
// module_account_permissions
repeated string blocked_module_accounts_override = 1;

// authority defines the custom module authority. If not set, defaults to the governance module.
string authority = 2;
}

// restrictions_order specifies the order of send restrictions and should be
// a list of module names which provide a send restriction instance. If no
// order is provided, then restrictions will be applied in alphabetical order
// of module names.
repeated string restrictions_order = 3;
}
1 change: 1 addition & 0 deletions proto/cosmos/bank/v1beta1/authz.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ message SendAuthorization {
repeated cosmos.base.v1beta1.Coin spend_limit = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(amino.encoding) = "legacy_coins",
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];

Expand Down
13 changes: 7 additions & 6 deletions proto/cosmos/bank/v1beta1/bank.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types";

// Params defines the parameters for the bank module.
message Params {
option (amino.name) = "cosmos-sdk/x/bank/Params";
option (gogoproto.goproto_stringer) = false;
option (amino.name) = "cosmos-sdk/x/bank/Params";
// Deprecated: Use of SendEnabled in params is deprecated.
// For genesis, use the newly added send_enabled field in the genesis object.
// Storage, lookup, and manipulation of this information is now in the keeper.
Expand All @@ -25,10 +24,9 @@ message Params {
// SendEnabled maps coin denom to a send_enabled status (whether a denom is
// sendable).
message SendEnabled {
option (gogoproto.equal) = true;
option (gogoproto.goproto_stringer) = false;
string denom = 1;
bool enabled = 2;
option (gogoproto.equal) = true;
string denom = 1;
bool enabled = 2;
}

// Input models transaction input.
Expand All @@ -42,6 +40,7 @@ message Input {
repeated cosmos.base.v1beta1.Coin coins = 2 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(amino.encoding) = "legacy_coins",
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}
Expand All @@ -55,6 +54,7 @@ message Output {
repeated cosmos.base.v1beta1.Coin coins = 2 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(amino.encoding) = "legacy_coins",
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}
Expand All @@ -73,6 +73,7 @@ message Supply {
repeated cosmos.base.v1beta1.Coin total = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(amino.encoding) = "legacy_coins",
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}
Expand Down
2 changes: 2 additions & 0 deletions proto/cosmos/bank/v1beta1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ message GenesisState {
// supply represents the total supply. If it is left empty, then supply will be calculated based on the provided
// balances. Otherwise, it will be used to validate that the sum of the balances equals this amount.
repeated cosmos.base.v1beta1.Coin supply = 3 [
(amino.encoding) = "legacy_coins",
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
Expand All @@ -45,6 +46,7 @@ message Balance {

// coins defines the different coins this balance holds.
repeated cosmos.base.v1beta1.Coin coins = 2 [
(amino.encoding) = "legacy_coins",
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
Expand Down
63 changes: 62 additions & 1 deletion proto/cosmos/bank/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,18 @@ service Query {
option (google.api.http).get = "/cosmos/bank/v1beta1/params";
}

// DenomsMetadata queries the client metadata of a given coin denomination.
// DenomMetadata queries the client metadata of a given coin denomination.
rpc DenomMetadata(QueryDenomMetadataRequest) returns (QueryDenomMetadataResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata/{denom}";
}

// DenomMetadataByQueryString queries the client metadata of a given coin denomination.
rpc DenomMetadataByQueryString(QueryDenomMetadataByQueryStringRequest)
returns (QueryDenomMetadataByQueryStringResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata_by_query_string";
}
// DenomsMetadata queries the client metadata for all registered coin
// denominations.
rpc DenomsMetadata(QueryDenomsMetadataRequest) returns (QueryDenomsMetadataResponse) {
Expand All @@ -102,6 +108,15 @@ service Query {
option (google.api.http).get = "/cosmos/bank/v1beta1/denom_owners/{denom}";
}

// DenomOwnersByQuery queries for all account addresses that own a particular token
// denomination.
//
// Since: cosmos-sdk 0.50.3
rpc DenomOwnersByQuery(QueryDenomOwnersByQueryRequest) returns (QueryDenomOwnersByQueryResponse) {
option (cosmos.query.v1.module_query_safe) = true;
option (google.api.http).get = "/cosmos/bank/v1beta1/denom_owners_by_query";
}

// SendEnabled queries for SendEnabled entries.
//
// This query only returns denominations that have specific SendEnabled settings.
Expand Down Expand Up @@ -143,6 +158,11 @@ message QueryAllBalancesRequest {

// pagination defines an optional pagination for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 2;

// resolve_denom is the flag to resolve the denom into a human-readable form from the metadata.
//
// Since: cosmos-sdk 0.50
bool resolve_denom = 3;
}

// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC
Expand All @@ -152,6 +172,7 @@ message QueryAllBalancesResponse {
repeated cosmos.base.v1beta1.Coin balances = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(amino.encoding) = "legacy_coins",
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];

Expand Down Expand Up @@ -183,6 +204,7 @@ message QuerySpendableBalancesResponse {
repeated cosmos.base.v1beta1.Coin balances = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(amino.encoding) = "legacy_coins",
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];

Expand Down Expand Up @@ -233,6 +255,7 @@ message QueryTotalSupplyResponse {
repeated cosmos.base.v1beta1.Coin supply = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(amino.encoding) = "legacy_coins",
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];

Expand All @@ -259,6 +282,7 @@ message QueryParamsRequest {}

// QueryParamsResponse defines the response type for querying x/bank parameters.
message QueryParamsResponse {
// params provides the parameters of the bank module.
Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}

Expand Down Expand Up @@ -291,6 +315,20 @@ message QueryDenomMetadataResponse {
Metadata metadata = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}

// QueryDenomMetadataByQueryStringRequest is the request type for the Query/DenomMetadata RPC method.
// Identical with QueryDenomMetadataRequest but receives denom as query string.
message QueryDenomMetadataByQueryStringRequest {
// denom is the coin denom to query the metadata for.
string denom = 1;
}

// QueryDenomMetadataByQueryStringResponse is the response type for the Query/DenomMetadata RPC
// method. Identical with QueryDenomMetadataResponse but receives denom as query string in request.
message QueryDenomMetadataByQueryStringResponse {
// metadata describes and provides all the client information for the requested token.
Metadata metadata = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}

// QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query,
// which queries for a paginated set of all account holders of a particular
// denomination.
Expand Down Expand Up @@ -325,6 +363,29 @@ message QueryDenomOwnersResponse {
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// QueryDenomOwnersByQueryRequest defines the request type for the DenomOwnersByQuery RPC query,
// which queries for a paginated set of all account holders of a particular
// denomination.
//
// Since: cosmos-sdk 0.50.3
message QueryDenomOwnersByQueryRequest {
// denom defines the coin denomination to query all account holders for.
string denom = 1;

// pagination defines an optional pagination for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 2;
}

// QueryDenomOwnersByQueryResponse defines the RPC response of a DenomOwnersByQuery RPC query.
//
// Since: cosmos-sdk 0.50.3
message QueryDenomOwnersByQueryResponse {
repeated DenomOwner denom_owners = 1;

// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// QuerySendEnabledRequest defines the RPC request for looking up SendEnabled entries.
//
// Since: cosmos-sdk 0.47
Expand Down
2 changes: 2 additions & 0 deletions proto/cosmos/bank/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ message MsgSend {
repeated cosmos.base.v1beta1.Coin amount = 3 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(amino.encoding) = "legacy_coins",
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}
Expand Down Expand Up @@ -104,6 +105,7 @@ message MsgSetSendEnabled {
option (cosmos.msg.v1.signer) = "authority";
option (amino.name) = "cosmos-sdk/MsgSetSendEnabled";

// authority is the address that controls the module.
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// send_enabled is the list of entries to add or update.
Expand Down
Loading