@mysten/deepbook-v3 2.0.0 → 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 +100 -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/balance_manager.mjs.map +1 -1
- package/dist/contracts/deepbook/balances.d.mts +4 -4
- package/dist/contracts/deepbook/balances.d.mts.map +1 -1
- 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/pool.mjs.map +1 -1
- package/dist/contracts/deepbook/registry.mjs.map +1 -1
- package/dist/contracts/deepbook_margin/margin_manager.mjs.map +1 -1
- package/dist/contracts/deepbook_margin/margin_manager_upgraded.mjs.map +1 -1
- package/dist/contracts/deepbook_margin/margin_pool.mjs.map +1 -1
- package/dist/contracts/deepbook_margin/margin_registry.mjs.map +1 -1
- package/dist/contracts/deepbook_margin/pool_proxy.mjs.map +1 -1
- package/dist/contracts/deepbook_margin/protocol_config.mjs.map +1 -1
- package/dist/contracts/deepbook_margin/tpsl.mjs.map +1 -1
- 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/margin_liquidation/liquidation_vault.mjs.map +1 -1
- 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/deepbook.d.mts +20 -20
- package/dist/transactions/deepbookAdmin.d.mts +4 -4
- package/dist/transactions/deepbookAdmin.d.mts.map +1 -1
- 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/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.mjs.map +1 -1
- package/dist/utils/constants.d.mts.map +1 -1
- package/dist/utils/constants.mjs +1 -1
- package/dist/utils/constants.mjs.map +1 -1
- package/package.json +33 -12
- 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/balance_manager.ts +1 -2
- package/src/contracts/deepbook/pool.ts +12 -24
- package/src/contracts/deepbook/registry.ts +1 -2
- package/src/contracts/deepbook_margin/margin_manager.ts +9 -18
- package/src/contracts/deepbook_margin/margin_manager_upgraded.ts +5 -10
- package/src/contracts/deepbook_margin/margin_pool.ts +2 -4
- package/src/contracts/deepbook_margin/margin_registry.ts +3 -6
- package/src/contracts/deepbook_margin/pool_proxy.ts +3 -6
- package/src/contracts/deepbook_margin/protocol_config.ts +1 -2
- package/src/contracts/deepbook_margin/tpsl.ts +1 -2
- 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/margin_liquidation/liquidation_vault.ts +2 -4
- 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/contracts/pyth/pyth.ts +2 -4
- 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/src/types/index.ts +1 -2
- package/src/utils/constants.ts +1 -7
- package/dist/types/bcs.mjs +0 -7
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { MoveStruct, MoveTuple, normalizeMoveArguments } from "../utils/index.mjs";
|
|
3
|
+
import { Bag } from "./deps/sui/bag.mjs";
|
|
4
|
+
import { bcs } from "@mysten/sui/bcs";
|
|
5
|
+
|
|
6
|
+
//#region src/contracts/account/account.ts
|
|
7
|
+
/**************************************************************
|
|
8
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
9
|
+
**************************************************************/
|
|
10
|
+
/**
|
|
11
|
+
* Owns shared account wrappers, typed coin custody, accumulator settlement, and
|
|
12
|
+
* application-scoped data. Consuming `Auth` is the mutable-borrow boundary: owner
|
|
13
|
+
* auth is checked against the account, while package-issued app auth yields the
|
|
14
|
+
* same full `&mut Account` and is not bound to an owner or operation. The wrapper
|
|
15
|
+
* address receives accumulator funds; a distinct derived account UID identifies
|
|
16
|
+
* the account and anchors app data, while typed balances remain embedded in the
|
|
17
|
+
* account. App data is namespaced by witness type, requires `Permit<App>` to
|
|
18
|
+
* mutate, and remains publicly readable.
|
|
19
|
+
*/
|
|
20
|
+
var account_exports = /* @__PURE__ */ __exportAll({
|
|
21
|
+
Account: () => Account,
|
|
22
|
+
AccountWrapper: () => AccountWrapper,
|
|
23
|
+
Auth: () => Auth,
|
|
24
|
+
CoinKey: () => CoinKey,
|
|
25
|
+
DataKey: () => DataKey,
|
|
26
|
+
accountId: () => accountId,
|
|
27
|
+
attach: () => attach,
|
|
28
|
+
balance: () => balance,
|
|
29
|
+
borrowData: () => borrowData,
|
|
30
|
+
borrowDataMut: () => borrowDataMut,
|
|
31
|
+
deposit: () => deposit,
|
|
32
|
+
depositFunds: () => depositFunds,
|
|
33
|
+
detach: () => detach,
|
|
34
|
+
generateAuth: () => generateAuth,
|
|
35
|
+
generateAuthAsObject: () => generateAuthAsObject,
|
|
36
|
+
hasData: () => hasData,
|
|
37
|
+
id: () => id,
|
|
38
|
+
loadAccount: () => loadAccount,
|
|
39
|
+
loadAccountMut: () => loadAccountMut,
|
|
40
|
+
owner: () => owner,
|
|
41
|
+
receiveAddress: () => receiveAddress,
|
|
42
|
+
referrerAccountId: () => referrerAccountId,
|
|
43
|
+
referrerReceiveAddress: () => referrerReceiveAddress,
|
|
44
|
+
settle: () => settle,
|
|
45
|
+
share: () => share,
|
|
46
|
+
withdraw: () => withdraw,
|
|
47
|
+
withdrawFunds: () => withdrawFunds
|
|
48
|
+
});
|
|
49
|
+
const $moduleName = "@local-pkg/account::account";
|
|
50
|
+
const Account = new MoveStruct({
|
|
51
|
+
name: `${$moduleName}::Account`,
|
|
52
|
+
fields: {
|
|
53
|
+
account_id: bcs.Address,
|
|
54
|
+
owner: bcs.Address,
|
|
55
|
+
receive_address: bcs.Address,
|
|
56
|
+
balances: Bag,
|
|
57
|
+
settlements: Bag,
|
|
58
|
+
referrer_account_id: bcs.option(bcs.Address),
|
|
59
|
+
referrer_receive_address: bcs.option(bcs.Address)
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
const AccountWrapper = new MoveStruct({
|
|
63
|
+
name: `${$moduleName}::AccountWrapper`,
|
|
64
|
+
fields: {
|
|
65
|
+
id: bcs.Address,
|
|
66
|
+
account: Account
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
const DataKey = new MoveTuple({
|
|
70
|
+
name: `${$moduleName}::DataKey<phantom App>`,
|
|
71
|
+
fields: [bcs.bool()]
|
|
72
|
+
});
|
|
73
|
+
const CoinKey = new MoveTuple({
|
|
74
|
+
name: `${$moduleName}::CoinKey<phantom T>`,
|
|
75
|
+
fields: [bcs.bool()]
|
|
76
|
+
});
|
|
77
|
+
const Auth = new MoveStruct({
|
|
78
|
+
name: `${$moduleName}::Auth`,
|
|
79
|
+
fields: {
|
|
80
|
+
kind: bcs.u8(),
|
|
81
|
+
owner: bcs.Address
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
/** Returns the wrapper object ID. */
|
|
85
|
+
function id(options) {
|
|
86
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
87
|
+
const argumentsTypes = [null];
|
|
88
|
+
const parameterNames = ["self"];
|
|
89
|
+
return (tx) => tx.moveCall({
|
|
90
|
+
package: packageAddress,
|
|
91
|
+
module: "account",
|
|
92
|
+
function: "id",
|
|
93
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/** Borrows the wrapped account for read-only composition. */
|
|
97
|
+
function loadAccount(options) {
|
|
98
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
99
|
+
const argumentsTypes = [null];
|
|
100
|
+
const parameterNames = ["self"];
|
|
101
|
+
return (tx) => tx.moveCall({
|
|
102
|
+
package: packageAddress,
|
|
103
|
+
module: "account",
|
|
104
|
+
function: "load_account",
|
|
105
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Returns the total balance of `T` available to the account, including funds
|
|
110
|
+
* delivered through the ambient accumulator but not yet settled into the account.
|
|
111
|
+
*/
|
|
112
|
+
function balance(options) {
|
|
113
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
114
|
+
const argumentsTypes = [
|
|
115
|
+
null,
|
|
116
|
+
"0x2::accumulator::AccumulatorRoot",
|
|
117
|
+
"0x2::clock::Clock"
|
|
118
|
+
];
|
|
119
|
+
const parameterNames = ["self"];
|
|
120
|
+
return (tx) => tx.moveCall({
|
|
121
|
+
package: packageAddress,
|
|
122
|
+
module: "account",
|
|
123
|
+
function: "balance",
|
|
124
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
125
|
+
typeArguments: options.typeArguments
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Returns the account owner address. This may be an EOA address or an
|
|
130
|
+
* object-ID-as-address.
|
|
131
|
+
*/
|
|
132
|
+
function owner(options) {
|
|
133
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
134
|
+
const argumentsTypes = [null];
|
|
135
|
+
const parameterNames = ["self"];
|
|
136
|
+
return (tx) => tx.moveCall({
|
|
137
|
+
package: packageAddress,
|
|
138
|
+
module: "account",
|
|
139
|
+
function: "owner",
|
|
140
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/** Returns the canonical account ID. */
|
|
144
|
+
function accountId(options) {
|
|
145
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
146
|
+
const argumentsTypes = [null];
|
|
147
|
+
const parameterNames = ["self"];
|
|
148
|
+
return (tx) => tx.moveCall({
|
|
149
|
+
package: packageAddress,
|
|
150
|
+
module: "account",
|
|
151
|
+
function: "account_id",
|
|
152
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Returns the canonical referrer account ID recorded at creation for external Move
|
|
157
|
+
* composition.
|
|
158
|
+
*/
|
|
159
|
+
function referrerAccountId(options) {
|
|
160
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
161
|
+
const argumentsTypes = [null];
|
|
162
|
+
const parameterNames = ["self"];
|
|
163
|
+
return (tx) => tx.moveCall({
|
|
164
|
+
package: packageAddress,
|
|
165
|
+
module: "account",
|
|
166
|
+
function: "referrer_account_id",
|
|
167
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Returns the referrer's accumulator receive address for external Move
|
|
172
|
+
* composition.
|
|
173
|
+
*/
|
|
174
|
+
function referrerReceiveAddress(options) {
|
|
175
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
176
|
+
const argumentsTypes = [null];
|
|
177
|
+
const parameterNames = ["self"];
|
|
178
|
+
return (tx) => tx.moveCall({
|
|
179
|
+
package: packageAddress,
|
|
180
|
+
module: "account",
|
|
181
|
+
function: "referrer_receive_address",
|
|
182
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
/** Returns the accumulator receive address for this account (the wrapper address). */
|
|
186
|
+
function receiveAddress(options) {
|
|
187
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
188
|
+
const argumentsTypes = [null];
|
|
189
|
+
const parameterNames = ["self"];
|
|
190
|
+
return (tx) => tx.moveCall({
|
|
191
|
+
package: packageAddress,
|
|
192
|
+
module: "account",
|
|
193
|
+
function: "receive_address",
|
|
194
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
/** Creates owner authority bound to the transaction sender. */
|
|
198
|
+
function generateAuth(options = {}) {
|
|
199
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
200
|
+
return (tx) => tx.moveCall({
|
|
201
|
+
package: packageAddress,
|
|
202
|
+
module: "account",
|
|
203
|
+
function: "generate_auth"
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/** Creates owner authority bound to an owning object's address. */
|
|
207
|
+
function generateAuthAsObject(options) {
|
|
208
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
209
|
+
const argumentsTypes = ["0x2::object::ID"];
|
|
210
|
+
const parameterNames = ["uid"];
|
|
211
|
+
return (tx) => tx.moveCall({
|
|
212
|
+
package: packageAddress,
|
|
213
|
+
module: "account",
|
|
214
|
+
function: "generate_auth_as_object",
|
|
215
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
/** Shares a newly created account wrapper. */
|
|
219
|
+
function share(options) {
|
|
220
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
221
|
+
const argumentsTypes = [null];
|
|
222
|
+
const parameterNames = ["self"];
|
|
223
|
+
return (tx) => tx.moveCall({
|
|
224
|
+
package: packageAddress,
|
|
225
|
+
module: "account",
|
|
226
|
+
function: "share",
|
|
227
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Consumes owner or app authority and returns the account's full mutable surface.
|
|
232
|
+
* Owner authority must match the stored owner; app authority is package-issued
|
|
233
|
+
* after registry authorization and carries no owner or operation restriction.
|
|
234
|
+
*/
|
|
235
|
+
function loadAccountMut(options) {
|
|
236
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
237
|
+
const argumentsTypes = [null, null];
|
|
238
|
+
const parameterNames = ["self", "auth"];
|
|
239
|
+
return (tx) => tx.moveCall({
|
|
240
|
+
package: packageAddress,
|
|
241
|
+
module: "account",
|
|
242
|
+
function: "load_account_mut",
|
|
243
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Permissionlessly folds accumulator-delivered `T` at the wrapper address into
|
|
248
|
+
* stored account balance. The per-coin timestamp is latched before reading the
|
|
249
|
+
* accumulator, preventing duplicate withdrawal and same-timestamp double counting
|
|
250
|
+
* even when no funds are available. Only the wrapper UID can authenticate the
|
|
251
|
+
* address-balance withdrawal; value leaving the account still requires a mutable
|
|
252
|
+
* borrow through `Auth`.
|
|
253
|
+
*/
|
|
254
|
+
function settle(options) {
|
|
255
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
256
|
+
const argumentsTypes = [
|
|
257
|
+
null,
|
|
258
|
+
"0x2::accumulator::AccumulatorRoot",
|
|
259
|
+
"0x2::clock::Clock"
|
|
260
|
+
];
|
|
261
|
+
const parameterNames = ["wrapper"];
|
|
262
|
+
return (tx) => tx.moveCall({
|
|
263
|
+
package: packageAddress,
|
|
264
|
+
module: "account",
|
|
265
|
+
function: "settle",
|
|
266
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
267
|
+
typeArguments: options.typeArguments
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Deposits into stored balance only; callers that include accumulator funds must
|
|
272
|
+
* settle through the wrapper first.
|
|
273
|
+
*/
|
|
274
|
+
function deposit(options) {
|
|
275
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
276
|
+
const argumentsTypes = [null, null];
|
|
277
|
+
const parameterNames = ["self", "coin"];
|
|
278
|
+
return (tx) => tx.moveCall({
|
|
279
|
+
package: packageAddress,
|
|
280
|
+
module: "account",
|
|
281
|
+
function: "deposit",
|
|
282
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
283
|
+
typeArguments: options.typeArguments
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Withdraws from stored balance only; callers that include accumulator funds must
|
|
288
|
+
* settle through the wrapper first.
|
|
289
|
+
*/
|
|
290
|
+
function withdraw(options) {
|
|
291
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
292
|
+
const argumentsTypes = [null, "u64"];
|
|
293
|
+
const parameterNames = ["self", "amount"];
|
|
294
|
+
return (tx) => tx.moveCall({
|
|
295
|
+
package: packageAddress,
|
|
296
|
+
module: "account",
|
|
297
|
+
function: "withdraw",
|
|
298
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
299
|
+
typeArguments: options.typeArguments
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* PTB entrypoint that settles accumulator funds, consumes authority, and deposits
|
|
304
|
+
* into stored balance in one call.
|
|
305
|
+
*/
|
|
306
|
+
function depositFunds(options) {
|
|
307
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
308
|
+
const argumentsTypes = [
|
|
309
|
+
null,
|
|
310
|
+
null,
|
|
311
|
+
null,
|
|
312
|
+
"0x2::accumulator::AccumulatorRoot",
|
|
313
|
+
"0x2::clock::Clock"
|
|
314
|
+
];
|
|
315
|
+
const parameterNames = [
|
|
316
|
+
"wrapper",
|
|
317
|
+
"auth",
|
|
318
|
+
"coin"
|
|
319
|
+
];
|
|
320
|
+
return (tx) => tx.moveCall({
|
|
321
|
+
package: packageAddress,
|
|
322
|
+
module: "account",
|
|
323
|
+
function: "deposit_funds",
|
|
324
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
325
|
+
typeArguments: options.typeArguments
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* PTB entrypoint that settles accumulator funds, consumes authority, and withdraws
|
|
330
|
+
* from stored balance in one call.
|
|
331
|
+
*/
|
|
332
|
+
function withdrawFunds(options) {
|
|
333
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
334
|
+
const argumentsTypes = [
|
|
335
|
+
null,
|
|
336
|
+
null,
|
|
337
|
+
"u64",
|
|
338
|
+
"0x2::accumulator::AccumulatorRoot",
|
|
339
|
+
"0x2::clock::Clock"
|
|
340
|
+
];
|
|
341
|
+
const parameterNames = [
|
|
342
|
+
"wrapper",
|
|
343
|
+
"auth",
|
|
344
|
+
"amount"
|
|
345
|
+
];
|
|
346
|
+
return (tx) => tx.moveCall({
|
|
347
|
+
package: packageAddress,
|
|
348
|
+
module: "account",
|
|
349
|
+
function: "withdraw_funds",
|
|
350
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
351
|
+
typeArguments: options.typeArguments
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Attach an app's `Data` under its witness namespace. Requires `Permit<App>`.
|
|
356
|
+
* Aborts if `App` already has data attached.
|
|
357
|
+
*/
|
|
358
|
+
function attach(options) {
|
|
359
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
360
|
+
const argumentsTypes = [
|
|
361
|
+
null,
|
|
362
|
+
null,
|
|
363
|
+
`${options.typeArguments[1]}`
|
|
364
|
+
];
|
|
365
|
+
const parameterNames = [
|
|
366
|
+
"self",
|
|
367
|
+
"Permit",
|
|
368
|
+
"data"
|
|
369
|
+
];
|
|
370
|
+
return (tx) => tx.moveCall({
|
|
371
|
+
package: packageAddress,
|
|
372
|
+
module: "account",
|
|
373
|
+
function: "attach",
|
|
374
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
375
|
+
typeArguments: options.typeArguments
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
/** Whether `App` has data attached to this account. */
|
|
379
|
+
function hasData(options) {
|
|
380
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
381
|
+
const argumentsTypes = [null];
|
|
382
|
+
const parameterNames = ["self"];
|
|
383
|
+
return (tx) => tx.moveCall({
|
|
384
|
+
package: packageAddress,
|
|
385
|
+
module: "account",
|
|
386
|
+
function: "has_data",
|
|
387
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
388
|
+
typeArguments: options.typeArguments
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Borrow an app's attached `Data`. Open (no witness): the slot is namespaced by
|
|
393
|
+
* `App` and on-chain state is public, so composing apps can read it. Aborts if
|
|
394
|
+
* nothing is attached.
|
|
395
|
+
*/
|
|
396
|
+
function borrowData(options) {
|
|
397
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
398
|
+
const argumentsTypes = [null];
|
|
399
|
+
const parameterNames = ["self"];
|
|
400
|
+
return (tx) => tx.moveCall({
|
|
401
|
+
package: packageAddress,
|
|
402
|
+
module: "account",
|
|
403
|
+
function: "borrow_data",
|
|
404
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
405
|
+
typeArguments: options.typeArguments
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Mutably borrow an app's attached `Data`. Requires `Permit<App>`. Aborts if
|
|
410
|
+
* nothing is attached.
|
|
411
|
+
*/
|
|
412
|
+
function borrowDataMut(options) {
|
|
413
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
414
|
+
const argumentsTypes = [null, null];
|
|
415
|
+
const parameterNames = ["self", "Permit"];
|
|
416
|
+
return (tx) => tx.moveCall({
|
|
417
|
+
package: packageAddress,
|
|
418
|
+
module: "account",
|
|
419
|
+
function: "borrow_data_mut",
|
|
420
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
421
|
+
typeArguments: options.typeArguments
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Detach and return an app's `Data`. Requires `Permit<App>`. Aborts if nothing is
|
|
426
|
+
* attached.
|
|
427
|
+
*/
|
|
428
|
+
function detach(options) {
|
|
429
|
+
const packageAddress = options.package ?? options.config?.accountPackageId ?? "@local-pkg/account";
|
|
430
|
+
const argumentsTypes = [null, null];
|
|
431
|
+
const parameterNames = ["self", "Permit"];
|
|
432
|
+
return (tx) => tx.moveCall({
|
|
433
|
+
package: packageAddress,
|
|
434
|
+
module: "account",
|
|
435
|
+
function: "detach",
|
|
436
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
437
|
+
typeArguments: options.typeArguments
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
//#endregion
|
|
442
|
+
export { Account, AccountWrapper, account_exports, balance, depositFunds, generateAuth, loadAccount, share, withdrawFunds };
|
|
443
|
+
//# sourceMappingURL=account.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.mjs","names":["bag.Bag"],"sources":["../../../src/contracts/account/account.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\n\n/**\n * Owns shared account wrappers, typed coin custody, accumulator settlement, and\n * application-scoped data. Consuming `Auth` is the mutable-borrow boundary: owner\n * auth is checked against the account, while package-issued app auth yields the\n * same full `&mut Account` and is not bound to an owner or operation. The wrapper\n * address receives accumulator funds; a distinct derived account UID identifies\n * the account and anchors app data, while typed balances remain embedded in the\n * account. App data is namespaced by witness type, requires `Permit<App>` to\n * mutate, and remains publicly readable.\n */\n\nimport {\n\tMoveStruct,\n\tMoveTuple,\n\tnormalizeMoveArguments,\n\ttype RawTransactionArgument,\n} from '../utils/index.js';\nimport { bcs, type BcsType } from '@mysten/sui/bcs';\nimport { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';\nimport * as bag from './deps/sui/bag.js';\nconst $moduleName = '@local-pkg/account::account';\nexport const Account = new MoveStruct({\n\tname: `${$moduleName}::Account`,\n\tfields: {\n\t\t/** Dynamic-field parent for account-owned application data. */\n\t\taccount_id: bcs.Address,\n\t\t/** EOA address or object-ID-as-address that owns this account. */\n\t\towner: bcs.Address,\n\t\t/** Wrapper-object address used as the accumulator delivery and withdrawal anchor. */\n\t\treceive_address: bcs.Address,\n\t\t/** Type-indexed stored `Balance<T>` values. */\n\t\tbalances: bag.Bag,\n\t\t/** Type-indexed timestamps of the latest settlement attempt. */\n\t\tsettlements: bag.Bag,\n\t\t/** Canonical account ID supplied at referral-based creation, if any. */\n\t\treferrer_account_id: bcs.option(bcs.Address),\n\t\t/** Referrer's wrapper address for accumulator delivery, if any. */\n\t\treferrer_receive_address: bcs.option(bcs.Address),\n\t},\n});\nexport const AccountWrapper = new MoveStruct({\n\tname: `${$moduleName}::AccountWrapper`,\n\tfields: {\n\t\tid: bcs.Address,\n\t\taccount: Account,\n\t},\n});\nexport const DataKey = new MoveTuple({\n\tname: `${$moduleName}::DataKey<phantom App>`,\n\tfields: [bcs.bool()],\n});\nexport const CoinKey = new MoveTuple({\n\tname: `${$moduleName}::CoinKey<phantom T>`,\n\tfields: [bcs.bool()],\n});\nexport const Auth = new MoveStruct({\n\tname: `${$moduleName}::Auth`,\n\tfields: {\n\t\tkind: bcs.u8(),\n\t\towner: bcs.Address,\n\t},\n});\nexport interface IdArguments {\n\tself: RawTransactionArgument<string>;\n}\nexport interface IdOptions {\n\tpackage?: string;\n\targuments: IdArguments | [self: RawTransactionArgument<string>];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n}\n/** Returns the wrapper object ID. */\nexport function id(options: IdOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['self'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'id',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface LoadAccountArguments {\n\tself: RawTransactionArgument<string>;\n}\nexport interface LoadAccountOptions {\n\tpackage?: string;\n\targuments: LoadAccountArguments | [self: RawTransactionArgument<string>];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n}\n/** Borrows the wrapped account for read-only composition. */\nexport function loadAccount(options: LoadAccountOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['self'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'load_account',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface BalanceArguments {\n\tself: TransactionArgument;\n}\nexport interface BalanceOptions {\n\tpackage?: string;\n\targuments: BalanceArguments | [self: TransactionArgument];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n\ttypeArguments: [string];\n}\n/**\n * Returns the total balance of `T` available to the account, including funds\n * delivered through the ambient accumulator but not yet settled into the account.\n */\nexport function balance(options: BalanceOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\t'0x2::accumulator::AccumulatorRoot',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = ['self'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'balance',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\nexport interface OwnerArguments {\n\tself: TransactionArgument;\n}\nexport interface OwnerOptions {\n\tpackage?: string;\n\targuments: OwnerArguments | [self: TransactionArgument];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n}\n/**\n * Returns the account owner address. This may be an EOA address or an\n * object-ID-as-address.\n */\nexport function owner(options: OwnerOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['self'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'owner',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface AccountIdArguments {\n\tself: TransactionArgument;\n}\nexport interface AccountIdOptions {\n\tpackage?: string;\n\targuments: AccountIdArguments | [self: TransactionArgument];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n}\n/** Returns the canonical account ID. */\nexport function accountId(options: AccountIdOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['self'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'account_id',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface ReferrerAccountIdArguments {\n\tself: TransactionArgument;\n}\nexport interface ReferrerAccountIdOptions {\n\tpackage?: string;\n\targuments: ReferrerAccountIdArguments | [self: TransactionArgument];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n}\n/**\n * Returns the canonical referrer account ID recorded at creation for external Move\n * composition.\n */\nexport function referrerAccountId(options: ReferrerAccountIdOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['self'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'referrer_account_id',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface ReferrerReceiveAddressArguments {\n\tself: TransactionArgument;\n}\nexport interface ReferrerReceiveAddressOptions {\n\tpackage?: string;\n\targuments: ReferrerReceiveAddressArguments | [self: TransactionArgument];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n}\n/**\n * Returns the referrer's accumulator receive address for external Move\n * composition.\n */\nexport function referrerReceiveAddress(options: ReferrerReceiveAddressOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['self'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'referrer_receive_address',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface ReceiveAddressArguments {\n\tself: TransactionArgument;\n}\nexport interface ReceiveAddressOptions {\n\tpackage?: string;\n\targuments: ReceiveAddressArguments | [self: TransactionArgument];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n}\n/** Returns the accumulator receive address for this account (the wrapper address). */\nexport function receiveAddress(options: ReceiveAddressOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['self'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'receive_address',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface GenerateAuthOptions {\n\tpackage?: string;\n\targuments?: [];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n}\n/** Creates owner authority bound to the transaction sender. */\nexport function generateAuth(options: GenerateAuthOptions = {}) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'generate_auth',\n\t\t});\n}\nexport interface GenerateAuthAsObjectArguments {\n\tuid: RawTransactionArgument<string>;\n}\nexport interface GenerateAuthAsObjectOptions {\n\tpackage?: string;\n\targuments: GenerateAuthAsObjectArguments | [uid: RawTransactionArgument<string>];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n}\n/** Creates owner authority bound to an owning object's address. */\nexport function generateAuthAsObject(options: GenerateAuthAsObjectOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = ['0x2::object::ID'] satisfies (string | null)[];\n\tconst parameterNames = ['uid'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'generate_auth_as_object',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface ShareArguments {\n\tself: RawTransactionArgument<string>;\n}\nexport interface ShareOptions {\n\tpackage?: string;\n\targuments: ShareArguments | [self: RawTransactionArgument<string>];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n}\n/** Shares a newly created account wrapper. */\nexport function share(options: ShareOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['self'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'share',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface LoadAccountMutArguments {\n\tself: RawTransactionArgument<string>;\n\tauth: TransactionArgument;\n}\nexport interface LoadAccountMutOptions {\n\tpackage?: string;\n\targuments:\n\t\tLoadAccountMutArguments | [self: RawTransactionArgument<string>, auth: TransactionArgument];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n}\n/**\n * Consumes owner or app authority and returns the account's full mutable surface.\n * Owner authority must match the stored owner; app authority is package-issued\n * after registry authorization and carries no owner or operation restriction.\n */\nexport function loadAccountMut(options: LoadAccountMutOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [null, null] satisfies (string | null)[];\n\tconst parameterNames = ['self', 'auth'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'load_account_mut',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface SettleArguments {\n\twrapper: RawTransactionArgument<string>;\n}\nexport interface SettleOptions {\n\tpackage?: string;\n\targuments: SettleArguments | [wrapper: RawTransactionArgument<string>];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n\ttypeArguments: [string];\n}\n/**\n * Permissionlessly folds accumulator-delivered `T` at the wrapper address into\n * stored account balance. The per-coin timestamp is latched before reading the\n * accumulator, preventing duplicate withdrawal and same-timestamp double counting\n * even when no funds are available. Only the wrapper UID can authenticate the\n * address-balance withdrawal; value leaving the account still requires a mutable\n * borrow through `Auth`.\n */\nexport function settle(options: SettleOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\t'0x2::accumulator::AccumulatorRoot',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = ['wrapper'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'settle',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\nexport interface DepositArguments {\n\tself: TransactionArgument;\n\tcoin: RawTransactionArgument<string>;\n}\nexport interface DepositOptions {\n\tpackage?: string;\n\targuments: DepositArguments | [self: TransactionArgument, coin: RawTransactionArgument<string>];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n\ttypeArguments: [string];\n}\n/**\n * Deposits into stored balance only; callers that include accumulator funds must\n * settle through the wrapper first.\n */\nexport function deposit(options: DepositOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [null, null] satisfies (string | null)[];\n\tconst parameterNames = ['self', 'coin'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'deposit',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\nexport interface WithdrawArguments {\n\tself: TransactionArgument;\n\tamount: RawTransactionArgument<number | bigint>;\n}\nexport interface WithdrawOptions {\n\tpackage?: string;\n\targuments:\n\t\t| WithdrawArguments\n\t\t| [self: TransactionArgument, amount: RawTransactionArgument<number | bigint>];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n\ttypeArguments: [string];\n}\n/**\n * Withdraws from stored balance only; callers that include accumulator funds must\n * settle through the wrapper first.\n */\nexport function withdraw(options: WithdrawOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [null, 'u64'] satisfies (string | null)[];\n\tconst parameterNames = ['self', 'amount'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'withdraw',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\nexport interface DepositFundsArguments {\n\twrapper: RawTransactionArgument<string>;\n\tauth: TransactionArgument;\n\tcoin: RawTransactionArgument<string>;\n}\nexport interface DepositFundsOptions {\n\tpackage?: string;\n\targuments:\n\t\t| DepositFundsArguments\n\t\t| [\n\t\t\t\twrapper: RawTransactionArgument<string>,\n\t\t\t\tauth: TransactionArgument,\n\t\t\t\tcoin: RawTransactionArgument<string>,\n\t\t ];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n\ttypeArguments: [string];\n}\n/**\n * PTB entrypoint that settles accumulator funds, consumes authority, and deposits\n * into stored balance in one call.\n */\nexport function depositFunds(options: DepositFundsOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\t'0x2::accumulator::AccumulatorRoot',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = ['wrapper', 'auth', 'coin'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'deposit_funds',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\nexport interface WithdrawFundsArguments {\n\twrapper: RawTransactionArgument<string>;\n\tauth: TransactionArgument;\n\tamount: RawTransactionArgument<number | bigint>;\n}\nexport interface WithdrawFundsOptions {\n\tpackage?: string;\n\targuments:\n\t\t| WithdrawFundsArguments\n\t\t| [\n\t\t\t\twrapper: RawTransactionArgument<string>,\n\t\t\t\tauth: TransactionArgument,\n\t\t\t\tamount: RawTransactionArgument<number | bigint>,\n\t\t ];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n\ttypeArguments: [string];\n}\n/**\n * PTB entrypoint that settles accumulator funds, consumes authority, and withdraws\n * from stored balance in one call.\n */\nexport function withdrawFunds(options: WithdrawFundsOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\tnull,\n\t\t'u64',\n\t\t'0x2::accumulator::AccumulatorRoot',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = ['wrapper', 'auth', 'amount'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'withdraw_funds',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\nexport interface AttachArguments<Data extends BcsType<any>> {\n\tself: TransactionArgument;\n\tPermit: TransactionArgument;\n\tdata: RawTransactionArgument<Data>;\n}\nexport interface AttachOptions<Data extends BcsType<any>> {\n\tpackage?: string;\n\targuments:\n\t\t| AttachArguments<Data>\n\t\t| [self: TransactionArgument, Permit: TransactionArgument, data: RawTransactionArgument<Data>];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n\ttypeArguments: [string, string];\n}\n/**\n * Attach an app's `Data` under its witness namespace. Requires `Permit<App>`.\n * Aborts if `App` already has data attached.\n */\nexport function attach<Data extends BcsType<any>>(options: AttachOptions<Data>) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [null, null, `${options.typeArguments[1]}`] satisfies (string | null)[];\n\tconst parameterNames = ['self', 'Permit', 'data'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'attach',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\nexport interface HasDataArguments {\n\tself: TransactionArgument;\n}\nexport interface HasDataOptions {\n\tpackage?: string;\n\targuments: HasDataArguments | [self: TransactionArgument];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n\ttypeArguments: [string];\n}\n/** Whether `App` has data attached to this account. */\nexport function hasData(options: HasDataOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['self'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'has_data',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\nexport interface BorrowDataArguments {\n\tself: TransactionArgument;\n}\nexport interface BorrowDataOptions {\n\tpackage?: string;\n\targuments: BorrowDataArguments | [self: TransactionArgument];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n\ttypeArguments: [string, string];\n}\n/**\n * Borrow an app's attached `Data`. Open (no witness): the slot is namespaced by\n * `App` and on-chain state is public, so composing apps can read it. Aborts if\n * nothing is attached.\n */\nexport function borrowData(options: BorrowDataOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['self'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'borrow_data',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\nexport interface BorrowDataMutArguments {\n\tself: TransactionArgument;\n\tPermit: TransactionArgument;\n}\nexport interface BorrowDataMutOptions {\n\tpackage?: string;\n\targuments: BorrowDataMutArguments | [self: TransactionArgument, Permit: TransactionArgument];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n\ttypeArguments: [string, string];\n}\n/**\n * Mutably borrow an app's attached `Data`. Requires `Permit<App>`. Aborts if\n * nothing is attached.\n */\nexport function borrowDataMut(options: BorrowDataMutOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [null, null] satisfies (string | null)[];\n\tconst parameterNames = ['self', 'Permit'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'borrow_data_mut',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\nexport interface DetachArguments {\n\tself: TransactionArgument;\n\tPermit: TransactionArgument;\n}\nexport interface DetachOptions {\n\tpackage?: string;\n\targuments: DetachArguments | [self: TransactionArgument, Permit: TransactionArgument];\n\tconfig?: {\n\t\taccountPackageId?: string;\n\t};\n\ttypeArguments: [string, string];\n}\n/**\n * Detach and return an app's `Data`. Requires `Permit<App>`. Aborts if nothing is\n * attached.\n */\nexport function detach(options: DetachOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.accountPackageId ?? '@local-pkg/account';\n\tconst argumentsTypes = [null, null] satisfies (string | null)[];\n\tconst parameterNames = ['self', 'Permit'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'account',\n\t\t\tfunction: 'detach',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,MAAM,cAAc;AACpB,MAAa,UAAU,IAAI,WAAW;CACrC,MAAM,GAAG,YAAY;CACrB,QAAQ;EAEP,YAAY,IAAI;EAEhB,OAAO,IAAI;EAEX,iBAAiB,IAAI;EA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AAC,KAAK;CAC7B,MAAM,iBAAiB,CAAC,OAAO;AAC/B,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,eAAe,QAAQ;EACvB,CAAC;;;;;;AAkBJ,SAAgB,cAAc,SAA+B;CAC5D,MAAM,iBACL,QAAQ,WAAW,QAAQ,QAAQ,oBAAoB;CACxD,MAAM,iBAAiB,CAAC,MAAM,KAAK;CACnC,MAAM,iBAAiB,CAAC,QAAQ,SAAS;AACzC,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,eAAe,QAAQ;EACvB,CAAC;;;;;;AAkBJ,SAAgB,OAAO,SAAwB;CAC9C,MAAM,iBACL,QAAQ,WAAW,QAAQ,QAAQ,oBAAoB;CACxD,MAAM,iBAAiB,CAAC,MAAM,KAAK;CACnC,MAAM,iBAAiB,CAAC,QAAQ,SAAS;AACzC,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,eAAe,QAAQ;EACvB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { MoveStruct } from "../utils/index.mjs";
|
|
2
|
+
import * as _mysten_sui_bcs0 from "@mysten/sui/bcs";
|
|
3
|
+
|
|
4
|
+
//#region src/contracts/account/account_events.d.ts
|
|
5
|
+
declare namespace account_events_d_exports {
|
|
6
|
+
export { AccountCreated, AppAuthorized, AppDeauthorized, Deposited, FundsSettled, Withdrawn };
|
|
7
|
+
}
|
|
8
|
+
declare const AccountCreated: MoveStruct<{
|
|
9
|
+
account_id: _mysten_sui_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
10
|
+
wrapper_id: _mysten_sui_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
11
|
+
owner: _mysten_sui_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
12
|
+
self_owned: _mysten_sui_bcs0.BcsType<boolean, boolean, "bool">;
|
|
13
|
+
referrer_account_id: _mysten_sui_bcs0.BcsType<string | null, string | Uint8Array<ArrayBufferLike> | null | undefined, "Option<bytes[32]>">;
|
|
14
|
+
}, "@local-pkg/account::account_events::AccountCreated">;
|
|
15
|
+
declare const AppAuthorized: MoveStruct<{
|
|
16
|
+
/** Fully-qualified `App` witness type name. */app: _mysten_sui_bcs0.BcsType<string, string, "string">;
|
|
17
|
+
}, "@local-pkg/account::account_events::AppAuthorized">;
|
|
18
|
+
declare const AppDeauthorized: MoveStruct<{
|
|
19
|
+
app: _mysten_sui_bcs0.BcsType<string, string, "string">;
|
|
20
|
+
}, "@local-pkg/account::account_events::AppDeauthorized">;
|
|
21
|
+
declare const Deposited: MoveStruct<{
|
|
22
|
+
account_id: _mysten_sui_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
23
|
+
coin_type: _mysten_sui_bcs0.BcsType<string, string, "string">;
|
|
24
|
+
amount: _mysten_sui_bcs0.BcsType<bigint, string | number | bigint, "u64">;
|
|
25
|
+
new_balance: _mysten_sui_bcs0.BcsType<bigint, string | number | bigint, "u64">;
|
|
26
|
+
}, "@local-pkg/account::account_events::Deposited">;
|
|
27
|
+
declare const Withdrawn: MoveStruct<{
|
|
28
|
+
account_id: _mysten_sui_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
29
|
+
coin_type: _mysten_sui_bcs0.BcsType<string, string, "string">;
|
|
30
|
+
amount: _mysten_sui_bcs0.BcsType<bigint, string | number | bigint, "u64">;
|
|
31
|
+
new_balance: _mysten_sui_bcs0.BcsType<bigint, string | number | bigint, "u64">;
|
|
32
|
+
}, "@local-pkg/account::account_events::Withdrawn">;
|
|
33
|
+
declare const FundsSettled: MoveStruct<{
|
|
34
|
+
account_id: _mysten_sui_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
35
|
+
coin_type: _mysten_sui_bcs0.BcsType<string, string, "string">;
|
|
36
|
+
amount: _mysten_sui_bcs0.BcsType<bigint, string | number | bigint, "u64">;
|
|
37
|
+
new_balance: _mysten_sui_bcs0.BcsType<bigint, string | number | bigint, "u64">;
|
|
38
|
+
}, "@local-pkg/account::account_events::FundsSettled">;
|
|
39
|
+
//#endregion
|
|
40
|
+
export { account_events_d_exports };
|
|
41
|
+
//# sourceMappingURL=account_events.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account_events.d.mts","names":[],"sources":["../../../src/contracts/account/account_events.ts"],"mappings":";;;;;;;cAca,cAAA,EAAc,UAAA;;;;;;;cAUd,aAAA,EAAa,UAAA;sDAMxB,gBAAA,CAAA,OAAA;AAAA;AAAA,cACW,eAAA,EAAe,UAAA;OAK1B,gBAAA,CAAA,OAAA;AAAA;AAAA,cACW,SAAA,EAAS,UAAA;;;;;;cAST,SAAA,EAAS,UAAA;;;;;;cAST,YAAA,EAAY,UAAA"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { MoveStruct } from "../utils/index.mjs";
|
|
3
|
+
import { U64 } from "../../bcs/integers.mjs";
|
|
4
|
+
import { bcs } from "@mysten/sui/bcs";
|
|
5
|
+
|
|
6
|
+
//#region src/contracts/account/account_events.ts
|
|
7
|
+
/**************************************************************
|
|
8
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
9
|
+
**************************************************************/
|
|
10
|
+
/**
|
|
11
|
+
* Defines canonical-account lifecycle, app-authorization, and per-coin custody
|
|
12
|
+
* events. `account_registry` emits creation and authorization transitions;
|
|
13
|
+
* `account` emits balance transitions.
|
|
14
|
+
*/
|
|
15
|
+
var account_events_exports = /* @__PURE__ */ __exportAll({
|
|
16
|
+
AccountCreated: () => AccountCreated,
|
|
17
|
+
AppAuthorized: () => AppAuthorized,
|
|
18
|
+
AppDeauthorized: () => AppDeauthorized,
|
|
19
|
+
Deposited: () => Deposited,
|
|
20
|
+
FundsSettled: () => FundsSettled,
|
|
21
|
+
Withdrawn: () => Withdrawn
|
|
22
|
+
});
|
|
23
|
+
const $moduleName = "@local-pkg/account::account_events";
|
|
24
|
+
const AccountCreated = new MoveStruct({
|
|
25
|
+
name: `${$moduleName}::AccountCreated`,
|
|
26
|
+
fields: {
|
|
27
|
+
account_id: bcs.Address,
|
|
28
|
+
wrapper_id: bcs.Address,
|
|
29
|
+
owner: bcs.Address,
|
|
30
|
+
self_owned: bcs.bool(),
|
|
31
|
+
referrer_account_id: bcs.option(bcs.Address)
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const AppAuthorized = new MoveStruct({
|
|
35
|
+
name: `${$moduleName}::AppAuthorized`,
|
|
36
|
+
fields: { app: bcs.string() }
|
|
37
|
+
});
|
|
38
|
+
const AppDeauthorized = new MoveStruct({
|
|
39
|
+
name: `${$moduleName}::AppDeauthorized`,
|
|
40
|
+
fields: { app: bcs.string() }
|
|
41
|
+
});
|
|
42
|
+
const Deposited = new MoveStruct({
|
|
43
|
+
name: `${$moduleName}::Deposited`,
|
|
44
|
+
fields: {
|
|
45
|
+
account_id: bcs.Address,
|
|
46
|
+
coin_type: bcs.string(),
|
|
47
|
+
amount: U64,
|
|
48
|
+
new_balance: U64
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
const Withdrawn = new MoveStruct({
|
|
52
|
+
name: `${$moduleName}::Withdrawn`,
|
|
53
|
+
fields: {
|
|
54
|
+
account_id: bcs.Address,
|
|
55
|
+
coin_type: bcs.string(),
|
|
56
|
+
amount: U64,
|
|
57
|
+
new_balance: U64
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
const FundsSettled = new MoveStruct({
|
|
61
|
+
name: `${$moduleName}::FundsSettled`,
|
|
62
|
+
fields: {
|
|
63
|
+
account_id: bcs.Address,
|
|
64
|
+
coin_type: bcs.string(),
|
|
65
|
+
amount: U64,
|
|
66
|
+
new_balance: U64
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
//#endregion
|
|
71
|
+
export { AccountCreated, Deposited, Withdrawn, account_events_exports };
|
|
72
|
+
//# sourceMappingURL=account_events.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account_events.mjs","names":[],"sources":["../../../src/contracts/account/account_events.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\n\n/**\n * Defines canonical-account lifecycle, app-authorization, and per-coin custody\n * events. `account_registry` emits creation and authorization transitions;\n * `account` emits balance transitions.\n */\n\nimport { MoveStruct } from '../utils/index.js';\nimport { bcs } from '@mysten/sui/bcs';\nimport { U64 } from '../../bcs/integers.js';\nconst $moduleName = '@local-pkg/account::account_events';\nexport const AccountCreated = new MoveStruct({\n\tname: `${$moduleName}::AccountCreated`,\n\tfields: {\n\t\taccount_id: bcs.Address,\n\t\twrapper_id: bcs.Address,\n\t\towner: bcs.Address,\n\t\tself_owned: bcs.bool(),\n\t\treferrer_account_id: bcs.option(bcs.Address),\n\t},\n});\nexport const AppAuthorized = new MoveStruct({\n\tname: `${$moduleName}::AppAuthorized`,\n\tfields: {\n\t\t/** Fully-qualified `App` witness type name. */\n\t\tapp: bcs.string(),\n\t},\n});\nexport const AppDeauthorized = new MoveStruct({\n\tname: `${$moduleName}::AppDeauthorized`,\n\tfields: {\n\t\tapp: bcs.string(),\n\t},\n});\nexport const Deposited = new MoveStruct({\n\tname: `${$moduleName}::Deposited`,\n\tfields: {\n\t\taccount_id: bcs.Address,\n\t\tcoin_type: bcs.string(),\n\t\tamount: U64,\n\t\tnew_balance: U64,\n\t},\n});\nexport const Withdrawn = new MoveStruct({\n\tname: `${$moduleName}::Withdrawn`,\n\tfields: {\n\t\taccount_id: bcs.Address,\n\t\tcoin_type: bcs.string(),\n\t\tamount: U64,\n\t\tnew_balance: U64,\n\t},\n});\nexport const FundsSettled = new MoveStruct({\n\tname: `${$moduleName}::FundsSettled`,\n\tfields: {\n\t\taccount_id: bcs.Address,\n\t\tcoin_type: bcs.string(),\n\t\tamount: U64,\n\t\tnew_balance: U64,\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAaA,MAAM,cAAc;AACpB,MAAa,iBAAiB,IAAI,WAAW;CAC5C,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,YAAY,IAAI;EAChB,YAAY,IAAI;EAChB,OAAO,IAAI;EACX,YAAY,IAAI,MAAM;EACtB,qBAAqB,IAAI,OAAO,IAAI,QAAQ;EAC5C;CACD,CAAC;AACF,MAAa,gBAAgB,IAAI,WAAW;CAC3C,MAAM,GAAG,YAAY;CACrB,QAAQ,EAEP,KAAK,IAAI,QAAQ,EACjB;CACD,CAAC;AACF,MAAa,kBAAkB,IAAI,WAAW;CAC7C,MAAM,GAAG,YAAY;CACrB,QAAQ,EACP,KAAK,IAAI,QAAQ,EACjB;CACD,CAAC;AACF,MAAa,YAAY,IAAI,WAAW;CACvC,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,YAAY,IAAI;EAChB,WAAW,IAAI,QAAQ;EACvB,QAAQ;EACR,aAAa;EACb;CACD,CAAC;AACF,MAAa,YAAY,IAAI,WAAW;CACvC,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,YAAY,IAAI;EAChB,WAAW,IAAI,QAAQ;EACvB,QAAQ;EACR,aAAa;EACb;CACD,CAAC;AACF,MAAa,eAAe,IAAI,WAAW;CAC1C,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,YAAY,IAAI;EAChB,WAAW,IAAI,QAAQ;EACvB,QAAQ;EACR,aAAa;EACb;CACD,CAAC"}
|