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
package/README.md
CHANGED
|
@@ -578,10 +578,15 @@ key's registered agent): the manager for a normal or parent vault, the
|
|
|
578
578
|
parent's manager for a child vault. What x/vault accepts depends on the kind
|
|
579
579
|
of vault:
|
|
580
580
|
|
|
581
|
-
- A normal trading vault or a child vault can place, modify and cancel
|
|
582
|
-
|
|
583
|
-
perpetual markets, where it also manages its collateral and margin.
|
|
584
|
-
conditional and group orders
|
|
581
|
+
- A normal trading vault or a child vault can place, modify and cancel orders
|
|
582
|
+
on its configured spot markets and, with the `perpetual` action, on
|
|
583
|
+
perpetual markets, where it also manages its collateral and margin. It can
|
|
584
|
+
also place conditional and group orders (stops, OCO, OTO, OTOCO) and modify
|
|
585
|
+
the waiting ones, but not TWAP orders. While a redemption is queued every
|
|
586
|
+
order must be IOC, and an inactive or redeeming vault can only sell on spot
|
|
587
|
+
and only reduce on perps. A conditional is checked against these rules again
|
|
588
|
+
when it fires, and a redemption cancels the vault's orders, conditionals
|
|
589
|
+
included.
|
|
585
590
|
- A normal lending vault can move supply between its pools with
|
|
586
591
|
`reallocateVault`.
|
|
587
592
|
- A parent vault can create child vaults, update or cancel their config, set
|
package/dist/core/network.d.ts
CHANGED
|
@@ -89,12 +89,12 @@ export declare const GAS_CONSTANTS: {
|
|
|
89
89
|
readonly VAULT_CREATE_TRADING_BASE: 190000;
|
|
90
90
|
readonly VAULT_CREATE_PER_MARKET: 9000;
|
|
91
91
|
readonly VAULT_CREATE_LENDING_BASE: 124000;
|
|
92
|
-
readonly VAULT_CREATE_PER_LENDING_POOL:
|
|
92
|
+
readonly VAULT_CREATE_PER_LENDING_POOL: 7000;
|
|
93
93
|
readonly VAULT_UPDATE_MANAGER: 95000;
|
|
94
94
|
readonly VAULT_UPDATE_CONFIG_TRADING_BASE: 85000;
|
|
95
95
|
readonly VAULT_UPDATE_CONFIG_PER_MARKET: 9000;
|
|
96
96
|
readonly VAULT_UPDATE_CONFIG_LENDING_BASE: 100000;
|
|
97
|
-
readonly VAULT_UPDATE_CONFIG_PER_POOL:
|
|
97
|
+
readonly VAULT_UPDATE_CONFIG_PER_POOL: 7000;
|
|
98
98
|
readonly VAULT_CANCEL_CONFIG_UPDATE: 75000;
|
|
99
99
|
readonly VAULT_SET_STATUS: 78000;
|
|
100
100
|
readonly VAULT_DEPOSIT: 260000;
|
|
@@ -948,19 +948,22 @@ export interface AgentSurface extends AgentClobTxApi, AgentPerpetualTxApi, Agent
|
|
|
948
948
|
* a normal or parent vault, the parent's manager for a child) or that key's
|
|
949
949
|
* registered agent. Build it with `client.attachVaultManager(...)`.
|
|
950
950
|
*
|
|
951
|
-
* x/vault accepts a different set per vault (v3.0.0-rc.
|
|
951
|
+
* x/vault accepts a different set per vault (v3.0.0-rc.4 account control):
|
|
952
952
|
* - normal trading vault, child vault: limit, market and scale orders,
|
|
953
|
-
* modify and cancel, on the vault's configured
|
|
954
|
-
* perpetual action, on perpetual markets, plus the
|
|
955
|
-
* margin messages
|
|
953
|
+
* conditional and group orders, modify and cancel, on the vault's configured
|
|
954
|
+
* spot markets and, with the perpetual action, on perpetual markets, plus the
|
|
955
|
+
* perpetual collateral and margin messages. While a redemption is queued
|
|
956
|
+
* every order must be IOC, and an inactive or redeeming vault may only sell
|
|
957
|
+
* spot and reduce perpetual positions; a conditional order is checked again
|
|
958
|
+
* when it fires, and a redemption cancels the vault's conditional orders too;
|
|
956
959
|
* - normal lending vault: `reallocateVault`;
|
|
957
960
|
* - parent vault: `createVault` (children), `updateVaultConfig`,
|
|
958
961
|
* `cancelVaultConfigUpdate` and `setVaultStatus` on its children,
|
|
959
962
|
* `transferChildVault` and `backstopTransfer`. A parent vault does not trade.
|
|
960
963
|
*
|
|
961
|
-
* TWAP
|
|
964
|
+
* TWAP orders are not available from a vault account.
|
|
962
965
|
*/
|
|
963
|
-
export interface VaultManagerSurface extends Omit<AgentClobTxApi, "placeTwapOrder"
|
|
966
|
+
export interface VaultManagerSurface extends Omit<AgentClobTxApi, "placeTwapOrder">, AgentPerpetualTxApi, AgentVaultTxApi, VaultAccountTxApi {
|
|
964
967
|
/** Address of the signing key (the manager or its agent). */
|
|
965
968
|
readonly address: string;
|
|
966
969
|
/** The vault account every message is sent from. */
|