coreum-js 2.6.5 → 2.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +44 -3
  2. package/dist/main/client/index.js +3 -2
  3. package/dist/main/coreum/extensions/ft.d.ts +9 -8
  4. package/dist/main/coreum/extensions/ft.js +15 -15
  5. package/dist/main/coreum/extensions/nft.d.ts +7 -6
  6. package/dist/main/coreum/extensions/nft.js +19 -11
  7. package/dist/main/coreum/extensions/nftbeta.d.ts +9 -8
  8. package/dist/main/coreum/extensions/nftbeta.js +22 -15
  9. package/dist/main/coreum/index.d.ts +16 -0
  10. package/dist/main/coreum/index.js +17 -1
  11. package/dist/main/cosmos/extensions/bank.d.ts +15 -0
  12. package/dist/main/cosmos/extensions/bank.js +43 -0
  13. package/dist/main/cosmos/extensions/distribution.d.ts +35 -0
  14. package/dist/main/cosmos/extensions/distribution.js +69 -0
  15. package/dist/main/cosmos/extensions/gov.d.ts +36 -0
  16. package/dist/main/cosmos/extensions/gov.js +70 -0
  17. package/dist/main/cosmos/extensions/index.d.ts +3 -0
  18. package/dist/main/cosmos/extensions/index.js +20 -0
  19. package/dist/main/cosmos/index.d.ts +161 -0
  20. package/dist/main/cosmos/index.js +162 -1
  21. package/dist/main/types/core.d.ts +7 -6
  22. package/dist/main/types/core.js +1 -1
  23. package/dist/main/wasm/v1/index.d.ts +77 -0
  24. package/dist/main/wasm/v1/index.js +78 -1
  25. package/dist/module/client/index.js +4 -3
  26. package/dist/module/coreum/extensions/ft.d.ts +9 -8
  27. package/dist/module/coreum/extensions/ft.js +15 -15
  28. package/dist/module/coreum/extensions/nft.d.ts +7 -6
  29. package/dist/module/coreum/extensions/nft.js +19 -11
  30. package/dist/module/coreum/extensions/nftbeta.d.ts +9 -8
  31. package/dist/module/coreum/extensions/nftbeta.js +22 -15
  32. package/dist/module/coreum/index.d.ts +16 -0
  33. package/dist/module/coreum/index.js +17 -1
  34. package/dist/module/cosmos/extensions/bank.d.ts +15 -0
  35. package/dist/module/cosmos/extensions/bank.js +39 -0
  36. package/dist/module/cosmos/extensions/distribution.d.ts +35 -0
  37. package/dist/module/cosmos/extensions/distribution.js +65 -0
  38. package/dist/module/cosmos/extensions/gov.d.ts +36 -0
  39. package/dist/module/cosmos/extensions/gov.js +72 -0
  40. package/dist/module/cosmos/extensions/index.d.ts +3 -0
  41. package/dist/module/cosmos/extensions/index.js +4 -0
  42. package/dist/module/cosmos/index.d.ts +161 -0
  43. package/dist/module/cosmos/index.js +162 -1
  44. package/dist/module/types/core.d.ts +7 -6
  45. package/dist/module/types/core.js +1 -1
  46. package/dist/module/wasm/v1/index.d.ts +77 -0
  47. package/dist/module/wasm/v1/index.js +78 -1
  48. package/package.json +2 -2
