decentralcardgame-cardchain-client-ts 0.0.36 → 0.0.38

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 (141) hide show
  1. package/amino_adapter.d.ts +9 -0
  2. package/amino_adapter.js +22 -0
  3. package/cardchain.cardchain/module.js +53 -52
  4. package/cardchain.featureflag/module.js +3 -2
  5. package/client.js +1 -1
  6. package/cosmos.auth.v1beta1/module.js +2 -1
  7. package/cosmos.authz.v1beta1/module.js +4 -3
  8. package/cosmos.bank.v1beta1/module.js +5 -4
  9. package/cosmos.bank.v1beta1/rest.d.ts +20 -20
  10. package/cosmos.bank.v1beta1/rest.js +16 -16
  11. package/cosmos.circuit.v1/module.js +4 -3
  12. package/cosmos.consensus.v1/module.js +2 -1
  13. package/cosmos.crisis.v1beta1/module.js +3 -2
  14. package/cosmos.distribution.v1beta1/module.js +8 -7
  15. package/cosmos.evidence.v1beta1/module.js +2 -1
  16. package/cosmos.feegrant.v1beta1/module.js +4 -3
  17. package/cosmos.gov.v1/module.js +8 -7
  18. package/cosmos.gov.v1beta1/module.js +5 -4
  19. package/cosmos.group.v1/module.js +17 -14
  20. package/cosmos.group.v1/types.d.ts +2 -1
  21. package/cosmos.group.v1/types.js +2 -1
  22. package/cosmos.mint.v1beta1/module.js +2 -1
  23. package/cosmos.nft.v1beta1/module.js +2 -1
  24. package/cosmos.slashing.v1beta1/module.js +3 -2
  25. package/cosmos.staking.v1beta1/module.js +8 -7
  26. package/cosmos.tx.v1beta1/rest.d.ts +8 -0
  27. package/cosmos.upgrade.v1beta1/module.js +3 -2
  28. package/cosmos.vesting.v1beta1/module.js +4 -3
  29. package/ibc.applications.fee.v1/module.js +5 -4
  30. package/ibc.applications.interchain_accounts.controller.v1/module.js +4 -3
  31. package/ibc.applications.interchain_accounts.host.v1/module.js +3 -2
  32. package/ibc.applications.transfer.v1/module.js +3 -2
  33. package/ibc.core.channel.v1/module.js +20 -19
  34. package/ibc.core.client.v1/module.js +8 -7
  35. package/ibc.core.connection.v1/module.js +6 -5
  36. package/index.d.ts +20 -20
  37. package/index.js +9 -9
  38. package/package.json +1 -1
  39. package/types/cosmos/app/runtime/v1alpha1/module.d.ts +13 -1
  40. package/types/cosmos/app/runtime/v1alpha1/module.js +36 -0
  41. package/types/cosmos/app/v1alpha1/query.d.ts +6 -2
  42. package/types/cosmos/auth/module/v1/module.d.ts +6 -0
  43. package/types/cosmos/auth/module/v1/module.js +18 -1
  44. package/types/cosmos/auth/v1beta1/query.d.ts +21 -107
  45. package/types/cosmos/auth/v1beta1/tx.d.ts +1 -9
  46. package/types/cosmos/authz/v1beta1/authz.d.ts +0 -1
  47. package/types/cosmos/authz/v1beta1/event.d.ts +0 -1
  48. package/types/cosmos/authz/v1beta1/genesis.d.ts +0 -1
  49. package/types/cosmos/authz/v1beta1/query.d.ts +2 -11
  50. package/types/cosmos/authz/v1beta1/tx.d.ts +0 -1
  51. package/types/cosmos/autocli/v1/options.d.ts +21 -1
  52. package/types/cosmos/autocli/v1/options.js +65 -2
  53. package/types/cosmos/bank/v1beta1/authz.d.ts +0 -4
  54. package/types/cosmos/bank/v1beta1/bank.d.ts +2 -14
  55. package/types/cosmos/bank/v1beta1/genesis.d.ts +1 -5
  56. package/types/cosmos/bank/v1beta1/query.d.ts +12 -62
  57. package/types/cosmos/bank/v1beta1/query.js +6 -6
  58. package/types/cosmos/bank/v1beta1/tx.d.ts +2 -18
  59. package/types/cosmos/base/abci/v1beta1/abci.d.ts +2 -12
  60. package/types/cosmos/base/reflection/v2alpha1/reflection.d.ts +0 -1
  61. package/types/cosmos/base/tendermint/v1beta1/query.d.ts +0 -5
  62. package/types/cosmos/benchmark/module/v1/module.d.ts +52 -0
  63. package/types/cosmos/benchmark/module/v1/module.js +289 -0
  64. package/types/cosmos/benchmark/v1/benchmark.d.ts +32 -0
  65. package/types/cosmos/benchmark/v1/benchmark.js +164 -0
  66. package/types/cosmos/benchmark/v1/tx.d.ts +51 -0
  67. package/types/cosmos/benchmark/v1/tx.js +196 -0
  68. package/types/cosmos/consensus/v1/query.d.ts +0 -1
  69. package/types/cosmos/consensus/v1/tx.d.ts +0 -4
  70. package/types/cosmos/{orm/module/v1alpha1 → counter/module/v1}/module.d.ts +4 -6
  71. package/types/cosmos/counter/module/v1/module.js +62 -0
  72. package/types/cosmos/counter/v1/query.d.ts +47 -0
  73. package/types/cosmos/counter/v1/query.js +122 -0
  74. package/types/cosmos/counter/v1/tx.d.ts +52 -0
  75. package/types/cosmos/counter/v1/tx.js +153 -0
  76. package/types/cosmos/crisis/v1beta1/tx.d.ts +1 -9
  77. package/types/cosmos/crypto/hd/v1/hd.d.ts +0 -1
  78. package/types/cosmos/crypto/keyring/v1/record.d.ts +0 -1
  79. package/types/cosmos/crypto/secp256r1/keys.d.ts +0 -1
  80. package/types/cosmos/distribution/v1beta1/query.d.ts +5 -1
  81. package/types/cosmos/distribution/v1beta1/tx.d.ts +4 -22
  82. package/types/cosmos/epochs/module/v1/module.d.ts +25 -0
  83. package/types/cosmos/{orm/module/v1alpha1 → epochs/module/v1}/module.js +2 -2
  84. package/types/cosmos/epochs/v1beta1/events.d.ts +32 -0
  85. package/types/cosmos/epochs/v1beta1/events.js +140 -0
  86. package/types/cosmos/epochs/v1beta1/genesis.d.ts +86 -0
  87. package/types/cosmos/epochs/v1beta1/genesis.js +256 -0
  88. package/types/cosmos/epochs/v1beta1/query.d.ts +73 -0
  89. package/types/cosmos/epochs/v1beta1/query.js +233 -0
  90. package/types/cosmos/evidence/v1beta1/query.d.ts +1 -5
  91. package/types/cosmos/feegrant/v1beta1/feegrant.d.ts +0 -1
  92. package/types/cosmos/feegrant/v1beta1/genesis.d.ts +0 -1
  93. package/types/cosmos/feegrant/v1beta1/query.d.ts +3 -16
  94. package/types/cosmos/feegrant/v1beta1/tx.d.ts +3 -16
  95. package/types/cosmos/gov/v1/genesis.d.ts +1 -8
  96. package/types/cosmos/gov/v1/gov.d.ts +9 -50
  97. package/types/cosmos/gov/v1/gov.js +0 -1
  98. package/types/cosmos/gov/v1/query.d.ts +1 -6
  99. package/types/cosmos/gov/v1/tx.d.ts +6 -37
  100. package/types/cosmos/gov/v1beta1/gov.d.ts +2 -10
  101. package/types/cosmos/gov/v1beta1/tx.d.ts +3 -15
  102. package/types/cosmos/group/v1/events.d.ts +8 -1
  103. package/types/cosmos/group/v1/events.js +68 -0
  104. package/types/cosmos/group/v1/genesis.d.ts +0 -1
  105. package/types/cosmos/group/v1/query.d.ts +3 -16
  106. package/types/cosmos/group/v1/tx.d.ts +2 -11
  107. package/types/cosmos/group/v1/tx.js +0 -1
  108. package/types/cosmos/group/v1/types.d.ts +2 -11
  109. package/types/cosmos/group/v1/types.js +0 -1
  110. package/types/cosmos/mint/v1beta1/tx.d.ts +1 -9
  111. package/types/cosmos/params/v1beta1/query.d.ts +1 -11
  112. package/types/cosmos/protocolpool/module/v1/module.d.ts +27 -0
  113. package/types/cosmos/protocolpool/module/v1/module.js +62 -0
  114. package/types/cosmos/protocolpool/v1/genesis.d.ts +33 -0
  115. package/types/cosmos/protocolpool/v1/genesis.js +84 -0
  116. package/types/cosmos/protocolpool/v1/query.d.ts +108 -0
  117. package/types/cosmos/protocolpool/v1/query.js +420 -0
  118. package/types/cosmos/protocolpool/v1/tx.d.ts +159 -0
  119. package/types/cosmos/protocolpool/v1/tx.js +700 -0
  120. package/types/cosmos/protocolpool/v1/types.d.ts +45 -0
  121. package/types/cosmos/protocolpool/v1/types.js +196 -0
  122. package/types/cosmos/slashing/v1beta1/tx.d.ts +1 -9
  123. package/types/cosmos/staking/v1beta1/authz.d.ts +2 -10
  124. package/types/cosmos/staking/v1beta1/authz.js +1 -5
  125. package/types/cosmos/staking/v1beta1/staking.d.ts +1 -5
  126. package/types/cosmos/staking/v1beta1/tx.d.ts +4 -25
  127. package/types/cosmos/store/snapshots/v1/snapshot.d.ts +5 -25
  128. package/types/cosmos/store/v1beta1/listening.d.ts +0 -2
  129. package/types/cosmos/tx/v1beta1/service.d.ts +6 -52
  130. package/types/cosmos/tx/v1beta1/tx.d.ts +37 -17
  131. package/types/cosmos/tx/v1beta1/tx.js +61 -1
  132. package/types/cosmos/upgrade/v1beta1/query.d.ts +4 -25
  133. package/types/cosmos/upgrade/v1beta1/tx.d.ts +5 -28
  134. package/types/cosmos/vesting/v1beta1/tx.d.ts +1 -15
  135. package/types/cosmos/vesting/v1beta1/vesting.d.ts +0 -2
  136. package/types/cosmos/orm/query/v1alpha1/query.d.ts +0 -148
  137. package/types/cosmos/orm/query/v1alpha1/query.js +0 -705
  138. package/types/cosmos/orm/v1/orm.d.ts +0 -115
  139. package/types/cosmos/orm/v1/orm.js +0 -300
  140. package/types/cosmos/orm/v1alpha1/schema.d.ts +0 -77
  141. package/types/cosmos/orm/v1alpha1/schema.js +0 -243
