ault-sdk-ts 0.13.0 → 0.15.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.
- package/README.md +9 -4
- package/dist/core/network.d.ts +2 -2
- package/dist/high-level/types.d.ts +9 -6
- package/dist/index.cjs +233 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +233 -62
- package/dist/index.js.map +1 -1
- package/dist/proto/gen/ault/margin/v1/tx.d.ts +15 -0
- package/dist/proto/gen/ault/oracle/v1/tx.d.ts +4 -4
- package/dist/proto/gen/ault/vault/v1/tx.d.ts +67 -0
- package/dist/proto/gen/ault/vault/v1/vault.d.ts +2 -0
- package/dist/rest/dex-types.generated.d.ts +11 -4
- package/dist/rest/dex.generated.d.ts +11 -4
- package/package.json +2 -2
|
@@ -126,6 +126,20 @@ export interface MsgInitializeMarginPool {
|
|
|
126
126
|
*/
|
|
127
127
|
export interface MsgInitializeMarginPoolResponse {
|
|
128
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* MsgSetMarginLendingPool is the v3.0.0-rc.2 testnet message that set the
|
|
131
|
+
* margin lending pool, replaced by MsgInitializeMarginPool. It has no rpc; it
|
|
132
|
+
* is kept only so testnet blocks and governance proposals that carried it still
|
|
133
|
+
* decode.
|
|
134
|
+
*
|
|
135
|
+
* @deprecated
|
|
136
|
+
*/
|
|
137
|
+
export interface MsgSetMarginLendingPool {
|
|
138
|
+
/** authority is the address of the governance account. */
|
|
139
|
+
authority: string;
|
|
140
|
+
/** pool_id is the x/lending pool the message set. */
|
|
141
|
+
poolId: bigint;
|
|
142
|
+
}
|
|
129
143
|
export declare const MsgDepositMargin: MessageFns<MsgDepositMargin>;
|
|
130
144
|
export declare const MsgDepositMarginResponse: MessageFns<MsgDepositMarginResponse>;
|
|
131
145
|
export declare const MsgWithdrawMargin: MessageFns<MsgWithdrawMargin>;
|
|
@@ -142,6 +156,7 @@ export declare const MsgUpdateParams: MessageFns<MsgUpdateParams>;
|
|
|
142
156
|
export declare const MsgUpdateParamsResponse: MessageFns<MsgUpdateParamsResponse>;
|
|
143
157
|
export declare const MsgInitializeMarginPool: MessageFns<MsgInitializeMarginPool>;
|
|
144
158
|
export declare const MsgInitializeMarginPoolResponse: MessageFns<MsgInitializeMarginPoolResponse>;
|
|
159
|
+
export declare const MsgSetMarginLendingPool: MessageFns<MsgSetMarginLendingPool>;
|
|
145
160
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
146
161
|
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 {} ? {
|
|
147
162
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
@@ -68,8 +68,8 @@ export interface MsgRemoveFeedResponse {
|
|
|
68
68
|
/**
|
|
69
69
|
* MsgSetFeedMapping binds, rebinds, or unbinds a feed's vendor source id. The
|
|
70
70
|
* binding decouples the internal feed_id consumers reference from the vendor's
|
|
71
|
-
* native data id used on the ingest path (
|
|
72
|
-
* source_id unbinds. Governance-gated.
|
|
71
|
+
* native data id used on the ingest path (an unbound source is unpriced). An
|
|
72
|
+
* empty source_id unbinds. Governance-gated.
|
|
73
73
|
*/
|
|
74
74
|
export interface MsgSetFeedMapping {
|
|
75
75
|
/** sender is the signer address (the governance module account). */
|
|
@@ -85,8 +85,8 @@ export interface MsgSetFeedMappingResponse {
|
|
|
85
85
|
/**
|
|
86
86
|
* MsgSetMarketMapping binds, rebinds, or unbinds a market's vendor source id,
|
|
87
87
|
* decoupling the internal market_id consumers reference from the vendor's
|
|
88
|
-
* native status package id used on the ingest path (
|
|
89
|
-
* empty source_id unbinds. Governance-gated.
|
|
88
|
+
* native status package id used on the ingest path (an unbound source sets no
|
|
89
|
+
* status). An empty source_id unbinds. Governance-gated.
|
|
90
90
|
*/
|
|
91
91
|
export interface MsgSetMarketMapping {
|
|
92
92
|
/** sender is the signer address (the governance module account). */
|
|
@@ -3,6 +3,24 @@ import { Coin } from "../../../cosmos/base/v1beta1/coin";
|
|
|
3
3
|
import { Params } from "./params";
|
|
4
4
|
import { FundWindow, LendingVaultConfig, LendingVaultTerms, OracleFeed, TradingVaultConfig, TradingVaultTerms, VaultRelationship, VaultStatus, VaultType } from "./vault";
|
|
5
5
|
export declare const protobufPackage = "ault.vault.v1";
|
|
6
|
+
/**
|
|
7
|
+
* LegacyFeeType is the v3.0.0-rc.2 vault fee type.
|
|
8
|
+
*
|
|
9
|
+
* @deprecated
|
|
10
|
+
*/
|
|
11
|
+
export declare enum LegacyFeeType {
|
|
12
|
+
/** LEGACY_FEE_TYPE_UNSPECIFIED - unspecified is the invalid default fee type. */
|
|
13
|
+
LEGACY_FEE_TYPE_UNSPECIFIED = 0,
|
|
14
|
+
/** LEGACY_FEE_TYPE_NONE - none applies no vault fee. */
|
|
15
|
+
LEGACY_FEE_TYPE_NONE = 1,
|
|
16
|
+
/** LEGACY_FEE_TYPE_MANAGEMENT_DILUTION - management dilution mints manager shares over time. */
|
|
17
|
+
LEGACY_FEE_TYPE_MANAGEMENT_DILUTION = 2,
|
|
18
|
+
/** LEGACY_FEE_TYPE_PERFORMANCE_EXIT - performance exit charges realized redemption profit. */
|
|
19
|
+
LEGACY_FEE_TYPE_PERFORMANCE_EXIT = 3,
|
|
20
|
+
UNRECOGNIZED = -1
|
|
21
|
+
}
|
|
22
|
+
export declare function legacyFeeTypeFromJSON(object: any): LegacyFeeType;
|
|
23
|
+
export declare function legacyFeeTypeToJSON(object: LegacyFeeType): string;
|
|
6
24
|
/** MsgCreateVault creates a vault. */
|
|
7
25
|
export interface MsgCreateVault {
|
|
8
26
|
owner: string;
|
|
@@ -167,6 +185,51 @@ export interface MsgSetOracleFeeds {
|
|
|
167
185
|
}
|
|
168
186
|
export interface MsgSetOracleFeedsResponse {
|
|
169
187
|
}
|
|
188
|
+
/**
|
|
189
|
+
* LegacyMsgCreateVault is MsgCreateVault as the v3.0.0-rc.2 testnet ran it.
|
|
190
|
+
* It has no rpc; the v3.0.0-rc.4 upgrade moves stored governance proposals that
|
|
191
|
+
* carried the old layout onto this type URL so they still decode.
|
|
192
|
+
*
|
|
193
|
+
* @deprecated
|
|
194
|
+
*/
|
|
195
|
+
export interface LegacyMsgCreateVault {
|
|
196
|
+
owner: string;
|
|
197
|
+
manager: string;
|
|
198
|
+
vaultType: VaultType;
|
|
199
|
+
relationship: VaultRelationship;
|
|
200
|
+
vaultDenom: string;
|
|
201
|
+
lockup: LegacyLockupPolicy | undefined;
|
|
202
|
+
fee: LegacyFeePolicy | undefined;
|
|
203
|
+
lending?: LendingVaultConfig | undefined;
|
|
204
|
+
trading?: TradingVaultConfig | undefined;
|
|
205
|
+
exitFeeBps: number;
|
|
206
|
+
initialDeposit: Coin | undefined;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* LegacyLockupPolicy is the v3.0.0-rc.2 vault lockup policy.
|
|
210
|
+
*
|
|
211
|
+
* @deprecated
|
|
212
|
+
*/
|
|
213
|
+
export interface LegacyLockupPolicy {
|
|
214
|
+
unrestricted?: LegacyUnrestricted | undefined;
|
|
215
|
+
fundWindow?: FundWindow | undefined;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* LegacyUnrestricted is the v3.0.0-rc.2 unrestricted lockup policy.
|
|
219
|
+
*
|
|
220
|
+
* @deprecated
|
|
221
|
+
*/
|
|
222
|
+
export interface LegacyUnrestricted {
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* LegacyFeePolicy is the v3.0.0-rc.2 vault fee policy.
|
|
226
|
+
*
|
|
227
|
+
* @deprecated
|
|
228
|
+
*/
|
|
229
|
+
export interface LegacyFeePolicy {
|
|
230
|
+
feeType: LegacyFeeType;
|
|
231
|
+
rateBps: number;
|
|
232
|
+
}
|
|
170
233
|
export declare const MsgCreateVault: MessageFns<MsgCreateVault>;
|
|
171
234
|
export declare const MsgCreateVaultResponse: MessageFns<MsgCreateVaultResponse>;
|
|
172
235
|
export declare const MsgUpdateVaultManager: MessageFns<MsgUpdateVaultManager>;
|
|
@@ -193,6 +256,10 @@ export declare const MsgUpdateParams: MessageFns<MsgUpdateParams>;
|
|
|
193
256
|
export declare const MsgUpdateParamsResponse: MessageFns<MsgUpdateParamsResponse>;
|
|
194
257
|
export declare const MsgSetOracleFeeds: MessageFns<MsgSetOracleFeeds>;
|
|
195
258
|
export declare const MsgSetOracleFeedsResponse: MessageFns<MsgSetOracleFeedsResponse>;
|
|
259
|
+
export declare const LegacyMsgCreateVault: MessageFns<LegacyMsgCreateVault>;
|
|
260
|
+
export declare const LegacyLockupPolicy: MessageFns<LegacyLockupPolicy>;
|
|
261
|
+
export declare const LegacyUnrestricted: MessageFns<LegacyUnrestricted>;
|
|
262
|
+
export declare const LegacyFeePolicy: MessageFns<LegacyFeePolicy>;
|
|
196
263
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
197
264
|
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 {} ? {
|
|
198
265
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
@@ -116,6 +116,8 @@ export interface RedemptionRequest {
|
|
|
116
116
|
* once before retrying.
|
|
117
117
|
*/
|
|
118
118
|
awaitingLiquidity: boolean;
|
|
119
|
+
/** waive_exit_fee preserves eligibility when all issued shares were queued. */
|
|
120
|
+
waiveExitFee: boolean;
|
|
119
121
|
}
|
|
120
122
|
/** VaultConfig wraps type-specific vault configuration. */
|
|
121
123
|
export interface VaultConfig {
|
|
@@ -1044,7 +1044,11 @@ export declare const ListMarketsResponse: zod.ZodArray<zod.ZodObject<{
|
|
|
1044
1044
|
}, zod.z.core.$strip>;
|
|
1045
1045
|
}, zod.z.core.$strip>>;
|
|
1046
1046
|
/**
|
|
1047
|
-
* Returns a dictionary of currencies keyed by code (e.g., "AULT", "
|
|
1047
|
+
* Returns a dictionary of currencies keyed by code (e.g., "AULT", "WBTC").
|
|
1048
|
+
Lists only assets a Spot market trades; Perpetual oracle feed ids
|
|
1049
|
+
(XAG, BTC, USD, ...) are not currencies. When two denoms map to the
|
|
1050
|
+
same code, the first by denom is kept.
|
|
1051
|
+
|
|
1048
1052
|
* @summary List all currencies
|
|
1049
1053
|
*/
|
|
1050
1054
|
export declare const listCurrenciesResponseInfoContractDecimalsMin = 0;
|
|
@@ -1252,8 +1256,11 @@ export declare const ListTradesResponse: zod.ZodArray<zod.ZodObject<{
|
|
|
1252
1256
|
/**
|
|
1253
1257
|
* Returns a single trade by its synthesized id. The `trades` table has no
|
|
1254
1258
|
surrogate key, so the id is the reversible composite the REST feeds
|
|
1255
|
-
emit, `<block_height>-<hex(order_id)>-<open_quantity>`,
|
|
1256
|
-
|
|
1259
|
+
emit, `<block_height>-<hex(order_id)>-<open_quantity>`, with
|
|
1260
|
+
`-<event_index>` appended from the Ault v3.0.0-rc.4 upgrade height
|
|
1261
|
+
(where a market order's matches all report open quantity 0), taken
|
|
1262
|
+
verbatim from a REST trade object's `id` (from `/trades/{symbol}` or
|
|
1263
|
+
`/mytrades`).
|
|
1257
1264
|
The endpoint parses it back to locate the fill and resolves either leg
|
|
1258
1265
|
of a match. Note this is not the WebSocket `tid`: the realtime feed emits
|
|
1259
1266
|
a hashed numeric trade id, which is not a valid input here — only a REST
|
|
@@ -1269,7 +1276,7 @@ there is no symbol under which to render the trade.
|
|
|
1269
1276
|
|
|
1270
1277
|
* @summary Get a single trade by ID
|
|
1271
1278
|
*/
|
|
1272
|
-
export declare const getTradePathIdMax =
|
|
1279
|
+
export declare const getTradePathIdMax = 125;
|
|
1273
1280
|
export declare const getTradePathIdRegExp: RegExp;
|
|
1274
1281
|
export declare const GetTradeParams: zod.ZodObject<{
|
|
1275
1282
|
id: zod.ZodString;
|
|
@@ -2440,7 +2440,7 @@ export declare const PerpTradeResponseTakerSide: {
|
|
|
2440
2440
|
readonly sell: "sell";
|
|
2441
2441
|
};
|
|
2442
2442
|
export interface PerpTradeResponse {
|
|
2443
|
-
/** `<block_height>-<hex(order_id)>-<open_quantity>` */
|
|
2443
|
+
/** `<block_height>-<hex(order_id)>-<open_quantity>`, plus `-<event_index>` from the Ault v3.0.0-rc.4 upgrade height */
|
|
2444
2444
|
id: string;
|
|
2445
2445
|
timestamp: number;
|
|
2446
2446
|
marketId: string;
|
|
@@ -4993,7 +4993,11 @@ export type listMarketsResponse = listMarketsResponseSuccess | listMarketsRespon
|
|
|
4993
4993
|
export declare const getListMarketsUrl: () => string;
|
|
4994
4994
|
export declare const listMarkets: (options?: RequestInit) => Promise<listMarketsResponse>;
|
|
4995
4995
|
/**
|
|
4996
|
-
* Returns a dictionary of currencies keyed by code (e.g., "AULT", "
|
|
4996
|
+
* Returns a dictionary of currencies keyed by code (e.g., "AULT", "WBTC").
|
|
4997
|
+
Lists only assets a Spot market trades; Perpetual oracle feed ids
|
|
4998
|
+
(XAG, BTC, USD, ...) are not currencies. When two denoms map to the
|
|
4999
|
+
same code, the first by denom is kept.
|
|
5000
|
+
|
|
4997
5001
|
* @summary List all currencies
|
|
4998
5002
|
*/
|
|
4999
5003
|
export type listCurrenciesResponse200 = {
|
|
@@ -5140,8 +5144,11 @@ export declare const listTrades: (symbol: string, params?: ListTradesParams, opt
|
|
|
5140
5144
|
/**
|
|
5141
5145
|
* Returns a single trade by its synthesized id. The `trades` table has no
|
|
5142
5146
|
surrogate key, so the id is the reversible composite the REST feeds
|
|
5143
|
-
emit, `<block_height>-<hex(order_id)>-<open_quantity>`,
|
|
5144
|
-
|
|
5147
|
+
emit, `<block_height>-<hex(order_id)>-<open_quantity>`, with
|
|
5148
|
+
`-<event_index>` appended from the Ault v3.0.0-rc.4 upgrade height
|
|
5149
|
+
(where a market order's matches all report open quantity 0), taken
|
|
5150
|
+
verbatim from a REST trade object's `id` (from `/trades/{symbol}` or
|
|
5151
|
+
`/mytrades`).
|
|
5145
5152
|
The endpoint parses it back to locate the fill and resolves either leg
|
|
5146
5153
|
of a match. Note this is not the WebSocket `tid`: the realtime feed emits
|
|
5147
5154
|
a hashed numeric trade id, which is not a valid input here — only a REST
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ault-sdk-ts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "TypeScript SDK for the Ault blockchain with high-level transaction methods and REST query clients",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ault",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
|
-
"gen:openapi": "orval",
|
|
48
|
+
"gen:openapi": "orval && node scripts/encode-dex-path-params.mjs",
|
|
49
49
|
"gen:proto": "node scripts/generate-protos.mjs",
|
|
50
50
|
"gen:eip712": "node scripts/generate-eip712-registry.mjs",
|
|
51
51
|
"gen:all": "npm run gen:openapi && npm run gen:proto && npm run gen:eip712 && pnpm lint:fix && pnpm format",
|