@@ -0,0 +1,15 @@
1
+ import { PageRequest } from "../bank/v1beta1/pagination";
2
+ import { QueryClient } from "@cosmjs/stargate";
3
+ export declare function setupBankExtension(base: QueryClient): {
4
+ bank: {
5
+ balance: (address: string, denom: string) => Promise<import("../base/v1beta1/coin").Coin>;
6
+ allBalances: (address: string) => Promise<import("../base/v1beta1/coin").Coin[]>;
7
+ totalSupply: (pagination?: PageRequest) => Promise<{
8
+ supply: import("../base/v1beta1/coin").Coin[];
9
+ pagination: import("../bank/v1beta1/pagination").PageResponse;
10
+ }>;
11
+ supplyOf: (denom: string) => Promise<import("../base/v1beta1/coin").Coin>;
12
+ denomMetadata: (denom: string) => Promise<import("../bank/v1beta1/bank").Metadata>;
13
+ denomsMetadata: (pagination?: PageRequest) => Promise<import("../bank/v1beta1/bank").Metadata[]>;
14
+ };
15
+ };
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setupBankExtension = void 0;
4
+ const query_1 = require("../bank/v1beta1/query");
5
+ const query_2 = require("../bank/v1beta1/query");
6
+ const stargate_1 = require("@cosmjs/stargate");
7
+ function setupBankExtension(base) {
8
+ const rpc = (0, stargate_1.createProtobufRpcClient)(base);
9
+ const queryService = new query_2.QueryClientImpl(rpc);
10
+ return {
11
+ bank: {
12
+ balance: async (address, denom) => {
13
+ const { balance } = await queryService.Balance({ address, denom });
14
+ return balance;
15
+ },
16
+ allBalances: async (address) => {
17
+ const { balances } = await queryService.AllBalances(query_1.QueryAllBalancesRequest.fromPartial({ address }));
18
+ return balances;
19
+ },
20
+ totalSupply: async (pagination) => {
21
+ const supplyResponse = await queryService.TotalSupply({ pagination });
22
+ return {
23
+ supply: supplyResponse.supply,
24
+ pagination: supplyResponse.pagination,
25
+ };
26
+ },
27
+ supplyOf: async (denom) => {
28
+ const { amount } = await queryService.SupplyOf({ denom });
29
+ return amount;
30
+ },
31
+ denomMetadata: async (denom) => {
32
+ const { metadata } = await queryService.DenomMetadata({ denom });
33
+ return metadata;
34
+ },
35
+ denomsMetadata: async (pagination) => {
36
+ const { metadatas } = await queryService.DenomsMetadata({ pagination });
37
+ return metadatas;
38
+ },
39
+ },
40
+ };
41
+ }
42
+ exports.setupBankExtension = setupBankExtension;
43
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFuay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb3Ntb3MvZXh0ZW5zaW9ucy9iYW5rLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLGlEQUFnRTtBQUNoRSxpREFBd0Q7QUFDeEQsK0NBQXdFO0FBRXhFLFNBQWdCLGtCQUFrQixDQUFDLElBQWlCO0lBQ2xELE1BQU0sR0FBRyxHQUFHLElBQUEsa0NBQXVCLEVBQUMsSUFBSSxDQUFDLENBQUM7SUFDMUMsTUFBTSxZQUFZLEdBQUcsSUFBSSx1QkFBZSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0lBRTlDLE9BQU87UUFDTCxJQUFJLEVBQUU7WUFDSixPQUFPLEVBQUUsS0FBSyxFQUFFLE9B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QUFZLENBQUMsYUFBYSxDQUFDLEVBQUUsS0FBSyxFQUFFLENBQUMsQ0FBQztnQkFFakUsT0FBTyxRQUFRLENBQUM7WUFDbEIsQ0FBQztZQUVELGNBQWMsRUFBRSxLQUFLLEVBQUUsVUFBd0IsRUFBRSxFQUFFO2dCQUNqRCxNQUFNLEVBQUUsU0FBUyxFQUFFLEdBQUcsTUFBTSxZQUFZLENBQUMsY0FBYyxDQUFDLEVBQUUsVUFBVSxFQUFFLENBQUMsQ0FBQztnQkFFeEUsT0FBTyxTQUFTLENBQUM7WUFDbkIsQ0FBQztTQUNGO0tBQ0YsQ0FBQztBQUNKLENBQUM7QUE1Q0QsZ0RBNENDIn0=
@@ -0,0 +1,35 @@
1
+ import { PageRequest } from "../distribution/v1beta1/pagination";
2
+ import { QueryClient } from "@cosmjs/stargate";
3
+ export declare function setupDistributionExtension(base: QueryClient): {
4
+ distribution: {
5
+ communityPool: () => Promise<{
6
+ pool: import("../base/v1beta1/coin").DecCoin[];
7
+ }>;
8
+ delegationRewards: (delegator: string, validator: string) => Promise<{
9
+ rewards: import("../base/v1beta1/coin").DecCoin[];
10
+ }>;
11
+ delegationTotalRewards: (delegator: string) => Promise<{
12
+ rewards: import("../distribution/v1beta1/distribution").DelegationDelegatorReward[];
13
+ total: import("../base/v1beta1/coin").DecCoin[];
14
+ }>;
15
+ delegatorValidators: (delegator: string) => Promise<{
16
+ validators: string[];
17
+ }>;
18
+ delegatorWithdrawAddress: (delegator: string) => Promise<{
19
+ withdrawAddress: string;
20
+ }>;
21
+ params: () => Promise<{
22
+ params: import("../distribution/v1beta1/distribution").Params;
23
+ }>;
24
+ validatorCommission: (validator: string) => Promise<{
25
+ commission: import("../distribution/v1beta1/distribution").ValidatorAccumulatedCommission;
26
+ }>;
27
+ validatorOutstandingRewards: (validator: string) => Promise<{
28
+ rewards: import("../distribution/v1beta1/distribution").ValidatorOutstandingRewards;
29
+ }>;
30
+ validatorSlashes: (validator: string, starting_height: number, ending_height: number, pagination?: PageRequest) => Promise<{
31
+ slashes: import("../distribution/v1beta1/distribution").ValidatorSlashEvent[];
32
+ pagination: import("../distribution/v1beta1/pagination").PageResponse;
33
+ }>;
34
+ };
35
+ };
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setupDistributionExtension = void 0;
4
+ const query_1 = require("../distribution/v1beta1/query");
5
+ const stargate_1 = require("@cosmjs/stargate");
6
+ function setupDistributionExtension(base) {
7
+ const rpc = (0, stargate_1.createProtobufRpcClient)(base);
8
+ const queryService = new query_1.QueryClientImpl(rpc);
9
+ return {
10
+ distribution: {
11
+ communityPool: async () => {
12
+ const response = await queryService.CommunityPool({});
13
+ return Object.assign({}, response);
14
+ },
15
+ delegationRewards: async (delegator, validator) => {
16
+ const response = await queryService.DelegationRewards({
17
+ delegatorAddress: delegator,
18
+ validatorAddress: validator,
19
+ });
20
+ return Object.assign({}, response);
21
+ },
22
+ delegationTotalRewards: async (delegator) => {
23
+ const response = await queryService.DelegationTotalRewards({
24
+ delegatorAddress: delegator,
25
+ });
26
+ return Object.assign({}, response);
27
+ },
28
+ delegatorValidators: async (delegator) => {
29
+ const response = await queryService.DelegatorValidators({
30
+ delegatorAddress: delegator,
31
+ });
32
+ return Object.assign({}, response);
33
+ },
34
+ delegatorWithdrawAddress: async (delegator) => {
35
+ const response = await queryService.DelegatorWithdrawAddress({
36
+ delegatorAddress: delegator,
37
+ });
38
+ return Object.assign({}, response);
39
+ },
40
+ params: async () => {
41
+ const response = await queryService.Params({});
42
+ return Object.assign({}, response);
43
+ },
44
+ validatorCommission: async (validator) => {
45
+ const response = await queryService.ValidatorCommission({
46
+ validatorAddress: validator,
47
+ });
48
+ return Object.assign({}, response);
49
+ },
50
+ validatorOutstandingRewards: async (validator) => {
51
+ const response = await queryService.ValidatorOutstandingRewards({
52
+ validatorAddress: validator,
53
+ });
54
+ return Object.assign({}, response);
55
+ },
56
+ validatorSlashes: async (validator, starting_height, ending_height, pagination) => {
57
+ const response = await queryService.ValidatorSlashes({
58
+ validatorAddress: validator,
59
+ startingHeight: starting_height,
60
+ endingHeight: ending_height,
61
+ pagination,
62
+ });
63
+ return Object.assign({}, response);
64
+ },
65
+ },
66
+ };
67
+ }
68
+ exports.setupDistributionExtension = setupDistributionExtension;
69
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzdHJpYnV0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2Nvc21vcy9leHRlbnNpb25zL2Rpc3RyaWJ1dGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSx5REFBZ0U7QUFDaEUsK0NBQXdFO0FBRXhFLFNBQWdCLDBCQUEwQixDQUFDLElBQWlCO0lBQzFELE1BQU0sR0FBRyxHQUFHLElBQUEsa0NBQXVCLEVBQUMsSUFBSSxDQUFDLENBQUM7SUFDMUMsTUFBTSxZQUFZLEdBQUcsSUFBSSx1QkFBZSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0lBRTlDLE9BQU87UUFDTCxZQUFZLEVBQUU7WUFDWixhQUFhLEVBQUUsS0FBSyxJQUFJLEVBQUU7Z0JBQ3hCLE1BQU0sUUFBUSxHQUFHLE1BQU0sWUFBWSxDQUFDLGFBQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQztnQkFDdEQseUJBQVksUUFBUSxFQUFHO1lBQ3pCLENBQUM7WUFDRCxpQkFBaUIsRUFBRSxLQUFLLEVBQUUsU0FBaUIsRUFBRSxTQUFpQixFQUFFLEVBQUU7Z0JBQ2hFLE1BQU0sUUFBUSxHQUFHLE1BQU0sWUFBWSxDQUFDLGlCQUFpQixDQUFDO29CQUNwRCxnQkFBZ0IsRUFBRSxTQUFTO29CQUMzQixnQkFBZ0IsRUFBRSxTQUFTO2lCQUM1QixDQUFDLENBQUM7Z0JBRUgseUJBQVksUUFBU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VILHlCQUFZLFFBQVEsRUFBRztZQUN6QixDQUFDO1lBQ0QsMkJBQTJCLEVBQUUsS0FBSyxFQUFFLFNBQWlCLEVBQUUsRUFBRTtnQkFDdkQsTUFBTSxRQUFRLEdBQUcsTUFBTSxZQUFZLENBQUMsMkJBQTJCLENBQUM7b0JBQzlELGdCQUFnQixFQUFFLFNBQVM7aUJBQzVCLENBQUMsQ0FBQztnQkFFSCx5QkFBWSxRQUFRLEVBQUc7WUFDekIsQ0FBQztZQUNELGdCQUFnQixFQUFFLEtBQUssRUFDckIsU0FBaUIsRUFDakIsZUFBdUIsRUFDdkIsYUFBcUIsRUFDckIsVUFBd0IsRUFDeEIsRUFBRTtnQkFDRixNQUFNLFFBQVEsR0FBRyxNQUFNLFlBQVksQ0FBQyxnQkFBZ0IsQ0FBQztvQkFDbkQsZ0JBQWdCLEVBQUUsU0FBUztvQkFDM0IsY0FBYyxFQUFFLGVBQWU7b0JBQy9CLFlBQVksRUFBRSxhQUFhO29CQUMzQixVQUFVO2lCQUNYLENBQUMsQ0FBQztnQkFFSCx5QkFBWSxRQUFRLEVBQUc7WUFDekIsQ0FBQztTQUNGO0tBQ0YsQ0FBQztBQUNKLENBQUM7QUExRUQsZ0VBMEVDIn0=
@@ -0,0 +1,36 @@
1
+ import { ProposalStatus } from "../gov/v1beta1/gov";
2
+ import { PageRequest } from "../gov/v1beta1/pagination";
3
+ import { QueryClient } from "@cosmjs/stargate";
4
+ export declare function setupGovExtension(base: QueryClient): {
5
+ gov: {
6
+ params: (parametersType: "deposit" | "tallying" | "voting") => Promise<{
7
+ votingParams: import("../gov/v1beta1/gov").VotingParams;
8
+ depositParams: import("../gov/v1beta1/gov").DepositParams;
9
+ tallyParams: import("../gov/v1beta1/gov").TallyParams;
10
+ }>;
11
+ proposals: (proposalStatus: ProposalStatus, depositor: string, voter: string, pagination?: PageRequest) => Promise<{
12
+ proposals: import("../gov/v1beta1/gov").Proposal[];
13
+ pagination: import("../gov/v1beta1/pagination").PageResponse;
14
+ }>;
15
+ proposal: (proposal_id: number) => Promise<{
16
+ proposal: import("../gov/v1beta1/gov").Proposal;
17
+ }>;
18
+ deposits: (proposal_id: number, pagination?: PageRequest) => Promise<{
19
+ deposits: import("../gov/v1beta1/gov").Deposit[];
20
+ pagination: import("../gov/v1beta1/pagination").PageResponse;
21
+ }>;
22
+ deposit: (proposal_id: number, depositor: string) => Promise<{
23
+ deposit: import("../gov/v1beta1/gov").Deposit;
24
+ }>;
25
+ tally: (proposal_id: number) => Promise<{
26
+ tally: import("../gov/v1beta1/gov").TallyResult;
27
+ }>;
28
+ votes: (proposal_id: number, pagination?: PageRequest) => Promise<{
29
+ votes: import("../gov/v1beta1/gov").Vote[];
30
+ pagination: import("../gov/v1beta1/pagination").PageResponse;
31
+ }>;
32
+ vote: (proposal_id: number, voter: string) => Promise<{
33
+ vote: import("../gov/v1beta1/gov").Vote;
34
+ }>;
35
+ };
36
+ };
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setupGovExtension = void 0;
4
+ const query_1 = require("../gov/v1beta1/query");
5
+ const stargate_1 = require("@cosmjs/stargate");
6
+ function setupGovExtension(base) {
7
+ const rpc = (0, stargate_1.createProtobufRpcClient)(base);
8
+ const queryService = new query_1.QueryClientImpl(rpc);
9
+ return {
10
+ gov: {
11
+ params: async (parametersType) => {
12
+ const response = await queryService.Params({
13
+ paramsType: parametersType,
14
+ });
15
+ return Object.assign({}, response);
16
+ },
17
+ proposals: async (proposalStatus, depositor, voter, pagination) => {
18
+ const response = await queryService.Proposals({
19
+ proposalStatus,
20
+ depositor,
21
+ voter,
22
+ pagination,
23
+ });
24
+ return Object.assign({}, response);
25
+ },
26
+ proposal: async (proposal_id) => {
27
+ const response = await queryService.Proposal({
28
+ proposalId: proposal_id,
29
+ });
30
+ return Object.assign({}, response);
31
+ },
32
+ deposits: async (proposal_id, pagination) => {
33
+ const response = await queryService.Deposits({
34
+ proposalId: proposal_id,
35
+ pagination,
36
+ });
37
+ return Object.assign({}, response);
38
+ },
39
+ deposit: async (proposal_id, depositor) => {
40
+ const response = await queryService.Deposit({
41
+ proposalId: proposal_id,
42
+ depositor,
43
+ });
44
+ return Object.assign({}, response);
45
+ },
46
+ tally: async (proposal_id) => {
47
+ const response = await queryService.TallyResult({
48
+ proposalId: proposal_id,
49
+ });
50
+ return Object.assign({}, response);
51
+ },
52
+ votes: async (proposal_id, pagination) => {
53
+ const response = await queryService.Votes({
54
+ proposalId: proposal_id,
55
+ pagination,
56
+ });
57
+ return Object.assign({}, response);
58
+ },
59
+ vote: async (proposal_id, voter) => {
60
+ const response = await queryService.Vote({
61
+ proposalId: proposal_id,
62
+ voter,
63
+ });
64
+ return Object.assign({}, response);
65
+ },
66
+ },
67
+ };
68
+ }
69
+ exports.setupGovExtension = setupGovExtension;
70
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ292LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2Nvc21vcy9leHRlbnNpb25zL2dvdi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFHQSxnREFBdUQ7QUFDdkQsK0NBQXdFO0FBRXhFLFNBQWdCLGlCQUFpQixDQUFDLElBQWlCO0lBQ2pELE1BQU0sR0FBRyxHQUFHLElBQUEsa0NBQXVCLEVBQUMsSUFBSSxDQUFDLENBQUM7SUFDMUMsTUFBTSxZQUFZLEdBQUcsSUFBSSx1QkFBZSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0lBRTlDLE9BQU87UUFDTCxHQUFHLEVBQUU7WUFDSCxNQUFNLEVBQUUsS0FBSyxFQUFFLGNBQWlELEVBQUUsRUFBRTtnQkFDbEUsTUFBTSxRQUFRLEdBQUcsTUFBTSxZQUFZLENBQUMsTUFBTSxDQUFDO29CQUN6QyxVQUFVLEVBQUUsY0FBYztpQkFDM0IsQ0FBQ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VBQUUsS0FBSyxFQUFFLFdBQW1CLEVBQUUsRUFBRTtnQkFDbkMsTUFBTSxRQUFRLEdBQUcsTUFBTSxZQUFZLENBQUMsV0FBVyxDQUFDO29CQUM5QyxVQUFVLEVBQUUsV0FBVztpQkFDeEIsQ0FBQyxDQUFDO2dCQUVILHlCQUFZLFFBQVEsRUFBRztZQUN6QixDQUFDO1lBRUQsS0FBSyxFQUFFLEtBQUssRUFBRSxXQUFtQixFQUFFLFVBQXdCLEVBQUUsRUFBRTtnQkFDN0QsTUFBTSxRQUFRLEdBQUcsTUFBTSxZQUFZLENBQUMsS0FBSyxDQUFDO29CQUN4QyxVQUFVLEVBQUUsV0FBVztvQkFDdkIsVUFBVTtpQkFDWCxDQUFDLENBQUM7Z0JBRUgseUJBQVksUUFBUSxFQUFHO1lBQ3pCLENBQUM7WUFFRCxJQUFJLEVBQUUsS0FBSyxFQUFFLFdBQW1CLEVBQUUsS0FBYSxFQUFFLEVBQUU7Z0JBQ2pELE1BQU0sUUFBUSxHQUFHLE1BQU0sWUFBWSxDQUFDLElBQUksQ0FBQztvQkFDdkMsVUFBVSxFQUFFLFdBQVc7b0JBQ3ZCLEtBQUs7aUJBQ04sQ0FBQyxDQUFDO2dCQUVILHlCQUFZLFFBQVEsRUFBRztZQUN6QixDQUFDO1NBQ0Y7S0FDRixDQUFDO0FBQ0osQ0FBQztBQXhGRCw4Q0F3RkMifQ==
@@ -0,0 +1,3 @@
1
+ export * from "./bank";
2
+ export * from "./gov";
3
+ export * from "./distribution";
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./bank"), exports);
18
+ __exportStar(require("./gov"), exports);
19
+ __exportStar(require("./distribution"), exports);
20
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29zbW9zL2V4dGVuc2lvbnMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLHlDQUF1QjtBQUN2Qix3Q0FBc0I7QUFDdEIsaURBQStCIn0=
@@ -9,6 +9,12 @@ import { MsgExec, MsgGrant, MsgRevoke } from "./authz/v1beta1/tx";
9
9
  * Module to generate the Messages related to the Authz module of the Blockchain
