ault-sdk-ts 0.0.2-alpha.8 → 0.3.0

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 (90) hide show
  1. package/README.md +378 -50
  2. package/dist/agent/attach.d.ts +26 -0
  3. package/dist/agent/sign-and-broadcast.d.ts +9 -2
  4. package/dist/agent/tx/clob.d.ts +8 -1
  5. package/dist/agent/tx-executor.d.ts +24 -2
  6. package/dist/client.d.ts +6 -7
  7. package/dist/core/clob-gas.d.ts +28 -0
  8. package/dist/core/clob-msgs.d.ts +31 -5
  9. package/dist/core/clob-responses.d.ts +20 -0
  10. package/dist/core/cloid.d.ts +4 -0
  11. package/dist/core/errors.d.ts +79 -0
  12. package/dist/core/manifest-fetcher.d.ts +12 -0
  13. package/dist/core/manifest-resolver.d.ts +131 -0
  14. package/dist/core/manifest-types.d.ts +104 -0
  15. package/dist/core/network.d.ts +42 -13
  16. package/dist/eip712/msg.generated.d.ts +26 -10
  17. package/dist/eip712/registry.d.ts +2 -0
  18. package/dist/eip712/sign-and-broadcast.d.ts +27 -3
  19. package/dist/high-level/cloid-lookup.d.ts +9 -0
  20. package/dist/high-level/create-client.d.ts +15 -11
  21. package/dist/high-level/tx/accountx.d.ts +3 -0
  22. package/dist/high-level/tx/agent.d.ts +1 -1
  23. package/dist/high-level/tx/clob.d.ts +1 -1
  24. package/dist/high-level/tx/context.d.ts +8 -0
  25. package/dist/high-level/tx/license.d.ts +1 -1
  26. package/dist/high-level/tx/miner.d.ts +1 -1
  27. package/dist/high-level/tx/reward.d.ts +1 -1
  28. package/dist/high-level/tx/staking.d.ts +1 -1
  29. package/dist/high-level/tx-executor.d.ts +23 -3
  30. package/dist/high-level/types.d.ts +356 -100
  31. package/dist/high-level-client.d.ts +1 -1
  32. package/dist/index.cjs +15590 -7271
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.d.ts +10 -1
  35. package/dist/index.js +15699 -7405
  36. package/dist/index.js.map +1 -1
  37. package/dist/proto/gen/ault/accountx/v1/genesis.d.ts +38 -0
  38. package/dist/proto/gen/ault/accountx/v1/params.d.ts +32 -0
  39. package/dist/proto/gen/ault/accountx/v1/query.d.ts +88 -0
  40. package/dist/proto/gen/ault/accountx/v1/tx.d.ts +52 -0
  41. package/dist/proto/gen/ault/agent/v1/tx.d.ts +4 -5
  42. package/dist/proto/gen/ault/authority/v1/authority.d.ts +2 -0
  43. package/dist/proto/gen/ault/clob/v1/genesis.d.ts +6 -5
  44. package/dist/proto/gen/ault/clob/v1/query.d.ts +14 -0
  45. package/dist/proto/gen/ault/clob/v1/tx.d.ts +30 -3
  46. package/dist/proto/gen/ault/common/v1/system.d.ts +31 -0
  47. package/dist/proto/gen/ault/license/v1/genesis.d.ts +1 -26
  48. package/dist/proto/gen/ault/license/v1/license.d.ts +0 -26
  49. package/dist/proto/gen/ault/license/v1/query.d.ts +44 -18
  50. package/dist/proto/gen/ault/market/v1/market.d.ts +1 -0
  51. package/dist/proto/gen/ault/market/v1/tx.d.ts +9 -0
  52. package/dist/proto/gen/ault/miner/v1/genesis.d.ts +52 -84
  53. package/dist/proto/gen/ault/miner/v1/miner.d.ts +10 -45
  54. package/dist/proto/gen/ault/miner/v1/query.d.ts +0 -13
  55. package/dist/proto/gen/ault/spot/v1/genesis.d.ts +2 -2
  56. package/dist/proto/gen/ault/spot/v1/order.d.ts +12 -4
  57. package/dist/proto/gen/ault/systemtx/v1/genesis.d.ts +37 -0
  58. package/dist/proto/gen/ault/tokenregistry/v1/genesis.d.ts +3 -3
  59. package/dist/proto/gen/ault/tokenregistry/v1/query.d.ts +2 -2
  60. package/dist/proto/gen/ault/tokenregistry/v1/tokenregistry.d.ts +24 -15
  61. package/dist/proto/gen/ault/tokenregistry/v1/tx.d.ts +1 -16
  62. package/dist/proto/gen/cosmos/bank/v1beta1/bank.d.ts +119 -0
  63. package/dist/proto/gen/cosmos/bank/v1beta1/query.d.ts +264 -0
  64. package/dist/proto/gen/cosmos/distribution/v1beta1/query.d.ts +203 -0
  65. package/dist/proto/gen/cosmos/query/v1/query.d.ts +1 -0
  66. package/dist/proto/gen/cosmos/staking/v1beta1/query.d.ts +275 -0
  67. package/dist/proto/gen/google/api/http.d.ts +20 -28
  68. package/dist/proto/gen/tendermint/abci/types.d.ts +23 -0
  69. package/dist/proto/tx-decode.d.ts +18 -0
  70. package/dist/rest/accountx.d.ts +8 -0
  71. package/dist/rest/bank.d.ts +15 -0
  72. package/dist/rest/clob.d.ts +9 -1
  73. package/dist/rest/context.d.ts +4 -4
  74. package/dist/rest/dex-types.generated.d.ts +434 -120
  75. package/dist/rest/dex.d.ts +7 -0
  76. package/dist/rest/dex.generated.d.ts +657 -83
  77. package/dist/rest/feemarket.d.ts +114 -0
  78. package/dist/rest/license.d.ts +21 -59
  79. package/dist/rest/miner.d.ts +16 -46
  80. package/dist/rest/portfolio.d.ts +103 -0
  81. package/dist/rest/staking.d.ts +14 -28
  82. package/dist/rest/tokenregistry.d.ts +3 -1
  83. package/dist/rest/types.d.ts +82 -858
  84. package/dist/utils/address.d.ts +2 -0
  85. package/dist/utils/opaque-id.d.ts +25 -0
  86. package/dist/utils/tx-hash.d.ts +1 -0
  87. package/dist/ws/client.d.ts +45 -5
  88. package/dist/ws/types.d.ts +379 -34
  89. package/package.json +2 -1
  90. package/dist/agent/create-agent-client.d.ts +0 -3
