@bulletxyz/bullet-sdk 0.17.6-rc.0 → 0.17.6-rc.2
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 +41 -2
- package/dist/browser/index.js.map +2 -2
- package/dist/node/index.js +41 -2
- package/dist/node/index.js.map +2 -2
- package/dist/types/bullet-wasm/index.d.ts +1 -0
- package/dist/types/calc.d.ts +7 -0
- package/dist/types/zod-types/wasm.d.ts +19 -0
- package/package.json +1 -1
|
@@ -34,4 +34,5 @@ export class BulletWasm {
|
|
|
34
34
|
static simulate_used_margin_on_order(asset_id: number, side: Side, price: string, size: string, reduce_only: boolean, user_account: any, margin_context: any): any;
|
|
35
35
|
static calculate_positions_additional_metadata(user_account: any, margin_context: any, funding_parameters: any): any;
|
|
36
36
|
static calculate_borrow_lend_additional_metadata(borrow_lend_market: any): any;
|
|
37
|
+
static calculate_account_summary_batch(user_accounts: any, margin_context: any): any;
|
|
37
38
|
}
|
package/dist/types/calc.d.ts
CHANGED
|
@@ -35,3 +35,10 @@ export declare function calculateBorrowLendMarketAdditionalMetadata(borrowLendMa
|
|
|
35
35
|
current_deposit_rate: Decimal;
|
|
36
36
|
current_borrow_rate: Decimal;
|
|
37
37
|
};
|
|
38
|
+
export declare function calculateAccountSummaryBatch(userAccounts: UserAccount[], marginContext: MarginContext): {
|
|
39
|
+
unrealized_pnl: Decimal;
|
|
40
|
+
equity: Decimal;
|
|
41
|
+
available_initial_margin: Decimal;
|
|
42
|
+
available_maintenance_margin: Decimal;
|
|
43
|
+
leverage: Decimal;
|
|
44
|
+
}[];
|
|
@@ -42,5 +42,24 @@ export declare const WasmResponseSchemas: {
|
|
|
42
42
|
current_deposit_rate: string | number;
|
|
43
43
|
current_borrow_rate: string | number;
|
|
44
44
|
}>;
|
|
45
|
+
AccountSummaryBatchSchema: z.ZodArray<z.ZodObject<{
|
|
46
|
+
equity: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
47
|
+
unrealized_pnl: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
48
|
+
available_initial_margin: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
49
|
+
available_maintenance_margin: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
50
|
+
leverage: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("decimal.js").Decimal, string | number>;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
unrealized_pnl: import("decimal.js").Decimal;
|
|
53
|
+
equity: import("decimal.js").Decimal;
|
|
54
|
+
available_initial_margin: import("decimal.js").Decimal;
|
|
55
|
+
available_maintenance_margin: import("decimal.js").Decimal;
|
|
56
|
+
leverage: import("decimal.js").Decimal;
|
|
57
|
+
}, {
|
|
58
|
+
unrealized_pnl: string | number;
|
|
59
|
+
equity: string | number;
|
|
60
|
+
available_initial_margin: string | number;
|
|
61
|
+
available_maintenance_margin: string | number;
|
|
62
|
+
leverage: string | number;
|
|
63
|
+
}>, "many">;
|
|
45
64
|
};
|
|
46
65
|
export type PositionAdditionalMetadata = z.infer<typeof WasmResponseSchemas.PositionAdditionalMetadataSchema>;
|