@@ -13,11 +13,7 @@ export interface MsgVerifyInvariant {
13
13
  /** MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. */
14
14
  export interface MsgVerifyInvariantResponse {
15
15
  }
16
- /**
17
- * MsgUpdateParams is the Msg/UpdateParams request type.
18
- *
19
- * Since: cosmos-sdk 0.47
20
- */
16
+ /** MsgUpdateParams is the Msg/UpdateParams request type. */
21
17
  export interface MsgUpdateParams {
22
18
  /** authority is the address that controls the module (defaults to x/gov unless overwritten). */
23
19
  authority: string;
@@ -27,8 +23,6 @@ export interface MsgUpdateParams {
27
23
  /**
28
24
  * MsgUpdateParamsResponse defines the response structure for executing a
29
25
  * MsgUpdateParams message.
30
- *
31
- * Since: cosmos-sdk 0.47
32
26
  */
33
27
  export interface MsgUpdateParamsResponse {
34
28
  }
@@ -43,8 +37,6 @@ export interface Msg {
43
37
  /**
44
38
  * UpdateParams defines a governance operation for updating the x/crisis module
45
39
  * parameters. The authority is defined in the keeper.
46
- *
47
- * Since: cosmos-sdk 0.47
48
40
  */
49
41
  UpdateParams(request: MsgUpdateParams): Promise<MsgUpdateParamsResponse>;
50
42
  }
@@ -1,6 +1,5 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  export declare const protobufPackage = "cosmos.crypto.hd.v1";
3
- /** Since: cosmos-sdk 0.46 */
4
3
  /** BIP44Params is used as path field in ledger item in Record. */
5
4
  export interface BIP44Params {
6
5
  /** purpose is a constant set to 44' (or 0x8000002C) following the BIP43 recommendation */
@@ -2,7 +2,6 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { Any } from "../../../../google/protobuf/any";
3
3
  import { BIP44Params } from "../../hd/v1/hd";
4
4
  export declare const protobufPackage = "cosmos.crypto.keyring.v1";
5
- /** Since: cosmos-sdk 0.46 */
6
5
  /** Record is used for representing a key in the keyring. */
7
6
  export interface Record {
8
7
  /** name represents a name of Record */
@@ -1,6 +1,5 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  export declare const protobufPackage = "cosmos.crypto.secp256r1";
3
- /** Since: cosmos-sdk 0.43 */
4
3
  /** PubKey defines a secp256r1 ECDSA public key. */
5
4
  export interface PubKey {
6
5
  /**
@@ -205,7 +205,11 @@ export interface Query {
205
205
  DelegatorValidators(request: QueryDelegatorValidatorsRequest): Promise<QueryDelegatorValidatorsResponse>;
206
206
  /** DelegatorWithdrawAddress queries withdraw address of a delegator. */
207
207
  DelegatorWithdrawAddress(request: QueryDelegatorWithdrawAddressRequest): Promise<QueryDelegatorWithdrawAddressResponse>;
208
- /** CommunityPool queries the community pool coins. */
208
+ /**
209
+ * CommunityPool queries the community pool coins.
210
+ *
211
+ * WARNING: This query will fail if an external community pool is used.
212
+ */
209
213
  CommunityPool(request: QueryCommunityPoolRequest): Promise<QueryCommunityPoolResponse>;
210
214
  }
211
215
  export declare const QueryServiceName = "cosmos.distribution.v1beta1.Query";
@@ -29,7 +29,6 @@ export interface MsgWithdrawDelegatorReward {
29
29
  * response type.
30
30
  */
31
31
  export interface MsgWithdrawDelegatorRewardResponse {
32
- /** Since: cosmos-sdk 0.46 */
33
32
  amount: Coin[];
34
33
  }
35
34
  /**
@@ -44,7 +43,6 @@ export interface MsgWithdrawValidatorCommission {
44
43
  * Msg/WithdrawValidatorCommission response type.
45
44
  */
46
45
  export interface MsgWithdrawValidatorCommissionResponse {
47
- /** Since: cosmos-sdk 0.46 */
48
46
  amount: Coin[];
49
47
  }
50
48
  /**
@@ -58,11 +56,7 @@ export interface MsgFundCommunityPool {
58
56
  /** MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. */
59
57
  export interface MsgFundCommunityPoolResponse {
60
58
  }
61
- /**
62
- * MsgUpdateParams is the Msg/UpdateParams request type.
63
- *
64
- * Since: cosmos-sdk 0.47
65
- */
59
+ /** MsgUpdateParams is the Msg/UpdateParams request type. */
66
60
  export interface MsgUpdateParams {
67
61
  /** authority is the address that controls the module (defaults to x/gov unless overwritten). */
68
62
  authority: string;
@@ -76,8 +70,6 @@ export interface MsgUpdateParams {
76
70
  /**
77
71
  * MsgUpdateParamsResponse defines the response structure for executing a
78
72
  * MsgUpdateParams message.
79
- *
80
- * Since: cosmos-sdk 0.47
81
73
  */
82
74
  export interface MsgUpdateParamsResponse {
83
75
  }
@@ -85,8 +77,6 @@ export interface MsgUpdateParamsResponse {
85
77
  * MsgCommunityPoolSpend defines a message for sending tokens from the community
86
78
  * pool to another account. This message is typically executed via a governance
87
79
  * proposal with the governance module being the executing authority.
88
- *
89
- * Since: cosmos-sdk 0.47
90
80
  */
91
81
  export interface MsgCommunityPoolSpend {
92
82
  /** authority is the address that controls the module (defaults to x/gov unless overwritten). */
@@ -97,16 +87,12 @@ export interface MsgCommunityPoolSpend {
97
87
  /**
98
88
  * MsgCommunityPoolSpendResponse defines the response to executing a
99
89
  * MsgCommunityPoolSpend message.
100
- *
101
- * Since: cosmos-sdk 0.47
102
90
  */
103
91
  export interface MsgCommunityPoolSpendResponse {
104
92
  }
105
93
  /**
106
94
  * DepositValidatorRewardsPool defines the request structure to provide
107
95
  * additional rewards to delegators from a specific validator.
108
- *
109
- * Since: cosmos-sdk 0.50
110
96
  */
111
97
  export interface MsgDepositValidatorRewardsPool {
112
98
  depositor: string;
@@ -116,8 +102,6 @@ export interface MsgDepositValidatorRewardsPool {
116
102
  /**
117
103
  * MsgDepositValidatorRewardsPoolResponse defines the response to executing a
118
104
  * MsgDepositValidatorRewardsPool message.
119
- *
120
- * Since: cosmos-sdk 0.50
121
105
  */
122
106
  export interface MsgDepositValidatorRewardsPoolResponse {
123
107
  }
@@ -155,13 +139,13 @@ export interface Msg {
155
139
  /**
156
140
  * FundCommunityPool defines a method to allow an account to directly
157
141
  * fund the community pool.
142
+ *
143
+ * WARNING: This method will fail if an external community pool is used.
158
144
  */
159
145
  FundCommunityPool(request: MsgFundCommunityPool): Promise<MsgFundCommunityPoolResponse>;
160
146
  /**
161
147
  * UpdateParams defines a governance operation for updating the x/distribution
162
148
  * module parameters. The authority is defined in the keeper.
163
- *
164
- * Since: cosmos-sdk 0.47
165
149
  */
166
150
  UpdateParams(request: MsgUpdateParams): Promise<MsgUpdateParamsResponse>;
167
151
  /**
@@ -170,14 +154,12 @@ export interface Msg {
170
154
  * could be the governance module itself. The authority is defined in the
171
155
  * keeper.
172
156
  *
173
- * Since: cosmos-sdk 0.47
157
+ * WARNING: This method will fail if an external community pool is used.
174
158
  */
175
159
  CommunityPoolSpend(request: MsgCommunityPoolSpend): Promise<MsgCommunityPoolSpendResponse>;
176
160
  /**
177
161
  * DepositValidatorRewardsPool defines a method to provide additional rewards
178
162
  * to delegators to a specific validator.
179
- *
180
- * Since: cosmos-sdk 0.50
181
163
  */
182
164
  DepositValidatorRewardsPool(request: MsgDepositValidatorRewardsPool): Promise<MsgDepositValidatorRewardsPoolResponse>;
183
165
  }
@@ -0,0 +1,25 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "cosmos.epochs.module.v1";
3
+ /** Module is the config object of the epochs module. */
4
+ export interface Module {
5
+ }
6
+ export declare const Module: MessageFns<Module>;
7
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
8
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
9
+ [K in keyof T]?: DeepPartial<T[K]>;
10
+ } : Partial<T>;
11
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
12
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
13
+ [K in keyof P]: Exact<P[K], I[K]>;
14
+ } & {
15
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
16
+ };
17
+ export interface MessageFns<T> {
18
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
19
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
20
+ fromJSON(object: any): T;
21
+ toJSON(message: T): unknown;
22
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
23
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
24
+ }
25
+ export {};
@@ -2,10 +2,10 @@
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.6.1
4
4
  // protoc unknown
5
- // source: cosmos/orm/module/v1alpha1/module.proto
5
+ // source: cosmos/epochs/module/v1/module.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
- export const protobufPackage = "cosmos.orm.module.v1alpha1";
8
+ export const protobufPackage = "cosmos.epochs.module.v1";
9
9
  function createBaseModule() {
10
10
  return {};
11
11
  }
@@ -0,0 +1,32 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "cosmos.epochs.v1beta1";
3
+ /** EventEpochEnd is an event emitted when an epoch end. */
4
+ export interface EventEpochEnd {
5
+ epochNumber: number;
6
+ }
7
+ /** EventEpochStart is an event emitted when an epoch start. */
8
+ export interface EventEpochStart {
9
+ epochNumber: number;
10
+ epochStartTime: number;
11
+ }
12
+ export declare const EventEpochEnd: MessageFns<EventEpochEnd>;
13
+ export declare const EventEpochStart: MessageFns<EventEpochStart>;
14
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
15
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
16
+ [K in keyof T]?: DeepPartial<T[K]>;
17
+ } : Partial<T>;
18
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
19
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
20
+ [K in keyof P]: Exact<P[K], I[K]>;
21
+ } & {
22
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
23
+ };
24
+ export interface MessageFns<T> {
25
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
26
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
27
+ fromJSON(object: any): T;
28
+ toJSON(message: T): unknown;
29
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
30
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
31
+ }
32
+ export {};
@@ -0,0 +1,140 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.6.1
4
+ // protoc unknown
5
+ // source: cosmos/epochs/v1beta1/events.proto
6
+ /* eslint-disable */
7
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
+ export const protobufPackage = "cosmos.epochs.v1beta1";
9
+ function createBaseEventEpochEnd() {
10
+ return { epochNumber: 0 };
11
+ }
12
+ export const EventEpochEnd = {
13
+ encode(message, writer = new BinaryWriter()) {
14
+ if (message.epochNumber !== 0) {
15
+ writer.uint32(8).int64(message.epochNumber);
16
+ }
17
+ return writer;
18
+ },
19
+ decode(input, length) {
20
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
21
+ let end = length === undefined ? reader.len : reader.pos + length;
22
+ const message = createBaseEventEpochEnd();
23
+ while (reader.pos < end) {
24
+ const tag = reader.uint32();
25
+ switch (tag >>> 3) {
26
+ case 1: {
27
+ if (tag !== 8) {
28
+ break;
29
+ }
30
+ message.epochNumber = longToNumber(reader.int64());
31
+ continue;
32
+ }
33
+ }
34
+ if ((tag & 7) === 4 || tag === 0) {
35
+ break;
36
+ }
37
+ reader.skip(tag & 7);
38
+ }
39
+ return message;
40
+ },
41
+ fromJSON(object) {
42
+ return { epochNumber: isSet(object.epochNumber) ? globalThis.Number(object.epochNumber) : 0 };
43
+ },
44
+ toJSON(message) {
45
+ const obj = {};
46
+ if (message.epochNumber !== 0) {
47
+ obj.epochNumber = Math.round(message.epochNumber);
48
+ }
49
+ return obj;
50
+ },
51
+ create(base) {
52
+ return EventEpochEnd.fromPartial(base ?? {});
53
+ },
54
+ fromPartial(object) {
55
+ const message = createBaseEventEpochEnd();
56
+ message.epochNumber = object.epochNumber ?? 0;
57
+ return message;
58
+ },
59
+ };
60
+ function createBaseEventEpochStart() {
61
+ return { epochNumber: 0, epochStartTime: 0 };
62
+ }
63
+ export const EventEpochStart = {
64
+ encode(message, writer = new BinaryWriter()) {
65
+ if (message.epochNumber !== 0) {
66
+ writer.uint32(8).int64(message.epochNumber);
67
+ }
68
+ if (message.epochStartTime !== 0) {
69
+ writer.uint32(16).int64(message.epochStartTime);
70
+ }
71
+ return writer;
72
+ },
73
+ decode(input, length) {
74
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
75
+ let end = length === undefined ? reader.len : reader.pos + length;
76
+ const message = createBaseEventEpochStart();
77
+ while (reader.pos < end) {
78
+ const tag = reader.uint32();
79
+ switch (tag >>> 3) {
80
+ case 1: {
81
+ if (tag !== 8) {
82
+ break;
83
+ }
84
+ message.epochNumber = longToNumber(reader.int64());
85
+ continue;
86
+ }
87
+ case 2: {
88
+ if (tag !== 16) {
89
+ break;
90
+ }
91
+ message.epochStartTime = longToNumber(reader.int64());
92
+ continue;
93
+ }
94
+ }
95
+ if ((tag & 7) === 4 || tag === 0) {
96
+ break;
97
+ }
98
+ reader.skip(tag & 7);
99
+ }
100
+ return message;
101
+ },
102
+ fromJSON(object) {
103
+ return {
104
+ epochNumber: isSet(object.epochNumber) ? globalThis.Number(object.epochNumber) : 0,
105
+ epochStartTime: isSet(object.epochStartTime) ? globalThis.Number(object.epochStartTime) : 0,
106
+ };
107
+ },
108
+ toJSON(message) {
109
+ const obj = {};
110
+ if (message.epochNumber !== 0) {
111
+ obj.epochNumber = Math.round(message.epochNumber);
112
+ }
113
+ if (message.epochStartTime !== 0) {
114
+ obj.epochStartTime = Math.round(message.epochStartTime);
115
+ }
116
+ return obj;
117
+ },
118
+ create(base) {
119
+ return EventEpochStart.fromPartial(base ?? {});
120
+ },
121
+ fromPartial(object) {
122
+ const message = createBaseEventEpochStart();
123
+ message.epochNumber = object.epochNumber ?? 0;
124
+ message.epochStartTime = object.epochStartTime ?? 0;
125
+ return message;
126
+ },
127
+ };
128
+ function longToNumber(int64) {
129
+ const num = globalThis.Number(int64.toString());
130
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) {
131
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
132
+ }
133
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) {
134
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
135
+ }
136
+ return num;
137
+ }
138
+ function isSet(value) {
139
+ return value !== null && value !== undefined;
140
+ }
@@ -0,0 +1,86 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { Duration } from "../../../google/protobuf/duration";
3
+ export declare const protobufPackage = "cosmos.epochs.v1beta1";
4
+ /**
5
+ * EpochInfo is a struct that describes the data going into
6
+ * a timer defined by the x/epochs module.
7
+ */
8
+ export interface EpochInfo {
9
+ /** identifier is a unique reference to this particular timer. */
10
+ identifier: string;
11
+ /**
12
+ * start_time is the time at which the timer first ever ticks.
13
+ * If start_time is in the future, the epoch will not begin until the start
14
+ * time.
15
+ */
16
+ startTime: Date | undefined;
17
+ /**
18
+ * duration is the time in between epoch ticks.
19
+ * In order for intended behavior to be met, duration should
20
+ * be greater than the chains expected block time.
21
+ * Duration must be non-zero.
22
+ */
23
+ duration: Duration | undefined;
24
+ /**
25
+ * current_epoch is the current epoch number, or in other words,
26
+ * how many times has the timer 'ticked'.
27
+ * The first tick (current_epoch=1) is defined as
28
+ * the first block whose blocktime is greater than the EpochInfo start_time.
29
+ */
30
+ currentEpoch: number;
31
+ /**
32
+ * current_epoch_start_time describes the start time of the current timer
33
+ * interval. The interval is (current_epoch_start_time,
34
+ * current_epoch_start_time + duration] When the timer ticks, this is set to
35
+ * current_epoch_start_time = last_epoch_start_time + duration only one timer
36
+ * tick for a given identifier can occur per block.
37
+ *
38
+ * NOTE! The current_epoch_start_time may diverge significantly from the
39
+ * wall-clock time the epoch began at. Wall-clock time of epoch start may be
40
+ * >> current_epoch_start_time. Suppose current_epoch_start_time = 10,
41
+ * duration = 5. Suppose the chain goes offline at t=14, and comes back online
42
+ * at t=30, and produces blocks at every successive time. (t=31, 32, etc.)
43
+ * * The t=30 block will start the epoch for (10, 15]
44
+ * * The t=31 block will start the epoch for (15, 20]
45
+ * * The t=32 block will start the epoch for (20, 25]
46
+ * * The t=33 block will start the epoch for (25, 30]
47
+ * * The t=34 block will start the epoch for (30, 35]
48
+ * * The **t=36** block will start the epoch for (35, 40]
49
+ */
50
+ currentEpochStartTime: Date | undefined;
51
+ /**
52
+ * epoch_counting_started is a boolean, that indicates whether this
53
+ * epoch timer has began yet.
54
+ */
55
+ epochCountingStarted: boolean;
56
+ /**
57
+ * current_epoch_start_height is the block height at which the current epoch
58
+ * started. (The block height at which the timer last ticked)
59
+ */
60
+ currentEpochStartHeight: number;
61
+ }
62
+ /** GenesisState defines the epochs module's genesis state. */
63
+ export interface GenesisState {
64
+ epochs: EpochInfo[];
65
+ }
66
+ export declare const EpochInfo: MessageFns<EpochInfo>;
67
+ export declare const GenesisState: MessageFns<GenesisState>;
68
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
69
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
70
+ [K in keyof T]?: DeepPartial<T[K]>;
71
+ } : Partial<T>;
72
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
73
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
74
+ [K in keyof P]: Exact<P[K], I[K]>;
75
+ } & {
76
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
77
+ };
78
+ export interface MessageFns<T> {
79
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
80
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
81
+ fromJSON(object: any): T;
82
+ toJSON(message: T): unknown;
83
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
84
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
85
+ }
86
+ export {};