coreum-js 2.6.4 → 2.6.6
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.
- package/README.md +92 -0
- package/dist/main/client/index.d.ts +8 -0
- package/dist/main/client/index.js +9 -1
- package/dist/main/coreum/index.d.ts +106 -0
- package/dist/main/coreum/index.js +106 -1
- package/dist/main/cosmos/index.d.ts +182 -0
- package/dist/main/cosmos/index.js +183 -1
- package/dist/main/services/cosmostation.js +2 -3
- package/dist/main/services/keplr.js +2 -3
- package/dist/main/types/core.d.ts +1 -0
- package/dist/main/types/core.js +2 -1
- package/dist/main/types/coreum.d.ts +2 -0
- package/dist/main/types/coreum.js +2 -1
- package/dist/main/utils/calculations.d.ts +14 -6
- package/dist/main/utils/calculations.js +22 -23
- package/dist/main/utils/event.d.ts +0 -1
- package/dist/main/utils/event.js +1 -2
- package/dist/main/utils/ft.d.ts +0 -1
- package/dist/main/utils/ft.js +1 -2
- package/dist/main/wasm/v1/index.d.ts +77 -0
- package/dist/main/wasm/v1/index.js +78 -1
- package/dist/module/client/index.d.ts +8 -0
- package/dist/module/client/index.js +9 -1
- package/dist/module/coreum/index.d.ts +106 -0
- package/dist/module/coreum/index.js +106 -1
- package/dist/module/cosmos/index.d.ts +182 -0
- package/dist/module/cosmos/index.js +183 -1
- package/dist/module/services/cosmostation.js +2 -3
- package/dist/module/services/keplr.js +2 -3
- package/dist/module/types/core.d.ts +1 -0
- package/dist/module/types/core.js +2 -1
- package/dist/module/types/coreum.d.ts +2 -0
- package/dist/module/types/coreum.js +2 -1
- package/dist/module/utils/calculations.d.ts +14 -6
- package/dist/module/utils/calculations.js +19 -19
- package/dist/module/utils/event.d.ts +0 -1
- package/dist/module/utils/event.js +1 -2
- package/dist/module/utils/ft.d.ts +0 -1
- package/dist/module/utils/ft.js +1 -2
- package/dist/module/wasm/v1/index.d.ts +77 -0
- package/dist/module/wasm/v1/index.js +78 -1
- package/package.json +2 -2
|
@@ -5,7 +5,16 @@ import { MsgCommunityPoolSpend, MsgDepositValidatorRewardsPool, MsgFundCommunity
|
|
|
5
5
|
import { MsgCreatePeriodicVestingAccount, MsgCreatePermanentLockedAccount, MsgCreateVestingAccount } from "./vesting/v1beta1/tx";
|
|
6
6
|
import { MsgBeginRedelegate, MsgCancelUnbondingDelegation, MsgCreateValidator, MsgDelegate, MsgEditValidator, MsgUndelegate, MsgUpdateParams as SMsgUpdateParams } from "./staking/v1beta1/tx";
|
|
7
7
|
import { MsgExec, MsgGrant, MsgRevoke } from "./authz/v1beta1/tx";
|
|
8
|
+
/**
|
|
9
|
+
* Module to generate the Messages related to the Authz module of the Blockchain
|
|
10
|
+
*/
|
|
8
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
|
+
*/
|
|
9
18
|
const Grant: <I extends {
|
|
10
19
|
granter?: string;
|
|
11
20
|
grantee?: string;
|
|
@@ -39,6 +48,12 @@ export declare namespace Authz {
|
|
|
39
48
|
typeUrl: string;
|
|
40
49
|
value: MsgGrant;
|
|
41
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
|
+
*/
|
|
42
57
|
const Exec: <I extends {
|
|
43
58
|
grantee?: string;
|
|
44
59
|
msgs?: {
|
|
@@ -64,6 +79,12 @@ export declare namespace Authz {
|
|
|
64
79
|
typeUrl: string;
|
|
65
80
|
value: MsgExec;
|
|
66
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
|
+
*/
|
|
67
88
|
const Revoke: <I extends {
|
|
68
89
|
granter?: string;
|
|
69
90
|
grantee?: string;
|
|
@@ -77,7 +98,16 @@ export declare namespace Authz {
|
|
|
77
98
|
value: MsgRevoke;
|
|
78
99
|
};
|
|
79
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Module to generate the Messages related to the Staking module of the Blockchain
|
|
103
|
+
*/
|
|
80
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
|
+
*/
|
|
81
111
|
const BeginRedelegate: <I extends {
|
|
82
112
|
delegatorAddress?: string;
|
|
83
113
|
validatorSrcAddress?: string;
|
|
@@ -101,6 +131,11 @@ export declare namespace Staking {
|
|
|
101
131
|
typeUrl: string;
|
|
102
132
|
value: MsgBeginRedelegate;
|
|
103
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
|
+
*/
|
|
104
139
|
const CancelUnbondingDelegation: <I extends {
|
|
105
140
|
delegatorAddress?: string;
|
|
106
141
|
validatorAddress?: string;
|
|
@@ -124,6 +159,12 @@ export declare namespace Staking {
|
|
|
124
159
|
typeUrl: string;
|
|
125
160
|
value: MsgCancelUnbondingDelegation;
|
|
126
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
|
+
*/
|
|
127
168
|
const CreateValidator: <I extends {
|
|
128
169
|
description?: {
|
|
129
170
|
moniker?: string;
|
|
@@ -192,6 +233,12 @@ export declare namespace Staking {
|
|
|
192
233
|
typeUrl: string;
|
|
193
234
|
value: MsgCreateValidator;
|
|
194
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
|
+
*/
|
|
195
242
|
const Delegate: <I extends {
|
|
196
243
|
delegatorAddress?: string;
|
|
197
244
|
validatorAddress?: string;
|
|
@@ -213,6 +260,12 @@ export declare namespace Staking {
|
|
|
213
260
|
typeUrl: string;
|
|
214
261
|
value: MsgDelegate;
|
|
215
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
|
+
*/
|
|
216
269
|
const EditValidator: <I extends {
|
|
217
270
|
description?: {
|
|
218
271
|
moniker?: string;
|
|
@@ -245,6 +298,12 @@ export declare namespace Staking {
|
|
|
245
298
|
typeUrl: string;
|
|
246
299
|
value: MsgEditValidator;
|
|
247
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
|
+
*/
|
|
248
307
|
const Undelegate: <I extends {
|
|
249
308
|
delegatorAddress?: string;
|
|
250
309
|
validatorAddress?: string;
|
|
@@ -266,6 +325,11 @@ export declare namespace Staking {
|
|
|
266
325
|
typeUrl: string;
|
|
267
326
|
value: MsgUndelegate;
|
|
268
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
|
+
*/
|
|
269
333
|
const UpdateParams: <I extends {
|
|
270
334
|
authority?: string;
|
|
271
335
|
params?: {
|
|
@@ -310,7 +374,16 @@ export declare namespace Staking {
|
|
|
310
374
|
value: SMsgUpdateParams;
|
|
311
375
|
};
|
|
312
376
|
}
|
|
377
|
+
/**
|
|
378
|
+
* Module to generate the Messages related to the Governance module of the Blockchain
|
|
379
|
+
*/
|
|
313
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
|
+
*/
|
|
314
387
|
const Deposit: <I extends {
|
|
315
388
|
proposalId?: number;
|
|
316
389
|
depositor?: string;
|
|
@@ -338,6 +411,12 @@ export declare namespace Governance {
|
|
|
338
411
|
typeUrl: string;
|
|
339
412
|
value: MsgDeposit;
|
|
340
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
|
+
*/
|
|
341
420
|
const SubmitProposal: <I extends {
|
|
342
421
|
content?: {
|
|
343
422
|
typeUrl?: string;
|
|
@@ -374,6 +453,12 @@ export declare namespace Governance {
|
|
|
374
453
|
typeUrl: string;
|
|
375
454
|
value: MsgSubmitProposal;
|
|
376
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
|
+
*/
|
|
377
462
|
const Vote: <I extends {
|
|
378
463
|
proposalId?: number;
|
|
379
464
|
voter?: string;
|
|
@@ -386,6 +471,12 @@ export declare namespace Governance {
|
|
|
386
471
|
typeUrl: string;
|
|
387
472
|
value: MsgVote;
|
|
388
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
|
+
*/
|
|
389
480
|
const VoteWeighted: <I extends {
|
|
390
481
|
proposalId?: number;
|
|
391
482
|
voter?: string;
|
|
@@ -414,7 +505,16 @@ export declare namespace Governance {
|
|
|
414
505
|
value: MsgVoteWeighted;
|
|
415
506
|
};
|
|
416
507
|
}
|
|
508
|
+
/**
|
|
509
|
+
* Module to generate the Messages related to the Feegrant module of the Blockchain
|
|
510
|
+
*/
|
|
417
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
|
+
*/
|
|
418
518
|
const GrantAllowance: <I extends {
|
|
419
519
|
granter?: string;
|
|
420
520
|
grantee?: string;
|
|
@@ -436,6 +536,12 @@ export declare namespace Feegrant {
|
|
|
436
536
|
typeUrl: string;
|
|
437
537
|
value: MsgGrantAllowance;
|
|
438
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
|
+
*/
|
|
439
545
|
const RevokeAllowance: <I extends {
|
|
440
546
|
granter?: string;
|
|
441
547
|
grantee?: string;
|
|
@@ -447,7 +553,16 @@ export declare namespace Feegrant {
|
|
|
447
553
|
value: MsgRevokeAllowance;
|
|
448
554
|
};
|
|
449
555
|
}
|
|
556
|
+
/**
|
|
557
|
+
* Module to generate the Messages related to the Bank module of the Blockchain
|
|
558
|
+
*/
|
|
450
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
|
+
*/
|
|
451
566
|
const MultiSend: <I extends {
|
|
452
567
|
inputs?: {
|
|
453
568
|
address?: string;
|
|
@@ -536,6 +651,12 @@ export declare namespace Bank {
|
|
|
536
651
|
typeUrl: string;
|
|
537
652
|
value: MsgMultiSend;
|
|
538
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
|
+
*/
|
|
539
660
|
const Send: <I extends {
|
|
540
661
|
fromAddress?: string;
|
|
541
662
|
toAddress?: string;
|
|
@@ -563,6 +684,11 @@ export declare namespace Bank {
|
|
|
563
684
|
typeUrl: string;
|
|
564
685
|
value: MsgSend;
|
|
565
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
|
+
*/
|
|
566
692
|
const SetSendEnabled: <I extends {
|
|
567
693
|
authority?: string;
|
|
568
694
|
sendEnabled?: {
|
|
@@ -590,6 +716,11 @@ export declare namespace Bank {
|
|
|
590
716
|
typeUrl: string;
|
|
591
717
|
value: MsgSetSendEnabled;
|
|
592
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
|
+
*/
|
|
593
724
|
const UpdateParams: <I extends {
|
|
594
725
|
authority?: string;
|
|
595
726
|
params?: {
|
|
@@ -628,7 +759,16 @@ export declare namespace Bank {
|
|
|
628
759
|
value: MsgUpdateParams;
|
|
629
760
|
};
|
|
630
761
|
}
|
|
762
|
+
/**
|
|
763
|
+
* Module to generate the Messages related to the Distribution module of the Blockchain
|
|
764
|
+
*/
|
|
631
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
|
+
*/
|
|
632
772
|
const WithdrawDelegatorReward: <I extends {
|
|
633
773
|
delegatorAddress?: string;
|
|
634
774
|
validatorAddress?: string;
|
|
@@ -639,6 +779,11 @@ export declare namespace Distribution {
|
|
|
639
779
|
typeUrl: string;
|
|
640
780
|
value: MsgWithdrawDelegatorReward;
|
|
641
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
|
+
*/
|
|
642
787
|
const UpdateParams: <I extends {
|
|
643
788
|
authority?: string;
|
|
644
789
|
params?: {
|
|
@@ -664,6 +809,12 @@ export declare namespace Distribution {
|
|
|
664
809
|
typeUrl: string;
|
|
665
810
|
value: DMsgUpdateParams;
|
|
666
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
|
+
*/
|
|
667
818
|
const WithdrawValidatorCommission: <I extends {
|
|
668
819
|
validatorAddress?: string;
|
|
669
820
|
} & {
|
|
@@ -672,6 +823,11 @@ export declare namespace Distribution {
|
|
|
672
823
|
typeUrl: string;
|
|
673
824
|
value: MsgWithdrawValidatorCommission;
|
|
674
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
|
+
*/
|
|
675
831
|
const CommunityPoolSpend: <I extends {
|
|
676
832
|
authority?: string;
|
|
677
833
|
recipient?: string;
|
|
@@ -699,6 +855,11 @@ export declare namespace Distribution {
|
|
|
699
855
|
typeUrl: string;
|
|
700
856
|
value: MsgCommunityPoolSpend;
|
|
701
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
|
+
*/
|
|
702
863
|
const DepositValidatorRewardsPool: <I extends {
|
|
703
864
|
depositor?: string;
|
|
704
865
|
validatorAddress?: string;
|
|
@@ -726,6 +887,12 @@ export declare namespace Distribution {
|
|
|
726
887
|
typeUrl: string;
|
|
727
888
|
value: MsgDepositValidatorRewardsPool;
|
|
728
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
|
+
*/
|
|
729
896
|
const FundCommunityPool: <I extends {
|
|
730
897
|
amount?: {
|
|
731
898
|
denom?: string;
|
|
@@ -751,6 +918,12 @@ export declare namespace Distribution {
|
|
|
751
918
|
typeUrl: string;
|
|
752
919
|
value: MsgFundCommunityPool;
|
|
753
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
|
+
*/
|
|
754
927
|
const SetWithdrawAddress: <I extends {
|
|
755
928
|
delegatorAddress?: string;
|
|
756
929
|
withdrawAddress?: string;
|
|
@@ -762,7 +935,16 @@ export declare namespace Distribution {
|
|
|
762
935
|
value: MsgSetWithdrawAddress;
|
|
763
936
|
};
|
|
764
937
|
}
|
|
938
|
+
/**
|
|
939
|
+
* Module to generate the Messages related to the Vesting module of the Blockchain
|
|
940
|
+
*/
|
|
765
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
|
+
*/
|
|
766
948
|
const CreateVestingAccount: <I extends {
|
|
767
949
|
fromAddress?: string;
|
|
768
950
|
toAddress?: string;
|