@mysten/deepbook-v3 2.0.1 → 2.1.3
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/CHANGELOG.md +83 -0
- package/PREDICT.md +256 -0
- package/README.md +116 -0
- package/dist/account.d.mts +139 -0
- package/dist/account.d.mts.map +1 -0
- package/dist/account.mjs +181 -0
- package/dist/account.mjs.map +1 -0
- package/dist/bcs/integers.mjs +23 -0
- package/dist/bcs/integers.mjs.map +1 -0
- package/dist/contracts/account/account.d.mts +382 -0
- package/dist/contracts/account/account.d.mts.map +1 -0
- package/dist/contracts/account/account.mjs +443 -0
- package/dist/contracts/account/account.mjs.map +1 -0
- package/dist/contracts/account/account_events.d.mts +41 -0
- package/dist/contracts/account/account_events.d.mts.map +1 -0
- package/dist/contracts/account/account_events.mjs +72 -0
- package/dist/contracts/account/account_events.mjs.map +1 -0
- package/dist/contracts/account/account_registry.d.mts +210 -0
- package/dist/contracts/account/account_registry.d.mts.map +1 -0
- package/dist/contracts/account/account_registry.mjs +263 -0
- package/dist/contracts/account/account_registry.mjs.map +1 -0
- package/dist/contracts/account/config-arguments.d.mts +10 -0
- package/dist/contracts/account/config-arguments.d.mts.map +1 -0
- package/dist/contracts/account/deps/sui/bag.mjs +44 -0
- package/dist/contracts/account/deps/sui/bag.mjs.map +1 -0
- package/dist/contracts/deepbook/account.d.mts +18 -18
- package/dist/contracts/deepbook/balances.d.mts +4 -4
- package/dist/contracts/deepbook/deep_price.d.mts +3 -3
- package/dist/contracts/deepbook/deep_price.d.mts.map +1 -1
- package/dist/contracts/deepbook/order.d.mts +12 -12
- package/dist/contracts/deepbook_predict/builder_code_events.mjs +38 -0
- package/dist/contracts/deepbook_predict/builder_code_events.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/config-arguments.d.mts +13 -0
- package/dist/contracts/deepbook_predict/config-arguments.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict/deps/fixed_math/i64.mjs +25 -0
- package/dist/contracts/deepbook_predict/deps/fixed_math/i64.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/deps/sui/balance.mjs +25 -0
- package/dist/contracts/deepbook_predict/deps/sui/balance.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/deps/sui/coin.mjs +24 -0
- package/dist/contracts/deepbook_predict/deps/sui/coin.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/deps/sui/table.mjs +39 -0
- package/dist/contracts/deepbook_predict/deps/sui/table.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/deps/sui/vec_set.mjs +26 -0
- package/dist/contracts/deepbook_predict/deps/sui/vec_set.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/ewma.mjs +29 -0
- package/dist/contracts/deepbook_predict/ewma.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/expiry_cash.mjs +27 -0
- package/dist/contracts/deepbook_predict/expiry_cash.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/expiry_market.mjs +367 -0
- package/dist/contracts/deepbook_predict/expiry_market.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/lp_book.mjs +92 -0
- package/dist/contracts/deepbook_predict/lp_book.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/market_manager.mjs +59 -0
- package/dist/contracts/deepbook_predict/market_manager.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/order.mjs +26 -0
- package/dist/contracts/deepbook_predict/order.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/order_events.mjs +84 -0
- package/dist/contracts/deepbook_predict/order_events.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/plp.mjs +284 -0
- package/dist/contracts/deepbook_predict/plp.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/pool_accounting.mjs +58 -0
- package/dist/contracts/deepbook_predict/pool_accounting.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/predict_account.mjs +106 -0
- package/dist/contracts/deepbook_predict/predict_account.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/pricing.mjs +80 -0
- package/dist/contracts/deepbook_predict/pricing.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/range_codec.mjs +41 -0
- package/dist/contracts/deepbook_predict/range_codec.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/registry.mjs +55 -0
- package/dist/contracts/deepbook_predict/registry.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/strike_exposure.mjs +65 -0
- package/dist/contracts/deepbook_predict/strike_exposure.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/strike_exposure_config.mjs +33 -0
- package/dist/contracts/deepbook_predict/strike_exposure_config.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/strike_payout_tree.mjs +72 -0
- package/dist/contracts/deepbook_predict/strike_payout_tree.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/vault_events.mjs +184 -0
- package/dist/contracts/deepbook_predict/vault_events.mjs.map +1 -0
- package/dist/contracts/deepbook_sessions/config-arguments.d.mts +10 -0
- package/dist/contracts/deepbook_sessions/config-arguments.d.mts.map +1 -0
- package/dist/contracts/deepbook_sessions/deps/sui/vec_map.mjs +37 -0
- package/dist/contracts/deepbook_sessions/deps/sui/vec_map.mjs.map +1 -0
- package/dist/contracts/deepbook_sessions/session_config.d.mts +63 -0
- package/dist/contracts/deepbook_sessions/session_config.d.mts.map +1 -0
- package/dist/contracts/deepbook_sessions/session_config.mjs +82 -0
- package/dist/contracts/deepbook_sessions/session_config.mjs.map +1 -0
- package/dist/contracts/deepbook_sessions/sessions.d.mts +275 -0
- package/dist/contracts/deepbook_sessions/sessions.d.mts.map +1 -0
- package/dist/contracts/deepbook_sessions/sessions.mjs +443 -0
- package/dist/contracts/deepbook_sessions/sessions.mjs.map +1 -0
- package/dist/contracts/utils/index.d.mts +18 -1
- package/dist/contracts/utils/index.d.mts.map +1 -1
- package/dist/deployments/index.d.mts +31 -0
- package/dist/deployments/index.d.mts.map +1 -0
- package/dist/deployments/index.mjs +30 -0
- package/dist/deployments/index.mjs.map +1 -0
- package/dist/deployments/testnet.d.mts +14 -0
- package/dist/deployments/testnet.d.mts.map +1 -0
- package/dist/deployments/testnet.mjs +73 -0
- package/dist/deployments/testnet.mjs.map +1 -0
- package/dist/deployments/types.d.mts +36 -0
- package/dist/deployments/types.d.mts.map +1 -0
- package/dist/index.mjs +0 -1
- package/dist/predict/client.d.mts +255 -0
- package/dist/predict/client.d.mts.map +1 -0
- package/dist/predict/client.mjs +436 -0
- package/dist/predict/client.mjs.map +1 -0
- package/dist/predict/config/generated.d.mts +29 -0
- package/dist/predict/config/generated.d.mts.map +1 -0
- package/dist/predict/config/generated.mjs +16 -0
- package/dist/predict/config/generated.mjs.map +1 -0
- package/dist/predict/config/index.d.mts +10 -0
- package/dist/predict/config/index.d.mts.map +1 -0
- package/dist/predict/config/index.mjs +13 -0
- package/dist/predict/config/index.mjs.map +1 -0
- package/dist/predict/config/testnet.d.mts +17 -0
- package/dist/predict/config/testnet.d.mts.map +1 -0
- package/dist/predict/config/testnet.mjs +26 -0
- package/dist/predict/config/testnet.mjs.map +1 -0
- package/dist/predict/config/types.d.mts +55 -0
- package/dist/predict/config/types.d.mts.map +1 -0
- package/dist/predict/decode.d.mts +162 -0
- package/dist/predict/decode.d.mts.map +1 -0
- package/dist/predict/decode.mjs +175 -0
- package/dist/predict/decode.mjs.map +1 -0
- package/dist/predict/errors.d.mts +42 -0
- package/dist/predict/errors.d.mts.map +1 -0
- package/dist/predict/errors.mjs +37 -0
- package/dist/predict/errors.mjs.map +1 -0
- package/dist/predict/index.d.mts +18 -0
- package/dist/predict/index.mjs +14 -0
- package/dist/predict/pricing.d.mts +73 -0
- package/dist/predict/pricing.d.mts.map +1 -0
- package/dist/predict/pricing.mjs +129 -0
- package/dist/predict/pricing.mjs.map +1 -0
- package/dist/predict/reads/balances.mjs +41 -0
- package/dist/predict/reads/balances.mjs.map +1 -0
- package/dist/predict/reads/inspect.d.mts +8 -0
- package/dist/predict/reads/inspect.d.mts.map +1 -0
- package/dist/predict/reads/inspect.mjs +37 -0
- package/dist/predict/reads/inspect.mjs.map +1 -0
- package/dist/predict/reads/markets.mjs +130 -0
- package/dist/predict/reads/markets.mjs.map +1 -0
- package/dist/predict/reads/parse.mjs +20 -0
- package/dist/predict/reads/parse.mjs.map +1 -0
- package/dist/predict/reads/pool.mjs +26 -0
- package/dist/predict/reads/pool.mjs.map +1 -0
- package/dist/predict/reads/positions.d.mts +12 -0
- package/dist/predict/reads/positions.d.mts.map +1 -0
- package/dist/predict/reads/positions.mjs +77 -0
- package/dist/predict/reads/positions.mjs.map +1 -0
- package/dist/predict/reads/pricing.d.mts +20 -0
- package/dist/predict/reads/pricing.d.mts.map +1 -0
- package/dist/predict/reads/pricing.mjs +43 -0
- package/dist/predict/reads/pricing.mjs.map +1 -0
- package/dist/predict/ticks.d.mts +11 -0
- package/dist/predict/ticks.d.mts.map +1 -0
- package/dist/predict/ticks.mjs +21 -0
- package/dist/predict/ticks.mjs.map +1 -0
- package/dist/predict/tx/authed.mjs +18 -0
- package/dist/predict/tx/authed.mjs.map +1 -0
- package/dist/predict/tx/common.d.mts +18 -0
- package/dist/predict/tx/common.d.mts.map +1 -0
- package/dist/predict/tx/common.mjs +52 -0
- package/dist/predict/tx/common.mjs.map +1 -0
- package/dist/predict/tx/trade.d.mts +15 -0
- package/dist/predict/tx/trade.d.mts.map +1 -0
- package/dist/predict/tx/trade.mjs +86 -0
- package/dist/predict/tx/trade.mjs.map +1 -0
- package/dist/predict/units.d.mts +11 -0
- package/dist/predict/units.d.mts.map +1 -0
- package/dist/predict/units.mjs +44 -0
- package/dist/predict/units.mjs.map +1 -0
- package/dist/queries/accountQueries.mjs +0 -1
- package/dist/queries/accountQueries.mjs.map +1 -1
- package/dist/queries/orderQueries.mjs +0 -1
- package/dist/queries/orderQueries.mjs.map +1 -1
- package/dist/queries/registryQueries.mjs +0 -1
- package/dist/queries/registryQueries.mjs.map +1 -1
- package/dist/sessions.d.mts +244 -0
- package/dist/sessions.d.mts.map +1 -0
- package/dist/sessions.mjs +291 -0
- package/dist/sessions.mjs.map +1 -0
- package/dist/transactions/balanceManager.d.mts +12 -12
- package/dist/transactions/balanceManager.d.mts.map +1 -1
- package/dist/transactions/deepbook.d.mts +20 -20
- package/dist/transactions/deepbook.d.mts.map +1 -1
- package/dist/transactions/deepbookAdmin.d.mts +4 -4
- package/dist/transactions/marginAdmin.d.mts +7 -7
- package/dist/transactions/marginLiquidations.d.mts +3 -3
- package/dist/transactions/marginMaintainer.d.mts +5 -5
- package/dist/transactions/marginManager.d.mts +32 -32
- package/dist/transactions/marginPool.d.mts +18 -18
- package/dist/transactions/marginRegistry.d.mts +16 -16
- package/dist/transactions/marginTPSL.d.mts +10 -10
- package/dist/transactions/poolProxy.d.mts +8 -8
- package/package.json +25 -4
- package/src/account.ts +239 -0
- package/src/bcs/integers.ts +35 -0
- package/src/contracts/account/account.ts +706 -0
- package/src/contracts/account/account_events.ts +64 -0
- package/src/contracts/account/account_registry.ts +468 -0
- package/src/contracts/account/config-arguments.ts +8 -0
- package/src/contracts/account/deps/sui/bag.ts +42 -0
- package/src/contracts/deepbook_predict/admin.ts +44 -0
- package/src/contracts/deepbook_predict/builder_code.ts +155 -0
- package/src/contracts/deepbook_predict/builder_code_events.ts +34 -0
- package/src/contracts/deepbook_predict/config-arguments.ts +11 -0
- package/src/contracts/deepbook_predict/config_events.ts +140 -0
- package/src/contracts/deepbook_predict/deps/fixed_math/i64.ts +21 -0
- package/src/contracts/deepbook_predict/deps/sui/balance.ts +25 -0
- package/src/contracts/deepbook_predict/deps/sui/coin.ts +20 -0
- package/src/contracts/deepbook_predict/deps/sui/table.ts +37 -0
- package/src/contracts/deepbook_predict/deps/sui/vec_set.ts +22 -0
- package/src/contracts/deepbook_predict/ewma.ts +26 -0
- package/src/contracts/deepbook_predict/ewma_config.ts +28 -0
- package/src/contracts/deepbook_predict/expiry_cash.ts +24 -0
- package/src/contracts/deepbook_predict/expiry_market.ts +1549 -0
- package/src/contracts/deepbook_predict/lp_book.ts +105 -0
- package/src/contracts/deepbook_predict/market_lifecycle_cap.ts +75 -0
- package/src/contracts/deepbook_predict/market_manager.ts +218 -0
- package/src/contracts/deepbook_predict/order.ts +24 -0
- package/src/contracts/deepbook_predict/order_events.ts +129 -0
- package/src/contracts/deepbook_predict/pause_cap.ts +68 -0
- package/src/contracts/deepbook_predict/plp.ts +987 -0
- package/src/contracts/deepbook_predict/pool_accounting.ts +79 -0
- package/src/contracts/deepbook_predict/predict_account.ts +180 -0
- package/src/contracts/deepbook_predict/pricing.ts +124 -0
- package/src/contracts/deepbook_predict/pricing_config.ts +41 -0
- package/src/contracts/deepbook_predict/protocol_config.ts +1066 -0
- package/src/contracts/deepbook_predict/range_codec.ts +53 -0
- package/src/contracts/deepbook_predict/registry.ts +694 -0
- package/src/contracts/deepbook_predict/strike_exposure.ts +77 -0
- package/src/contracts/deepbook_predict/strike_exposure_config.ts +46 -0
- package/src/contracts/deepbook_predict/strike_payout_tree.ts +89 -0
- package/src/contracts/deepbook_predict/vault_events.ts +222 -0
- package/src/contracts/deepbook_sessions/config-arguments.ts +8 -0
- package/src/contracts/deepbook_sessions/deps/sui/vec_map.ts +33 -0
- package/src/contracts/deepbook_sessions/session_config.ts +130 -0
- package/src/contracts/deepbook_sessions/sessions.ts +663 -0
- package/src/contracts/propbook/block_scholes_store.ts +842 -0
- package/src/contracts/propbook/deps/sui/table.ts +37 -0
- package/src/contracts/propbook/oracle_lane.ts +170 -0
- package/src/contracts/propbook/pyth_feed.ts +414 -0
- package/src/contracts/propbook/registry.ts +596 -0
- package/src/deployments/index.ts +73 -0
- package/src/deployments/testnet.ts +107 -0
- package/src/deployments/types.ts +81 -0
- package/src/index.ts +5 -0
- package/src/predict/client.ts +941 -0
- package/src/predict/config/generated.ts +39 -0
- package/src/predict/config/index.ts +25 -0
- package/src/predict/config/testnet.ts +27 -0
- package/src/predict/config/types.ts +52 -0
- package/src/predict/decode.ts +476 -0
- package/src/predict/errors.ts +83 -0
- package/src/predict/index.ts +94 -0
- package/src/predict/pricing.ts +199 -0
- package/src/predict/reads/balances.ts +55 -0
- package/src/predict/reads/inspect.ts +78 -0
- package/src/predict/reads/markets.ts +222 -0
- package/src/predict/reads/parse.ts +30 -0
- package/src/predict/reads/pool.ts +37 -0
- package/src/predict/reads/positions.ts +144 -0
- package/src/predict/reads/pricing.ts +79 -0
- package/src/predict/ticks.ts +42 -0
- package/src/predict/tx/authed.ts +20 -0
- package/src/predict/tx/common.ts +92 -0
- package/src/predict/tx/trade.ts +183 -0
- package/src/predict/units.ts +49 -0
- package/src/sessions.ts +471 -0
- package/dist/types/bcs.mjs +0 -7
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Owns deterministic builder referral codes and the DUSDC fees delivered to their
|
|
7
|
+
* object addresses through the funds accumulator. Codes are derived per owner and
|
|
8
|
+
* index, and only the immutable owner may withdraw accumulated fees.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
MoveTuple,
|
|
13
|
+
MoveStruct,
|
|
14
|
+
normalizeMoveArguments,
|
|
15
|
+
type RawTransactionArgument,
|
|
16
|
+
} from '../utils/index.js';
|
|
17
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
18
|
+
import { U64 } from '../../bcs/integers.js';
|
|
19
|
+
import { type Transaction } from '@mysten/sui/transactions';
|
|
20
|
+
const $moduleName = '@local-pkg/deepbook_predict::builder_code';
|
|
21
|
+
export const BuilderCodeKey = new MoveTuple({
|
|
22
|
+
name: `${$moduleName}::BuilderCodeKey`,
|
|
23
|
+
fields: [bcs.Address, U64],
|
|
24
|
+
});
|
|
25
|
+
export const BuilderCode = new MoveStruct({
|
|
26
|
+
name: `${$moduleName}::BuilderCode`,
|
|
27
|
+
fields: {
|
|
28
|
+
id: bcs.Address,
|
|
29
|
+
owner: bcs.Address,
|
|
30
|
+
index: U64,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
export interface IdArguments {
|
|
34
|
+
code: RawTransactionArgument<string>;
|
|
35
|
+
}
|
|
36
|
+
export interface IdOptions {
|
|
37
|
+
package?: string;
|
|
38
|
+
arguments: IdArguments | [code: RawTransactionArgument<string>];
|
|
39
|
+
config?: {
|
|
40
|
+
predictPackageId?: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/** Returns the code identity for trade construction and external discovery. */
|
|
44
|
+
export function id(options: IdOptions) {
|
|
45
|
+
const packageAddress =
|
|
46
|
+
options.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';
|
|
47
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
48
|
+
const parameterNames = ['code'];
|
|
49
|
+
return (tx: Transaction) =>
|
|
50
|
+
tx.moveCall({
|
|
51
|
+
package: packageAddress,
|
|
52
|
+
module: 'builder_code',
|
|
53
|
+
function: 'id',
|
|
54
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
export interface OwnerArguments {
|
|
58
|
+
code: RawTransactionArgument<string>;
|
|
59
|
+
}
|
|
60
|
+
export interface OwnerOptions {
|
|
61
|
+
package?: string;
|
|
62
|
+
arguments: OwnerArguments | [code: RawTransactionArgument<string>];
|
|
63
|
+
config?: {
|
|
64
|
+
predictPackageId?: string;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/** Returns the immutable owner authorized to claim fees. */
|
|
68
|
+
export function owner(options: OwnerOptions) {
|
|
69
|
+
const packageAddress =
|
|
70
|
+
options.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';
|
|
71
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
72
|
+
const parameterNames = ['code'];
|
|
73
|
+
return (tx: Transaction) =>
|
|
74
|
+
tx.moveCall({
|
|
75
|
+
package: packageAddress,
|
|
76
|
+
module: 'builder_code',
|
|
77
|
+
function: 'owner',
|
|
78
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
export interface IndexArguments {
|
|
82
|
+
code: RawTransactionArgument<string>;
|
|
83
|
+
}
|
|
84
|
+
export interface IndexOptions {
|
|
85
|
+
package?: string;
|
|
86
|
+
arguments: IndexArguments | [code: RawTransactionArgument<string>];
|
|
87
|
+
config?: {
|
|
88
|
+
predictPackageId?: string;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
/** Returns the owner-selected derivation index for external discovery. */
|
|
92
|
+
export function index(options: IndexOptions) {
|
|
93
|
+
const packageAddress =
|
|
94
|
+
options.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';
|
|
95
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
96
|
+
const parameterNames = ['code'];
|
|
97
|
+
return (tx: Transaction) =>
|
|
98
|
+
tx.moveCall({
|
|
99
|
+
package: packageAddress,
|
|
100
|
+
module: 'builder_code',
|
|
101
|
+
function: 'index',
|
|
102
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
export interface ClaimableBuilderFeesArguments {
|
|
106
|
+
code: RawTransactionArgument<string>;
|
|
107
|
+
}
|
|
108
|
+
export interface ClaimableBuilderFeesOptions {
|
|
109
|
+
package?: string;
|
|
110
|
+
arguments: ClaimableBuilderFeesArguments | [code: RawTransactionArgument<string>];
|
|
111
|
+
config?: {
|
|
112
|
+
predictPackageId?: string;
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
/** Return visible DUSDC builder fees for SDK and devInspect reads. */
|
|
116
|
+
export function claimableBuilderFees(options: ClaimableBuilderFeesOptions) {
|
|
117
|
+
const packageAddress =
|
|
118
|
+
options.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';
|
|
119
|
+
const argumentsTypes = ['0x2::accumulator::AccumulatorRoot', null] satisfies (string | null)[];
|
|
120
|
+
const parameterNames = ['code'];
|
|
121
|
+
return (tx: Transaction) =>
|
|
122
|
+
tx.moveCall({
|
|
123
|
+
package: packageAddress,
|
|
124
|
+
module: 'builder_code',
|
|
125
|
+
function: 'claimable_builder_fees',
|
|
126
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
export interface ClaimAllBuilderFeesArguments {
|
|
130
|
+
code: RawTransactionArgument<string>;
|
|
131
|
+
}
|
|
132
|
+
export interface ClaimAllBuilderFeesOptions {
|
|
133
|
+
package?: string;
|
|
134
|
+
arguments: ClaimAllBuilderFeesArguments | [code: RawTransactionArgument<string>];
|
|
135
|
+
config?: {
|
|
136
|
+
predictPackageId?: string;
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Claims all settled DUSDC builder fees for the immutable owner; an empty
|
|
141
|
+
* accumulator returns a zero coin.
|
|
142
|
+
*/
|
|
143
|
+
export function claimAllBuilderFees(options: ClaimAllBuilderFeesOptions) {
|
|
144
|
+
const packageAddress =
|
|
145
|
+
options.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';
|
|
146
|
+
const argumentsTypes = [null, '0x2::accumulator::AccumulatorRoot'] satisfies (string | null)[];
|
|
147
|
+
const parameterNames = ['code'];
|
|
148
|
+
return (tx: Transaction) =>
|
|
149
|
+
tx.moveCall({
|
|
150
|
+
package: packageAddress,
|
|
151
|
+
module: 'builder_code',
|
|
152
|
+
function: 'claim_all_builder_fees',
|
|
153
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
154
|
+
});
|
|
155
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
/** Builder-code lifecycle and attribution events for Predict. */
|
|
6
|
+
|
|
7
|
+
import { MoveStruct } from '../utils/index.js';
|
|
8
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
9
|
+
import { U64 } from '../../bcs/integers.js';
|
|
10
|
+
const $moduleName = '@local-pkg/deepbook_predict::builder_code_events';
|
|
11
|
+
export const BuilderCodeCreated = new MoveStruct({
|
|
12
|
+
name: `${$moduleName}::BuilderCodeCreated`,
|
|
13
|
+
fields: {
|
|
14
|
+
builder_code_id: bcs.Address,
|
|
15
|
+
owner: bcs.Address,
|
|
16
|
+
builder_code_index: U64,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
export const BuilderCodeSet = new MoveStruct({
|
|
20
|
+
name: `${$moduleName}::BuilderCodeSet`,
|
|
21
|
+
fields: {
|
|
22
|
+
account_id: bcs.Address,
|
|
23
|
+
owner: bcs.Address,
|
|
24
|
+
builder_code_id: bcs.option(bcs.Address),
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
export const BuilderFeesClaimed = new MoveStruct({
|
|
28
|
+
name: `${$moduleName}::BuilderFeesClaimed`,
|
|
29
|
+
fields: {
|
|
30
|
+
builder_code_id: bcs.Address,
|
|
31
|
+
owner: bcs.Address,
|
|
32
|
+
amount: U64,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { type ConfigValue } from '../utils/index.js';
|
|
5
|
+
export interface DeepbookPredictConfig {
|
|
6
|
+
predictPackageId?: string;
|
|
7
|
+
protocolConfig: ConfigValue;
|
|
8
|
+
poolVault: ConfigValue;
|
|
9
|
+
registry: ConfigValue;
|
|
10
|
+
oracleRegistry: ConfigValue;
|
|
11
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
/** Admin and configuration events for Predict. */
|
|
6
|
+
|
|
7
|
+
import { MoveStruct } from '../utils/index.js';
|
|
8
|
+
import { U64 } from '../../bcs/integers.js';
|
|
9
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
10
|
+
const $moduleName = '@local-pkg/deepbook_predict::config_events';
|
|
11
|
+
export const StrikeExposureTemplateConfigUpdated = new MoveStruct({
|
|
12
|
+
name: `${$moduleName}::StrikeExposureTemplateConfigUpdated`,
|
|
13
|
+
fields: {
|
|
14
|
+
backing_buffer_lambda: U64,
|
|
15
|
+
base_fee: U64,
|
|
16
|
+
min_fee: U64,
|
|
17
|
+
min_entry_probability: U64,
|
|
18
|
+
max_entry_probability: U64,
|
|
19
|
+
expiry_fee_window_ms: U64,
|
|
20
|
+
expiry_fee_max_multiplier: U64,
|
|
21
|
+
inventory_impact_max_rate: U64,
|
|
22
|
+
onchain_timestamp_ms: U64,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
export const PricingConfigUpdated = new MoveStruct({
|
|
26
|
+
name: `${$moduleName}::PricingConfigUpdated`,
|
|
27
|
+
fields: {
|
|
28
|
+
use_pyth_spot_for_forward: bcs.bool(),
|
|
29
|
+
pyth_spot_freshness_ms: U64,
|
|
30
|
+
block_scholes_price_freshness_ms: U64,
|
|
31
|
+
block_scholes_svi_freshness_ms: U64,
|
|
32
|
+
onchain_timestamp_ms: U64,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
export const EwmaConfigUpdated = new MoveStruct({
|
|
36
|
+
name: `${$moduleName}::EwmaConfigUpdated`,
|
|
37
|
+
fields: {
|
|
38
|
+
alpha: U64,
|
|
39
|
+
z_score_threshold: U64,
|
|
40
|
+
penalty_rate: U64,
|
|
41
|
+
enabled: bcs.bool(),
|
|
42
|
+
onchain_timestamp_ms: U64,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
export const PlpFeeRatesUpdated = new MoveStruct({
|
|
46
|
+
name: `${$moduleName}::PlpFeeRatesUpdated`,
|
|
47
|
+
fields: {
|
|
48
|
+
plp_supply_fee_rate: U64,
|
|
49
|
+
plp_withdraw_fee_rate: U64,
|
|
50
|
+
onchain_timestamp_ms: U64,
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
export const TradingPausedUpdated = new MoveStruct({
|
|
54
|
+
name: `${$moduleName}::TradingPausedUpdated`,
|
|
55
|
+
fields: {
|
|
56
|
+
protocol_config_id: bcs.Address,
|
|
57
|
+
paused: bcs.bool(),
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
export const ProtocolFrozenUpdated = new MoveStruct({
|
|
61
|
+
name: `${$moduleName}::ProtocolFrozenUpdated`,
|
|
62
|
+
fields: {
|
|
63
|
+
protocol_config_id: bcs.Address,
|
|
64
|
+
frozen: bcs.bool(),
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
export const MarketCreated = new MoveStruct({
|
|
68
|
+
name: `${$moduleName}::MarketCreated`,
|
|
69
|
+
fields: {
|
|
70
|
+
expiry_market_id: bcs.Address,
|
|
71
|
+
pool_vault_id: bcs.Address,
|
|
72
|
+
/** Propbook underlying this market resolves current oracle bindings through. */
|
|
73
|
+
propbook_underlying_id: bcs.u32(),
|
|
74
|
+
expiry: U64,
|
|
75
|
+
/**
|
|
76
|
+
* Raw-price-per-tick factor; indexers/SDKs derive raw strikes as
|
|
77
|
+
* `tick * tick_size`.
|
|
78
|
+
*/
|
|
79
|
+
tick_size: U64,
|
|
80
|
+
/** Coarser raw-price step that new finite mint boundaries must align to. */
|
|
81
|
+
admission_tick_size: U64,
|
|
82
|
+
/** DUSDC pool allocation cap snapshotted for this expiry. */
|
|
83
|
+
max_expiry_allocation: U64,
|
|
84
|
+
/** Minimum DUSDC cash target snapshotted for this expiry. */
|
|
85
|
+
initial_expiry_cash: U64,
|
|
86
|
+
backing_buffer_lambda: U64,
|
|
87
|
+
base_fee: U64,
|
|
88
|
+
min_fee: U64,
|
|
89
|
+
min_entry_probability: U64,
|
|
90
|
+
max_entry_probability: U64,
|
|
91
|
+
expiry_fee_window_ms: U64,
|
|
92
|
+
expiry_fee_max_multiplier: U64,
|
|
93
|
+
/** Maximum marginal inventory-impact rate snapshotted by this market. */
|
|
94
|
+
inventory_impact_max_rate: U64,
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
export const CadenceConfigUpdated = new MoveStruct({
|
|
98
|
+
name: `${$moduleName}::CadenceConfigUpdated`,
|
|
99
|
+
fields: {
|
|
100
|
+
registry_id: bcs.Address,
|
|
101
|
+
propbook_underlying_id: bcs.u32(),
|
|
102
|
+
cadence_id: bcs.u8(),
|
|
103
|
+
tick_size: U64,
|
|
104
|
+
admission_tick_size: U64,
|
|
105
|
+
max_expiry_allocation: U64,
|
|
106
|
+
initial_expiry_cash: U64,
|
|
107
|
+
window_size: U64,
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
export const ExpiryMarketMintPausedUpdated = new MoveStruct({
|
|
111
|
+
name: `${$moduleName}::ExpiryMarketMintPausedUpdated`,
|
|
112
|
+
fields: {
|
|
113
|
+
expiry_market_id: bcs.Address,
|
|
114
|
+
paused: bcs.bool(),
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
export const ReferenceTickSet = new MoveStruct({
|
|
118
|
+
name: `${$moduleName}::ReferenceTickSet`,
|
|
119
|
+
fields: {
|
|
120
|
+
expiry_market_id: bcs.Address,
|
|
121
|
+
propbook_underlying_id: bcs.u32(),
|
|
122
|
+
source_timestamp_ms: U64,
|
|
123
|
+
spot: U64,
|
|
124
|
+
tick: U64,
|
|
125
|
+
onchain_timestamp_ms: U64,
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
export const MarketSettled = new MoveStruct({
|
|
129
|
+
name: `${$moduleName}::MarketSettled`,
|
|
130
|
+
fields: {
|
|
131
|
+
expiry_market_id: bcs.Address,
|
|
132
|
+
propbook_underlying_id: bcs.u32(),
|
|
133
|
+
expiry: U64,
|
|
134
|
+
settlement_price: U64,
|
|
135
|
+
/** `0` = Pyth and `1` = Block Scholes. */
|
|
136
|
+
settlement_source: bcs.u8(),
|
|
137
|
+
/** On-chain landing time of the settlement, `clock.timestamp_ms()`. */
|
|
138
|
+
onchain_timestamp_ms: U64,
|
|
139
|
+
},
|
|
140
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Signed integers represented by a `u64` magnitude and a canonical nonnegative
|
|
7
|
+
* zero. Scaled multiplication and division use 1e9 fixed point and truncate the
|
|
8
|
+
* result's magnitude toward zero.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { MoveStruct } from '../../../utils/index.js';
|
|
12
|
+
import { U64 } from '../../../../bcs/integers.js';
|
|
13
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
14
|
+
const $moduleName = 'fixed_math::i64';
|
|
15
|
+
export const I64 = new MoveStruct({
|
|
16
|
+
name: `${$moduleName}::I64`,
|
|
17
|
+
fields: {
|
|
18
|
+
magnitude: U64,
|
|
19
|
+
is_negative: bcs.bool(),
|
|
20
|
+
},
|
|
21
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A storable handler for Balances in general. Is used in the `Coin` module to
|
|
7
|
+
* allow balance operations and can be used to implement custom coins with `Supply`
|
|
8
|
+
* and `Balance`s.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { MoveStruct } from '../../../utils/index.js';
|
|
12
|
+
import { U64 } from '../../../../bcs/integers.js';
|
|
13
|
+
const $moduleName = '0x2::balance';
|
|
14
|
+
export const Balance = new MoveStruct({
|
|
15
|
+
name: `${$moduleName}::Balance<phantom T>`,
|
|
16
|
+
fields: {
|
|
17
|
+
value: U64,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
export const Supply = new MoveStruct({
|
|
21
|
+
name: `${$moduleName}::Supply<phantom T>`,
|
|
22
|
+
fields: {
|
|
23
|
+
value: U64,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Defines the `Coin` type - platform wide representation of fungible tokens and
|
|
7
|
+
* coins. `Coin` can be described as a secure wrapper around `Balance` type.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { MoveStruct } from '../../../utils/index.js';
|
|
11
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
12
|
+
import * as balance from './balance.js';
|
|
13
|
+
const $moduleName = '0x2::coin';
|
|
14
|
+
export const TreasuryCap = new MoveStruct({
|
|
15
|
+
name: `${$moduleName}::TreasuryCap<phantom T>`,
|
|
16
|
+
fields: {
|
|
17
|
+
id: bcs.Address,
|
|
18
|
+
total_supply: balance.Supply,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A table is a map-like collection. But unlike a traditional collection, it's keys
|
|
7
|
+
* and values are not stored within the `Table` value, but instead are stored using
|
|
8
|
+
* Sui's object system. The `Table` struct acts only as a handle into the object
|
|
9
|
+
* system to retrieve those keys and values. Note that this means that `Table`
|
|
10
|
+
* values with exactly the same key-value mapping will not be equal, with `==`, at
|
|
11
|
+
* runtime. For example
|
|
12
|
+
*
|
|
13
|
+
* ```
|
|
14
|
+
* let table1 = table::new<u64, bool>();
|
|
15
|
+
* let table2 = table::new<u64, bool>();
|
|
16
|
+
* table::add(&mut table1, 0, false);
|
|
17
|
+
* table::add(&mut table1, 1, true);
|
|
18
|
+
* table::add(&mut table2, 0, false);
|
|
19
|
+
* table::add(&mut table2, 1, true);
|
|
20
|
+
* // table1 does not equal table2, despite having the same entries
|
|
21
|
+
* assert!(&table1 != &table2);
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { MoveStruct } from '../../../utils/index.js';
|
|
26
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
27
|
+
import { U64 } from '../../../../bcs/integers.js';
|
|
28
|
+
const $moduleName = '0x2::table';
|
|
29
|
+
export const Table = new MoveStruct({
|
|
30
|
+
name: `${$moduleName}::Table<phantom K, phantom V>`,
|
|
31
|
+
fields: {
|
|
32
|
+
/** the ID of this table */
|
|
33
|
+
id: bcs.Address,
|
|
34
|
+
/** the number of key-value pairs in the table */
|
|
35
|
+
size: U64,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { type BcsType, bcs } from '@mysten/sui/bcs';
|
|
5
|
+
import { MoveStruct } from '../../../utils/index.js';
|
|
6
|
+
const $moduleName = '0x2::vec_set';
|
|
7
|
+
/**
|
|
8
|
+
* A set data structure backed by a vector. The set is guaranteed not to contain
|
|
9
|
+
* duplicate keys. All operations are O(N) in the size of the set
|
|
10
|
+
*
|
|
11
|
+
* - the intention of this data structure is only to provide the convenience of
|
|
12
|
+
* programming against a set API. Sets that need sorted iteration rather than
|
|
13
|
+
* insertion order iteration should be handwritten.
|
|
14
|
+
*/
|
|
15
|
+
export function VecSet<K extends BcsType<any>>(...typeParameters: [K]) {
|
|
16
|
+
return new MoveStruct({
|
|
17
|
+
name: `${$moduleName}::VecSet<${typeParameters[0].name as K['name']}>`,
|
|
18
|
+
fields: {
|
|
19
|
+
contents: bcs.vector(typeParameters[0]),
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Per-market exponentially weighted gas-price statistics used to surcharge trades
|
|
7
|
+
* placed during abnormal network congestion.
|
|
8
|
+
*
|
|
9
|
+
* This module owns only the evolving `(mean, variance)` estimate and the gas-price
|
|
10
|
+
* observation and penalty math. The tunable knobs (`alpha`, `z_score_threshold`,
|
|
11
|
+
* `penalty_rate`, `enabled`) live in `EwmaConfig`; `ExpiryMarket` owns the stored
|
|
12
|
+
* state and decides when to fold observations in.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { MoveStruct } from '../utils/index.js';
|
|
16
|
+
import { U64 } from '../../bcs/integers.js';
|
|
17
|
+
const $moduleName = '@local-pkg/deepbook_predict::ewma';
|
|
18
|
+
export const EwmaState = new MoveStruct({
|
|
19
|
+
name: `${$moduleName}::EwmaState`,
|
|
20
|
+
fields: {
|
|
21
|
+
mean: U64,
|
|
22
|
+
variance: U64,
|
|
23
|
+
/** On-chain time of the last fold; guards against more than one update per ms. */
|
|
24
|
+
last_updated_timestamp_ms: U64,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Stored parameters for the gas-price EWMA trade penalty.
|
|
7
|
+
*
|
|
8
|
+
* `ExpiryMarket` holds the evolving `EwmaState`; this config holds the
|
|
9
|
+
* admin-tunable knobs shared by every market. The penalty is disabled by default.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { MoveStruct } from '../utils/index.js';
|
|
13
|
+
import { U64 } from '../../bcs/integers.js';
|
|
14
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
15
|
+
const $moduleName = '@local-pkg/deepbook_predict::ewma_config';
|
|
16
|
+
export const EwmaConfig = new MoveStruct({
|
|
17
|
+
name: `${$moduleName}::EwmaConfig`,
|
|
18
|
+
fields: {
|
|
19
|
+
/** Smoothing factor for the gas-price mean and variance; higher reacts faster. */
|
|
20
|
+
alpha: U64,
|
|
21
|
+
/** Standard deviations above the smoothed mean required before a penalty applies. */
|
|
22
|
+
z_score_threshold: U64,
|
|
23
|
+
/** Per-unit fee added to a penalized trade's trading fee. */
|
|
24
|
+
penalty_rate: U64,
|
|
25
|
+
/** Master switch; no penalty applies while false. */
|
|
26
|
+
enabled: bcs.bool(),
|
|
27
|
+
},
|
|
28
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Expiry-local DUSDC custody and isolated reserve accounting.
|
|
7
|
+
*
|
|
8
|
+
* This leaf owns cash balance arithmetic and the inventory-impact escrow used only
|
|
9
|
+
* for live-close rebates. It does not decide payment eligibility, pool allocation,
|
|
10
|
+
* or market phase sequencing; `ExpiryMarket` owns those policies.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { MoveStruct } from '../utils/index.js';
|
|
14
|
+
import { U64 } from '../../bcs/integers.js';
|
|
15
|
+
import * as balance from './deps/sui/balance.js';
|
|
16
|
+
const $moduleName = '@local-pkg/deepbook_predict::expiry_cash';
|
|
17
|
+
export const ExpiryCash = new MoveStruct({
|
|
18
|
+
name: `${$moduleName}::ExpiryCash`,
|
|
19
|
+
fields: {
|
|
20
|
+
cash_balance: balance.Balance,
|
|
21
|
+
/** Collected inventory-impact charges still reserved for live-close rebates. */
|
|
22
|
+
inventory_impact_reserve: U64,
|
|
23
|
+
},
|
|
24
|
+
});
|