@@ -1,6 +1,6 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { Coin } from "../../../cosmos/base/v1beta1/coin";
3
- import { EpochInfo, LicenseInfo, MiningDelegation, OperatorInfo, OwnerVRFKey, Params, Winner } from "./miner";
3
+ import { EpochInfo, LicenseInfoSnapshot, MiningDelegation, OperatorInfo, OwnerVRFKey, Params, Winner } from "./miner";
4
4
  export declare const protobufPackage = "ault.miner.v1";
5
5
  /** GenesisState defines the miner module's genesis state */
6
6
  export interface GenesisState {
@@ -12,24 +12,31 @@ export interface GenesisState {
12
12
  currentThreshold: Uint8Array;
13
13
  /** owner_keys contains registered owner VRF keys */
14
14
  ownerKeys: OwnerVRFKey[];
15
- /** last_submit_epochs tracks last submission per license */
16
- lastSubmitEpochs: LastSubmitEpoch[];
15
+ licenseCredits: LicenseCreditsEntry[];
17
16
  /** epochs contains recent epoch info (ring buffer) */
18
17
  epochs: EpochInfo[];
19
- /** license_infos contains license stats (credits and payouts) for each epoch */
20
- licenseInfos: EpochLicenseInfo[];
18
+ /** LicenseInfoSnapshotEntry contains snapshots of license info for each epoch */
19
+ licenseInfoSnapshots: LicenseInfoSnapshotEntry[];
21
20
  /** epoch_winners contains winners for each epoch */
22
21
  epochWinners: EpochWinnersInfo[];
23
22
  /** randao_mix is the current RANDAO mix value */
24
23
  randaoMix: Uint8Array;
25
24
  /** last_settled_epoch is the last epoch that was settled for payouts */
26
25
  lastSettledEpoch: bigint;
27
- /** operators contains registered mining operators */
28
- operators: OperatorInfo[];
26
+ /**
27
+ * operators_info_snapshots contains registered mining operators info
28
+ * snapshots for each epoch
29
+ */
30
+ operatorInfoSnapshots: OperatorInfoSnapshotEntry[];
29
31
  /** mining_delegations contains license to operator delegations */
30
32
  miningDelegations: MiningDelegation[];
31
33
  /** delegation_queue contains pending delegation changes */
32
34
  delegationQueue: MiningDelegation[];
35
+ /**
36
+ * last_undelegated_epochs records, per operator, the most recent epoch at
37
+ * which any license was removed from the operator's delegation set
38
+ */
39
+ lastUndelegatedEpochs: LastUndelegatedEpochEntry[];
33
40
  /**
34
41
  * epoch_start_time (seconds since Unix epoch) shifts the epoch clock start.
35
42
  *
@@ -40,43 +47,40 @@ export interface GenesisState {
40
47
  * and emissions remain paused.
41
48
  */
42
49
  epochStartTime: bigint;
43
- /** payout_queue contains pending payouts */
44
- payoutQueue: PayoutQueueItem[];
45
- /** rate_limits contains rate limit counts per epoch per license */
46
- rateLimits: RateLimitEntry[];
47
- /** last_delegation_epochs tracks last delegation change epoch per license */
48
- lastDelegationEpochs: LastDelegationEpochEntry[];
49
- /**
50
- * Deprecated: signer_rate_limits is no longer used by runtime.
51
- *
52
- * @deprecated
53
- */
54
- signerRateLimits: SignerRateLimitEntry[];
50
+ /** pending_payouts contains pending payouts aggregated by recipient */
51
+ pendingPayouts: PendingPayoutEntry[];
55
52
  /**
56
53
  * carryover_emission is accumulated emission from epochs with no eligible
57
54
  * payouts
58
55
  */
59
56
  carryoverEmission: Coin | undefined;
60
- /** all_time_credits contains accumulated credits per license */
61
- allTimeCredits: AllTimeCreditsEntry[];
62
- /** all_time_payouts contains accumulated payouts per license */
63
- allTimePayouts: AllTimePayoutsEntry[];
64
57
  }
65
- /** LastSubmitEpoch tracks the last epoch a license submitted work */
66
- export interface LastSubmitEpoch {
58
+ export interface LicenseCreditsEntry {
59
+ epoch: bigint;
60
+ licenseId: bigint;
61
+ credits: number;
62
+ }
63
+ /**
64
+ * LicenseInfoSnapshotEntry tracks license info snapshots for genesis
65
+ * export/import
66
+ */
67
+ export interface LicenseInfoSnapshotEntry {
67
68
  /** license_id */
68
69
  licenseId: bigint;
69
70
  /** epoch number */
70
71
  epoch: bigint;
72
+ /** snapshot of license info for this epoch */
73
+ snapshot: LicenseInfoSnapshot | undefined;
71
74
  }
72
- /** EpochLicenseInfo tracks license stats for genesis export/import */
73
- export interface EpochLicenseInfo {
75
+ /**
76
+ * OperatorInfoSnapshotEntry tracks operator info snapshots for genesis
77
+ * export/import
78
+ */
79
+ export interface OperatorInfoSnapshotEntry {
74
80
  /** epoch number */
75
81
  epoch: bigint;
76
- /** license_id */
77
- licenseId: bigint;
78
- /** license info (credits and payout) */
79
- info: LicenseInfo | undefined;
82
+ /** snapshot of operator info for this epoch */
83
+ snapshot: OperatorInfo | undefined;
80
84
  }
81
85
  /** EpochWinnersInfo tracks winners for an epoch in genesis export/import */
82
86
  export interface EpochWinnersInfo {
@@ -85,66 +89,30 @@ export interface EpochWinnersInfo {
85
89
  /** winners for this epoch (directly stored, no wrapper) */
86
90
  winners: Winner[];
87
91
  }
88
- /** PayoutQueueItem represents a pending payout in the queue */
89
- export interface PayoutQueueItem {
90
- /** license_id */
91
- licenseId: bigint;
92
- /** epoch number */
93
- epoch: bigint;
94
- /** recipient address */
95
- recipient: string;
96
- /** amount as string */
92
+ /** PendingPayoutEntry represents a pending payout */
93
+ export interface PendingPayoutEntry {
94
+ /** recipient address (raw 20 bytes) */
95
+ recipient: Uint8Array;
96
+ /** pending payout amount */
97
97
  amount: string;
98
98
  }
99
- /** RateLimitEntry represents rate limit count for a license in an epoch */
100
- export interface RateLimitEntry {
99
+ /**
100
+ * LastUndelegatedEpochEntry tracks per-operator the most recent epoch at
101
+ * which any license was undelegated from this operator.
102
+ */
103
+ export interface LastUndelegatedEpochEntry {
104
+ /** operator address */
105
+ operator: string;
101
106
  /** epoch number */
102
107
  epoch: bigint;
103
- /** license_id */
104
- licenseId: bigint;
105
- /** count */
106
- count: number;
107
- }
108
- /** LastDelegationEpochEntry tracks the last delegation change epoch per license */
109
- export interface LastDelegationEpochEntry {
110
- /** license_id */
111
- licenseId: bigint;
112
- /** epoch of last delegation change */
113
- epoch: bigint;
114
- }
115
- /** Deprecated: SignerRateLimitEntry is retained only for backward compatibility. */
116
- export interface SignerRateLimitEntry {
117
- /** epoch number */
118
- epoch: bigint;
119
- /** signer address */
120
- signer: Uint8Array;
121
- /** count */
122
- count: number;
123
- }
124
- /** AllTimeCreditsEntry tracks cumulative credits for a license */
125
- export interface AllTimeCreditsEntry {
126
- /** license_id */
127
- licenseId: bigint;
128
- /** credits accumulated */
129
- credits: bigint;
130
- }
131
- /** AllTimePayoutsEntry tracks cumulative payouts for a license */
132
- export interface AllTimePayoutsEntry {
133
- /** license_id */
134
- licenseId: bigint;
135
- /** payout accumulated */
136
- payout: string;
137
108
  }
138
109
  export declare const GenesisState: MessageFns<GenesisState>;
139
- export declare const LastSubmitEpoch: MessageFns<LastSubmitEpoch>;
140
- export declare const EpochLicenseInfo: MessageFns<EpochLicenseInfo>;
110
+ export declare const LicenseCreditsEntry: MessageFns<LicenseCreditsEntry>;
111
+ export declare const LicenseInfoSnapshotEntry: MessageFns<LicenseInfoSnapshotEntry>;
112
+ export declare const OperatorInfoSnapshotEntry: MessageFns<OperatorInfoSnapshotEntry>;
141
113
  export declare const EpochWinnersInfo: MessageFns<EpochWinnersInfo>;
142
- export declare const PayoutQueueItem: MessageFns<PayoutQueueItem>;
143
- export declare const RateLimitEntry: MessageFns<RateLimitEntry>;
144
- export declare const LastDelegationEpochEntry: MessageFns<LastDelegationEpochEntry>;
145
- export declare const SignerRateLimitEntry: MessageFns<SignerRateLimitEntry>;
146
- export declare const AllTimeCreditsEntry: MessageFns<AllTimeCreditsEntry>;
147
- export declare const AllTimePayoutsEntry: MessageFns<AllTimePayoutsEntry>;
114
+ export declare const PendingPayoutEntry: MessageFns<PendingPayoutEntry>;
115
+ export declare const LastUndelegatedEpochEntry: MessageFns<LastUndelegatedEpochEntry>;
148
116
  type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
149
117
  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 {} ? {
150
118
  [K in keyof T]?: DeepPartial<T[K]>;
@@ -49,38 +49,13 @@ export interface EpochInfo {
49
49
  /** finalized indicates if beacon is finalized */
50
50
  finalized: boolean;
51
51
  }
52
- /** LicenseInfo tracks license stats for a specific epoch */
53
- export interface LicenseInfo {
54
- /** credits earned */
55
- credits: bigint;
56
- /** payout is the total payout amount for this license in this epoch */
57
- payout: string;
58
- /** owner is the license owner at the time credits were earned */
59
- owner: string;
60
- /**
61
- * commission_recipient is the address to receive commission
62
- * Empty if not delegated
63
- */
64
- commissionRecipient: string;
65
- /**
66
- * commission_rate is the operator's commission rate at the time credits were
67
- * earned (0-100)
68
- */
69
- commissionRate: number;
70
- /**
71
- * operator is the operator address at the time credits were earned
72
- * Empty if not delegated
73
- */
74
- operator: string;
75
- }
76
- /** RewardQueueItem represents a reward to be paid out */
77
- export interface RewardQueueItem {
78
- /** license_id to receive the reward */
79
- licenseId: bigint;
80
- /** epoch when the reward was earned */
81
- epoch: bigint;
82
- /** amount to be paid (in sdk.Int format) */
83
- amount: string;
52
+ /**
53
+ * LicenseInfoSnapshot represents a snapshot of license info for a specific
54
+ * epoch
55
+ */
56
+ export interface LicenseInfoSnapshot {
57
+ owner: Uint8Array;
58
+ operator: Uint8Array;
84
59
  }
85
60
  /** OperatorInfo represents a registered mining operator */
86
61
  export interface OperatorInfo {
@@ -88,16 +63,8 @@ export interface OperatorInfo {
88
63
  operator: string;
89
64
  /** commission_rate is the commission percentage (0-100) */
90
65
  commissionRate: number;
91
- /**
92
- * commission_recipient is the address to receive commission rewards
93
- * If empty, commission is sent to the operator address
94
- */
66
+ /** commission_recipient is the address to receive commission rewards */
95
67
  commissionRecipient: string;
96
- /**
97
- * last_update_epoch is the epoch when operator info was last updated
98
- * Used to enforce per-epoch rate limiting on commission rate changes
99
- */
100
- lastUpdateEpoch: bigint;
101
68
  }
102
69
  /** MiningDelegation represents a delegation from a license to an operator */
103
70
  export interface MiningDelegation {
@@ -151,8 +118,7 @@ export interface Params {
151
118
  /**
152
119
  * max_payouts_per_block limits the number of payouts processed per block
153
120
  * for deterministic execution. Each payout (transfer + bookkeeping) is
154
- * atomic. Prevents unbounded work per block and double-payout bugs. Default:
155
- * 500, Range: 1-100000
121
+ * atomic. Prevents unbounded work per block. Default: 500, Range: 1-100000
156
122
  */
157
123
  maxPayoutsPerBlock: number;
158
124
  /**
@@ -206,8 +172,7 @@ export declare const OwnerVRFKey: MessageFns<OwnerVRFKey>;
206
172
  export declare const Winner: MessageFns<Winner>;
207
173
  export declare const EpochWinners: MessageFns<EpochWinners>;
208
174
  export declare const EpochInfo: MessageFns<EpochInfo>;
209
- export declare const LicenseInfo: MessageFns<LicenseInfo>;
210
- export declare const RewardQueueItem: MessageFns<RewardQueueItem>;
175
+ export declare const LicenseInfoSnapshot: MessageFns<LicenseInfoSnapshot>;
211
176
  export declare const OperatorInfo: MessageFns<OperatorInfo>;
212
177
  export declare const MiningDelegation: MessageFns<MiningDelegation>;
213
178
  export declare const Params: MessageFns<Params>;
@@ -31,21 +31,8 @@ export interface QueryLicenseMinerInfoRequest {
31
31
  export interface QueryLicenseMinerInfoResponse {
32
32
  /** vrf_pubkey registered for this license */
33
33
  vrfPubkey: Uint8Array;
34
- /** last_submit_epoch is the last epoch this license submitted work */
35
- lastSubmitEpoch: bigint;
36
34
  /** eligible_now indicates if license can mine now */
37
35
  eligibleNow: boolean;
38
- /** quarantined_local indicates miner-local quarantine flag */
39
- quarantinedLocal: boolean;
40
- /** quarantined_source indicates quarantine per x/license */
41
- quarantinedSource: boolean;
42
- /** all_time_credits is the cumulative count of successful work submissions */
43
- allTimeCredits: bigint;
44
- /**
45
- * all_time_payouts is the cumulative amount paid out to this license (sdk.Int
46
- * string)
47
- */
48
- allTimePayouts: string;
49
36
  }
50
37
  /** QueryBeaconRequest is the request for Query/Beacon */
51
38
  export interface QueryBeaconRequest {
@@ -1,8 +1,8 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
- import { SpotOrder } from "./order";
2
+ import { SpotOrderRecord } from "./order";
3
3
  export declare const protobufPackage = "ault.spot.v1";
4
4
  export interface GenesisState {
5
- orders: SpotOrder[];
5
+ orders: SpotOrderRecord[];
6
6
  }
7
7
  export declare const GenesisState: MessageFns<GenesisState>;
8
8
  type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
@@ -2,20 +2,26 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { FeeInfo } from "../../clob/v1/fee";
3
3
  export declare const protobufPackage = "ault.spot.v1";
4
4
  export interface SpotOrder {
5
- id: Uint8Array;
6
5
  orderer: Uint8Array;
7
6
  marketId: Uint8Array;
8
7
  buy: boolean;
9
8
  price: string;
10
- quantity: string;
11
- openQuantity: string;
12
- remainingDeposit: string;
13
9
  deadline: Date | undefined;
14
10
  tick: bigint;
15
11
  postOnly: boolean;
16
12
  /** fee_info contains fee distribution metadata. */
17
13
  feeInfo: FeeInfo | undefined;
18
14
  }
15
+ export interface SpotOrderState {
16
+ quantity: string;
17
+ openQuantity: string;
18
+ remainingDeposit: string;
19
+ }
20
+ export interface SpotOrderRecord {
21
+ id: Uint8Array;
22
+ order: SpotOrder | undefined;
23
+ state: SpotOrderState | undefined;
24
+ }
19
25
  /**
20
26
  * ConditionalSpotOrder is a pending order that activates when trigger
21
27
  * conditions are met.
@@ -44,6 +50,8 @@ export interface ConditionalSpotOrder {
44
50
  feeInfo: FeeInfo | undefined;
45
51
  }
46
52
  export declare const SpotOrder: MessageFns<SpotOrder>;
53
+ export declare const SpotOrderState: MessageFns<SpotOrderState>;
54
+ export declare const SpotOrderRecord: MessageFns<SpotOrderRecord>;
47
55
  export declare const ConditionalSpotOrder: MessageFns<ConditionalSpotOrder>;
48
56
  type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
49
57
  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 {} ? {
@@ -0,0 +1,37 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "ault.systemtx.v1";
3
+ /**
4
+ * GenesisState defines the systemtx module's genesis state.
5
+ *
6
+ * The systemtx module maintains a queue of EVM logs derived from non-EVM Cosmos
7
+ * events (e.g. unbonding completion). The queue is normally drained each block
8
+ * by the protocol system transaction, but any logs still queued at export time
9
+ * must be carried across an upgrade so they are not lost.
10
+ */
11
+ export interface GenesisState {
12
+ /**
13
+ * system_tx_logs are the queued EVM logs, hex-encoded (JSON-marshaled
14
+ * ethtypes.Log).
15
+ */
16
+ systemTxLogs: string[];
17
+ }
18
+ export declare const GenesisState: MessageFns<GenesisState>;
19
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
20
+ 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 {} ? {
21
+ [K in keyof T]?: DeepPartial<T[K]>;
22
+ } : Partial<T>;
23
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
24
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
25
+ [K in keyof P]: Exact<P[K], I[K]>;
26
+ } & {
27
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
28
+ };
29
+ export interface MessageFns<T> {
30
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
31
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
32
+ fromJSON(object: any): T;
33
+ toJSON(message: T): unknown;
34
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
35
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
36
+ }
37
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
- import { DenomTransferLimit, Params, ResetState, TokenPair } from "./tokenregistry";
2
+ import { Params, ResetState, TokenPair, TransferLimit } from "./tokenregistry";
3
3
  export declare const protobufPackage = "ault.tokenregistry.v1";
4
4
  /** GenesisState defines the tokenregistry module genesis state. */
5
5
  export interface GenesisState {
@@ -7,8 +7,8 @@ export interface GenesisState {
7
7
  params: Params | undefined;
8
8
  /** token_pairs is the initial token pair set. */
9
9
  tokenPairs: TokenPair[];
10
- /** denom_transfer_limits is the initial denom transfer limit set. */
11
- denomTransferLimits: DenomTransferLimit[];
10
+ /** transfer_limits is the initial transfer limit set. */
11
+ transferLimits: TransferLimit[];
12
12
  /** reset_state tracks the last hourly/daily reset timestamps. */
13
13
  resetState: ResetState | undefined;
14
14
  }
@@ -1,6 +1,6 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination";
3
- import { DenomTransferLimit, Params, TokenPair } from "./tokenregistry";
3
+ import { Params, TokenPair, TransferLimit } from "./tokenregistry";
4
4
  export declare const protobufPackage = "ault.tokenregistry.v1";
5
5
  /** QueryTokenPairRequest defines the request for Query/TokenPair. */
6
6
  export interface QueryTokenPairRequest {
@@ -46,7 +46,7 @@ export interface QueryTransferLimitRequest {
46
46
  /** QueryTransferLimitResponse defines the response for Query/TransferLimit. */
47
47
  export interface QueryTransferLimitResponse {
48
48
  /** transfer_limit is the transfer limit config and current capacity. */
49
- transferLimit: DenomTransferLimit | undefined;
49
+ transferLimit: TransferLimit | undefined;
50
50
  }
51
51
  export declare const QueryTokenPairRequest: MessageFns<QueryTokenPairRequest>;
52
52
  export declare const QueryTokenPairResponse: MessageFns<QueryTokenPairResponse>;
@@ -23,13 +23,6 @@ export interface Limiter {
23
23
  */
24
24
  baselineSupplyBps: number;
25
25
  }
26
- /** TransferLimitConfig wraps the hourly and daily limiters for a token pair. */
27
- export interface TransferLimitConfig {
28
- /** hourly defines the hourly transfer-out rate limit. */
29
- hourly: Limiter | undefined;
30
- /** daily defines the daily transfer-out rate limit. */
31
- daily: Limiter | undefined;
32
- }
33
26
  /** TokenPair defines an ERC20 <> Cosmos denom pair. */
34
27
  export interface TokenPair {
35
28
  /** erc20_address is the ERC20 contract address (0x...). */
@@ -45,18 +38,33 @@ export interface TokenPair {
45
38
  enabled: boolean;
46
39
  }
47
40
  /**
48
- * DenomTransferLimit holds both the rate limit config and current remaining
49
- * capacity for a denom. only exists for denoms that have a transfer limit.
41
+ * TransferLimitConfig stores the transfer limit config. only exists for denoms
42
+ * that have a transfer limit.
50
43
  */
51
- export interface DenomTransferLimit {
52
- /** denom is the cosmos denom. */
53
- denom: string;
44
+ export interface TransferLimitConfig {
45
+ /** hourly defines the hourly transfer-out rate limit. */
46
+ hourly: Limiter | undefined;
47
+ /** daily defines the daily transfer-out rate limit. */
48
+ daily: Limiter | undefined;
49
+ }
50
+ /**
51
+ * TransferLimitState stores the current remaining capacity. only exists for
52
+ * denoms that have a transfer limit.
53
+ */
54
+ export interface TransferLimitState {
54
55
  /** hourly_remaining is the remaining outflow capacity for the current hour. */
55
56
  hourlyRemaining: string;
56
57
  /** daily_remaining is the remaining outflow capacity for the current day. */
57
58
  dailyRemaining: string;
58
- /** config is the transfer limit configuration. */
59
+ }
60
+ /** TransferLimit wraps the full transfer limit view for a denom. */
61
+ export interface TransferLimit {
62
+ /** denom is the cosmos denom. */
63
+ denom: string;
64
+ /** config is the transfer limit config for the denom. */
59
65
  config: TransferLimitConfig | undefined;
66
+ /** state is the current remaining transfer capacity for the denom. */
67
+ state: TransferLimitState | undefined;
60
68
  }
61
69
  /** ResetState tracks the last time boundaries for transfer limit resets. */
62
70
  export interface ResetState {
@@ -91,9 +99,10 @@ export interface PendingTransfer {
91
99
  amount: string;
92
100
  }
93
101
  export declare const Limiter: MessageFns<Limiter>;
94
- export declare const TransferLimitConfig: MessageFns<TransferLimitConfig>;
95
102
  export declare const TokenPair: MessageFns<TokenPair>;
96
- export declare const DenomTransferLimit: MessageFns<DenomTransferLimit>;
103
+ export declare const TransferLimitConfig: MessageFns<TransferLimitConfig>;
104
+ export declare const TransferLimitState: MessageFns<TransferLimitState>;
105
+ export declare const TransferLimit: MessageFns<TransferLimit>;
97
106
  export declare const ResetState: MessageFns<ResetState>;
98
107
  export declare const Params: MessageFns<Params>;
99
108
  export declare const PendingTransfer: MessageFns<PendingTransfer>;
@@ -54,19 +54,6 @@ export interface MsgDisableTokenPair {
54
54
  /** MsgDisableTokenPairResponse is the response for MsgDisableTokenPair. */
55
55
  export interface MsgDisableTokenPairResponse {
56
56
  }
57
- /**
58
- * MsgCleanupTokenPair defines a message to remove a token pair whose ERC20
59
- * contract no longer exists (e.g. self-destructed).
60
- */
61
- export interface MsgCleanupTokenPair {
62
- /** sender is the signer address. */
63
- sender: string;
64
- /** erc20_address is the ERC20 contract address (0x...). */
65
- erc20Address: string;
66
- }
67
- /** MsgCleanupTokenPairResponse is the response for MsgCleanupTokenPair. */
68
- export interface MsgCleanupTokenPairResponse {
69
- }
70
57
  /**
71
58
  * MsgSetTransferLimit defines a message to set transfer rate limit for a token
72
59
  * pair.
@@ -76,7 +63,7 @@ export interface MsgSetTransferLimit {
76
63
  sender: string;
77
64
  /** erc20_address is the ERC20 contract address (0x...). */
78
65
  erc20Address: string;
79
- /** transfer_limit defines the hourly and daily rate limit config. */
66
+ /** transfer_limit defines the transfer rate limit config. */
80
67
  transferLimit: TransferLimitConfig | undefined;
81
68
  }
82
69
  /** MsgSetTransferLimitResponse is the response for MsgSetTransferLimit. */
@@ -105,8 +92,6 @@ export declare const MsgEnableTokenPair: MessageFns<MsgEnableTokenPair>;
105
92
  export declare const MsgEnableTokenPairResponse: MessageFns<MsgEnableTokenPairResponse>;
106
93
  export declare const MsgDisableTokenPair: MessageFns<MsgDisableTokenPair>;
107
94
  export declare const MsgDisableTokenPairResponse: MessageFns<MsgDisableTokenPairResponse>;
108
- export declare const MsgCleanupTokenPair: MessageFns<MsgCleanupTokenPair>;
109
- export declare const MsgCleanupTokenPairResponse: MessageFns<MsgCleanupTokenPairResponse>;
110
95
  export declare const MsgSetTransferLimit: MessageFns<MsgSetTransferLimit>;
111
96
  export declare const MsgSetTransferLimitResponse: MessageFns<MsgSetTransferLimitResponse>;
112
97
  export declare const MsgRemoveTransferLimit: MessageFns<MsgRemoveTransferLimit>;
@@ -0,0 +1,119 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { Coin } from "../../base/v1beta1/coin";
3
+ export declare const protobufPackage = "cosmos.bank.v1beta1";
4
+ /** Params defines the parameters for the bank module. */
5
+ export interface Params {
6
+ /**
7
+ * Deprecated: Use of SendEnabled in params is deprecated.
8
+ * For genesis, use the newly added send_enabled field in the genesis object.
9
+ * Storage, lookup, and manipulation of this information is now in the keeper.
10
+ *
11
+ * As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files.
12
+ *
13
+ * @deprecated
14
+ */
15
+ sendEnabled: SendEnabled[];
16
+ defaultSendEnabled: boolean;
17
+ }
18
+ /**
19
+ * SendEnabled maps coin denom to a send_enabled status (whether a denom is
20
+ * sendable).
21
+ */
22
+ export interface SendEnabled {
23
+ denom: string;
24
+ enabled: boolean;
25
+ }
26
+ /** Input models transaction input. */
27
+ export interface Input {
28
+ address: string;
29
+ coins: Coin[];
30
+ }
31
+ /** Output models transaction outputs. */
32
+ export interface Output {
33
+ address: string;
34
+ coins: Coin[];
35
+ }
36
+ /**
37
+ * Supply represents a struct that passively keeps track of the total supply
38
+ * amounts in the network.
39
+ * This message is deprecated now that supply is indexed by denom.
40
+ *
41
+ * @deprecated
42
+ */
43
+ export interface Supply {
44
+ total: Coin[];
45
+ }
46
+ /**
47
+ * DenomUnit represents a struct that describes a given
48
+ * denomination unit of the basic token.
49
+ */
50
+ export interface DenomUnit {
51
+ /** denom represents the string name of the given denom unit (e.g uatom). */
52
+ denom: string;
53
+ /**
54
+ * exponent represents power of 10 exponent that one must
55
+ * raise the base_denom to in order to equal the given DenomUnit's denom
56
+ * 1 denom = 10^exponent base_denom
57
+ * (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with
58
+ * exponent = 6, thus: 1 atom = 10^6 uatom).
59
+ */
60
+ exponent: number;
61
+ /** aliases is a list of string aliases for the given denom */
62
+ aliases: string[];
63
+ }
64
+ /**
65
+ * Metadata represents a struct that describes
66
+ * a basic token.
67
+ */
68
+ export interface Metadata {
69
+ description: string;
70
+ /** denom_units represents the list of DenomUnit's for a given coin */
71
+ denomUnits: DenomUnit[];
72
+ /** base represents the base denom (should be the DenomUnit with exponent = 0). */
73
+ base: string;
74
+ /**
75
+ * display indicates the suggested denom that should be
76
+ * displayed in clients.
77
+ */
78
+ display: string;
79
+ /** name defines the name of the token (eg: Cosmos Atom) */
80
+ name: string;
81
+ /**
82
+ * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can
83
+ * be the same as the display.
84
+ */
85
+ symbol: string;
86
+ /** URI to a document (on or off-chain) that contains additional information. Optional. */
87
+ uri: string;
88
+ /**
89
+ * URIHash is a sha256 hash of a document pointed by URI. It's used to verify that
90
+ * the document didn't change. Optional.
91
+ */
92
+ uriHash: string;
93
+ }
94
+ export declare const Params: MessageFns<Params>;
95
+ export declare const SendEnabled: MessageFns<SendEnabled>;
96
+ export declare const Input: MessageFns<Input>;
97
+ export declare const Output: MessageFns<Output>;
98
+ export declare const Supply: MessageFns<Supply>;
99
+ export declare const DenomUnit: MessageFns<DenomUnit>;
100
+ export declare const Metadata: MessageFns<Metadata>;
101
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
102
+ 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 {} ? {
103
+ [K in keyof T]?: DeepPartial<T[K]>;
104
+ } : Partial<T>;
105
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
106
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
107
+ [K in keyof P]: Exact<P[K], I[K]>;
108
+ } & {
109
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
110
+ };
111
+ export interface MessageFns<T> {
112
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
113
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
114
+ fromJSON(object: any): T;
115
+ toJSON(message: T): unknown;
116
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
117
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
118
+ }
119
+ export {};