10
10
  */
11
11
  export declare namespace Authz {
12
+ /** MsgGrant message creator
13
+ * Grants the provided authorization to the grantee on the granter's account with the provided expiration time. If there is already a grant for the given (granter, grantee, Authorization) triple, then the grant will be overwritten.
14
+ *
15
+ * @param object Represents the properties available for this MsgGrant message.
16
+ * @returns A Msg object with the typeUrl and value object for the proper message
17
+ */
12
18
  const Grant: <I extends {
13
19
  granter?: string;
14
20
  grantee?: string;
@@ -42,6 +48,12 @@ export declare namespace Authz {
42
48
  typeUrl: string;
43
49
  value: MsgGrant;
44
50
  };
51
+ /** MsgExec message creator
52
+ * Attempts to execute the provided messages using authorizations granted to the grantee. Each message should have only one signer corresponding to the granter of the authorization.
53
+ *
54
+ * @param object Represents the properties available for this MsgExec message.
55
+ * @returns A Msg object with the typeUrl and value object for the proper message
56
+ */
45
57
  const Exec: <I extends {
46
58
  grantee?: string;
47
59
  msgs?: {
@@ -67,6 +79,12 @@ export declare namespace Authz {
67
79
  typeUrl: string;
68
80
  value: MsgExec;
69
81
  };
82
+ /** MsgRevoke message creator
83
+ * Revokes any authorization corresponding to the provided method name on the granter's account that has been granted to the grantee.
84
+ *
85
+ * @param object Represents the properties available for this MsgRevoke message.
86
+ * @returns A Msg object with the typeUrl and value object for the proper message
87
+ */
70
88
  const Revoke: <I extends {
71
89
  granter?: string;
72
90
  grantee?: string;
@@ -84,6 +102,12 @@ export declare namespace Authz {
84
102
  * Module to generate the Messages related to the Staking module of the Blockchain
85
103
  */
86
104
  export declare namespace Staking {
105
+ /** MsgBeginRedelegate message creator
106
+ * Defines a method for performing a redelegation of coins from a delegator and source validator to a destination validator.
107
+ *
108
+ * @param object Represents the properties available for this MsgBeginRedelegate message.
109
+ * @returns A Msg object with the typeUrl and value object for the proper message
110
+ */
87
111
  const BeginRedelegate: <I extends {
88
112
  delegatorAddress?: string;
89
113
  validatorSrcAddress?: string;
@@ -107,6 +131,11 @@ export declare namespace Staking {
107
131
  typeUrl: string;
108
132
  value: MsgBeginRedelegate;
109
133
  };
134
+ /** MsgCancelUnbondingDelegation message creator
135
+ *
136
+ * @param object Represents the properties available for this MsgCancelUnbondingDelegation message.
137
+ * @returns A Msg object with the typeUrl and value object for the proper message
138
+ */
110
139
  const CancelUnbondingDelegation: <I extends {
111
140
  delegatorAddress?: string;
112
141
  validatorAddress?: string;
@@ -130,6 +159,12 @@ export declare namespace Staking {
130
159
  typeUrl: string;
131
160
  value: MsgCancelUnbondingDelegation;
132
161
  };
162
+ /** MsgCreateValidator message creator
163
+ * Defines a method for creating a new validator.
164
+ *
165
+ * @param object Represents the properties available for this MsgCreateValidator message.
166
+ * @returns A Msg object with the typeUrl and value object for the proper message
167
+ */
133
168
  const CreateValidator: <I extends {
134
169
  description?: {
135
170
  moniker?: string;
@@ -198,6 +233,12 @@ export declare namespace Staking {
198
233
  typeUrl: string;
199
234
  value: MsgCreateValidator;
200
235
  };
236
+ /** MsgDelegate message creator
237
+ * Defines a method for performing a delegation of coins from a delegator to a validator.
238
+ *
239
+ * @param object Represents the properties available for this MsgDelegate message.
240
+ * @returns A Msg object with the typeUrl and value object for the proper message
241
+ */
201
242
  const Delegate: <I extends {
202
243
  delegatorAddress?: string;
203
244
  validatorAddress?: string;
@@ -219,6 +260,12 @@ export declare namespace Staking {
219
260
  typeUrl: string;
220
261
  value: MsgDelegate;
221
262
  };
263
+ /** MsgEditValidator message creator
264
+ * Defines a method for editing an existing validator.
265
+ *
266
+ * @param object Represents the properties available for this MsgEditValidator message.
267
+ * @returns A Msg object with the typeUrl and value object for the proper message
268
+ */
222
269
  const EditValidator: <I extends {
223
270
  description?: {
224
271
  moniker?: string;
@@ -251,6 +298,12 @@ export declare namespace Staking {
251
298
  typeUrl: string;
252
299
  value: MsgEditValidator;
253
300
  };
301
+ /** MsgUndelegate message creator
302
+ * Defines a method for performing an undelegation from a delegate and a validator.
303
+ *
304
+ * @param object Represents the properties available for this MsgUndelegate message.
305
+ * @returns A Msg object with the typeUrl and value object for the proper message
306
+ */
254
307
  const Undelegate: <I extends {
255
308
  delegatorAddress?: string;
256
309
  validatorAddress?: string;
@@ -272,6 +325,11 @@ export declare namespace Staking {
272
325
  typeUrl: string;
273
326
  value: MsgUndelegate;
274
327
  };
328
+ /** MsgUpdateParams message creator
329
+ *
330
+ * @param object Represents the properties available for this MsgUpdateParams message.
331
+ * @returns A Msg object with the typeUrl and value object for the proper message
332
+ */
275
333
  const UpdateParams: <I extends {
276
334
  authority?: string;
277
335
  params?: {
@@ -320,6 +378,12 @@ export declare namespace Staking {
320
378
  * Module to generate the Messages related to the Governance module of the Blockchain
321
379
  */
322
380
  export declare namespace Governance {
381
+ /** MsgDeposit message creator
382
+ * Defines a method to add deposit on a specific proposal.
383
+ *
384
+ * @param object Represents the properties available for this MsgDeposit message.
385
+ * @returns A Msg object with the typeUrl and value object for the proper message
386
+ */
323
387
  const Deposit: <I extends {
324
388
  proposalId?: number;
325
389
  depositor?: string;
@@ -347,6 +411,12 @@ export declare namespace Governance {
347
411
  typeUrl: string;
348
412
  value: MsgDeposit;
349
413
  };
414
+ /** MsgSubmitProposal message creator
415
+ * Defines a method to create new proposal given a content.
416
+ *
417
+ * @param object Represents the properties available for this MsgSubmitProposal message.
418
+ * @returns A Msg object with the typeUrl and value object for the proper message
419
+ */
350
420
  const SubmitProposal: <I extends {
351
421
  content?: {
352
422
  typeUrl?: string;
@@ -383,6 +453,12 @@ export declare namespace Governance {
383
453
  typeUrl: string;
384
454
  value: MsgSubmitProposal;
385
455
  };
456
+ /** MsgVote message creator
457
+ * Defines a method to add a vote on a specific proposal.
458
+ *
459
+ * @param object Represents the properties available for this MsgVote message.
460
+ * @returns A Msg object with the typeUrl and value object for the proper message
461
+ */
386
462
  const Vote: <I extends {
387
463
  proposalId?: number;
388
464
  voter?: string;
@@ -395,6 +471,12 @@ export declare namespace Governance {
395
471
  typeUrl: string;
396
472
  value: MsgVote;
397
473
  };
474
+ /** MsgVoteWeighted message creator
475
+ * Defines a method to add a weighted vote on a specific proposal.
476
+ *
477
+ * @param object Represents the properties available for this MsgVoteWeighted message.
478
+ * @returns A Msg object with the typeUrl and value object for the proper message
479
+ */
398
480
  const VoteWeighted: <I extends {
399
481
  proposalId?: number;
400
482
  voter?: string;
@@ -427,6 +509,12 @@ export declare namespace Governance {
427
509
  * Module to generate the Messages related to the Feegrant module of the Blockchain
428
510
  */
429
511
  export declare namespace Feegrant {
512
+ /** MsgGrantAllowance message creator
513
+ * Grants fee allowance to the grantee on the granter's account with the provided expiration time.
514
+ *
515
+ * @param object Represents the properties available for this MsgGrantAllowance message.
516
+ * @returns A Msg object with the typeUrl and value object for the proper message
517
+ */
430
518
  const GrantAllowance: <I extends {
431
519
  granter?: string;
432
520
  grantee?: string;
@@ -448,6 +536,12 @@ export declare namespace Feegrant {
448
536
  typeUrl: string;
449
537
  value: MsgGrantAllowance;
450
538
  };
539
+ /** MsgRevokeAllowance message creator
540
+ * Revokes any fee allowance of granter's account that has been granted to the grantee.
541
+ *
542
+ * @param object Represents the properties available for this MsgRevokeAllowance message.
543
+ * @returns A Msg object with the typeUrl and value object for the proper message
544
+ */
451
545
  const RevokeAllowance: <I extends {
452
546
  granter?: string;
453
547
  grantee?: string;
@@ -463,6 +557,12 @@ export declare namespace Feegrant {
463
557
  * Module to generate the Messages related to the Bank module of the Blockchain
464
558
  */
465
559
  export declare namespace Bank {
560
+ /** MsgMultiSend message creator
561
+ * Defines a method for sending coins from some accounts to other accounts.
562
+ *
563
+ * @param object Represents the properties available for this MsgMultiSend message.
564
+ * @returns A Msg object with the typeUrl and value object for the proper message
565
+ */
466
566
  const MultiSend: <I extends {
467
567
  inputs?: {
468
568
  address?: string;
@@ -551,6 +651,12 @@ export declare namespace Bank {
551
651
  typeUrl: string;
552
652
  value: MsgMultiSend;
553
653
  };
654
+ /** MsgSend message creator
655
+ * Defines a method for sending coins from one account to another account.
656
+ *
657
+ * @param object Represents the properties available for this MsgSend message.
658
+ * @returns A Msg object with the typeUrl and value object for the proper message
659
+ */
554
660
  const Send: <I extends {
555
661
  fromAddress?: string;
556
662
  toAddress?: string;
@@ -578,6 +684,11 @@ export declare namespace Bank {
578
684
  typeUrl: string;
579
685
  value: MsgSend;
580
686
  };
687
+ /** MsgSetSendEnabled message creator
688
+ *
689
+ * @param object Represents the properties available for this MsgSetSendEnabled message.
690
+ * @returns A Msg object with the typeUrl and value object for the proper message
691
+ */
581
692
  const SetSendEnabled: <I extends {
582
693
  authority?: string;
583
694
  sendEnabled?: {
@@ -605,6 +716,11 @@ export declare namespace Bank {
605
716
  typeUrl: string;
606
717
  value: MsgSetSendEnabled;
607
718
  };
719
+ /** MsgUpdateParams message creator
720
+ *
721
+ * @param object Represents the properties available for this MsgUpdateParams message.
722
+ * @returns A Msg object with the typeUrl and value object for the proper message
723
+ */
608
724
  const UpdateParams: <I extends {
609
725
  authority?: string;
610
726
  params?: {
@@ -647,6 +763,12 @@ export declare namespace Bank {
647
763
  * Module to generate the Messages related to the Distribution module of the Blockchain
648
764
  */
649
765
  export declare namespace Distribution {
766
+ /** MsgWithdrawDelegatorReward message creator
767
+ * Defines a method to withdraw rewards of delegator from a single validator.
768
+ *
769
+ * @param object Represents the properties available for this MsgWithdrawDelegatorReward message.
770
+ * @returns A Msg object with the typeUrl and value object for the proper message
771
+ */
650
772
  const WithdrawDelegatorReward: <I extends {
651
773
  delegatorAddress?: string;
652
774
  validatorAddress?: string;
@@ -657,6 +779,11 @@ export declare namespace Distribution {
657
779
  typeUrl: string;
658
780
  value: MsgWithdrawDelegatorReward;
659
781
  };
782
+ /** MsgUpdateParams message creator
783
+ *
784
+ * @param object Represents the properties available for this MsgUpdateParams message.
785
+ * @returns A Msg object with the typeUrl and value object for the proper message
786
+ */
660
787
  const UpdateParams: <I extends {
661
788
  authority?: string;
662
789
  params?: {
@@ -682,6 +809,12 @@ export declare namespace Distribution {
682
809
  typeUrl: string;
683
810
  value: DMsgUpdateParams;
684
811
  };
812
+ /** MsgWithdrawValidatorCommission message creator
813
+ * Defines a method to withdraw the full commission to the validator address.
814
+ *
815
+ * @param object Represents the properties available for this MsgWithdrawValidatorCommission message.
816
+ * @returns A Msg object with the typeUrl and value object for the proper message
817
+ */
685
818
  const WithdrawValidatorCommission: <I extends {
686
819
  validatorAddress?: string;
687
820
  } & {
@@ -690,6 +823,11 @@ export declare namespace Distribution {
690
823
  typeUrl: string;
691
824
  value: MsgWithdrawValidatorCommission;
692
825
  };
826
+ /** MsgCommunityPoolSpend message creator
827
+ *
828
+ * @param object Represents the properties available for this MsgCommunityPoolSpend message.
829
+ * @returns A Msg object with the typeUrl and value object for the proper message
830
+ */
693
831
  const CommunityPoolSpend: <I extends {
694
832
  authority?: string;
695
833
  recipient?: string;
@@ -717,6 +855,11 @@ export declare namespace Distribution {
717
855
  typeUrl: string;
718
856
  value: MsgCommunityPoolSpend;
719
857
  };
858
+ /** MsgDepositValidatorRewardsPool message creator
859
+ *
860
+ * @param object Represents the properties available for this MsgDepositValidatorRewardsPool message.
861
+ * @returns A Msg object with the typeUrl and value object for the proper message
862
+ */
720
863
  const DepositValidatorRewardsPool: <I extends {
721
864
  depositor?: string;
722
865
  validatorAddress?: string;
@@ -744,6 +887,12 @@ export declare namespace Distribution {
744
887
  typeUrl: string;
745
888
  value: MsgDepositValidatorRewardsPool;
746
889
  };
890
+ /** MsgFundCommunityPool message creator
891
+ * Defines a method to allow an account to directly fund the community pool.
892
+ *
893
+ * @param object Represents the properties available for this MsgUpdateParams message.
894
+ * @returns A Msg object with the typeUrl and value object for the proper message
895
+ */
747
896
  const FundCommunityPool: <I extends {
748
897
  amount?: {
749
898
  denom?: string;
@@ -769,6 +918,12 @@ export declare namespace Distribution {
769
918
  typeUrl: string;
770
919
  value: MsgFundCommunityPool;
771
920
  };
921
+ /** MsgSetWithdrawAddress message creator
922
+ * Defines a method to change the withdraw address for a delegator (or validator self-delegation).
923
+ *
924
+ * @param object Represents the properties available for this MsgSetWithdrawAddress message.
925
+ * @returns A Msg object with the typeUrl and value object for the proper message
926
+ */
772
927
  const SetWithdrawAddress: <I extends {
773
928
  delegatorAddress?: string;
774
929
  withdrawAddress?: string;
@@ -784,6 +939,12 @@ export declare namespace Distribution {
784
939
  * Module to generate the Messages related to the Vesting module of the Blockchain
785
940
  */
786
941
  export declare namespace Vesting {
942
+ /** MsgCreateVestingAccount message creator
943
+ * Defines a method that enables creating a vesting account.
944
+ *
945
+ * @param object Represents the properties available for this MsgCreateVestingAccount message.
946
+ * @returns A Msg object with the typeUrl and value object for the proper message
947
+ */
787
948
  const CreateVestingAccount: <I extends {
788
949
  fromAddress?: string;
789
950
  toAddress?: string;