ault-sdk-ts 0.17.1 → 0.18.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 CHANGED
@@ -561,6 +561,7 @@ fee, and starts with your initial deposit:
561
561
 
562
562
  ```typescript
563
563
  await client.createVault({
564
+ description: { name: "USDC lending", details: "Supplies pool 1" },
564
565
  vaultDenom: usdc.denom,
565
566
  managementFeeBps: 200,
566
567
  config: {
@@ -573,6 +574,7 @@ await client.createVault({
573
574
  });
574
575
 
575
576
  await client.createVault({
577
+ description: { name: "Spot and perps" },
576
578
  config: { trading: { allowedActions: ["spot", "perpetual"], spotMarketIds: [marketId] } },
577
579
  // Without a fund window the exit fee must be positive; with one it is zero.
578
580
  exitFeeBps: 50,
@@ -581,6 +583,10 @@ await client.createVault({
581
583
  });
582
584
  ```
583
585
 
586
+ Since v3.0.0-rc.5 every vault needs a `description`. Its `name` is required
587
+ (up to 70 bytes of UTF-8) and `details` is optional (up to 280). The chain
588
+ keeps both as they were at creation.
589
+
584
590
  `fundWindow` (`depositOpenTime`, `depositCloseTime`, `redemptionOpenTime`)
585
591
  limits when deposits and redemptions happen; a vault without one takes both
586
592
  at any time. `vaultAddressKind(address)` reads a vault's type and relationship
@@ -61,10 +61,10 @@ export declare const GAS_CONSTANTS: {
61
61
  readonly CANCEL_ORDER_BASE: 52000;
62
62
  readonly CANCEL_ORDER_PER_ID: 29000;
63
63
  readonly MODIFY_ORDER_PER_ID: 155000;
64
- readonly CONDITIONAL_ORDER: 125000;
64
+ readonly CONDITIONAL_ORDER: 140000;
65
65
  readonly MODIFY_CONDITIONAL_BASE: 55000;
66
66
  readonly MODIFY_CONDITIONAL_PER_ORDER: 49000;
67
- readonly GROUP_ORDER: 222000;
67
+ readonly GROUP_ORDER: 254000;
68
68
  readonly OPEN_ACCOUNT: 96000;
69
69
  readonly PERP_DEPOSIT: 250000;
70
70
  readonly PERP_WITHDRAW: 250000;
@@ -74,21 +74,21 @@ export declare const GAS_CONSTANTS: {
74
74
  readonly PERP_LIQUIDATE_PER_ACCOUNT: 1000000;
75
75
  readonly LENDING_SUPPLY: 122000;
76
76
  readonly LENDING_WITHDRAW: 115000;
77
- readonly LENDING_SUPPLY_COLLATERAL: 110000;
78
- readonly LENDING_WITHDRAW_COLLATERAL: 240000;
79
- readonly LENDING_BORROW: 260000;
77
+ readonly LENDING_SUPPLY_COLLATERAL: 115000;
78
+ readonly LENDING_WITHDRAW_COLLATERAL: 260000;
79
+ readonly LENDING_BORROW: 280000;
80
80
  readonly LENDING_REPAY: 100000;
81
- readonly LENDING_LIQUIDATE: 430000;
81
+ readonly LENDING_LIQUIDATE: 490000;
82
82
  readonly LENDING_FUND_INSURANCE_FUND: 150000;
83
83
  readonly MARGIN_DEPOSIT_BASE: 88000;
84
- readonly MARGIN_DEPOSIT_PER_COIN: 46000;
84
+ readonly MARGIN_DEPOSIT_PER_COIN: 53000;
85
85
  readonly MARGIN_WITHDRAW_BASE: 74000;
86
- readonly MARGIN_WITHDRAW_PER_COIN: 180000;
87
- readonly MARGIN_BORROW: 227000;
86
+ readonly MARGIN_WITHDRAW_PER_COIN: 210000;
87
+ readonly MARGIN_BORROW: 250000;
88
88
  readonly MARGIN_REPAY: 259000;
89
- readonly VAULT_CREATE_TRADING_BASE: 190000;
89
+ readonly VAULT_CREATE_TRADING_BASE: 220000;
90
90
  readonly VAULT_CREATE_PER_MARKET: 9000;
91
- readonly VAULT_CREATE_LENDING_BASE: 124000;
91
+ readonly VAULT_CREATE_LENDING_BASE: 160000;
92
92
  readonly VAULT_CREATE_PER_LENDING_POOL: 7000;
93
93
  readonly VAULT_UPDATE_MANAGER: 95000;
94
94
  readonly VAULT_UPDATE_CONFIG_TRADING_BASE: 85000;
@@ -35,6 +35,14 @@ export interface TradingVaultConfigInput {
35
35
  /** Close the redeemed share of open positions on every redemption. */
36
36
  alwaysCloseOnRedemption?: boolean;
37
37
  }
38
+ /**
39
+ * A vault's display name and details, set at creation and never changed after.
40
+ * `name` is required and takes up to 70 bytes of UTF-8; `details` up to 280.
41
+ */
42
+ export interface VaultDescriptionInput {
43
+ name: string;
44
+ details?: string;
45
+ }
38
46
  export type VaultConfigInput = {
39
47
  lending: LendingVaultConfigInput;
40
48
  } | {
@@ -89,6 +97,8 @@ export declare function buildVaultRedeemMsg(sender: string, params: {
89
97
  * `initialDeposit`; trading vaults use the perpetual collateral denom.
90
98
  */
91
99
  export declare function buildCreateVaultMsg(owner: string, params: {
100
+ /** Display name and details; immutable once the vault exists. */
101
+ description: VaultDescriptionInput;
92
102
  config: VaultConfigInput;
93
103
  /** Lending vaults only: the denom depositors supply. */
94
104
  vaultDenom?: string;
@@ -16,7 +16,7 @@ import type { PerpetualApi } from "../rest/perpetual";
16
16
  import type { LendingApi } from "../rest/lending";
17
17
  import type { MarginOrderOptions } from "../core/margin-msgs";
18
18
  import type { LendingPoolId } from "../core/lending-msgs";
19
- import type { VaultConfigInput, VaultFundWindowInput, VaultStatusInput } from "../core/vault-msgs";
19
+ import type { VaultConfigInput, VaultDescriptionInput, VaultFundWindowInput, VaultStatusInput } from "../core/vault-msgs";
20
20
  import type { MarginApi } from "../rest/margin";
21
21
  import type { OracleApi } from "../rest/oracle";
22
22
  import type { VaultApi } from "../rest/vault";
@@ -624,6 +624,8 @@ export interface VaultTxApi {
624
624
  } & TxOptions): Promise<TxResult>;
625
625
  }
626
626
  export interface CreateVaultParams {
627
+ /** Display name (required) and details; neither can be changed after creation. */
628
+ description: VaultDescriptionInput;
627
629
  config: VaultConfigInput;
628
630
  /** Lending vaults only: the denom depositors supply. Trading vaults use the perpetual collateral denom. */
629
631
  vaultDenom?: string;