@bulletxyz/bullet-sdk 0.49.11 → 0.49.13
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/dist/browser/index.js +27 -2
- package/dist/browser/index.js.map +4 -4
- package/dist/node/index.js +27 -2
- package/dist/node/index.js.map +4 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/client.d.ts +2 -1
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/zod-types/rest.d.ts +226 -0
- package/dist/types/zod-types/rest.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -2303,6 +2303,21 @@ var VersionedV3 = (schema) => z3.object({ V3: schema }).transform((d) => ({
|
|
|
2303
2303
|
queued_withdrawals: z3.array(VaultWithdrawal),
|
|
2304
2304
|
whitelist_deposits: z3.boolean(),
|
|
2305
2305
|
whitelisted_depositors: z3.array(Base58Address)
|
|
2306
|
+
}), VaultInfoV1 = z3.object({
|
|
2307
|
+
leader: Base58Address,
|
|
2308
|
+
name: z3.string(),
|
|
2309
|
+
description: z3.string(),
|
|
2310
|
+
deposit_asset_ids: z3.array(AssetId),
|
|
2311
|
+
withdraw_asset_id: AssetId,
|
|
2312
|
+
deposit_limit: DecimalSchema,
|
|
2313
|
+
leader_minimum_holding_percentage: U8Schema,
|
|
2314
|
+
withdraw_lockup_period_hours: U8Schema,
|
|
2315
|
+
profit_share_percentage: U8Schema,
|
|
2316
|
+
withdrawal_fee_bps: U8Schema,
|
|
2317
|
+
total_shares: DecimalSchema,
|
|
2318
|
+
high_watermark: DecimalSchema,
|
|
2319
|
+
queued_withdrawals: z3.array(VaultWithdrawal),
|
|
2320
|
+
whitelisted_depositors: z3.array(Base58Address)
|
|
2306
2321
|
}), GlobalVaultConfig = z3.object({
|
|
2307
2322
|
leader_minimum_holding_percentage: U8Schema,
|
|
2308
2323
|
creation_fee_usdc: DecimalSchema,
|
|
@@ -2478,7 +2493,9 @@ var VersionedV3 = (schema) => z3.object({ V3: schema }).transform((d) => ({
|
|
|
2478
2493
|
addresses: z3.array(Base58Address),
|
|
2479
2494
|
total: z3.number(),
|
|
2480
2495
|
next_offset: z3.number().nullable()
|
|
2481
|
-
})
|
|
2496
|
+
}),
|
|
2497
|
+
VaultInfoV0,
|
|
2498
|
+
VaultInfoV1
|
|
2482
2499
|
}, ResponseSchemas = {
|
|
2483
2500
|
DummyValue: StateResponseSchemas.StateValue(Schemas.DummyValue),
|
|
2484
2501
|
ExchangeInfo: StateResponseSchemas.StateValue(VersionedV3(Schemas.ExchangeInfoV3)),
|
|
@@ -2521,6 +2538,10 @@ var VersionedV3 = (schema) => z3.object({ V3: schema }).transform((d) => ({
|
|
|
2521
2538
|
})),
|
|
2522
2539
|
SpotMarketConfigs: createBaseResponse(createJsonMap(MarketId, Schemas.SpotMarketConfig)),
|
|
2523
2540
|
AccountAddresses: createBaseResponse(Schemas.AccountAddresses),
|
|
2541
|
+
Vault: StateResponseSchemas.StateMapElement(Base58Address, VersionedV1V0({
|
|
2542
|
+
V0: Schemas.VaultInfoV0,
|
|
2543
|
+
V1: Schemas.VaultInfoV1
|
|
2544
|
+
})),
|
|
2524
2545
|
ChainData: StateResponseSchemas.RollupSchema(z3.object({
|
|
2525
2546
|
chain_data: z3.object({
|
|
2526
2547
|
chain_id: z3.number(),
|
|
@@ -2788,6 +2809,10 @@ class ReadOnlyClient {
|
|
|
2788
2809
|
let path = `/modules/exchange/state/user-account-configs/items/${address}`, response = await this.fetchApiResource(path);
|
|
2789
2810
|
return ResponseSchemas.UserAccountConfig.parse(response).value;
|
|
2790
2811
|
}
|
|
2812
|
+
async getVault(address) {
|
|
2813
|
+
let path = `/modules/exchange/state/vaults/items/${address}`, response = await this.fetchApiResource(path);
|
|
2814
|
+
return ResponseSchemas.Vault.parse(response).value;
|
|
2815
|
+
}
|
|
2791
2816
|
async getDelegate(delegate) {
|
|
2792
2817
|
let path = `/modules/exchange/api/v1/delegate/${delegate}`, response = await this.fetchApiResource(path);
|
|
2793
2818
|
return ResponseSchemas.Delegate.parse(response);
|
|
@@ -4585,4 +4610,4 @@ export {
|
|
|
4585
4610
|
AbortError
|
|
4586
4611
|
};
|
|
4587
4612
|
|
|
4588
|
-
//# debugId=
|
|
4613
|
+
//# debugId=7527E21FCA69F11A64756E2164756E21
|