@mysten/deepbook-v3 2.7.0 → 2.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/PREDICT.md +15 -10
  3. package/dist/contracts/account/account.d.mts +23 -23
  4. package/dist/contracts/account/account_events.d.mts +20 -20
  5. package/dist/contracts/account/account_registry.d.mts +19 -19
  6. package/dist/contracts/deepbook/account.d.mts +18 -18
  7. package/dist/contracts/deepbook/balances.d.mts +4 -4
  8. package/dist/contracts/deepbook/deep_price.d.mts +3 -3
  9. package/dist/contracts/deepbook/order.d.mts +12 -12
  10. package/dist/contracts/deepbook_predict/admin.d.mts +4 -4
  11. package/dist/contracts/deepbook_predict/admin.d.mts.map +1 -1
  12. package/dist/contracts/deepbook_predict/builder_code.d.mts +11 -11
  13. package/dist/contracts/deepbook_predict/builder_code.d.mts.map +1 -1
  14. package/dist/contracts/deepbook_predict/builder_code_events.d.mts +10 -10
  15. package/dist/contracts/deepbook_predict/config_events.d.mts +80 -80
  16. package/dist/contracts/deepbook_predict/market_lifecycle_cap.d.mts +5 -5
  17. package/dist/contracts/deepbook_predict/market_manager.d.mts +27 -27
  18. package/dist/contracts/deepbook_predict/market_manager.d.mts.map +1 -1
  19. package/dist/contracts/deepbook_predict/order_events.d.mts +50 -50
  20. package/dist/contracts/deepbook_predict/pause_cap.d.mts +5 -5
  21. package/dist/contracts/deepbook_predict/plp.d.mts +74 -74
  22. package/dist/contracts/deepbook_predict/pool_valuation_cap.d.mts +5 -5
  23. package/dist/contracts/deepbook_predict/predict_account.d.mts +14 -14
  24. package/dist/contracts/deepbook_predict/predict_account.d.mts.map +1 -1
  25. package/dist/contracts/deepbook_predict/pricing.d.mts +67 -67
  26. package/dist/contracts/deepbook_predict/pricing.d.mts.map +1 -1
  27. package/dist/contracts/deepbook_predict/range_codec.d.mts +2 -2
  28. package/dist/contracts/deepbook_predict/registry.d.mts +28 -28
  29. package/dist/contracts/deepbook_predict/vault_events.d.mts +131 -131
  30. package/dist/contracts/deepbook_predict_math/lazer_price.d.mts +13 -13
  31. package/dist/contracts/deepbook_predict_math/math.d.mts +14 -14
  32. package/dist/contracts/deepbook_predict_orders/delayed_execution_config.d.mts +30 -30
  33. package/dist/contracts/deepbook_predict_orders/desk.d.mts +28 -28
  34. package/dist/contracts/deepbook_predict_orders/desk.d.mts.map +1 -1
  35. package/dist/contracts/deepbook_predict_orders/order_queue.d.mts +187 -187
  36. package/dist/contracts/deepbook_predict_orders/queue.d.mts +49 -49
  37. package/dist/contracts/deepbook_predict_orders/queue.d.mts.map +1 -1
  38. package/dist/contracts/deepbook_predict_orders/queue_events.d.mts +140 -140
  39. package/dist/contracts/deepbook_sessions/session_config.d.mts +8 -8
  40. package/dist/contracts/deepbook_sessions/session_config.d.mts.map +1 -1
  41. package/dist/contracts/deepbook_sessions/sessions.d.mts +27 -27
  42. package/dist/contracts/deepbook_sessions/sessions.d.mts.map +1 -1
  43. package/dist/deployments/mainnet.mjs +7 -4
  44. package/dist/deployments/mainnet.mjs.map +1 -1
  45. package/dist/deployments/testnet.mjs +5 -4
  46. package/dist/deployments/testnet.mjs.map +1 -1
  47. package/dist/predict/bindings/expiry-market.d.mts +5 -5
  48. package/dist/predict/bindings/expiry-market.d.mts.map +1 -1
  49. package/dist/predict/bindings/protocol-config.d.mts +3 -3
  50. package/dist/predict/config/mainnet.mjs +11 -3
  51. package/dist/predict/config/mainnet.mjs.map +1 -1
  52. package/dist/predict/reads/pricing.d.mts +0 -1
  53. package/dist/predict/reads/pricing.d.mts.map +1 -1
  54. package/dist/predict/reads/queue.d.mts +0 -1
  55. package/dist/predict/reads/queue.d.mts.map +1 -1
  56. package/dist/sessions.mjs.map +1 -1
  57. package/dist/transactions/balanceManager.d.mts +12 -12
  58. package/dist/transactions/deepbook.d.mts +20 -20
  59. package/dist/transactions/deepbookAdmin.d.mts +4 -4
  60. package/dist/transactions/marginAdmin.d.mts +7 -7
  61. package/dist/transactions/marginMaintainer.d.mts +5 -5
  62. package/dist/transactions/marginManager.d.mts +32 -32
  63. package/dist/transactions/marginPool.d.mts +18 -18
  64. package/dist/transactions/marginTPSL.d.mts +10 -10
  65. package/dist/transactions/poolProxy.d.mts +8 -8
  66. package/package.json +5 -5
  67. package/src/deployments/mainnet.ts +7 -2
  68. package/src/deployments/testnet.ts +5 -4
  69. package/src/predict/config/mainnet.ts +16 -7
  70. package/src/sessions.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"sessions.d.mts","names":[],"sources":["../../../src/contracts/deepbook_sessions/sessions.ts"],"mappings":";;;;;;;;;cAqBa,WAAA,EAAW,UAAA;eAKtB,kBAAA,CAAA,OAAA;AAAA;AAAA,cACW,YAAA,EAAY,UAAA;;;;;;;;;;;;;cAMZ,iBAAA,EAAiB,UAAA;;;;;cAQjB,cAAA,EAAc,UAAA;;;;;UAQV,4BAAA;EAChB,OAAA,EAAS,sBAAA;EACT,OAAA,EAAS,sBAAA;AAAA;AAAA,UAEO,0BAAA;EAChB,OAAA;EACA,SAAA,EACG,4BAAA,IACC,OAAA,EAAS,sBAAA,UAAgC,OAAA,EAAS,sBAAA;EACtD,MAAA;IACC,iBAAA;EAAA;AAAA;;iBAIc,mBAAA,CAAoB,OAAA,EAAS,0BAAA,IAKpC,EAAA,EAAI,WAAA,KAAW,2BAAA,CAAA,iBAAA;AAAA,UAQP,yBAAA;EAChB,OAAA,EAAS,sBAAA;EACT,cAAA,GAAiB,sBAAA;EACjB,OAAA,EAAS,sBAAA;EACT,UAAA,EAAY,sBAAA;AAAA;AAAA,UAEI,uBAAA;EAChB,OAAA;EACA,SAAA,EAAW,yBAAA;EACX,MAAA;IACC,cAAA,EAAgB,WAAA;IAChB,iBAAA;EAAA;AAAA;;AAlEF;;;iBAyEgB,gBAAA,CAAiB,OAAA,EAAS,uBAAA,IAOjC,EAAA,EAAI,WAAA,KAAW,2BAAA,CAAA,iBAAA;AAAA,UAeP,sBAAA;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;EACV,KAAA,EAAO,sBAAA;EACP,SAAA,EAAW,sBAAA;EACX,UAAA,EAAY,sBAAA;EACZ,OAAA,EAAS,sBAAA;EACT,WAAA,EAAa,sBAAA;AAAA;AAAA,UAEG,uBAAA;EAChB,OAAA;EACA,SAAA,EAAW,yBAAA;EACX,MAAA;IACC,cAAA,EAAgB,WAAA;IAChB,iBAAA;EAAA;AAAA;;;;AA/rBF;iBAssBgB,gBAAA,CAAiB,OAAA,EAAS,uBAAA,IAuCjC,EAAA,EAAI,WAAA,KAAW,yBAAA,CAAA,iBAAA;AAAA,UAeP,0BAAA;EAChB,KAAA,EAAO,sBAAA;EACP,MAAA,EAAQ,sBAAA;EACR,eAAA,EAAiB,sBAAA;EACjB,OAAA,EAAS,sBAAA;EACT,cAAA,GAAiB,sBAAA;EACjB,IAAA,EAAM,sBAAA;EACN,MAAA,EAAQ,sBAAA;EACR,gBAAA,EAAkB,sBAAA;EAClB,IAAA,EAAM,sBAAA;EACN,QAAA,EAAU,sBAAA;EACV,KAAA,EAAO,sBAAA;EACP,QAAA,EAAU,sBAAA;EACV,aAAA,EAAe,sBAAA;EACf,cAAA,EAAgB,sBAAA;EAChB,WAAA,EAAa,sBAAA;AAAA;AAAA,UAEG,wBAAA;EAChB,OAAA;EACA,SAAA,EAAW,0BAAA;EACX,MAAA;IACC,cAAA,EAAgB,WAAA;IAChB,iBAAA;EAAA;AAAA;;;AAztBF;;iBAguBgB,iBAAA,CAAkB,OAAA,EAAS,wBAAA,IAuClC,EAAA,EAAI,WAAA,KAAW,yBAAA,CAAA,iBAAA"}
@@ -19,7 +19,7 @@ const MAINNET_ACCOUNT = Object.freeze({
19
19
  * the package root for one id.
20
20
  */
21
21
  const MAINNET_SESSIONS = Object.freeze({
22
- sessionsPackageId: "0xec678aee98cd161bdce62ff3dcf4893574df29d927dc8b573f6b4563ec960a1a",
22
+ sessionsPackageId: "0xfd9ef53ca443517d6a3a4d8742e00eaa1e7f35b0997697caab8c3e62870c0ce5",
23
23
  sessionsPackageIdV1: "0x9a068beffa019ae756f4a6d2611e9899d3c6dd888812dd9eca87535d2ac55e2a",
24
24
  sessionsConfig: "0xb2fba483748aac7508676020d4e691d68239b66f8bf7c5e7634dd1a76a329317",
25
25
  accountPackageId: "0x4e1dd01465713c9d832313fed5f45c222a4d5c62a533d6da96764c8b2a245d58",
@@ -43,10 +43,12 @@ const MAINNET_UNITS = Object.freeze({
43
43
  const MAINNET_PREDICT = Object.freeze({
44
44
  network: "mainnet",
45
45
  packages: Object.freeze({
46
- predict: "0x08fa3ef1b047d87b0b4ce1c7e5f8b42d8bfdea9a70547efe3cce5d8d6e47ee53",
46
+ predict: "0x98235c5842831c9b5f51dc637cf34c91db2aca5510802eb6ebfec63f5b71a7bb",
47
47
  predictV1: "0x89aea622e7bb3bdd598bde87dde40ee31c9eed4971b9546e23ec83de3c48bbba",
48
48
  account: "0x4e1dd01465713c9d832313fed5f45c222a4d5c62a533d6da96764c8b2a245d58",
49
- propbook: "0xa6c8f32015b5b41d34ee09995a2e9d7a21cdecf0e1910a50b264fd252cd33831"
49
+ propbook: "0xa6c8f32015b5b41d34ee09995a2e9d7a21cdecf0e1910a50b264fd252cd33831",
50
+ predictOrders: "0x7cd41de311f8f3efb2c239b38773a4010fce3bef0120cd55f479843077c98903",
51
+ predictMath: "0x19262d18a3ce9f1c304defbacc89f36585152acde73e626231200d10617fb9a7"
50
52
  }),
51
53
  objects: Object.freeze({
52
54
  registry: "0x94327dbc256a2cfabd164c2bf4b3fe033bfaa4771f7a6f716954e07cb1b4beba",
@@ -67,7 +69,8 @@ const MAINNET_PREDICT = Object.freeze({
67
69
  pythFeed: "0x4c5d2b4c8238f04b7687c3a8df915b69c50d5f4d291fc49aea44bdb6b52e1a20",
68
70
  blockScholesValueStore: "0xe83f843b15ae63045b2cea445fb8ea7ad85c5fc2a05f66db122a511e1f2c67bc",
69
71
  blockScholesSviStore: "0xfdd447be39d847747caf18ecf3355031bb33979c472581f1a5481375d3748bfb"
70
- }) })
72
+ }) }),
73
+ oracle: Object.freeze({ pythLazerState: "0xd0db9c1e9212a98120384bf78d8b8c985d87b9ee6921dffcf9d1394062911573" })
71
74
  });
72
75
 
73
76
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"mainnet.mjs","names":[],"sources":["../../src/deployments/mainnet.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n// GENERATED by `pnpm sync-deployment` from the deploy tooling's own manifest\n// (`packages/predict/deployment/deployment.mainnet.json`) and the Predict/Sessions\n// `Published.toml` records for current call targets and original type IDs. Do not hand-edit:\n// the next regeneration overwrites it, and a hand-patched id is exactly the drift this\n// file exists to prevent. To move to a new deployment, check the sibling deepbookv3\n// checkout out to the new anchor and re-run the script.\n//\n// Deployment: deepbook-predict-mainnet\n// sourceCommit: 7b169bde2c2a25fee3ac9aa4686e346309bfe570\n//\n// Runtime-dependency-free — every subpath reads a slice of this, so a value import here\n// would pull that module into all of their graphs. The type import below is erased.\n//\n// Frozen: these are shared module singletons, so an accessor handing one to a caller who\n// mutates it would change what every other caller sees.\n\nimport type {\n\tAccountIds,\n\tDeploymentInfo,\n\tDeploymentUnits,\n\tPredictIds,\n\tSessionsIds,\n} from './types.js';\n\n/** Which on-chain deployment the ids below came from. */\nexport const MAINNET_DEPLOYMENT: DeploymentInfo = Object.freeze({\n\tdeployment: 'deepbook-predict-mainnet',\n\tnetwork: 'mainnet',\n\tchainId: '35834a8a',\n\tsourceCommit: '7b169bde2c2a25fee3ac9aa4686e346309bfe570',\n});\n\n/** Ids for the shared `account` primitive — the `/account` subpath's slice. */\nexport const MAINNET_ACCOUNT: AccountIds = Object.freeze({\n\taccountPackageId: '0x4e1dd01465713c9d832313fed5f45c222a4d5c62a533d6da96764c8b2a245d58',\n\taccountRegistry: '0x8c52c6f5b2374e33f4a726d9c32337b1aee3a71410d41c18faa91d938d66e4bc',\n});\n\n/**\n * Ids for time-limited sessions — the `/sessions` subpath's slice.\n *\n * `deepbookRegistry` is only needed by the DeepBook **spot** session wrappers; the Predict\n * wrappers never take it. It is carried here so a spot caller does not have to reach into\n * the package root for one id.\n */\nexport const MAINNET_SESSIONS: SessionsIds = Object.freeze({\n\tsessionsPackageId: '0xec678aee98cd161bdce62ff3dcf4893574df29d927dc8b573f6b4563ec960a1a',\n\tsessionsPackageIdV1: '0x9a068beffa019ae756f4a6d2611e9899d3c6dd888812dd9eca87535d2ac55e2a',\n\tsessionsConfig: '0xb2fba483748aac7508676020d4e691d68239b66f8bf7c5e7634dd1a76a329317',\n\taccountPackageId: '0x4e1dd01465713c9d832313fed5f45c222a4d5c62a533d6da96764c8b2a245d58',\n\taccountRegistry: '0x8c52c6f5b2374e33f4a726d9c32337b1aee3a71410d41c18faa91d938d66e4bc',\n\tdeepbookRegistry: '0xaf16199a2dff736e9f07a845f23c5da6df6f756eddb631aed9d24a93efc4549d',\n\tdeepbookCoreAccountPackageId:\n\t\t'0xd71b5a341dc8dc7e187517849edf61e54670b60fe496e07186c09a65fa7afdb7',\n\t/** Required by every Predict session wrapper — they all take `config: &ProtocolConfig`. */\n\tprotocolConfig: '0x5fa6efbe7691809565a660adde23f0c184ca1d19cefafa4e1c88d655fe279580',\n});\n\n/**\n * Scale constants the deployment owns rather than the SDK. Deployment-wide:\n * `quoteCoinDecimals` and `fixedPointScale` apply to any subpath formatting a custody\n * balance, not just Predict.\n */\nexport const MAINNET_UNITS: DeploymentUnits = Object.freeze({\n\tpositionLotSize: 10000,\n\tfixedPointScale: 1000000000,\n\tquoteCoinDecimals: 6,\n\tpositionQuantityDecimals: 6,\n});\n\n/** Ids for DeepBook Predict — the `/predict` subpath's slice. */\nexport const MAINNET_PREDICT: PredictIds = Object.freeze({\n\tnetwork: 'mainnet',\n\tpackages: Object.freeze({\n\t\tpredict: '0x08fa3ef1b047d87b0b4ce1c7e5f8b42d8bfdea9a70547efe3cce5d8d6e47ee53',\n\t\tpredictV1: '0x89aea622e7bb3bdd598bde87dde40ee31c9eed4971b9546e23ec83de3c48bbba',\n\t\taccount: '0x4e1dd01465713c9d832313fed5f45c222a4d5c62a533d6da96764c8b2a245d58',\n\t\tpropbook: '0xa6c8f32015b5b41d34ee09995a2e9d7a21cdecf0e1910a50b264fd252cd33831',\n\t}),\n\tobjects: Object.freeze({\n\t\tregistry: '0x94327dbc256a2cfabd164c2bf4b3fe033bfaa4771f7a6f716954e07cb1b4beba',\n\t\tprotocolConfig: '0x5fa6efbe7691809565a660adde23f0c184ca1d19cefafa4e1c88d655fe279580',\n\t\tpoolVault: '0x4d227a1baf8cfcaf6e652a9182d0e63f85f9ce82cd542fdf3356bb3581be3b99',\n\t\toracleRegistry: '0x5d62c0d9be43efa769a708ade53fbe5bea98c15c865b64ca7c498c87b045a698',\n\t\taccountRegistry: '0x8c52c6f5b2374e33f4a726d9c32337b1aee3a71410d41c18faa91d938d66e4bc',\n\t}),\n\tquoteCoinType: '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC',\n\t/**\n\t * `plp` is the LP share coin type. It is NOT derivable from `packages.predict`: a Move\n\t * type tag keeps the ORIGINAL package id across an upgrade, while `packages.predict`\n\t * moves to the latest. They agree only while predict is at v1.\n\t */\n\tcoinTypes: Object.freeze({\n\t\tplp: '0x89aea622e7bb3bdd598bde87dde40ee31c9eed4971b9546e23ec83de3c48bbba::plp::PLP',\n\t\tdeep: '0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP',\n\t}),\n\tunits: MAINNET_UNITS,\n\tunderlyings: Object.freeze({\n\t\tBTC: Object.freeze({\n\t\t\tsymbol: 'BTC',\n\t\t\tpropbookUnderlyingId: 1,\n\t\t\tpythFeed: '0x4c5d2b4c8238f04b7687c3a8df915b69c50d5f4d291fc49aea44bdb6b52e1a20',\n\t\t\tblockScholesValueStore: '0xe83f843b15ae63045b2cea445fb8ea7ad85c5fc2a05f66db122a511e1f2c67bc',\n\t\t\tblockScholesSviStore: '0xfdd447be39d847747caf18ecf3355031bb33979c472581f1a5481375d3748bfb',\n\t\t}),\n\t}),\n});\n"],"mappings":";;AA4BA,MAAa,qBAAqC,OAAO,OAAO;CAC/D,YAAY;CACZ,SAAS;CACT,SAAS;CACT,cAAc;CACd,CAAC;;AAGF,MAAa,kBAA8B,OAAO,OAAO;CACxD,kBAAkB;CAClB,iBAAiB;CACjB,CAAC;;;;;;;;AASF,MAAa,mBAAgC,OAAO,OAAO;CAC1D,mBAAmB;CACnB,qBAAqB;CACrB,gBAAgB;CAChB,kBAAkB;CAClB,iBAAiB;CACjB,kBAAkB;CAClB,8BACC;CAED,gBAAgB;CAChB,CAAC;;;;;;AAOF,MAAa,gBAAiC,OAAO,OAAO;CAC3D,iBAAiB;CACjB,iBAAiB;CACjB,mBAAmB;CACnB,0BAA0B;CAC1B,CAAC;;AAGF,MAAa,kBAA8B,OAAO,OAAO;CACxD,SAAS;CACT,UAAU,OAAO,OAAO;EACvB,SAAS;EACT,WAAW;EACX,SAAS;EACT,UAAU;EACV,CAAC;CACF,SAAS,OAAO,OAAO;EACtB,UAAU;EACV,gBAAgB;EAChB,WAAW;EACX,gBAAgB;EAChB,iBAAiB;EACjB,CAAC;CACF,eAAe;CAMf,WAAW,OAAO,OAAO;EACxB,KAAK;EACL,MAAM;EACN,CAAC;CACF,OAAO;CACP,aAAa,OAAO,OAAO,EAC1B,KAAK,OAAO,OAAO;EAClB,QAAQ;EACR,sBAAsB;EACtB,UAAU;EACV,wBAAwB;EACxB,sBAAsB;EACtB,CAAC,EACF,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"mainnet.mjs","names":[],"sources":["../../src/deployments/mainnet.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n// GENERATED by `pnpm sync-deployment` from the deploy tooling's own manifest\n// (`packages/predict/deployment/deployment.mainnet.json`) and the Predict/Sessions\n// `Published.toml` records for current call targets and original type IDs. Do not hand-edit:\n// the next regeneration overwrites it, and a hand-patched id is exactly the drift this\n// file exists to prevent. To move to a new deployment, check the sibling deepbookv3\n// checkout out to the new anchor and re-run the script.\n//\n// Deployment: deepbook-predict-mainnet\n// sourceCommit: 7b169bde2c2a25fee3ac9aa4686e346309bfe570\n//\n// Runtime-dependency-free — every subpath reads a slice of this, so a value import here\n// would pull that module into all of their graphs. The type import below is erased.\n//\n// Frozen: these are shared module singletons, so an accessor handing one to a caller who\n// mutates it would change what every other caller sees.\n\nimport type {\n\tAccountIds,\n\tDeploymentInfo,\n\tDeploymentUnits,\n\tPredictIds,\n\tSessionsIds,\n} from './types.js';\n\n/** Which on-chain deployment the ids below came from. */\nexport const MAINNET_DEPLOYMENT: DeploymentInfo = Object.freeze({\n\tdeployment: 'deepbook-predict-mainnet',\n\tnetwork: 'mainnet',\n\tchainId: '35834a8a',\n\tsourceCommit: '7b169bde2c2a25fee3ac9aa4686e346309bfe570',\n});\n\n/** Ids for the shared `account` primitive — the `/account` subpath's slice. */\nexport const MAINNET_ACCOUNT: AccountIds = Object.freeze({\n\taccountPackageId: '0x4e1dd01465713c9d832313fed5f45c222a4d5c62a533d6da96764c8b2a245d58',\n\taccountRegistry: '0x8c52c6f5b2374e33f4a726d9c32337b1aee3a71410d41c18faa91d938d66e4bc',\n});\n\n/**\n * Ids for time-limited sessions — the `/sessions` subpath's slice.\n *\n * `deepbookRegistry` is only needed by the DeepBook **spot** session wrappers; the Predict\n * wrappers never take it. It is carried here so a spot caller does not have to reach into\n * the package root for one id.\n */\nexport const MAINNET_SESSIONS: SessionsIds = Object.freeze({\n\tsessionsPackageId: '0xfd9ef53ca443517d6a3a4d8742e00eaa1e7f35b0997697caab8c3e62870c0ce5',\n\tsessionsPackageIdV1: '0x9a068beffa019ae756f4a6d2611e9899d3c6dd888812dd9eca87535d2ac55e2a',\n\tsessionsConfig: '0xb2fba483748aac7508676020d4e691d68239b66f8bf7c5e7634dd1a76a329317',\n\taccountPackageId: '0x4e1dd01465713c9d832313fed5f45c222a4d5c62a533d6da96764c8b2a245d58',\n\taccountRegistry: '0x8c52c6f5b2374e33f4a726d9c32337b1aee3a71410d41c18faa91d938d66e4bc',\n\tdeepbookRegistry: '0xaf16199a2dff736e9f07a845f23c5da6df6f756eddb631aed9d24a93efc4549d',\n\tdeepbookCoreAccountPackageId:\n\t\t'0xd71b5a341dc8dc7e187517849edf61e54670b60fe496e07186c09a65fa7afdb7',\n\t/** Required by every Predict session wrapper — they all take `config: &ProtocolConfig`. */\n\tprotocolConfig: '0x5fa6efbe7691809565a660adde23f0c184ca1d19cefafa4e1c88d655fe279580',\n});\n\n/**\n * Scale constants the deployment owns rather than the SDK. Deployment-wide:\n * `quoteCoinDecimals` and `fixedPointScale` apply to any subpath formatting a custody\n * balance, not just Predict.\n */\nexport const MAINNET_UNITS: DeploymentUnits = Object.freeze({\n\tpositionLotSize: 10000,\n\tfixedPointScale: 1000000000,\n\tquoteCoinDecimals: 6,\n\tpositionQuantityDecimals: 6,\n});\n\n/** Ids for DeepBook Predict — the `/predict` subpath's slice. */\nexport const MAINNET_PREDICT: PredictIds = Object.freeze({\n\tnetwork: 'mainnet',\n\tpackages: Object.freeze({\n\t\tpredict: '0x98235c5842831c9b5f51dc637cf34c91db2aca5510802eb6ebfec63f5b71a7bb',\n\t\tpredictV1: '0x89aea622e7bb3bdd598bde87dde40ee31c9eed4971b9546e23ec83de3c48bbba',\n\t\taccount: '0x4e1dd01465713c9d832313fed5f45c222a4d5c62a533d6da96764c8b2a245d58',\n\t\tpropbook: '0xa6c8f32015b5b41d34ee09995a2e9d7a21cdecf0e1910a50b264fd252cd33831',\n\t\tpredictOrders: '0x7cd41de311f8f3efb2c239b38773a4010fce3bef0120cd55f479843077c98903',\n\t\tpredictMath: '0x19262d18a3ce9f1c304defbacc89f36585152acde73e626231200d10617fb9a7',\n\t}),\n\tobjects: Object.freeze({\n\t\tregistry: '0x94327dbc256a2cfabd164c2bf4b3fe033bfaa4771f7a6f716954e07cb1b4beba',\n\t\tprotocolConfig: '0x5fa6efbe7691809565a660adde23f0c184ca1d19cefafa4e1c88d655fe279580',\n\t\tpoolVault: '0x4d227a1baf8cfcaf6e652a9182d0e63f85f9ce82cd542fdf3356bb3581be3b99',\n\t\toracleRegistry: '0x5d62c0d9be43efa769a708ade53fbe5bea98c15c865b64ca7c498c87b045a698',\n\t\taccountRegistry: '0x8c52c6f5b2374e33f4a726d9c32337b1aee3a71410d41c18faa91d938d66e4bc',\n\t}),\n\tquoteCoinType: '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC',\n\t/**\n\t * `plp` is the LP share coin type. It is NOT derivable from `packages.predict`: a Move\n\t * type tag keeps the ORIGINAL package id across an upgrade, while `packages.predict`\n\t * moves to the latest. They agree only while predict is at v1.\n\t */\n\tcoinTypes: Object.freeze({\n\t\tplp: '0x89aea622e7bb3bdd598bde87dde40ee31c9eed4971b9546e23ec83de3c48bbba::plp::PLP',\n\t\tdeep: '0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP',\n\t}),\n\tunits: MAINNET_UNITS,\n\tunderlyings: Object.freeze({\n\t\tBTC: Object.freeze({\n\t\t\tsymbol: 'BTC',\n\t\t\tpropbookUnderlyingId: 1,\n\t\t\tpythFeed: '0x4c5d2b4c8238f04b7687c3a8df915b69c50d5f4d291fc49aea44bdb6b52e1a20',\n\t\t\tblockScholesValueStore: '0xe83f843b15ae63045b2cea445fb8ea7ad85c5fc2a05f66db122a511e1f2c67bc',\n\t\t\tblockScholesSviStore: '0xfdd447be39d847747caf18ecf3355031bb33979c472581f1a5481375d3748bfb',\n\t\t}),\n\t}),\n\toracle: Object.freeze({\n\t\tpythLazerState: '0xd0db9c1e9212a98120384bf78d8b8c985d87b9ee6921dffcf9d1394062911573',\n\t}),\n});\n"],"mappings":";;AA4BA,MAAa,qBAAqC,OAAO,OAAO;CAC/D,YAAY;CACZ,SAAS;CACT,SAAS;CACT,cAAc;CACd,CAAC;;AAGF,MAAa,kBAA8B,OAAO,OAAO;CACxD,kBAAkB;CAClB,iBAAiB;CACjB,CAAC;;;;;;;;AASF,MAAa,mBAAgC,OAAO,OAAO;CAC1D,mBAAmB;CACnB,qBAAqB;CACrB,gBAAgB;CAChB,kBAAkB;CAClB,iBAAiB;CACjB,kBAAkB;CAClB,8BACC;CAED,gBAAgB;CAChB,CAAC;;;;;;AAOF,MAAa,gBAAiC,OAAO,OAAO;CAC3D,iBAAiB;CACjB,iBAAiB;CACjB,mBAAmB;CACnB,0BAA0B;CAC1B,CAAC;;AAGF,MAAa,kBAA8B,OAAO,OAAO;CACxD,SAAS;CACT,UAAU,OAAO,OAAO;EACvB,SAAS;EACT,WAAW;EACX,SAAS;EACT,UAAU;EACV,eAAe;EACf,aAAa;EACb,CAAC;CACF,SAAS,OAAO,OAAO;EACtB,UAAU;EACV,gBAAgB;EAChB,WAAW;EACX,gBAAgB;EAChB,iBAAiB;EACjB,CAAC;CACF,eAAe;CAMf,WAAW,OAAO,OAAO;EACxB,KAAK;EACL,MAAM;EACN,CAAC;CACF,OAAO;CACP,aAAa,OAAO,OAAO,EAC1B,KAAK,OAAO,OAAO;EAClB,QAAQ;EACR,sBAAsB;EACtB,UAAU;EACV,wBAAwB;EACxB,sBAAsB;EACtB,CAAC,EACF,CAAC;CACF,QAAQ,OAAO,OAAO,EACrB,gBAAgB,sEAChB,CAAC;CACF,CAAC"}
@@ -19,7 +19,7 @@ const TESTNET_ACCOUNT = Object.freeze({
19
19
  * the package root for one id.
20
20
  */
21
21
  const TESTNET_SESSIONS = Object.freeze({
22
- sessionsPackageId: "0x25cfc04f97ef75c530872e630c1b3e21845e615a5a68d185291372e196cbd3de",
22
+ sessionsPackageId: "0x3c50acf2d3bf48719ca9dfa2fd538e134d5c778c3502349b6417bb511f3c9889",
23
23
  sessionsPackageIdV1: "0x1908eee49d7a08d74a537d7f23766b363a145517fe0d3e0d85635d1682831ffd",
24
24
  sessionsConfig: "0xc096b97289821b27badfdf758d614bbbfa386f93d3faa409ecc1fcc6075d1186",
25
25
  accountPackageId: "0x1e57d6554b99e4ca68330322c3e5c409ba1b681642726b603bf1be92c1840ca9",
@@ -43,12 +43,13 @@ const TESTNET_UNITS = Object.freeze({
43
43
  const TESTNET_PREDICT = Object.freeze({
44
44
  network: "testnet",
45
45
  packages: Object.freeze({
46
- predict: "0x0654ecbed7c0f2645d9de7cb6cf08e65c2ee05cdbb39a415f17a6bd1cd92e267",
46
+ predict: "0x340a77ce690e683138790592be6c6d02dc56a7e88e2555dc17f8a4967d003816",
47
47
  predictV1: "0x59d71119e990573a738dd3ff9c4c7d28d6893af69c87c1a7f3a2e90e280ce2f4",
48
48
  account: "0x1e57d6554b99e4ca68330322c3e5c409ba1b681642726b603bf1be92c1840ca9",
49
49
  propbook: "0xa83f9d7651de09672a40cea371c387bf954e0f3092947670d71428d4fbc9edd9",
50
- predictOrders: "0xd723ddef890bff70bd492cd384c913b5e7daeb6e8900cb3a5606546ac4f3907f",
51
- predictMath: "0x471592f682a9560b7046ca1bbf240e608bf5b2071ff1a9bd129b8011166a43c5"
50
+ predictOrders: "0x0b1aefb17d4c158ff6e060b1f3677648125fdb0516106e318f9234d07e5a7a0e",
51
+ predictOrdersV1: "0xd723ddef890bff70bd492cd384c913b5e7daeb6e8900cb3a5606546ac4f3907f",
52
+ predictMath: "0x2039bac8c1ec51ce3d7cb366ec36b45fdbbafe1aa2aaea0ed9bef52db40e1562"
52
53
  }),
53
54
  objects: Object.freeze({
54
55
  registry: "0x85cfaa857f9dfca75f6ba624eead063c4a1bc9b701201b8f21e1f9c15833ccc4",
@@ -1 +1 @@
1
- {"version":3,"file":"testnet.mjs","names":[],"sources":["../../src/deployments/testnet.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n// GENERATED by `pnpm sync-deployment` from the deploy tooling's own manifest\n// (`packages/predict/deployment/deployment.testnet.json`) and the Predict/Sessions\n// `Published.toml` records for current call targets and original type IDs. Do not hand-edit:\n// the next regeneration overwrites it, and a hand-patched id is exactly the drift this\n// file exists to prevent. To move to a new deployment, check the sibling deepbookv3\n// checkout out to the new anchor and re-run the script.\n//\n// Deployment: deepbook-predict-testnet\n// sourceCommit: 4d752fb82d909a821c85bcc5d3963725efb546f4\n//\n// Runtime-dependency-free — every subpath reads a slice of this, so a value import here\n// would pull that module into all of their graphs. The type import below is erased.\n//\n// Frozen: these are shared module singletons, so an accessor handing one to a caller who\n// mutates it would change what every other caller sees.\n\nimport type {\n\tAccountIds,\n\tDeploymentInfo,\n\tDeploymentUnits,\n\tPredictIds,\n\tSessionsIds,\n} from './types.js';\n\n/** Which on-chain deployment the ids below came from. */\nexport const TESTNET_DEPLOYMENT: DeploymentInfo = Object.freeze({\n\tdeployment: 'deepbook-predict-testnet',\n\tnetwork: 'testnet',\n\tchainId: '4c78adac',\n\tsourceCommit: '4d752fb82d909a821c85bcc5d3963725efb546f4',\n});\n\n/** Ids for the shared `account` primitive — the `/account` subpath's slice. */\nexport const TESTNET_ACCOUNT: AccountIds = Object.freeze({\n\taccountPackageId: '0x1e57d6554b99e4ca68330322c3e5c409ba1b681642726b603bf1be92c1840ca9',\n\taccountRegistry: '0x511e11f7f5d5c1043d795180657603d59e06e90fbfcafd3f90c67ff0836bbd0c',\n});\n\n/**\n * Ids for time-limited sessions — the `/sessions` subpath's slice.\n *\n * `deepbookRegistry` is only needed by the DeepBook **spot** session wrappers; the Predict\n * wrappers never take it. It is carried here so a spot caller does not have to reach into\n * the package root for one id.\n */\nexport const TESTNET_SESSIONS: SessionsIds = Object.freeze({\n\tsessionsPackageId: '0x25cfc04f97ef75c530872e630c1b3e21845e615a5a68d185291372e196cbd3de',\n\tsessionsPackageIdV1: '0x1908eee49d7a08d74a537d7f23766b363a145517fe0d3e0d85635d1682831ffd',\n\tsessionsConfig: '0xc096b97289821b27badfdf758d614bbbfa386f93d3faa409ecc1fcc6075d1186',\n\taccountPackageId: '0x1e57d6554b99e4ca68330322c3e5c409ba1b681642726b603bf1be92c1840ca9',\n\taccountRegistry: '0x511e11f7f5d5c1043d795180657603d59e06e90fbfcafd3f90c67ff0836bbd0c',\n\tdeepbookRegistry: '0x7c256edbda983a2cd6f946655f4bf3f00a41043993781f8674a7046e8c0e11d1',\n\tdeepbookCoreAccountPackageId:\n\t\t'0x2a3a5f51e1c566e0a77c667596a8212d036b44aeac32790991c9eb97580fabb1',\n\t/** Required by every Predict session wrapper — they all take `config: &ProtocolConfig`. */\n\tprotocolConfig: '0x422a45c31128e69d0310ab3bed28bd14f730acf9f5681f70936d20c60d26bfb0',\n});\n\n/**\n * Scale constants the deployment owns rather than the SDK. Deployment-wide:\n * `quoteCoinDecimals` and `fixedPointScale` apply to any subpath formatting a custody\n * balance, not just Predict.\n */\nexport const TESTNET_UNITS: DeploymentUnits = Object.freeze({\n\tpositionLotSize: 10000,\n\tfixedPointScale: 1000000000,\n\tquoteCoinDecimals: 6,\n\tpositionQuantityDecimals: 6,\n});\n\n/** Ids for DeepBook Predict — the `/predict` subpath's slice. */\nexport const TESTNET_PREDICT: PredictIds = Object.freeze({\n\tnetwork: 'testnet',\n\tpackages: Object.freeze({\n\t\tpredict: '0x0654ecbed7c0f2645d9de7cb6cf08e65c2ee05cdbb39a415f17a6bd1cd92e267',\n\t\tpredictV1: '0x59d71119e990573a738dd3ff9c4c7d28d6893af69c87c1a7f3a2e90e280ce2f4',\n\t\taccount: '0x1e57d6554b99e4ca68330322c3e5c409ba1b681642726b603bf1be92c1840ca9',\n\t\tpropbook: '0xa83f9d7651de09672a40cea371c387bf954e0f3092947670d71428d4fbc9edd9',\n\t\tpredictOrders: '0xd723ddef890bff70bd492cd384c913b5e7daeb6e8900cb3a5606546ac4f3907f',\n\t\tpredictMath: '0x471592f682a9560b7046ca1bbf240e608bf5b2071ff1a9bd129b8011166a43c5',\n\t}),\n\tobjects: Object.freeze({\n\t\tregistry: '0x85cfaa857f9dfca75f6ba624eead063c4a1bc9b701201b8f21e1f9c15833ccc4',\n\t\tprotocolConfig: '0x422a45c31128e69d0310ab3bed28bd14f730acf9f5681f70936d20c60d26bfb0',\n\t\tpoolVault: '0x6fd178a49848387d60ccfd3e53bf06969929970246a3a7983ae5bb2a5ed52ee3',\n\t\toracleRegistry: '0xf4ad65184b2e4e9d8e50d44b02a76c64e9607f63e3dbc362e110c99e20a17161',\n\t\taccountRegistry: '0x511e11f7f5d5c1043d795180657603d59e06e90fbfcafd3f90c67ff0836bbd0c',\n\t}),\n\tquoteCoinType: '0xc028557a1ed49e42ed091e115aedefd70a442b184c18fbec5c48d5b6c0b8c184::usdc::USDC',\n\t/**\n\t * `plp` is the LP share coin type. It is NOT derivable from `packages.predict`: a Move\n\t * type tag keeps the ORIGINAL package id across an upgrade, while `packages.predict`\n\t * moves to the latest. They agree only while predict is at v1.\n\t */\n\tcoinTypes: Object.freeze({\n\t\tplp: '0x59d71119e990573a738dd3ff9c4c7d28d6893af69c87c1a7f3a2e90e280ce2f4::plp::PLP',\n\t\tdeep: '0x36dbef866a1d62bf7328989a10fb2f07d769f4ee587c0de4a0a256e57e0a58a8::deep::DEEP',\n\t}),\n\tunits: TESTNET_UNITS,\n\tunderlyings: Object.freeze({\n\t\tBTC: Object.freeze({\n\t\t\tsymbol: 'BTC',\n\t\t\tpropbookUnderlyingId: 1,\n\t\t\tpythFeed: '0x8ef99c3d14e57612d09a67bcc9b5bff568a80992df6beca2bfcd922973192faa',\n\t\t\tblockScholesValueStore: '0x1e5142471311505a7428b072230c9ffe8a747b3b9392720e39246af4aea08216',\n\t\t\tblockScholesSviStore: '0x0f1cbefd1dd2ba08ae700a7067c32e0718edf926fa18cea80bd231c02d509ece',\n\t\t}),\n\t}),\n\toracle: Object.freeze({\n\t\tpythLazerState: '0xe2b9096a5ea341a9f1eef126b2203727e29e73fdb0641ade2e1e32942f97e4d8',\n\t}),\n});\n"],"mappings":";;AA4BA,MAAa,qBAAqC,OAAO,OAAO;CAC/D,YAAY;CACZ,SAAS;CACT,SAAS;CACT,cAAc;CACd,CAAC;;AAGF,MAAa,kBAA8B,OAAO,OAAO;CACxD,kBAAkB;CAClB,iBAAiB;CACjB,CAAC;;;;;;;;AASF,MAAa,mBAAgC,OAAO,OAAO;CAC1D,mBAAmB;CACnB,qBAAqB;CACrB,gBAAgB;CAChB,kBAAkB;CAClB,iBAAiB;CACjB,kBAAkB;CAClB,8BACC;CAED,gBAAgB;CAChB,CAAC;;;;;;AAOF,MAAa,gBAAiC,OAAO,OAAO;CAC3D,iBAAiB;CACjB,iBAAiB;CACjB,mBAAmB;CACnB,0BAA0B;CAC1B,CAAC;;AAGF,MAAa,kBAA8B,OAAO,OAAO;CACxD,SAAS;CACT,UAAU,OAAO,OAAO;EACvB,SAAS;EACT,WAAW;EACX,SAAS;EACT,UAAU;EACV,eAAe;EACf,aAAa;EACb,CAAC;CACF,SAAS,OAAO,OAAO;EACtB,UAAU;EACV,gBAAgB;EAChB,WAAW;EACX,gBAAgB;EAChB,iBAAiB;EACjB,CAAC;CACF,eAAe;CAMf,WAAW,OAAO,OAAO;EACxB,KAAK;EACL,MAAM;EACN,CAAC;CACF,OAAO;CACP,aAAa,OAAO,OAAO,EAC1B,KAAK,OAAO,OAAO;EAClB,QAAQ;EACR,sBAAsB;EACtB,UAAU;EACV,wBAAwB;EACxB,sBAAsB;EACtB,CAAC,EACF,CAAC;CACF,QAAQ,OAAO,OAAO,EACrB,gBAAgB,sEAChB,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"testnet.mjs","names":[],"sources":["../../src/deployments/testnet.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n// GENERATED by `pnpm sync-deployment` from the deploy tooling's own manifest\n// (`packages/predict/deployment/deployment.testnet.json`) and the Predict/Sessions\n// `Published.toml` records for current call targets and original type IDs. Do not hand-edit:\n// the next regeneration overwrites it, and a hand-patched id is exactly the drift this\n// file exists to prevent. To move to a new deployment, check the sibling deepbookv3\n// checkout out to the new anchor and re-run the script.\n//\n// Deployment: deepbook-predict-testnet\n// sourceCommit: 4d752fb82d909a821c85bcc5d3963725efb546f4\n//\n// Runtime-dependency-free — every subpath reads a slice of this, so a value import here\n// would pull that module into all of their graphs. The type import below is erased.\n//\n// Frozen: these are shared module singletons, so an accessor handing one to a caller who\n// mutates it would change what every other caller sees.\n\nimport type {\n\tAccountIds,\n\tDeploymentInfo,\n\tDeploymentUnits,\n\tPredictIds,\n\tSessionsIds,\n} from './types.js';\n\n/** Which on-chain deployment the ids below came from. */\nexport const TESTNET_DEPLOYMENT: DeploymentInfo = Object.freeze({\n\tdeployment: 'deepbook-predict-testnet',\n\tnetwork: 'testnet',\n\tchainId: '4c78adac',\n\tsourceCommit: '4d752fb82d909a821c85bcc5d3963725efb546f4',\n});\n\n/** Ids for the shared `account` primitive — the `/account` subpath's slice. */\nexport const TESTNET_ACCOUNT: AccountIds = Object.freeze({\n\taccountPackageId: '0x1e57d6554b99e4ca68330322c3e5c409ba1b681642726b603bf1be92c1840ca9',\n\taccountRegistry: '0x511e11f7f5d5c1043d795180657603d59e06e90fbfcafd3f90c67ff0836bbd0c',\n});\n\n/**\n * Ids for time-limited sessions — the `/sessions` subpath's slice.\n *\n * `deepbookRegistry` is only needed by the DeepBook **spot** session wrappers; the Predict\n * wrappers never take it. It is carried here so a spot caller does not have to reach into\n * the package root for one id.\n */\nexport const TESTNET_SESSIONS: SessionsIds = Object.freeze({\n\tsessionsPackageId: '0x3c50acf2d3bf48719ca9dfa2fd538e134d5c778c3502349b6417bb511f3c9889',\n\tsessionsPackageIdV1: '0x1908eee49d7a08d74a537d7f23766b363a145517fe0d3e0d85635d1682831ffd',\n\tsessionsConfig: '0xc096b97289821b27badfdf758d614bbbfa386f93d3faa409ecc1fcc6075d1186',\n\taccountPackageId: '0x1e57d6554b99e4ca68330322c3e5c409ba1b681642726b603bf1be92c1840ca9',\n\taccountRegistry: '0x511e11f7f5d5c1043d795180657603d59e06e90fbfcafd3f90c67ff0836bbd0c',\n\tdeepbookRegistry: '0x7c256edbda983a2cd6f946655f4bf3f00a41043993781f8674a7046e8c0e11d1',\n\tdeepbookCoreAccountPackageId:\n\t\t'0x2a3a5f51e1c566e0a77c667596a8212d036b44aeac32790991c9eb97580fabb1',\n\t/** Required by every Predict session wrapper — they all take `config: &ProtocolConfig`. */\n\tprotocolConfig: '0x422a45c31128e69d0310ab3bed28bd14f730acf9f5681f70936d20c60d26bfb0',\n});\n\n/**\n * Scale constants the deployment owns rather than the SDK. Deployment-wide:\n * `quoteCoinDecimals` and `fixedPointScale` apply to any subpath formatting a custody\n * balance, not just Predict.\n */\nexport const TESTNET_UNITS: DeploymentUnits = Object.freeze({\n\tpositionLotSize: 10000,\n\tfixedPointScale: 1000000000,\n\tquoteCoinDecimals: 6,\n\tpositionQuantityDecimals: 6,\n});\n\n/** Ids for DeepBook Predict — the `/predict` subpath's slice. */\nexport const TESTNET_PREDICT: PredictIds = Object.freeze({\n\tnetwork: 'testnet',\n\tpackages: Object.freeze({\n\t\tpredict: '0x340a77ce690e683138790592be6c6d02dc56a7e88e2555dc17f8a4967d003816',\n\t\tpredictV1: '0x59d71119e990573a738dd3ff9c4c7d28d6893af69c87c1a7f3a2e90e280ce2f4',\n\t\taccount: '0x1e57d6554b99e4ca68330322c3e5c409ba1b681642726b603bf1be92c1840ca9',\n\t\tpropbook: '0xa83f9d7651de09672a40cea371c387bf954e0f3092947670d71428d4fbc9edd9',\n\t\tpredictOrders: '0x0b1aefb17d4c158ff6e060b1f3677648125fdb0516106e318f9234d07e5a7a0e',\n\t\tpredictOrdersV1: '0xd723ddef890bff70bd492cd384c913b5e7daeb6e8900cb3a5606546ac4f3907f',\n\t\tpredictMath: '0x2039bac8c1ec51ce3d7cb366ec36b45fdbbafe1aa2aaea0ed9bef52db40e1562',\n\t}),\n\tobjects: Object.freeze({\n\t\tregistry: '0x85cfaa857f9dfca75f6ba624eead063c4a1bc9b701201b8f21e1f9c15833ccc4',\n\t\tprotocolConfig: '0x422a45c31128e69d0310ab3bed28bd14f730acf9f5681f70936d20c60d26bfb0',\n\t\tpoolVault: '0x6fd178a49848387d60ccfd3e53bf06969929970246a3a7983ae5bb2a5ed52ee3',\n\t\toracleRegistry: '0xf4ad65184b2e4e9d8e50d44b02a76c64e9607f63e3dbc362e110c99e20a17161',\n\t\taccountRegistry: '0x511e11f7f5d5c1043d795180657603d59e06e90fbfcafd3f90c67ff0836bbd0c',\n\t}),\n\tquoteCoinType: '0xc028557a1ed49e42ed091e115aedefd70a442b184c18fbec5c48d5b6c0b8c184::usdc::USDC',\n\t/**\n\t * `plp` is the LP share coin type. It is NOT derivable from `packages.predict`: a Move\n\t * type tag keeps the ORIGINAL package id across an upgrade, while `packages.predict`\n\t * moves to the latest. They agree only while predict is at v1.\n\t */\n\tcoinTypes: Object.freeze({\n\t\tplp: '0x59d71119e990573a738dd3ff9c4c7d28d6893af69c87c1a7f3a2e90e280ce2f4::plp::PLP',\n\t\tdeep: '0x36dbef866a1d62bf7328989a10fb2f07d769f4ee587c0de4a0a256e57e0a58a8::deep::DEEP',\n\t}),\n\tunits: TESTNET_UNITS,\n\tunderlyings: Object.freeze({\n\t\tBTC: Object.freeze({\n\t\t\tsymbol: 'BTC',\n\t\t\tpropbookUnderlyingId: 1,\n\t\t\tpythFeed: '0x8ef99c3d14e57612d09a67bcc9b5bff568a80992df6beca2bfcd922973192faa',\n\t\t\tblockScholesValueStore: '0x1e5142471311505a7428b072230c9ffe8a747b3b9392720e39246af4aea08216',\n\t\t\tblockScholesSviStore: '0x0f1cbefd1dd2ba08ae700a7067c32e0718edf926fa18cea80bd231c02d509ece',\n\t\t}),\n\t}),\n\toracle: Object.freeze({\n\t\tpythLazerState: '0xe2b9096a5ea341a9f1eef126b2203727e29e73fdb0641ade2e1e32942f97e4d8',\n\t}),\n});\n"],"mappings":";;AA4BA,MAAa,qBAAqC,OAAO,OAAO;CAC/D,YAAY;CACZ,SAAS;CACT,SAAS;CACT,cAAc;CACd,CAAC;;AAGF,MAAa,kBAA8B,OAAO,OAAO;CACxD,kBAAkB;CAClB,iBAAiB;CACjB,CAAC;;;;;;;;AASF,MAAa,mBAAgC,OAAO,OAAO;CAC1D,mBAAmB;CACnB,qBAAqB;CACrB,gBAAgB;CAChB,kBAAkB;CAClB,iBAAiB;CACjB,kBAAkB;CAClB,8BACC;CAED,gBAAgB;CAChB,CAAC;;;;;;AAOF,MAAa,gBAAiC,OAAO,OAAO;CAC3D,iBAAiB;CACjB,iBAAiB;CACjB,mBAAmB;CACnB,0BAA0B;CAC1B,CAAC;;AAGF,MAAa,kBAA8B,OAAO,OAAO;CACxD,SAAS;CACT,UAAU,OAAO,OAAO;EACvB,SAAS;EACT,WAAW;EACX,SAAS;EACT,UAAU;EACV,eAAe;EACf,iBAAiB;EACjB,aAAa;EACb,CAAC;CACF,SAAS,OAAO,OAAO;EACtB,UAAU;EACV,gBAAgB;EAChB,WAAW;EACX,gBAAgB;EAChB,iBAAiB;EACjB,CAAC;CACF,eAAe;CAMf,WAAW,OAAO,OAAO;EACxB,KAAK;EACL,MAAM;EACN,CAAC;CACF,OAAO;CACP,aAAa,OAAO,OAAO,EAC1B,KAAK,OAAO,OAAO;EAClB,QAAQ;EACR,sBAAsB;EACtB,UAAU;EACV,wBAAwB;EACxB,sBAAsB;EACtB,CAAC,EACF,CAAC;CACF,QAAQ,OAAO,OAAO,EACrB,gBAAgB,sEAChB,CAAC;CACF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { RawTransactionArgument } from "../../contracts/utils/index.mjs";
2
2
  import { AdmissionTickSizeArguments, AdmissionTickSizeOptions, AdmitMintArguments, AdmitMintOptions, AdmitSellArguments, AdmitSellOptions, AllInCostArguments, AllInCostOptions, BackingBufferLambdaArguments, BackingBufferLambdaOptions, BuilderFeeArguments, BuilderFeeOptions, CashBalanceArguments, CashBalanceOptions, CommitArguments, CommitOptions, CurrentNavArguments, CurrentNavOptions, EntryProbabilityArguments, EntryProbabilityOptions, ExpiryArguments, ExpiryFeeMaxMultiplierArguments, ExpiryFeeMaxMultiplierOptions, ExpiryFeeWindowMsArguments, ExpiryFeeWindowMsOptions, ExpiryMarket, ExpiryOptions, FeeIncentiveBalanceArguments, FeeIncentiveBalanceOptions, FeeIncentiveSubsidyArguments, FeeIncentiveSubsidyOptions, IdArguments, IdOptions, InventoryImpactChargeArguments, InventoryImpactChargeOptions, InventoryImpactMaxRateArguments, InventoryImpactMaxRateOptions, InventoryImpactReserveArguments, InventoryImpactReserveOptions, InventoryImpactScaleArguments, InventoryImpactScaleOptions, IsPendingValuationArguments, IsPendingValuationOptions, IsSettledArguments, IsSettledOptions, LiveOrderValueArguments, LiveOrderValueOptions, LoadLivePricerArguments, LoadLivePricerOptions, MintExactAmountOptions as MintExactAmountOptions$1, MintExactCostOptions as MintExactCostOptions$1, MintExactQuantityOptions as MintExactQuantityOptions$1, MintPausedArguments, MintPausedOptions, MintQuote, OrderFlowLedger, OrderFlowLedgerKey, OrderFlowStateArguments, OrderFlowStateOptions, OrderParties, OrderReceipt, PayoutLiabilityArguments, PayoutLiabilityOptions, PenaltyFeeArguments, PenaltyFeeOptions, PremiumArguments, PremiumOptions, PropbookUnderlyingIdArguments, PropbookUnderlyingIdOptions, QuantityArguments, QuantityOptions, QuoteCloseArguments, QuoteCloseOptions, QuoteMintArguments, QuoteMintExactCostForAccountArguments, QuoteMintExactCostForAccountOptions, QuoteMintForAccountArguments, QuoteMintForAccountOptions, QuoteMintOptions, ReceiptInfoArguments, ReceiptInfoOptions, RedeemBuilderFeeArguments, RedeemBuilderFeeOptions, RedeemCloseQuantityArguments, RedeemCloseQuantityOptions, RedeemInventoryImpactRebateArguments, RedeemInventoryImpactRebateOptions, RedeemLiveOptions as RedeemLiveOptions$1, RedeemProbabilityArguments, RedeemProbabilityOptions, RedeemProceedsArguments, RedeemProceedsOptions, RedeemQuote, RedeemSettledArguments, RedeemSettledOptions, RedeemSettledPermissionlessArguments, RedeemSettledPermissionlessOptions, RedeemTradingFeeArguments, RedeemTradingFeeOptions, ReferenceTickArguments, ReferenceTickOptions, ReferenceTickSourceTimestampMsArguments, ReferenceTickSourceTimestampMsOptions, ReleaseArguments, ReleaseOptions, RequiredCashArguments, RequiredCashOptions, SetMintPausedArguments, SetMintPausedOptions, SetReferenceTickArguments, SetReferenceTickOptions, SettledOrderPayoutArguments, SettledOrderPayoutOptions, SettlementPriceArguments, SettlementPriceOptions, TickSizeArguments, TickSizeOptions, TradingFeeArguments, TradingFeeOptions, TryFillArguments, TryFillOptions, TryPaySettledArguments, TryPaySettledOptions, TrySettleArguments, TrySettleOptions, TrySettlementPriceArguments, TrySettlementPriceOptions, ValuationStamp, admissionTickSize, admitMint, admitSell, allInCost, backingBufferLambda, builderFee, cashBalance, commit, currentNav, entryProbability, expiry, expiryFeeMaxMultiplier, expiryFeeWindowMs, feeIncentiveBalance, feeIncentiveSubsidy, id, inventoryImpactCharge, inventoryImpactMaxRate, inventoryImpactReserve, inventoryImpactScale, isPendingValuation, isSettled, liveOrderValue, loadLivePricer, mintPaused, orderFlowState, payoutLiability, penaltyFee, premium, propbookUnderlyingId, quantity, quoteClose, quoteMint, quoteMintExactCostForAccount, quoteMintForAccount, receiptInfo, redeemBuilderFee, redeemCloseQuantity, redeemInventoryImpactRebate, redeemProbability, redeemProceeds, redeemSettled, redeemSettledPermissionless, redeemTradingFee, referenceTick, referenceTickSourceTimestampMs, release, requiredCash, setMintPaused, setReferenceTick, settledOrderPayout, settlementPrice, tickSize, tradingFee, tryFill, tryPaySettled, trySettle, trySettlementPrice } from "../../contracts/deepbook_predict/expiry_market.mjs";
3
- import * as _mysten_sui_transactions5 from "@mysten/sui/transactions";
3
+ import * as _mysten_sui_transactions33 from "@mysten/sui/transactions";
4
4
  import { TransactionArgument } from "@mysten/sui/transactions";
5
5
 
6
6
  //#region src/predict/bindings/expiry-market.d.ts
@@ -28,7 +28,7 @@ interface MintExactQuantityOptions extends Omit<MintExactQuantityOptions$1, 'arg
28
28
  * @deprecated Retired by delayed execution: Predict v4 always aborts it
29
29
  * (`EDelayedExecutionRequired`). Queue mints through the order-flow package.
30
30
  */
31
- declare function mintExactQuantity(options: MintExactQuantityOptions): (tx: _mysten_sui_transactions5.Transaction) => _mysten_sui_transactions5.TransactionResult;
31
+ declare function mintExactQuantity(options: MintExactQuantityOptions): (tx: _mysten_sui_transactions33.Transaction) => _mysten_sui_transactions33.TransactionResult;
32
32
  interface MintExactAmountArguments extends TradeTarget {
33
33
  lowerTick: RawTransactionArgument<number | bigint>;
34
34
  higherTick: RawTransactionArgument<number | bigint>;
@@ -43,7 +43,7 @@ interface MintExactAmountOptions extends Omit<MintExactAmountOptions$1, 'argumen
43
43
  * @deprecated Retired by delayed execution: Predict v4 always aborts it
44
44
  * (`EDelayedExecutionRequired`). Queue mints through the order-flow package.
45
45
  */
46
- declare function mintExactAmount(options: MintExactAmountOptions): (tx: _mysten_sui_transactions5.Transaction) => _mysten_sui_transactions5.TransactionResult;
46
+ declare function mintExactAmount(options: MintExactAmountOptions): (tx: _mysten_sui_transactions33.Transaction) => _mysten_sui_transactions33.TransactionResult;
47
47
  interface MintExactCostArguments extends TradeTarget {
48
48
  lowerTick: RawTransactionArgument<number | bigint>;
49
49
  higherTick: RawTransactionArgument<number | bigint>;
@@ -57,7 +57,7 @@ interface MintExactCostOptions extends Omit<MintExactCostOptions$1, 'arguments'>
57
57
  * @deprecated Retired by delayed execution: Predict v4 always aborts it
58
58
  * (`EDelayedExecutionRequired`). Queue mints through the order-flow package.
59
59
  */
60
- declare function mintExactCost(options: MintExactCostOptions): (tx: _mysten_sui_transactions5.Transaction) => _mysten_sui_transactions5.TransactionResult;
60
+ declare function mintExactCost(options: MintExactCostOptions): (tx: _mysten_sui_transactions33.Transaction) => _mysten_sui_transactions33.TransactionResult;
61
61
  interface RedeemLiveArguments extends TradeTarget {
62
62
  orderId: RawTransactionArgument<number | bigint>;
63
63
  closeQuantity: RawTransactionArgument<number | bigint>;
@@ -71,7 +71,7 @@ interface RedeemLiveOptions extends Omit<RedeemLiveOptions$1, 'arguments'> {
71
71
  * @deprecated Retired by delayed execution: Predict v4 always aborts it
72
72
  * (`EDelayedExecutionRequired`). Sell an Open record through the order-flow package.
73
73
  */
74
- declare function redeemLive(options: RedeemLiveOptions): (tx: _mysten_sui_transactions5.Transaction) => _mysten_sui_transactions5.TransactionResult;
74
+ declare function redeemLive(options: RedeemLiveOptions): (tx: _mysten_sui_transactions33.Transaction) => _mysten_sui_transactions33.TransactionResult;
75
75
  //#endregion
76
76
  export { expiry_market_d_exports };
77
77
  //# sourceMappingURL=expiry-market.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"expiry-market.d.mts","names":[],"sources":["../../../src/predict/bindings/expiry-market.ts"],"mappings":";;;;;;;;;UAgCU,WAAA;EACT,MAAA,EAAQ,sBAAA;EACR,OAAA,EAAS,sBAAA;EACT,IAAA,EAAM,mBAAA;EACN,MAAA,GAAS,sBAAA;EACT,MAAA,EAAQ,mBAAA;AAAA;AAAA,UAGQ,0BAAA,SAAmC,WAAA;EACnD,SAAA,EAAW,sBAAA;EACX,UAAA,EAAY,sBAAA;EACZ,QAAA,EAAU,sBAAA;EACV,OAAA,EAAS,sBAAA;EACT,cAAA,EAAgB,sBAAA;AAAA;AAAA,UAEA,wBAAA,SAAiC,IAAA,CACjD,0BAAA;EAGA,SAAA,EAAW,0BAAA;AAAA;;;;;iBAMI,iBAAA,CAAkB,OAAA,EAAS,wBAAA,IAAwB,EAAA,EAAA,yBAAA,CAAA,WAAA,KAAA,yBAAA,CAAA,iBAAA;AAAA,UAOlD,wBAAA,SAAiC,WAAA;EACjD,SAAA,EAAW,sBAAA;EACX,UAAA,EAAY,sBAAA;EACZ,UAAA,EAAY,sBAAA;EACZ,WAAA,EAAa,sBAAA;EACb,OAAA,EAAS,sBAAA;AAAA;AAAA,UAEO,sBAAA,SAA+B,IAAA,CAC/C,wBAAA;EAGA,SAAA,EAAW,wBAAA;AAAA;;;;;iBAMI,eAAA,CAAgB,OAAA,EAAS,sBAAA,IAAsB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,EAAA,EAAA,0BAAA,CAAA,WAAA,KAAA,0BAAA,CAAA,iBAAA;AAAA,UAOlD,wBAAA,SAAiC,WAAA;EACjD,SAAA,EAAW,sBAAA;EACX,UAAA,EAAY,sBAAA;EACZ,UAAA,EAAY,sBAAA;EACZ,WAAA,EAAa,sBAAA;EACb,OAAA,EAAS,sBAAA;AAAA;AAAA,UAEO,sBAAA,SAA+B,IAAA,CAC/C,wBAAA;EAGA,SAAA,EAAW,wBAAA;AAAA;;;;;iBAMI,eAAA,CAAgB,OAAA,EAAS,sBAAA,IAAsB,EAAA,EAAA,0BAAA,CAAA,WAAA,KAAA,0BAAA,CAAA,iBAAA;AAAA,UAO9C,sBAAA,SAA+B,WAAA;EAC/C,SAAA,EAAW,sBAAA;EACX,UAAA,EAAY,sBAAA;EACZ,OAAA,EAAS,sBAAA;EACT,WAAA,EAAa,sBAAA;AAAA;AAAA,UAEG,oBAAA,SAA6B,IAAA,CAAK,sBAAA;EAClD,SAAA,EAAW,sBAAA;AAAA;;;;;iBAMI,aAAA,CAAc,OAAA,EAAS,oBAAA,IAAoB,EAAA,EAAA,0BAAA,CAAA,WAAA,KAAA,0BAAA,CAAA,iBAAA;AAAA,UAO1C,mBAAA,SAA4B,WAAA;EAC5C,OAAA,EAAS,sBAAA;EACT,aAAA,EAAe,sBAAA;EACf,cAAA,EAAgB,sBAAA;EAChB,WAAA,EAAa,sBAAA;AAAA;AAAA,UAEG,iBAAA,SAA0B,IAAA,CAAK,mBAAA;EAC/C,SAAA,EAAW,mBAAA;AAAA;;;;;iBAMI,UAAA,CAAW,OAAA,EAAS,iBAAA,IAAiB,EAAA,EAAA,0BAAA,CAAA,WAAA,KAAA,0BAAA,CAAA,iBAAA"}
@@ -1,6 +1,6 @@
1
1
  import { RawTransactionArgument } from "../../contracts/utils/index.mjs";
2
2
  import { AddFlushOperatorArguments, AddFlushOperatorOptions, AddSettledRedeemKeeperArguments, AddSettledRedeemKeeperOptions, BumpVersionWatermarkArguments, BumpVersionWatermarkOptions, FeeIncentiveLifetimeCapRateArguments, FeeIncentiveLifetimeCapRateKey, FeeIncentiveLifetimeCapRateOptions, FeeIncentiveLiveTargetRateArguments, FeeIncentiveLiveTargetRateKey, FeeIncentiveLiveTargetRateOptions, FeeIncentiveSubsidyRateArguments, FeeIncentiveSubsidyRateKey, FeeIncentiveSubsidyRateOptions, FlushOperatorsKey, FrozenArguments, FrozenOptions, IdArguments, IdOptions, IsFlushOperatorArguments, IsFlushOperatorOptions, IsOrderFlowArguments, IsOrderFlowOptions, NoTradeWindowMsArguments, NoTradeWindowMsOptions, OrderFlowKey, ProtocolConfig, ReferralFeeRateArguments, ReferralFeeRateOptions, RemoveFlushOperatorArguments, RemoveFlushOperatorOptions, RemoveSettledRedeemKeeperArguments, RemoveSettledRedeemKeeperOptions, SetBlockScholesPriceFreshnessMsArguments, SetBlockScholesPriceFreshnessMsOptions, SetBlockScholesSviFreshnessMsArguments, SetBlockScholesSviFreshnessMsOptions, SetEwmaEnabledOptions as SetEwmaEnabledOptions$1, SetEwmaParamsOptions as SetEwmaParamsOptions$1, SetFeeIncentiveLiveTargetRateArguments, SetFeeIncentiveLiveTargetRateOptions, SetFeeIncentiveSubsidyRateArguments, SetFeeIncentiveSubsidyRateOptions, SetFrozenArguments, SetFrozenOptions, SetLpRequestLimitFlushAttemptsArguments, SetLpRequestLimitFlushAttemptsOptions, SetMaxLpPoolValueArguments, SetMaxLpPoolValueOptions, SetMaxValuationWindowMsArguments, SetMaxValuationWindowMsOptions, SetNoTradeWindowMsArguments, SetNoTradeWindowMsOptions, SetOrderFlowArguments, SetOrderFlowOptions, SetPlpSupplyFeeRateArguments, SetPlpSupplyFeeRateOptions, SetPlpWithdrawFeeRateArguments, SetPlpWithdrawFeeRateOptions, SetProtocolReserveProfitShareArguments, SetProtocolReserveProfitShareOptions, SetPythSpotFreshnessMsArguments, SetPythSpotFreshnessMsOptions, SetReferralFeeRateArguments, SetReferralFeeRateOptions, SetTemplateBackingBufferLambdaArguments, SetTemplateBackingBufferLambdaOptions, SetTemplateBaseFeeArguments, SetTemplateBaseFeeOptions, SetTemplateExpiryFeeMaxMultiplierArguments, SetTemplateExpiryFeeMaxMultiplierOptions, SetTemplateExpiryFeeWindowMsArguments, SetTemplateExpiryFeeWindowMsOptions, SetTemplateFeeIncentiveLifetimeCapRateArguments, SetTemplateFeeIncentiveLifetimeCapRateOptions, SetTemplateInventoryImpactMaxRateArguments, SetTemplateInventoryImpactMaxRateOptions, SetTemplateMaxEntryProbabilityArguments, SetTemplateMaxEntryProbabilityOptions, SetTemplateMinEntryProbabilityArguments, SetTemplateMinEntryProbabilityOptions, SetTemplateMinFeeArguments, SetTemplateMinFeeOptions, SetTradingPausedArguments, SetTradingPausedOptions, SetUsePythSpotForForwardArguments, SetUsePythSpotForForwardOptions, SettledRedeemKeepersKey, TradingPausedArguments, TradingPausedOptions, ValuationInProgressArguments, ValuationInProgressOptions, VersionWatermarkArguments, VersionWatermarkOptions, addFlushOperator, addSettledRedeemKeeper, bumpVersionWatermark, feeIncentiveLifetimeCapRate, feeIncentiveLiveTargetRate, feeIncentiveSubsidyRate, frozen, id, isFlushOperator, isOrderFlow, noTradeWindowMs, referralFeeRate, removeFlushOperator, removeSettledRedeemKeeper, setBlockScholesPriceFreshnessMs, setBlockScholesSviFreshnessMs, setFeeIncentiveLiveTargetRate, setFeeIncentiveSubsidyRate, setFrozen, setLpRequestLimitFlushAttempts, setMaxLpPoolValue, setMaxValuationWindowMs, setNoTradeWindowMs, setOrderFlow, setPlpSupplyFeeRate, setPlpWithdrawFeeRate, setProtocolReserveProfitShare, setPythSpotFreshnessMs, setReferralFeeRate, setTemplateBackingBufferLambda, setTemplateBaseFee, setTemplateExpiryFeeMaxMultiplier, setTemplateExpiryFeeWindowMs, setTemplateFeeIncentiveLifetimeCapRate, setTemplateInventoryImpactMaxRate, setTemplateMaxEntryProbability, setTemplateMinEntryProbability, setTemplateMinFee, setTradingPaused, setUsePythSpotForForward, tradingPaused, valuationInProgress, versionWatermark } from "../../contracts/deepbook_predict/protocol_config.mjs";
3
- import * as _mysten_sui_transactions60 from "@mysten/sui/transactions";
3
+ import * as _mysten_sui_transactions88 from "@mysten/sui/transactions";
4
4
 
5
5
  //#region src/predict/bindings/protocol-config.d.ts
6
6
  declare namespace protocol_config_d_exports {
@@ -20,7 +20,7 @@ interface SetEwmaParamsOptions extends Omit<SetEwmaParamsOptions$1, 'arguments'>
20
20
  * @deprecated Retired with instant trading: queued fills charge no congestion penalty, and
21
21
  * Predict v4 always aborts it (`EEwmaRetired`).
22
22
  */
23
- declare function setEwmaParams(options: SetEwmaParamsOptions): (tx: _mysten_sui_transactions60.Transaction) => _mysten_sui_transactions60.TransactionResult;
23
+ declare function setEwmaParams(options: SetEwmaParamsOptions): (tx: _mysten_sui_transactions88.Transaction) => _mysten_sui_transactions88.TransactionResult;
24
24
  interface SetEwmaEnabledArguments {
25
25
  config?: RawTransactionArgument<string>;
26
26
  AdminCap: RawTransactionArgument<string>;
@@ -33,7 +33,7 @@ interface SetEwmaEnabledOptions extends Omit<SetEwmaEnabledOptions$1, 'arguments
33
33
  * @deprecated Retired with instant trading: queued fills charge no congestion penalty, and
34
34
  * Predict v4 always aborts it (`EEwmaRetired`).
35
35
  */
36
- declare function setEwmaEnabled(options: SetEwmaEnabledOptions): (tx: _mysten_sui_transactions60.Transaction) => _mysten_sui_transactions60.TransactionResult;
36
+ declare function setEwmaEnabled(options: SetEwmaEnabledOptions): (tx: _mysten_sui_transactions88.Transaction) => _mysten_sui_transactions88.TransactionResult;
37
37
  //#endregion
38
38
  export { protocol_config_d_exports };
39
39
  //# sourceMappingURL=protocol-config.d.mts.map
@@ -13,12 +13,20 @@ import { MAINNET_PREDICT } from "../../deployments/mainnet.mjs";
13
13
  */
14
14
  const MAINNET_CONFIG = Object.freeze({
15
15
  network: "mainnet",
16
- packages: MAINNET_PREDICT.packages,
17
- objects: MAINNET_PREDICT.objects,
16
+ packages: Object.freeze({
17
+ ...MAINNET_PREDICT.packages,
18
+ predictDelayedExecution: "0x98235c5842831c9b5f51dc637cf34c91db2aca5510802eb6ebfec63f5b71a7bb"
19
+ }),
20
+ objects: Object.freeze({
21
+ ...MAINNET_PREDICT.objects,
22
+ orderDesk: "0x87b0a87262aacf58eaff567eed2fb7cb0f9cbc1f5ce33ef79216cd26d13a1b5b",
23
+ queueRegistry: "0x8d4f0c671862f065ac7f2c2cb24abc47cf75ed8fc8e5e52c1d4bdfa53eee164f"
24
+ }),
18
25
  quoteCoinType: MAINNET_PREDICT.quoteCoinType,
19
26
  coinTypes: MAINNET_PREDICT.coinTypes,
20
27
  units: MAINNET_PREDICT.units,
21
- underlyings: MAINNET_PREDICT.underlyings
28
+ underlyings: MAINNET_PREDICT.underlyings,
29
+ oracle: MAINNET_PREDICT.oracle
22
30
  });
23
31
 
24
32
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"mainnet.mjs","names":[],"sources":["../../../src/predict/config/mainnet.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { MAINNET_PREDICT } from '../../deployments/mainnet.js';\nimport type { PredictConfig } from './types.js';\n\n/**\n * Mainnet deployment constants, read from the shared generated record in\n * `src/deployments/` rather than transcribed here. `/account` and `/sessions` read slices of\n * that same record, so a redeploy (`pnpm sync-deployment`) moves every subpath together and\n * they cannot end up addressing different deployments.\n *\n * The record is generated from the deploy tooling's `deployment.mainnet.json`; see\n * `scripts/sync-deployment.ts`. `getDeployment('mainnet')` names the deployment and the\n * deepbookv3 commit these ids came from.\n */\nexport const MAINNET_CONFIG: PredictConfig = Object.freeze({\n\t// The record widens `network` to `string` so the published types don't pin a literal;\n\t// this file is the mainnet config by construction.\n\tnetwork: 'mainnet',\n\t// TODO(DBU-887): delayed execution is not recorded on Mainnet yet. Once the Mainnet rollout is\n\t// recorded, `pnpm sync-deployment` fills `packages.predictOrders`, `packages.predictMath` and\n\t// `oracle.pythLazerState`, and this file pins `packages.predictDelayedExecution` (Mainnet v4),\n\t// `objects.orderDesk` and `objects.queueRegistry`, as the Testnet config does. Until then the\n\t// queued-order surface (DBU-885) throws on this network, and only a custom `config` reaches it.\n\tpackages: MAINNET_PREDICT.packages,\n\tobjects: MAINNET_PREDICT.objects,\n\tquoteCoinType: MAINNET_PREDICT.quoteCoinType,\n\tcoinTypes: MAINNET_PREDICT.coinTypes,\n\tunits: MAINNET_PREDICT.units,\n\tunderlyings: MAINNET_PREDICT.underlyings,\n});\n"],"mappings":";;;;;;;;;;;;;AAgBA,MAAa,iBAAgC,OAAO,OAAO;CAG1D,SAAS;CAMT,UAAU,gBAAgB;CAC1B,SAAS,gBAAgB;CACzB,eAAe,gBAAgB;CAC/B,WAAW,gBAAgB;CAC3B,OAAO,gBAAgB;CACvB,aAAa,gBAAgB;CAC7B,CAAC"}
1
+ {"version":3,"file":"mainnet.mjs","names":[],"sources":["../../../src/predict/config/mainnet.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { MAINNET_PREDICT } from '../../deployments/mainnet.js';\nimport type { PredictConfig } from './types.js';\n\n/**\n * Mainnet deployment constants, read from the shared generated record in\n * `src/deployments/` rather than transcribed here. `/account` and `/sessions` read slices of\n * that same record, so a redeploy (`pnpm sync-deployment`) moves every subpath together and\n * they cannot end up addressing different deployments.\n *\n * The record is generated from the deploy tooling's `deployment.mainnet.json`; see\n * `scripts/sync-deployment.ts`. `getDeployment('mainnet')` names the deployment and the\n * deepbookv3 commit these ids came from.\n */\nexport const MAINNET_CONFIG: PredictConfig = Object.freeze({\n\t// The record widens `network` to `string` so the published types don't pin a literal;\n\t// this file is the mainnet config by construction.\n\tnetwork: 'mainnet',\n\t// Delayed execution (DBU-885) is recorded on Mainnet. The generated record carries the package\n\t// IDs that move with upgrades (Predict, `deepbook_predict_orders`, `deepbook_predict_math`) and\n\t// the Lazer `State`. The three IDs pinned below are in no publication record and never move:\n\t// the Predict version that introduced delayed execution (Mainnet v4), which defines its new\n\t// types and events, and the `OrderDesk` and `QueueRegistry` that `deepbook_predict_orders`'s\n\t// `init` shared at publish.\n\tpackages: Object.freeze({\n\t\t...MAINNET_PREDICT.packages,\n\t\tpredictDelayedExecution: '0x98235c5842831c9b5f51dc637cf34c91db2aca5510802eb6ebfec63f5b71a7bb',\n\t}),\n\tobjects: Object.freeze({\n\t\t...MAINNET_PREDICT.objects,\n\t\torderDesk: '0x87b0a87262aacf58eaff567eed2fb7cb0f9cbc1f5ce33ef79216cd26d13a1b5b',\n\t\tqueueRegistry: '0x8d4f0c671862f065ac7f2c2cb24abc47cf75ed8fc8e5e52c1d4bdfa53eee164f',\n\t}),\n\tquoteCoinType: MAINNET_PREDICT.quoteCoinType,\n\tcoinTypes: MAINNET_PREDICT.coinTypes,\n\tunits: MAINNET_PREDICT.units,\n\tunderlyings: MAINNET_PREDICT.underlyings,\n\toracle: MAINNET_PREDICT.oracle,\n});\n"],"mappings":";;;;;;;;;;;;;AAgBA,MAAa,iBAAgC,OAAO,OAAO;CAG1D,SAAS;CAOT,UAAU,OAAO,OAAO;EACvB,GAAG,gBAAgB;EACnB,yBAAyB;EACzB,CAAC;CACF,SAAS,OAAO,OAAO;EACtB,GAAG,gBAAgB;EACnB,WAAW;EACX,eAAe;EACf,CAAC;CACF,eAAe,gBAAgB;CAC/B,WAAW,gBAAgB;CAC3B,OAAO,gBAAgB;CACvB,aAAa,gBAAgB;CAC7B,QAAQ,gBAAgB;CACxB,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { PricerInputs } from "../pricing.mjs";
2
2
  import "../config/generated.mjs";
3
3
  import "../tx/trade.mjs";
4
- import "./inspect.mjs";
5
4
 
6
5
  //#region src/predict/reads/pricing.d.ts
7
6
  /** A resolved pricer snapshot read from the chain: the decimal forward + rolled SVI the
@@ -1 +1 @@
1
- {"version":3,"file":"pricing.d.mts","names":[],"sources":["../../../src/predict/reads/pricing.ts"],"mappings":";;;;;;;;AA2BA;;;UAAiB,cAAA,SAAuB,YAAA;EACvC,OAAA;IACC,UAAA;IACA,kBAAA;IACA,qBAAA;IACA,iBAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"pricing.d.mts","names":[],"sources":["../../../src/predict/reads/pricing.ts"],"mappings":";;;;;;AA2BA;;;;UAAiB,cAAA,SAAuB,YAAA;EACvC,OAAA;IACC,UAAA;IACA,kBAAA;IACA,qBAAA;IACA,iBAAA;EAAA;AAAA"}
@@ -2,7 +2,6 @@ import { DelayedExecutionPolicy, QueueHeads, QueuedOrder } from "../queue.mjs";
2
2
  import { OrdersGeneratedConfig } from "../config/generated.mjs";
3
3
  import "../tx/trade.mjs";
4
4
  import "../tx/queue.mjs";
5
- import "./inspect.mjs";
6
5
  import { ClientWithCoreApi } from "@mysten/sui/client";
7
6
 
8
7
  //#region src/predict/reads/queue.d.ts
@@ -1 +1 @@
1
- {"version":3,"file":"queue.d.mts","names":[],"sources":["../../../src/predict/reads/queue.ts"],"mappings":";;;;;;;;;iBAsCgB,oBAAA,CACf,MAAA,EAAQ,IAAA,CAAK,qBAAA;AADd;AAAA,UAOiB,gBAAA;EAChB,QAAA;EAPY;EASZ,OAAA;EACA,QAAA;EACA,UAAA;EACA,WAAA;EACA,YAAA;EAPgB;;;;EAYhB,SAAA;EA0DU;EAxDV,eAAA;EAwDqB;EAtDrB,mBAAA;EAbA;EAeA,mBAAA;EAbA;EAeA,mBAAA;EAbA;EAeA,KAAA;EACA,OAAA;IACC,KAAA;IACA,sBAAA,iBALD;IAOC,oCAAA;EAAA;EAED,KAAA,EAAO,UAAA;EAJN;EAMD,OAAA;IAAW,KAAA;IAAe,KAAA;EAAA;EAAf;;;;EAKX,MAAA;IAAU,MAAA;IAAgB,MAAA;IAAgB,SAAA;EAAA;EAIjC;EAFT,IAAA;IACC,EAAA;IACA,MAAA,EAAQ,sBAAA;IACR,gBAAA;EAAA;EAED,QAAA;IACC,eAAA,UAYA;IAVA,uBAAA;IACA,aAAA;IACA,MAAA,WAmBA;IAjBA,gBAAA;IAoBS;;;AAyLX;;IAvME,gBAAA;EAAA;EAuMuB;EApMxB,OAAA;IACC,SAAA;;;;;IAKA,aAAA;IAEA,YAAA;EAAA;;EAGD,OAAA,GAAU,WAAA;AAAA;;;;;;;;;;;;;;;;;KAyLC,aAAA"}
1
+ {"version":3,"file":"queue.d.mts","names":[],"sources":["../../../src/predict/reads/queue.ts"],"mappings":";;;;;;;;iBAsCgB,oBAAA,CACf,MAAA,EAAQ,IAAA,CAAK,qBAAA;;UAMG,gBAAA;EAChB,QAAA;EAPQ;EASR,OAAA;EACA,QAAA;EACA,UAAA;EACA,WAAA;EACA,YAAA;EAPgC;;;;EAYhC,SAAA;EA0DqB;EAxDrB,eAAA;EAbA;EAeA,mBAAA;EAZA;EAcA,mBAAA;EAZA;EAcA,mBAAA;EARA;EAUA,KAAA;EACA,OAAA;IACC,KAAA;IACA,sBAAA,iBAHD;IAKC,oCAAA;EAAA;EAED,KAAA,EAAO,UAAA;EAFN;EAID,OAAA;IAAW,KAAA;IAAe,KAAA;EAAA;EAAA;;;;EAK1B,MAAA;IAAU,MAAA;IAAgB,MAAA;IAAgB,SAAA;EAAA;EAKzC;EAHD,IAAA;IACC,EAAA;IACA,MAAA,EAAQ,sBAAA;IACR,gBAAA;EAAA;EAED,QAAA;IACC,eAAA,UAeD;IAbC,uBAAA;IACA,aAAA;IACA,MAAA,WAsBD;IApBC,gBAAA;IAoBoB;;AAyLtB;;;IAvME,gBAAA;EAAA;;EAGD,OAAA;IACC,SAAA;;;;;IAKA,aAAA;IAEA,YAAA;EAAA;;EAGD,OAAA,GAAU,WAAA;AAAA;;;;;;;;;;;;;;;;;KAyLC,aAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"sessions.mjs","names":["#config","#generatedConfig","sessions.authorizeSession","sessions.revokeSession","sessions.sessionExpirationMs","sessions.mintExactQuantity","sessions.mintExactAmount","sessions.mintExactCost","sessions.redeemLive","sessions.redeemSettled","sessions.enqueueExactQuantity","#queuedTarget","sessions.enqueueExactAmount","sessions.enqueueExactCost","sessions.enqueueRedeemOpen"],"sources":["../src/sessions.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\nimport { bcs } from '@mysten/sui/bcs';\nimport type { Transaction, TransactionArgument, TransactionResult } from '@mysten/sui/transactions';\nimport { deriveDynamicFieldID, deriveObjectID } from '@mysten/sui/utils';\n\nimport { MAINNET_SESSIONS } from './deployments/mainnet.js';\nimport { TESTNET_SESSIONS } from './deployments/testnet.js';\nimport type { NetworkArg } from './deployments/index.js';\n\n// Provenance and scale constants, so a sessions-only consumer can answer \"which deployment\n// is this pinned to?\" and format a custody balance without importing another subpath.\nexport { getDeployment, getUnits, TESTNET_DEPLOYMENT, TESTNET_UNITS } from './deployments/index.js';\nexport type { DeployedNetwork, NetworkArg } from './deployments/index.js';\n\nimport { AccountContract } from './account.js';\nimport { deriveQueueId } from './predict/queue-id.js';\nimport type { DeepbookSessionsConfig } from './contracts/deepbook_sessions/config-arguments.js';\nimport * as sessions from './contracts/deepbook_sessions/sessions.js';\nimport { SessionsData } from './contracts/deepbook_sessions/sessions.js';\n\n/**\n * Deployed ids the sessions builders address.\n *\n * `accountPackageId` / `accountRegistry` are the same shared-account ids\n * {@link AccountContract} takes — sessions is an Account app, so it addresses the same\n * registry. `sessionsPackageId` and `sessionsConfig` come from the sessions deployment.\n */\nexport interface SessionsConfig extends DeepbookSessionsConfig {\n\t/** The latest `deepbook_sessions` Move-call package id. */\n\tsessionsPackageId: string;\n\t/** Original ID for v1 structs. Omit only for an unupgraded custom deployment. */\n\tsessionsPackageIdV1?: string;\n\t/** The shared `SessionsConfig` object id. */\n\tsessionsConfig: string;\n\t/** The shared `account` Move package id. */\n\taccountPackageId: string;\n\t/** The shared `AccountRegistry` object id. */\n\taccountRegistry: string;\n}\n\n/**\n * Ids the DeepBook **spot** session wrappers need on top of {@link SessionsConfig}. The\n * Predict wrappers never take these, so they are kept off the main config rather than made\n * optional there.\n */\nexport interface SessionsSpotIds {\n\t/** DeepBook's shared `Registry` — `deepbook_registry` on the spot entrypoints. */\n\tdeepbookRegistry: string;\n\t/** The `deepbook_core_account` Move package id. */\n\tdeepbookCoreAccountPackageId: string;\n}\n\n/** Ids the Predict session wrappers need beyond {@link SessionsConfig}. */\nexport interface SessionsPredictIds {\n\t/** Every Predict wrapper takes `config: &ProtocolConfig`. */\n\tprotocolConfig: string;\n}\n\n/**\n * @description The deployed sessions ids for `network`, so a caller does not transcribe\n * them. Generated from the deploy manifest — see `src/deployments/`. The returned object\n * also carries {@link SessionsSpotIds} for the generated spot wrappers.\n * @throws if the network has no recorded deployment, rather than returning placeholder ids.\n *\n * ```ts\n * const sessions = new SessionsContract(getSessionsConfig('testnet'));\n * ```\n */\nexport function getSessionsConfig(\n\tnetwork: NetworkArg,\n): SessionsConfig & SessionsSpotIds & SessionsPredictIds {\n\t// The frozen record itself, matching `/account` — returning a spread here would have\n\t// quietly exempted this subpath from the immutability the others guarantee.\n\tif (network === 'testnet') return TESTNET_SESSIONS;\n\tif (network === 'mainnet') return MAINNET_SESSIONS;\n\tthrow new Error(\n\t\t`@mysten/deepbook-v3/sessions: no sessions deployment recorded for network '${network}'. ` +\n\t\t\t'Sessions is recorded for testnet and mainnet; for your own deployment construct a ' +\n\t\t\t'`SessionsConfig` ' +\n\t\t\t'and pass it to SessionsContract directly.',\n\t);\n}\n\n/** The market, queue, account and oracle objects every queued Predict session wrapper names. */\nexport interface SessionsQueuedOrderTarget {\n\texpiryMarketId: string;\n\twrapperId: string;\n\t/**\n\t * The order-flow companion's shared `OrderDesk` (`deepbook_predict_orders`). Predict's\n\t * `PredictConfig.objects.orderDesk`.\n\t */\n\torderDesk: string;\n\t/**\n\t * The order-flow companion's shared `QueueRegistry`, which every market's queue ID derives\n\t * from. Predict's `PredictConfig.objects.queueRegistry`.\n\t */\n\tqueueRegistry: string;\n\t/**\n\t * The market's `MarketQueue`. Defaults to the ID derived from `queueRegistry` and the market\n\t * (`deriveQueueId`), which is where `queue::create_and_share` puts it.\n\t */\n\tqueueId?: string;\n\t/** Predict's `ProtocolConfig`. */\n\tprotocolConfig: string;\n\t/** Predict's `OracleRegistry` (the propbook registry). */\n\toracleRegistry: string;\n\t/** The market's `PythFeed`. */\n\tpythFeed: string;\n\t/** The market's `BlockScholesValueStore`. */\n\tblockScholesValueStore: string;\n\t/** The market's `BlockScholesSVIStore`. */\n\tblockScholesSviStore: string;\n}\n\nconst U64_MAX = (1n << 64n) - 1n;\n\n// The chain refuses a zero or \"unlimited\" cap on every queued mint (`EMintCostCapRequired`).\nfunction assertQueuedMaxCost(maxCost: number | bigint): void {\n\tconst value = BigInt(maxCost);\n\tif (value <= 0n || value >= U64_MAX) {\n\t\tthrow new Error(\n\t\t\t`maxCost must be above 0 and below u64::MAX on a queued mint (EMintCostCapRequired), got ${value}`,\n\t\t);\n\t}\n}\n\n/** The maximum session duration the contract accepts: 30 days, in milliseconds. */\nexport const MAX_SESSION_DURATION_MS = 30 * 24 * 60 * 60 * 1000;\n\n/** The maximum number of distinct session addresses one Account may store. */\nexport const MAX_SESSIONS_PER_ACCOUNT = 20;\n\n// `sui::dynamic_field::Field<DataKey<SessionsApp>, SessionsData>` — what a core `getObject`\n// on the grant field actually returns. `DataKey` is source-empty, but Move inserts a\n// hidden `dummy_field: bool` into empty structs, so the name occupies ONE zero byte\n// between the id and the value. Decoding the value alone would read the field id's first\n// byte as the VecMap length: garbage grants, or a silent empty list.\nconst SessionsDataField = bcs.struct('Field<DataKey,SessionsData>', {\n\tid: bcs.Address,\n\tname: bcs.bool(), // DataKey's hidden dummy_field\n\tvalue: SessionsData,\n});\n\n// `AccountKey(owner)` — the canonical ACCOUNT identity, a different derived object from\n// the wrapper. Grant data hangs off this one.\nconst AccountKey = bcs.struct('AccountKey', { pos0: bcs.Address });\n\n/** One stored session grant. */\nexport interface SessionGrant {\n\t/** The authorized ephemeral address. */\n\tsession: string;\n\t/** Absolute expiry, ms since epoch. The grant is dead AT this timestamp (strict `<`). */\n\texpiresAtMs: bigint;\n}\n\n/**\n * SessionsContract — time-limited trading sessions over a canonical Account.\n *\n * An Account owner authorizes an ephemeral address to submit a bounded set of\n * transactions on the Account's behalf until a fixed expiry. The session key never\n * receives a reusable `Auth`: each wrapper mints app authorization internally and\n * consumes it in the same call.\n *\n * WHAT A SESSION KEY CAN DO. It cannot withdraw to an address, cannot grant or revoke\n * sessions, and cannot outlive its expiry — those all require owner auth. It CAN trade\n * the Account's full balance: the spot wrappers take a caller-chosen `Pool` and, through\n * `deepbook_core_account`, pull the account's entire Base, Quote and DEEP balance\n * (stored plus unsettled) into the embedded manager for the duration of the call, with\n * `price_limit` supplied by the caller. Nothing caps notional, restricts which pools are\n * reachable, or bounds loss to adverse pricing. Treat a session key as authority over\n * everything the Account holds, and fund an ephemeral-session Account accordingly.\n *\n * Operational precondition: an admin must have authorized `SessionsApp` on the account\n * registry. Until then — or after a `deauthorize_app` — the TRADING wrappers abort with\n * `EAppNotAuthorized`; `authorizeSession`, `revokeSession` and `sessionExpirationMs` use\n * owner auth or no auth and keep working. Note that `deauthorize_app` does not clear\n * `SessionsData`, so re-authorizing makes every still-unexpired grant live again at once\n * — it is a pause, not a kill switch. Revoking, and reading expirations, also keep\n * working if the sessions package is later version-gated.\n *\n * This class wraps the session lifecycle and the **Predict** entrypoints. The DeepBook\n * spot session wrappers are generated (see `sessionsMoveCalls`) but are not wrapped here\n * — note `placeLimitOrder` and `placeMarketOrder` put `accountRegistry` at index 2 and\n * `sessionsConfig` at 4, because `deepbookRegistry` sits between them; the other three\n * (`cancelLiveOrder`, `cancelLiveOrders`, `withdrawSettledAmounts`) take no\n * `deepbookRegistry` and so keep 1 and 3 like the Predict wrappers:\n * the surrounding spot-over-Account workflow — discovering the embedded balance manager,\n * reading resting orders and locked balances — is not modelled yet, so a wrapped builder\n * would be hard to use well. They are reachable from the generated bindings meanwhile.\n */\nexport class SessionsContract {\n\t#config: SessionsConfig;\n\n\tconstructor(config: SessionsConfig) {\n\t\tthis.#config = config;\n\t}\n\n\t// The generated thunks resolve the package address and auto-inject the shared\n\t// `SessionsConfig` from this object. `accountRegistry` stays an explicit argument —\n\t// it belongs to the account package, which is a separate codegen entry.\n\tget #generatedConfig() {\n\t\treturn {\n\t\t\tsessionsPackageId: this.#config.sessionsPackageId,\n\t\t\tsessionsConfig: this.#config.sessionsConfig,\n\t\t};\n\t}\n\n\t/**\n\t * @description The owner's canonical `AccountWrapper` id — derived off-chain, no read.\n\t * Every builder here takes that id.\n\t */\n\tderiveAccountWrapperId(owner: string): string {\n\t\treturn new AccountContract({\n\t\t\taccountPackageId: this.#config.accountPackageId,\n\t\t\taccountRegistry: this.#config.accountRegistry,\n\t\t}).deriveAccountWrapperId(owner);\n\t}\n\n\t/**\n\t * @description The owner's canonical ACCOUNT id — a different derived object from the\n\t * wrapper. The session grants hang off this one, so this is what\n\t * {@link deriveSessionsFieldId} and {@link decodeSessions} work from.\n\t */\n\tderiveAccountId(owner: string): string {\n\t\treturn deriveObjectID(\n\t\t\tthis.#config.accountRegistry,\n\t\t\t`${this.#config.accountPackageId}::account_registry::AccountKey`,\n\t\t\tAccountKey.serialize({ pos0: owner }).toBytes(),\n\t\t);\n\t}\n\n\t/**\n\t * @description The object id of the owner's `DataKey<SessionsApp>` dynamic field —\n\t * fetch this object and pass its BCS contents to {@link decodeSessions}. There is no\n\t * bulk on-chain read, so this is the route to enumerating grants.\n\t */\n\tderiveSessionsFieldId(owner: string): string {\n\t\t// A PLAIN dynamic field, not a derived object: `account::attach` writes it with\n\t\t// `df::add` (`use fun df::add as UID.add`), whereas the account and wrapper ids are\n\t\t// claimed through `derived_object::claim`. `deriveObjectID` would wrap the tag in\n\t\t// `0x2::derived_object::DerivedObjectKey<..>` and yield an id that points at nothing.\n\t\treturn deriveDynamicFieldID(\n\t\t\tthis.deriveAccountId(owner),\n\t\t\t`${this.#config.accountPackageId}::account::DataKey<${this.#config.sessionsPackageIdV1 ?? this.#config.sessionsPackageId}::sessions::SessionsApp>`,\n\t\t\t// DataKey is source-empty; Move's hidden `dummy_field: bool` is the key's one byte.\n\t\t\tnew Uint8Array([0]),\n\t\t);\n\t}\n\n\t/**\n\t * @description Grant `session` authority over the Account until `now + durationMs`.\n\t * Authority is derived from the transaction SENDER, so the owner must sign this.\n\t * `durationMs` must be > 0 and <= {@link MAX_SESSION_DURATION_MS}; an Account holds at\n\t * most {@link MAX_SESSIONS_PER_ACCOUNT} distinct addresses. Re-authorizing an address\n\t * replaces its expiry in place and consumes no additional slot.\n\t * @returns A function that takes a Transaction object\n\t */\n\tauthorizeSession(params: { wrapperId: string; session: string; durationMs: number | bigint }) {\n\t\treturn (tx: Transaction): void => {\n\t\t\ttx.add(\n\t\t\t\tsessions.authorizeSession({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\twrapper: params.wrapperId,\n\t\t\t\t\t\tsession: params.session,\n\t\t\t\t\t\tdurationMs: params.durationMs,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t\t};\n\t}\n\n\t/**\n\t * @description Remove `session`'s grant. Owner-signed, like `authorizeSession`.\n\t * Deliberately takes no `SessionsConfig`: revocation is not version-gated, so it keeps\n\t * working after the package is retired. Revoking an address that holds no grant is a\n\t * silent no-op — it neither aborts nor emits, so read before and after if you need to\n\t * distinguish \"revoked\" from \"was never granted\".\n\t * @returns A function that takes a Transaction object\n\t */\n\trevokeSession(params: { wrapperId: string; session: string }) {\n\t\treturn (tx: Transaction): void => {\n\t\t\ttx.add(\n\t\t\t\tsessions.revokeSession({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: { wrapper: params.wrapperId, session: params.session },\n\t\t\t\t}),\n\t\t\t);\n\t\t};\n\t}\n\n\t/**\n\t * @description Read one session's absolute expiry as `Option<u64>`. Compose in a\n\t * dev-inspect/simulate PTB and decode the returned BCS. Not version-gated.\n\t * @returns A function that takes a Transaction object\n\t */\n\tsessionExpirationMs(params: { wrapperId: string; session: string }) {\n\t\treturn (tx: Transaction): TransactionResult =>\n\t\t\ttx.add(\n\t\t\t\tsessions.sessionExpirationMs({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: { wrapper: params.wrapperId, session: params.session },\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t// === Predict wrappers ===\n\t//\n\t// Each mirrors the Predict entrypoint of the same name, with two differences: the\n\t// caller supplies NO `Auth` (the wrapper mints and consumes app authorization\n\t// internally), and `accountRegistry` + `sessionsConfig` are threaded in. `pricer` is a\n\t// PTB RESULT, not an object — it comes from a preceding `expiry_market::load_live_pricer`\n\t// command in the same transaction. Everything else matches Predict exactly, and Predict\n\t// still performs all parameter validation.\n\n\t/**\n\t * @description Mint a position of an exact payout quantity, as `session`. Pass\n\t * `u64::MAX` for `maxCost` / `maxProbability` to leave either slippage cap\n\t * effectively unbounded — the chain asserts `value <= cap`, so the max value can never\n\t * trip. Both are required; there is no default.\n\t * @returns A function that takes a Transaction object and returns the new order id (u256)\n\t * @deprecated Retired by delayed execution (DBU-885): always aborts through Predict v4\n\t * (`EDelayedExecutionRequired`). Use {@link SessionsContract.enqueueExactQuantity}.\n\t */\n\tmintExactQuantity(params: {\n\t\texpiryMarketId: string;\n\t\twrapperId: string;\n\t\tprotocolConfig: string;\n\t\tpricer: TransactionArgument;\n\t\tlowerTick: number | bigint;\n\t\thigherTick: number | bigint;\n\t\tquantity: number | bigint;\n\t\tmaxCost: number | bigint;\n\t\tmaxProbability: number | bigint;\n\t}) {\n\t\treturn (tx: Transaction): TransactionResult =>\n\t\t\ttx.add(\n\t\t\t\tsessions.mintExactQuantity({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\tmarket: params.expiryMarketId,\n\t\t\t\t\t\taccountRegistry: this.#config.accountRegistry,\n\t\t\t\t\t\twrapper: params.wrapperId,\n\t\t\t\t\t\tconfig: params.protocolConfig,\n\t\t\t\t\t\tpricer: params.pricer,\n\t\t\t\t\t\tlowerTick: params.lowerTick,\n\t\t\t\t\t\thigherTick: params.higherTick,\n\t\t\t\t\t\tquantity: params.quantity,\n\t\t\t\t\t\tmaxCost: params.maxCost,\n\t\t\t\t\t\tmaxProbability: params.maxProbability,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t/**\n\t * @description Mint by spending up to a premium budget, flooring the quantity received.\n\t * The chain requires `maxCost > 0`.\n\t * @returns A function that takes a Transaction object and returns the new order id (u256)\n\t * @deprecated Retired by delayed execution (DBU-885): always aborts through Predict v4.\n\t * Use {@link SessionsContract.enqueueExactAmount}.\n\t */\n\tmintExactAmount(params: {\n\t\texpiryMarketId: string;\n\t\twrapperId: string;\n\t\tprotocolConfig: string;\n\t\tpricer: TransactionArgument;\n\t\tlowerTick: number | bigint;\n\t\thigherTick: number | bigint;\n\t\tmaxPremium: number | bigint;\n\t\tminQuantity: number | bigint;\n\t\tmaxCost: number | bigint;\n\t}) {\n\t\treturn (tx: Transaction): TransactionResult =>\n\t\t\ttx.add(\n\t\t\t\tsessions.mintExactAmount({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\tmarket: params.expiryMarketId,\n\t\t\t\t\t\taccountRegistry: this.#config.accountRegistry,\n\t\t\t\t\t\twrapper: params.wrapperId,\n\t\t\t\t\t\tconfig: params.protocolConfig,\n\t\t\t\t\t\tpricer: params.pricer,\n\t\t\t\t\t\tlowerTick: params.lowerTick,\n\t\t\t\t\t\thigherTick: params.higherTick,\n\t\t\t\t\t\tmaxPremium: params.maxPremium,\n\t\t\t\t\t\tminQuantity: params.minQuantity,\n\t\t\t\t\t\tmaxCost: params.maxCost,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t/**\n\t * Mint within an all-in budget as a session. Amounts are raw Move units.\n\t * Requires Sessions/Predict v2 or later.\n\t * @deprecated Retired by delayed execution (DBU-885): always aborts through Predict v4.\n\t * Use {@link SessionsContract.enqueueExactCost}.\n\t */\n\tmintExactCost(params: {\n\t\texpiryMarketId: string;\n\t\twrapperId: string;\n\t\tprotocolConfig: string;\n\t\tpricer: TransactionArgument;\n\t\tlowerTick: number | bigint;\n\t\thigherTick: number | bigint;\n\t\tmaxCost: number | bigint;\n\t\tminQuantity: number | bigint;\n\t}) {\n\t\treturn (tx: Transaction): TransactionResult =>\n\t\t\ttx.add(\n\t\t\t\tsessions.mintExactCost({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\tmarket: params.expiryMarketId,\n\t\t\t\t\t\taccountRegistry: this.#config.accountRegistry,\n\t\t\t\t\t\twrapper: params.wrapperId,\n\t\t\t\t\t\tconfig: params.protocolConfig,\n\t\t\t\t\t\tpricer: params.pricer,\n\t\t\t\t\t\tlowerTick: params.lowerTick,\n\t\t\t\t\t\thigherTick: params.higherTick,\n\t\t\t\t\t\tmaxCost: params.maxCost,\n\t\t\t\t\t\tminQuantity: params.minQuantity,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t/**\n\t * @description Close part or all of a live position at the pricer's mark, as `session`.\n\t * `minProbability` / `minProceeds` are close-side slippage floors; `0` disables either,\n\t * and OMITTING them is `0` — unlike the mint caps, which are required. On a delegated\n\t * key this is the direction that closes a position at any price, so pass real floors\n\t * unless you mean to accept whatever the mark gives you.\n\t * @returns A function that takes a Transaction object and returns `Option<u256>` — the\n\t * replacement order id when a partial close leaves quantity open\n\t * @deprecated Retired by delayed execution (DBU-885): always aborts through Predict v4.\n\t * Account positions then have no early exit; queued fills are Open records sold with\n\t * {@link SessionsContract.enqueueRedeemOpen}.\n\t */\n\tredeemLive(params: {\n\t\texpiryMarketId: string;\n\t\twrapperId: string;\n\t\tprotocolConfig: string;\n\t\tpricer: TransactionArgument;\n\t\torderId: bigint;\n\t\tcloseQuantity: number | bigint;\n\t\tminProbability?: number | bigint;\n\t\tminProceeds?: number | bigint;\n\t}) {\n\t\treturn (tx: Transaction): TransactionResult =>\n\t\t\ttx.add(\n\t\t\t\tsessions.redeemLive({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\tmarket: params.expiryMarketId,\n\t\t\t\t\t\taccountRegistry: this.#config.accountRegistry,\n\t\t\t\t\t\twrapper: params.wrapperId,\n\t\t\t\t\t\tconfig: params.protocolConfig,\n\t\t\t\t\t\tpricer: params.pricer,\n\t\t\t\t\t\torderId: params.orderId,\n\t\t\t\t\t\tcloseQuantity: params.closeQuantity,\n\t\t\t\t\t\tminProbability: params.minProbability ?? 0,\n\t\t\t\t\t\tminProceeds: params.minProceeds ?? 0,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t/**\n\t * @description Claim a settled position in full, as `session`. Takes no pricer — the\n\t * settlement price is fixed — and no quantity: a settled claim is all-or-nothing.\n\t * @returns A function that takes a Transaction object\n\t */\n\tredeemSettled(params: {\n\t\texpiryMarketId: string;\n\t\twrapperId: string;\n\t\tprotocolConfig: string;\n\t\torderId: bigint;\n\t}) {\n\t\treturn (tx: Transaction): void => {\n\t\t\ttx.add(\n\t\t\t\tsessions.redeemSettled({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\tmarket: params.expiryMarketId,\n\t\t\t\t\t\taccountRegistry: this.#config.accountRegistry,\n\t\t\t\t\t\twrapper: params.wrapperId,\n\t\t\t\t\t\tconfig: params.protocolConfig,\n\t\t\t\t\t\torderId: params.orderId,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t\t};\n\t}\n\n\t// === Queued Predict wrappers (delayed execution, DBU-885) ===\n\t//\n\t// The session form of the order-flow companion's `queue::enqueue_*`, in Sessions v3. Each\n\t// wrapper names the market's `MarketQueue` and the companion's `OrderDesk` next to the market.\n\t// Placement takes no pricer: it reads the oracle objects directly, so each wrapper takes the\n\t// market's three feed ids plus Predict's `OracleRegistry` (the propbook registry). Amounts are\n\t// raw Move units. Each returns the new queue record ID (u64). The queue and Predict perform\n\t// every check; the caps below are only the ones a session key should never send by accident.\n\t//\n\t// They need a config whose `sessionsPackageId` is a Sessions v3 publication. Testnet records\n\t// Sessions v3. TODO(DBU-887): Mainnet still records Sessions v2, which has none of them.\n\n\t/**\n\t * @description Queue a mint of an exact payout quantity, as `session`. `maxCost` (all-in cap)\n\t * and `maxProbability` (at most 1e9) are required, and the chain refuses an \"unlimited\"\n\t * `maxCost`.\n\t * @returns A function that takes a Transaction object and returns the record id (u64)\n\t */\n\tenqueueExactQuantity(\n\t\tparams: SessionsQueuedOrderTarget & {\n\t\t\tlowerTick: number | bigint;\n\t\t\thigherTick: number | bigint;\n\t\t\tquantity: number | bigint;\n\t\t\tmaxCost: number | bigint;\n\t\t\tmaxProbability: number | bigint;\n\t\t},\n\t) {\n\t\tassertQueuedMaxCost(params.maxCost);\n\t\treturn (tx: Transaction): TransactionResult =>\n\t\t\ttx.add(\n\t\t\t\tsessions.enqueueExactQuantity({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\t...this.#queuedTarget(params),\n\t\t\t\t\t\tlowerTick: params.lowerTick,\n\t\t\t\t\t\thigherTick: params.higherTick,\n\t\t\t\t\t\tquantity: params.quantity,\n\t\t\t\t\t\tmaxCost: params.maxCost,\n\t\t\t\t\t\tmaxProbability: params.maxProbability,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t/**\n\t * @description Queue a premium-budget mint, as `session`: sized at τ under `maxPremium`, at\n\t * least `minQuantity`, with the all-in debit capped by the required `maxCost`.\n\t * @returns A function that takes a Transaction object and returns the record id (u64)\n\t */\n\tenqueueExactAmount(\n\t\tparams: SessionsQueuedOrderTarget & {\n\t\t\tlowerTick: number | bigint;\n\t\t\thigherTick: number | bigint;\n\t\t\tmaxPremium: number | bigint;\n\t\t\tminQuantity: number | bigint;\n\t\t\tmaxCost: number | bigint;\n\t\t},\n\t) {\n\t\tassertQueuedMaxCost(params.maxCost);\n\t\treturn (tx: Transaction): TransactionResult =>\n\t\t\ttx.add(\n\t\t\t\tsessions.enqueueExactAmount({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\t...this.#queuedTarget(params),\n\t\t\t\t\t\tlowerTick: params.lowerTick,\n\t\t\t\t\t\thigherTick: params.higherTick,\n\t\t\t\t\t\tmaxPremium: params.maxPremium,\n\t\t\t\t\t\tminQuantity: params.minQuantity,\n\t\t\t\t\t\tmaxCost: params.maxCost,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t/**\n\t * @description Queue an all-in-budget mint, as `session`: sized at τ so the all-in cost fits\n\t * `maxCost`, at least `minQuantity`.\n\t * @returns A function that takes a Transaction object and returns the record id (u64)\n\t */\n\tenqueueExactCost(\n\t\tparams: SessionsQueuedOrderTarget & {\n\t\t\tlowerTick: number | bigint;\n\t\t\thigherTick: number | bigint;\n\t\t\tmaxCost: number | bigint;\n\t\t\tminQuantity: number | bigint;\n\t\t},\n\t) {\n\t\tassertQueuedMaxCost(params.maxCost);\n\t\treturn (tx: Transaction): TransactionResult =>\n\t\t\ttx.add(\n\t\t\t\tsessions.enqueueExactCost({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\t...this.#queuedTarget(params),\n\t\t\t\t\t\tlowerTick: params.lowerTick,\n\t\t\t\t\t\thigherTick: params.higherTick,\n\t\t\t\t\t\tmaxCost: params.maxCost,\n\t\t\t\t\t\tminQuantity: params.minQuantity,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t/**\n\t * @description Queue an early sell of the Open record `recordId` (its queue record ID, not\n\t * the position's order ID), as `session`. `minProbability` and `minProceeds` are the close\n\t * floors at τ and are required: on a delegated key, `0` closes at any price, so pass it only\n\t * on purpose.\n\t * @returns A function that takes a Transaction object and returns the new record id (u64)\n\t */\n\tenqueueRedeemOpen(\n\t\tparams: SessionsQueuedOrderTarget & {\n\t\t\trecordId: number | bigint;\n\t\t\tcloseQuantity: number | bigint;\n\t\t\tminProbability: number | bigint;\n\t\t\tminProceeds: number | bigint;\n\t\t},\n\t) {\n\t\treturn (tx: Transaction): TransactionResult =>\n\t\t\ttx.add(\n\t\t\t\tsessions.enqueueRedeemOpen({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\t...this.#queuedTarget(params),\n\t\t\t\t\t\trecordId: params.recordId,\n\t\t\t\t\t\tcloseQuantity: params.closeQuantity,\n\t\t\t\t\t\tminProbability: params.minProbability,\n\t\t\t\t\t\tminProceeds: params.minProceeds,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t// The leading arguments every queued wrapper shares, in the Move order: `(queue, market,\n\t// account_registry, wrapper, sessions_config, desk, config, propbook_registry, pyth, bs_values,\n\t// bs_svi, …)`. `sessions_config` comes from the generated config.\n\t#queuedTarget(params: SessionsQueuedOrderTarget) {\n\t\treturn {\n\t\t\tqueue: params.queueId ?? deriveQueueId(params.queueRegistry, params.expiryMarketId),\n\t\t\tmarket: params.expiryMarketId,\n\t\t\taccountRegistry: this.#config.accountRegistry,\n\t\t\twrapper: params.wrapperId,\n\t\t\tdesk: params.orderDesk,\n\t\t\tconfig: params.protocolConfig,\n\t\t\tpropbookRegistry: params.oracleRegistry,\n\t\t\tpyth: params.pythFeed,\n\t\t\tbsValues: params.blockScholesValueStore,\n\t\t\tbsSvi: params.blockScholesSviStore,\n\t\t};\n\t}\n\n\t/**\n\t * @description Decode an Account's stored grants from the raw BCS content of its\n\t * `DataKey<SessionsApp>` dynamic FIELD object — the whole\n\t * `Field<DataKey<SessionsApp>, SessionsData>`, as the core API returns it, not the\n\t * inner `SessionsData`. Get the id from {@link deriveSessionsFieldId}.\n\t *\n\t * There is no bulk on-chain read — `sessionExpirationMs` answers one address at a time —\n\t * so listing grants means fetching that field and decoding it here. Note the field hangs\n\t * off the DERIVED ACCOUNT address, not the wrapper address; they are different objects.\n\t *\n\t * Expired grants are never pruned automatically and keep occupying slots, so callers\n\t * managing the {@link MAX_SESSIONS_PER_ACCOUNT} cap should list, drop anything already\n\t * expired, and revoke before granting again.\n\t */\n\tstatic decodeSessions(contents: Uint8Array): SessionGrant[] {\n\t\t// Assert full consumption. `@mysten/bcs`'s ULEB reader indexes the underlying\n\t\t// ArrayBuffer rather than the view, so a truncated SUBARRAY — which is exactly what a\n\t\t// gRPC `content` field is — can read past its bound and decode to `[]` with no error.\n\t\t// Re-serializing and comparing lengths turns both truncation and trailing junk into a\n\t\t// throw, so \"no grants\" can only ever mean no grants.\n\t\tconst field = SessionsDataField.parse(contents);\n\t\tconst reencoded = SessionsDataField.serialize(field).toBytes();\n\t\tif (reencoded.length !== contents.length) {\n\t\t\tthrow new Error(\n\t\t\t\t`sessions field is ${contents.length} bytes but its contents encode to ${reencoded.length}; ` +\n\t\t\t\t\t'the bytes are truncated or carry trailing data',\n\t\t\t);\n\t\t}\n\t\treturn field.value.sessions.contents.map((entry) => ({\n\t\t\tsession: entry.key,\n\t\t\texpiresAtMs: BigInt(entry.value),\n\t\t}));\n\t}\n\n\t/** Grants from {@link decodeSessions} that are still live at `nowMs`. */\n\tstatic activeSessions(grants: readonly SessionGrant[], nowMs: number | bigint): SessionGrant[] {\n\t\tconst now = BigInt(nowMs);\n\t\t// The chain asserts `now < expiresAtMs`, so a grant is dead AT its expiry.\n\t\treturn grants.filter((g) => now < g.expiresAtMs);\n\t}\n\n\t/**\n\t * @description Grants that are already dead at `nowMs` — the complement of\n\t * {@link activeSessions}, and the list to revoke when reclaiming slots. Use this rather\n\t * than filtering by hand: `nowMs > expiresAtMs` looks equivalent but leaves the grant\n\t * expiring exactly at `nowMs` occupying a slot forever.\n\t */\n\tstatic expiredSessions(grants: readonly SessionGrant[], nowMs: number | bigint): SessionGrant[] {\n\t\tconst now = BigInt(nowMs);\n\t\treturn grants.filter((g) => now >= g.expiresAtMs);\n\t}\n}\n\n// === Generated bindings ===\n// NOTE: this namespace carries the DeepBook spot session calls too\n// (`placeLimitOrder`, `placeMarketOrder`, `cancelLiveOrder(s)`, `withdrawSettledAmounts`).\n// They are generated and callable; they are simply not wrapped on `SessionsContract`.\nexport * as sessionsMoveCalls from './contracts/deepbook_sessions/sessions.js';\nexport * as sessionConfigMoveCalls from './contracts/deepbook_sessions/session_config.js';\nexport {\n\tSessionsApp,\n\tSessionsData,\n\tSessionAuthorized,\n\tSessionRevoked,\n} from './contracts/deepbook_sessions/sessions.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqEA,SAAgB,kBACf,SACwD;AAGxD,KAAI,YAAY,UAAW,QAAO;AAClC,KAAI,YAAY,UAAW,QAAO;AAClC,OAAM,IAAI,MACT,8EAA8E,QAAQ,mJAItF;;AAkCF,MAAM,WAAW,MAAM,OAAO;AAG9B,SAAS,oBAAoB,SAAgC;CAC5D,MAAM,QAAQ,OAAO,QAAQ;AAC7B,KAAI,SAAS,MAAM,SAAS,QAC3B,OAAM,IAAI,MACT,2FAA2F,QAC3F;;;AAKH,MAAa,0BAA0B,MAAU,KAAK,KAAK;;AAG3D,MAAa,2BAA2B;AAOxC,MAAM,oBAAoB,IAAI,OAAO,+BAA+B;CACnE,IAAI,IAAI;CACR,MAAM,IAAI,MAAM;CAChB,OAAO;CACP,CAAC;AAIF,MAAM,aAAa,IAAI,OAAO,cAAc,EAAE,MAAM,IAAI,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6ClE,IAAa,mBAAb,MAA8B;CAC7B;CAEA,YAAY,QAAwB;AACnC,QAAKA,SAAU;;CAMhB,KAAIC,kBAAmB;AACtB,SAAO;GACN,mBAAmB,MAAKD,OAAQ;GAChC,gBAAgB,MAAKA,OAAQ;GAC7B;;;;;;CAOF,uBAAuB,OAAuB;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U,OAAO;GACjB,OAAO,OAAO;GACd;;;;;;;;;;;;;;;;CAiBF,OAAO,eAAe,UAAsC;EAM3D,MAAM,QAAQ,kBAAkB,MAAM,SAAS;EAC/C,MAAM,YAAY,kBAAkB,UAAU,MAAM,CAAC,SAAS;AAC9D,MAAI,UAAU,WAAW,SAAS,OACjC,OAAM,IAAI,MACT,qBAAqB,SAAS,OAAO,oCAAoC,UAAU,OAAO,kDAE1F;AAEF,SAAO,MAAM,MAAM,SAAS,SAAS,KAAK,WAAW;GACpD,SAAS,MAAM;GACf,aAAa,OAAO,MAAM,MAAM;GAChC,EAAE;;;CAIJ,OAAO,eAAe,QAAiC,OAAwC;EAC9F,MAAM,MAAM,OAAO,MAAM;AAEzB,SAAO,OAAO,QAAQ,MAAM,MAAM,EAAE,YAAY;;;;;;;;CASjD,OAAO,gBAAgB,QAAiC,OAAwC;EAC/F,MAAM,MAAM,OAAO,MAAM;AACzB,SAAO,OAAO,QAAQ,MAAM,OAAO,EAAE,YAAY"}
1
+ {"version":3,"file":"sessions.mjs","names":["#config","#generatedConfig","sessions.authorizeSession","sessions.revokeSession","sessions.sessionExpirationMs","sessions.mintExactQuantity","sessions.mintExactAmount","sessions.mintExactCost","sessions.redeemLive","sessions.redeemSettled","sessions.enqueueExactQuantity","#queuedTarget","sessions.enqueueExactAmount","sessions.enqueueExactCost","sessions.enqueueRedeemOpen"],"sources":["../src/sessions.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\nimport { bcs } from '@mysten/sui/bcs';\nimport type { Transaction, TransactionArgument, TransactionResult } from '@mysten/sui/transactions';\nimport { deriveDynamicFieldID, deriveObjectID } from '@mysten/sui/utils';\n\nimport { MAINNET_SESSIONS } from './deployments/mainnet.js';\nimport { TESTNET_SESSIONS } from './deployments/testnet.js';\nimport type { NetworkArg } from './deployments/index.js';\n\n// Provenance and scale constants, so a sessions-only consumer can answer \"which deployment\n// is this pinned to?\" and format a custody balance without importing another subpath.\nexport { getDeployment, getUnits, TESTNET_DEPLOYMENT, TESTNET_UNITS } from './deployments/index.js';\nexport type { DeployedNetwork, NetworkArg } from './deployments/index.js';\n\nimport { AccountContract } from './account.js';\nimport { deriveQueueId } from './predict/queue-id.js';\nimport type { DeepbookSessionsConfig } from './contracts/deepbook_sessions/config-arguments.js';\nimport * as sessions from './contracts/deepbook_sessions/sessions.js';\nimport { SessionsData } from './contracts/deepbook_sessions/sessions.js';\n\n/**\n * Deployed ids the sessions builders address.\n *\n * `accountPackageId` / `accountRegistry` are the same shared-account ids\n * {@link AccountContract} takes — sessions is an Account app, so it addresses the same\n * registry. `sessionsPackageId` and `sessionsConfig` come from the sessions deployment.\n */\nexport interface SessionsConfig extends DeepbookSessionsConfig {\n\t/** The latest `deepbook_sessions` Move-call package id. */\n\tsessionsPackageId: string;\n\t/** Original ID for v1 structs. Omit only for an unupgraded custom deployment. */\n\tsessionsPackageIdV1?: string;\n\t/** The shared `SessionsConfig` object id. */\n\tsessionsConfig: string;\n\t/** The shared `account` Move package id. */\n\taccountPackageId: string;\n\t/** The shared `AccountRegistry` object id. */\n\taccountRegistry: string;\n}\n\n/**\n * Ids the DeepBook **spot** session wrappers need on top of {@link SessionsConfig}. The\n * Predict wrappers never take these, so they are kept off the main config rather than made\n * optional there.\n */\nexport interface SessionsSpotIds {\n\t/** DeepBook's shared `Registry` — `deepbook_registry` on the spot entrypoints. */\n\tdeepbookRegistry: string;\n\t/** The `deepbook_core_account` Move package id. */\n\tdeepbookCoreAccountPackageId: string;\n}\n\n/** Ids the Predict session wrappers need beyond {@link SessionsConfig}. */\nexport interface SessionsPredictIds {\n\t/** Every Predict wrapper takes `config: &ProtocolConfig`. */\n\tprotocolConfig: string;\n}\n\n/**\n * @description The deployed sessions ids for `network`, so a caller does not transcribe\n * them. Generated from the deploy manifest — see `src/deployments/`. The returned object\n * also carries {@link SessionsSpotIds} for the generated spot wrappers.\n * @throws if the network has no recorded deployment, rather than returning placeholder ids.\n *\n * ```ts\n * const sessions = new SessionsContract(getSessionsConfig('testnet'));\n * ```\n */\nexport function getSessionsConfig(\n\tnetwork: NetworkArg,\n): SessionsConfig & SessionsSpotIds & SessionsPredictIds {\n\t// The frozen record itself, matching `/account` — returning a spread here would have\n\t// quietly exempted this subpath from the immutability the others guarantee.\n\tif (network === 'testnet') return TESTNET_SESSIONS;\n\tif (network === 'mainnet') return MAINNET_SESSIONS;\n\tthrow new Error(\n\t\t`@mysten/deepbook-v3/sessions: no sessions deployment recorded for network '${network}'. ` +\n\t\t\t'Sessions is recorded for testnet and mainnet; for your own deployment construct a ' +\n\t\t\t'`SessionsConfig` ' +\n\t\t\t'and pass it to SessionsContract directly.',\n\t);\n}\n\n/** The market, queue, account and oracle objects every queued Predict session wrapper names. */\nexport interface SessionsQueuedOrderTarget {\n\texpiryMarketId: string;\n\twrapperId: string;\n\t/**\n\t * The order-flow companion's shared `OrderDesk` (`deepbook_predict_orders`). Predict's\n\t * `PredictConfig.objects.orderDesk`.\n\t */\n\torderDesk: string;\n\t/**\n\t * The order-flow companion's shared `QueueRegistry`, which every market's queue ID derives\n\t * from. Predict's `PredictConfig.objects.queueRegistry`.\n\t */\n\tqueueRegistry: string;\n\t/**\n\t * The market's `MarketQueue`. Defaults to the ID derived from `queueRegistry` and the market\n\t * (`deriveQueueId`), which is where `queue::create_and_share` puts it.\n\t */\n\tqueueId?: string;\n\t/** Predict's `ProtocolConfig`. */\n\tprotocolConfig: string;\n\t/** Predict's `OracleRegistry` (the propbook registry). */\n\toracleRegistry: string;\n\t/** The market's `PythFeed`. */\n\tpythFeed: string;\n\t/** The market's `BlockScholesValueStore`. */\n\tblockScholesValueStore: string;\n\t/** The market's `BlockScholesSVIStore`. */\n\tblockScholesSviStore: string;\n}\n\nconst U64_MAX = (1n << 64n) - 1n;\n\n// The chain refuses a zero or \"unlimited\" cap on every queued mint (`EMintCostCapRequired`).\nfunction assertQueuedMaxCost(maxCost: number | bigint): void {\n\tconst value = BigInt(maxCost);\n\tif (value <= 0n || value >= U64_MAX) {\n\t\tthrow new Error(\n\t\t\t`maxCost must be above 0 and below u64::MAX on a queued mint (EMintCostCapRequired), got ${value}`,\n\t\t);\n\t}\n}\n\n/** The maximum session duration the contract accepts: 30 days, in milliseconds. */\nexport const MAX_SESSION_DURATION_MS = 30 * 24 * 60 * 60 * 1000;\n\n/** The maximum number of distinct session addresses one Account may store. */\nexport const MAX_SESSIONS_PER_ACCOUNT = 20;\n\n// `sui::dynamic_field::Field<DataKey<SessionsApp>, SessionsData>` — what a core `getObject`\n// on the grant field actually returns. `DataKey` is source-empty, but Move inserts a\n// hidden `dummy_field: bool` into empty structs, so the name occupies ONE zero byte\n// between the id and the value. Decoding the value alone would read the field id's first\n// byte as the VecMap length: garbage grants, or a silent empty list.\nconst SessionsDataField = bcs.struct('Field<DataKey,SessionsData>', {\n\tid: bcs.Address,\n\tname: bcs.bool(), // DataKey's hidden dummy_field\n\tvalue: SessionsData,\n});\n\n// `AccountKey(owner)` — the canonical ACCOUNT identity, a different derived object from\n// the wrapper. Grant data hangs off this one.\nconst AccountKey = bcs.struct('AccountKey', { pos0: bcs.Address });\n\n/** One stored session grant. */\nexport interface SessionGrant {\n\t/** The authorized ephemeral address. */\n\tsession: string;\n\t/** Absolute expiry, ms since epoch. The grant is dead AT this timestamp (strict `<`). */\n\texpiresAtMs: bigint;\n}\n\n/**\n * SessionsContract — time-limited trading sessions over a canonical Account.\n *\n * An Account owner authorizes an ephemeral address to submit a bounded set of\n * transactions on the Account's behalf until a fixed expiry. The session key never\n * receives a reusable `Auth`: each wrapper mints app authorization internally and\n * consumes it in the same call.\n *\n * WHAT A SESSION KEY CAN DO. It cannot withdraw to an address, cannot grant or revoke\n * sessions, and cannot outlive its expiry — those all require owner auth. It CAN trade\n * the Account's full balance: the spot wrappers take a caller-chosen `Pool` and, through\n * `deepbook_core_account`, pull the account's entire Base, Quote and DEEP balance\n * (stored plus unsettled) into the embedded manager for the duration of the call, with\n * `price_limit` supplied by the caller. Nothing caps notional, restricts which pools are\n * reachable, or bounds loss to adverse pricing. Treat a session key as authority over\n * everything the Account holds, and fund an ephemeral-session Account accordingly.\n *\n * Operational precondition: an admin must have authorized `SessionsApp` on the account\n * registry. Until then — or after a `deauthorize_app` — the TRADING wrappers abort with\n * `EAppNotAuthorized`; `authorizeSession`, `revokeSession` and `sessionExpirationMs` use\n * owner auth or no auth and keep working. Note that `deauthorize_app` does not clear\n * `SessionsData`, so re-authorizing makes every still-unexpired grant live again at once\n * — it is a pause, not a kill switch. Revoking, and reading expirations, also keep\n * working if the sessions package is later version-gated.\n *\n * This class wraps the session lifecycle and the **Predict** entrypoints. The DeepBook\n * spot session wrappers are generated (see `sessionsMoveCalls`) but are not wrapped here\n * — note `placeLimitOrder` and `placeMarketOrder` put `accountRegistry` at index 2 and\n * `sessionsConfig` at 4, because `deepbookRegistry` sits between them; the other three\n * (`cancelLiveOrder`, `cancelLiveOrders`, `withdrawSettledAmounts`) take no\n * `deepbookRegistry` and so keep 1 and 3 like the Predict wrappers:\n * the surrounding spot-over-Account workflow — discovering the embedded balance manager,\n * reading resting orders and locked balances — is not modelled yet, so a wrapped builder\n * would be hard to use well. They are reachable from the generated bindings meanwhile.\n */\nexport class SessionsContract {\n\t#config: SessionsConfig;\n\n\tconstructor(config: SessionsConfig) {\n\t\tthis.#config = config;\n\t}\n\n\t// The generated thunks resolve the package address and auto-inject the shared\n\t// `SessionsConfig` from this object. `accountRegistry` stays an explicit argument —\n\t// it belongs to the account package, which is a separate codegen entry.\n\tget #generatedConfig() {\n\t\treturn {\n\t\t\tsessionsPackageId: this.#config.sessionsPackageId,\n\t\t\tsessionsConfig: this.#config.sessionsConfig,\n\t\t};\n\t}\n\n\t/**\n\t * @description The owner's canonical `AccountWrapper` id — derived off-chain, no read.\n\t * Every builder here takes that id.\n\t */\n\tderiveAccountWrapperId(owner: string): string {\n\t\treturn new AccountContract({\n\t\t\taccountPackageId: this.#config.accountPackageId,\n\t\t\taccountRegistry: this.#config.accountRegistry,\n\t\t}).deriveAccountWrapperId(owner);\n\t}\n\n\t/**\n\t * @description The owner's canonical ACCOUNT id — a different derived object from the\n\t * wrapper. The session grants hang off this one, so this is what\n\t * {@link deriveSessionsFieldId} and {@link decodeSessions} work from.\n\t */\n\tderiveAccountId(owner: string): string {\n\t\treturn deriveObjectID(\n\t\t\tthis.#config.accountRegistry,\n\t\t\t`${this.#config.accountPackageId}::account_registry::AccountKey`,\n\t\t\tAccountKey.serialize({ pos0: owner }).toBytes(),\n\t\t);\n\t}\n\n\t/**\n\t * @description The object id of the owner's `DataKey<SessionsApp>` dynamic field —\n\t * fetch this object and pass its BCS contents to {@link decodeSessions}. There is no\n\t * bulk on-chain read, so this is the route to enumerating grants.\n\t */\n\tderiveSessionsFieldId(owner: string): string {\n\t\t// A PLAIN dynamic field, not a derived object: `account::attach` writes it with\n\t\t// `df::add` (`use fun df::add as UID.add`), whereas the account and wrapper ids are\n\t\t// claimed through `derived_object::claim`. `deriveObjectID` would wrap the tag in\n\t\t// `0x2::derived_object::DerivedObjectKey<..>` and yield an id that points at nothing.\n\t\treturn deriveDynamicFieldID(\n\t\t\tthis.deriveAccountId(owner),\n\t\t\t`${this.#config.accountPackageId}::account::DataKey<${this.#config.sessionsPackageIdV1 ?? this.#config.sessionsPackageId}::sessions::SessionsApp>`,\n\t\t\t// DataKey is source-empty; Move's hidden `dummy_field: bool` is the key's one byte.\n\t\t\tnew Uint8Array([0]),\n\t\t);\n\t}\n\n\t/**\n\t * @description Grant `session` authority over the Account until `now + durationMs`.\n\t * Authority is derived from the transaction SENDER, so the owner must sign this.\n\t * `durationMs` must be > 0 and <= {@link MAX_SESSION_DURATION_MS}; an Account holds at\n\t * most {@link MAX_SESSIONS_PER_ACCOUNT} distinct addresses. Re-authorizing an address\n\t * replaces its expiry in place and consumes no additional slot.\n\t * @returns A function that takes a Transaction object\n\t */\n\tauthorizeSession(params: { wrapperId: string; session: string; durationMs: number | bigint }) {\n\t\treturn (tx: Transaction): void => {\n\t\t\ttx.add(\n\t\t\t\tsessions.authorizeSession({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\twrapper: params.wrapperId,\n\t\t\t\t\t\tsession: params.session,\n\t\t\t\t\t\tdurationMs: params.durationMs,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t\t};\n\t}\n\n\t/**\n\t * @description Remove `session`'s grant. Owner-signed, like `authorizeSession`.\n\t * Deliberately takes no `SessionsConfig`: revocation is not version-gated, so it keeps\n\t * working after the package is retired. Revoking an address that holds no grant is a\n\t * silent no-op — it neither aborts nor emits, so read before and after if you need to\n\t * distinguish \"revoked\" from \"was never granted\".\n\t * @returns A function that takes a Transaction object\n\t */\n\trevokeSession(params: { wrapperId: string; session: string }) {\n\t\treturn (tx: Transaction): void => {\n\t\t\ttx.add(\n\t\t\t\tsessions.revokeSession({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: { wrapper: params.wrapperId, session: params.session },\n\t\t\t\t}),\n\t\t\t);\n\t\t};\n\t}\n\n\t/**\n\t * @description Read one session's absolute expiry as `Option<u64>`. Compose in a\n\t * dev-inspect/simulate PTB and decode the returned BCS. Not version-gated.\n\t * @returns A function that takes a Transaction object\n\t */\n\tsessionExpirationMs(params: { wrapperId: string; session: string }) {\n\t\treturn (tx: Transaction): TransactionResult =>\n\t\t\ttx.add(\n\t\t\t\tsessions.sessionExpirationMs({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: { wrapper: params.wrapperId, session: params.session },\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t// === Predict wrappers ===\n\t//\n\t// Each mirrors the Predict entrypoint of the same name, with two differences: the\n\t// caller supplies NO `Auth` (the wrapper mints and consumes app authorization\n\t// internally), and `accountRegistry` + `sessionsConfig` are threaded in. `pricer` is a\n\t// PTB RESULT, not an object — it comes from a preceding `expiry_market::load_live_pricer`\n\t// command in the same transaction. Everything else matches Predict exactly, and Predict\n\t// still performs all parameter validation.\n\n\t/**\n\t * @description Mint a position of an exact payout quantity, as `session`. Pass\n\t * `u64::MAX` for `maxCost` / `maxProbability` to leave either slippage cap\n\t * effectively unbounded — the chain asserts `value <= cap`, so the max value can never\n\t * trip. Both are required; there is no default.\n\t * @returns A function that takes a Transaction object and returns the new order id (u256)\n\t * @deprecated Retired by delayed execution (DBU-885): always aborts through Predict v4\n\t * (`EDelayedExecutionRequired`). Use {@link SessionsContract.enqueueExactQuantity}.\n\t */\n\tmintExactQuantity(params: {\n\t\texpiryMarketId: string;\n\t\twrapperId: string;\n\t\tprotocolConfig: string;\n\t\tpricer: TransactionArgument;\n\t\tlowerTick: number | bigint;\n\t\thigherTick: number | bigint;\n\t\tquantity: number | bigint;\n\t\tmaxCost: number | bigint;\n\t\tmaxProbability: number | bigint;\n\t}) {\n\t\treturn (tx: Transaction): TransactionResult =>\n\t\t\ttx.add(\n\t\t\t\tsessions.mintExactQuantity({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\tmarket: params.expiryMarketId,\n\t\t\t\t\t\taccountRegistry: this.#config.accountRegistry,\n\t\t\t\t\t\twrapper: params.wrapperId,\n\t\t\t\t\t\tconfig: params.protocolConfig,\n\t\t\t\t\t\tpricer: params.pricer,\n\t\t\t\t\t\tlowerTick: params.lowerTick,\n\t\t\t\t\t\thigherTick: params.higherTick,\n\t\t\t\t\t\tquantity: params.quantity,\n\t\t\t\t\t\tmaxCost: params.maxCost,\n\t\t\t\t\t\tmaxProbability: params.maxProbability,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t/**\n\t * @description Mint by spending up to a premium budget, flooring the quantity received.\n\t * The chain requires `maxCost > 0`.\n\t * @returns A function that takes a Transaction object and returns the new order id (u256)\n\t * @deprecated Retired by delayed execution (DBU-885): always aborts through Predict v4.\n\t * Use {@link SessionsContract.enqueueExactAmount}.\n\t */\n\tmintExactAmount(params: {\n\t\texpiryMarketId: string;\n\t\twrapperId: string;\n\t\tprotocolConfig: string;\n\t\tpricer: TransactionArgument;\n\t\tlowerTick: number | bigint;\n\t\thigherTick: number | bigint;\n\t\tmaxPremium: number | bigint;\n\t\tminQuantity: number | bigint;\n\t\tmaxCost: number | bigint;\n\t}) {\n\t\treturn (tx: Transaction): TransactionResult =>\n\t\t\ttx.add(\n\t\t\t\tsessions.mintExactAmount({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\tmarket: params.expiryMarketId,\n\t\t\t\t\t\taccountRegistry: this.#config.accountRegistry,\n\t\t\t\t\t\twrapper: params.wrapperId,\n\t\t\t\t\t\tconfig: params.protocolConfig,\n\t\t\t\t\t\tpricer: params.pricer,\n\t\t\t\t\t\tlowerTick: params.lowerTick,\n\t\t\t\t\t\thigherTick: params.higherTick,\n\t\t\t\t\t\tmaxPremium: params.maxPremium,\n\t\t\t\t\t\tminQuantity: params.minQuantity,\n\t\t\t\t\t\tmaxCost: params.maxCost,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t/**\n\t * Mint within an all-in budget as a session. Amounts are raw Move units.\n\t * Requires Sessions/Predict v2 or later.\n\t * @deprecated Retired by delayed execution (DBU-885): always aborts through Predict v4.\n\t * Use {@link SessionsContract.enqueueExactCost}.\n\t */\n\tmintExactCost(params: {\n\t\texpiryMarketId: string;\n\t\twrapperId: string;\n\t\tprotocolConfig: string;\n\t\tpricer: TransactionArgument;\n\t\tlowerTick: number | bigint;\n\t\thigherTick: number | bigint;\n\t\tmaxCost: number | bigint;\n\t\tminQuantity: number | bigint;\n\t}) {\n\t\treturn (tx: Transaction): TransactionResult =>\n\t\t\ttx.add(\n\t\t\t\tsessions.mintExactCost({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\tmarket: params.expiryMarketId,\n\t\t\t\t\t\taccountRegistry: this.#config.accountRegistry,\n\t\t\t\t\t\twrapper: params.wrapperId,\n\t\t\t\t\t\tconfig: params.protocolConfig,\n\t\t\t\t\t\tpricer: params.pricer,\n\t\t\t\t\t\tlowerTick: params.lowerTick,\n\t\t\t\t\t\thigherTick: params.higherTick,\n\t\t\t\t\t\tmaxCost: params.maxCost,\n\t\t\t\t\t\tminQuantity: params.minQuantity,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t/**\n\t * @description Close part or all of a live position at the pricer's mark, as `session`.\n\t * `minProbability` / `minProceeds` are close-side slippage floors; `0` disables either,\n\t * and OMITTING them is `0` — unlike the mint caps, which are required. On a delegated\n\t * key this is the direction that closes a position at any price, so pass real floors\n\t * unless you mean to accept whatever the mark gives you.\n\t * @returns A function that takes a Transaction object and returns `Option<u256>` — the\n\t * replacement order id when a partial close leaves quantity open\n\t * @deprecated Retired by delayed execution (DBU-885): always aborts through Predict v4.\n\t * Account positions then have no early exit; queued fills are Open records sold with\n\t * {@link SessionsContract.enqueueRedeemOpen}.\n\t */\n\tredeemLive(params: {\n\t\texpiryMarketId: string;\n\t\twrapperId: string;\n\t\tprotocolConfig: string;\n\t\tpricer: TransactionArgument;\n\t\torderId: bigint;\n\t\tcloseQuantity: number | bigint;\n\t\tminProbability?: number | bigint;\n\t\tminProceeds?: number | bigint;\n\t}) {\n\t\treturn (tx: Transaction): TransactionResult =>\n\t\t\ttx.add(\n\t\t\t\tsessions.redeemLive({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\tmarket: params.expiryMarketId,\n\t\t\t\t\t\taccountRegistry: this.#config.accountRegistry,\n\t\t\t\t\t\twrapper: params.wrapperId,\n\t\t\t\t\t\tconfig: params.protocolConfig,\n\t\t\t\t\t\tpricer: params.pricer,\n\t\t\t\t\t\torderId: params.orderId,\n\t\t\t\t\t\tcloseQuantity: params.closeQuantity,\n\t\t\t\t\t\tminProbability: params.minProbability ?? 0,\n\t\t\t\t\t\tminProceeds: params.minProceeds ?? 0,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t/**\n\t * @description Claim a settled position in full, as `session`. Takes no pricer — the\n\t * settlement price is fixed — and no quantity: a settled claim is all-or-nothing.\n\t * @returns A function that takes a Transaction object\n\t */\n\tredeemSettled(params: {\n\t\texpiryMarketId: string;\n\t\twrapperId: string;\n\t\tprotocolConfig: string;\n\t\torderId: bigint;\n\t}) {\n\t\treturn (tx: Transaction): void => {\n\t\t\ttx.add(\n\t\t\t\tsessions.redeemSettled({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\tmarket: params.expiryMarketId,\n\t\t\t\t\t\taccountRegistry: this.#config.accountRegistry,\n\t\t\t\t\t\twrapper: params.wrapperId,\n\t\t\t\t\t\tconfig: params.protocolConfig,\n\t\t\t\t\t\torderId: params.orderId,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t\t};\n\t}\n\n\t// === Queued Predict wrappers (delayed execution, DBU-885) ===\n\t//\n\t// The session form of the order-flow companion's `queue::enqueue_*`, in Sessions v3. Each\n\t// wrapper names the market's `MarketQueue` and the companion's `OrderDesk` next to the market.\n\t// Placement takes no pricer: it reads the oracle objects directly, so each wrapper takes the\n\t// market's three feed ids plus Predict's `OracleRegistry` (the propbook registry). Amounts are\n\t// raw Move units. Each returns the new queue record ID (u64). The queue and Predict perform\n\t// every check; the caps below are only the ones a session key should never send by accident.\n\t//\n\t// They need a config whose `sessionsPackageId` is a Sessions v3 publication, which both\n\t// network records are. Sessions v1 and v2 have none of them.\n\n\t/**\n\t * @description Queue a mint of an exact payout quantity, as `session`. `maxCost` (all-in cap)\n\t * and `maxProbability` (at most 1e9) are required, and the chain refuses an \"unlimited\"\n\t * `maxCost`.\n\t * @returns A function that takes a Transaction object and returns the record id (u64)\n\t */\n\tenqueueExactQuantity(\n\t\tparams: SessionsQueuedOrderTarget & {\n\t\t\tlowerTick: number | bigint;\n\t\t\thigherTick: number | bigint;\n\t\t\tquantity: number | bigint;\n\t\t\tmaxCost: number | bigint;\n\t\t\tmaxProbability: number | bigint;\n\t\t},\n\t) {\n\t\tassertQueuedMaxCost(params.maxCost);\n\t\treturn (tx: Transaction): TransactionResult =>\n\t\t\ttx.add(\n\t\t\t\tsessions.enqueueExactQuantity({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\t...this.#queuedTarget(params),\n\t\t\t\t\t\tlowerTick: params.lowerTick,\n\t\t\t\t\t\thigherTick: params.higherTick,\n\t\t\t\t\t\tquantity: params.quantity,\n\t\t\t\t\t\tmaxCost: params.maxCost,\n\t\t\t\t\t\tmaxProbability: params.maxProbability,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t/**\n\t * @description Queue a premium-budget mint, as `session`: sized at τ under `maxPremium`, at\n\t * least `minQuantity`, with the all-in debit capped by the required `maxCost`.\n\t * @returns A function that takes a Transaction object and returns the record id (u64)\n\t */\n\tenqueueExactAmount(\n\t\tparams: SessionsQueuedOrderTarget & {\n\t\t\tlowerTick: number | bigint;\n\t\t\thigherTick: number | bigint;\n\t\t\tmaxPremium: number | bigint;\n\t\t\tminQuantity: number | bigint;\n\t\t\tmaxCost: number | bigint;\n\t\t},\n\t) {\n\t\tassertQueuedMaxCost(params.maxCost);\n\t\treturn (tx: Transaction): TransactionResult =>\n\t\t\ttx.add(\n\t\t\t\tsessions.enqueueExactAmount({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\t...this.#queuedTarget(params),\n\t\t\t\t\t\tlowerTick: params.lowerTick,\n\t\t\t\t\t\thigherTick: params.higherTick,\n\t\t\t\t\t\tmaxPremium: params.maxPremium,\n\t\t\t\t\t\tminQuantity: params.minQuantity,\n\t\t\t\t\t\tmaxCost: params.maxCost,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t/**\n\t * @description Queue an all-in-budget mint, as `session`: sized at τ so the all-in cost fits\n\t * `maxCost`, at least `minQuantity`.\n\t * @returns A function that takes a Transaction object and returns the record id (u64)\n\t */\n\tenqueueExactCost(\n\t\tparams: SessionsQueuedOrderTarget & {\n\t\t\tlowerTick: number | bigint;\n\t\t\thigherTick: number | bigint;\n\t\t\tmaxCost: number | bigint;\n\t\t\tminQuantity: number | bigint;\n\t\t},\n\t) {\n\t\tassertQueuedMaxCost(params.maxCost);\n\t\treturn (tx: Transaction): TransactionResult =>\n\t\t\ttx.add(\n\t\t\t\tsessions.enqueueExactCost({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\t...this.#queuedTarget(params),\n\t\t\t\t\t\tlowerTick: params.lowerTick,\n\t\t\t\t\t\thigherTick: params.higherTick,\n\t\t\t\t\t\tmaxCost: params.maxCost,\n\t\t\t\t\t\tminQuantity: params.minQuantity,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t/**\n\t * @description Queue an early sell of the Open record `recordId` (its queue record ID, not\n\t * the position's order ID), as `session`. `minProbability` and `minProceeds` are the close\n\t * floors at τ and are required: on a delegated key, `0` closes at any price, so pass it only\n\t * on purpose.\n\t * @returns A function that takes a Transaction object and returns the new record id (u64)\n\t */\n\tenqueueRedeemOpen(\n\t\tparams: SessionsQueuedOrderTarget & {\n\t\t\trecordId: number | bigint;\n\t\t\tcloseQuantity: number | bigint;\n\t\t\tminProbability: number | bigint;\n\t\t\tminProceeds: number | bigint;\n\t\t},\n\t) {\n\t\treturn (tx: Transaction): TransactionResult =>\n\t\t\ttx.add(\n\t\t\t\tsessions.enqueueRedeemOpen({\n\t\t\t\t\tconfig: this.#generatedConfig,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\t...this.#queuedTarget(params),\n\t\t\t\t\t\trecordId: params.recordId,\n\t\t\t\t\t\tcloseQuantity: params.closeQuantity,\n\t\t\t\t\t\tminProbability: params.minProbability,\n\t\t\t\t\t\tminProceeds: params.minProceeds,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\t// The leading arguments every queued wrapper shares, in the Move order: `(queue, market,\n\t// account_registry, wrapper, sessions_config, desk, config, propbook_registry, pyth, bs_values,\n\t// bs_svi, …)`. `sessions_config` comes from the generated config.\n\t#queuedTarget(params: SessionsQueuedOrderTarget) {\n\t\treturn {\n\t\t\tqueue: params.queueId ?? deriveQueueId(params.queueRegistry, params.expiryMarketId),\n\t\t\tmarket: params.expiryMarketId,\n\t\t\taccountRegistry: this.#config.accountRegistry,\n\t\t\twrapper: params.wrapperId,\n\t\t\tdesk: params.orderDesk,\n\t\t\tconfig: params.protocolConfig,\n\t\t\tpropbookRegistry: params.oracleRegistry,\n\t\t\tpyth: params.pythFeed,\n\t\t\tbsValues: params.blockScholesValueStore,\n\t\t\tbsSvi: params.blockScholesSviStore,\n\t\t};\n\t}\n\n\t/**\n\t * @description Decode an Account's stored grants from the raw BCS content of its\n\t * `DataKey<SessionsApp>` dynamic FIELD object — the whole\n\t * `Field<DataKey<SessionsApp>, SessionsData>`, as the core API returns it, not the\n\t * inner `SessionsData`. Get the id from {@link deriveSessionsFieldId}.\n\t *\n\t * There is no bulk on-chain read — `sessionExpirationMs` answers one address at a time —\n\t * so listing grants means fetching that field and decoding it here. Note the field hangs\n\t * off the DERIVED ACCOUNT address, not the wrapper address; they are different objects.\n\t *\n\t * Expired grants are never pruned automatically and keep occupying slots, so callers\n\t * managing the {@link MAX_SESSIONS_PER_ACCOUNT} cap should list, drop anything already\n\t * expired, and revoke before granting again.\n\t */\n\tstatic decodeSessions(contents: Uint8Array): SessionGrant[] {\n\t\t// Assert full consumption. `@mysten/bcs`'s ULEB reader indexes the underlying\n\t\t// ArrayBuffer rather than the view, so a truncated SUBARRAY — which is exactly what a\n\t\t// gRPC `content` field is — can read past its bound and decode to `[]` with no error.\n\t\t// Re-serializing and comparing lengths turns both truncation and trailing junk into a\n\t\t// throw, so \"no grants\" can only ever mean no grants.\n\t\tconst field = SessionsDataField.parse(contents);\n\t\tconst reencoded = SessionsDataField.serialize(field).toBytes();\n\t\tif (reencoded.length !== contents.length) {\n\t\t\tthrow new Error(\n\t\t\t\t`sessions field is ${contents.length} bytes but its contents encode to ${reencoded.length}; ` +\n\t\t\t\t\t'the bytes are truncated or carry trailing data',\n\t\t\t);\n\t\t}\n\t\treturn field.value.sessions.contents.map((entry) => ({\n\t\t\tsession: entry.key,\n\t\t\texpiresAtMs: BigInt(entry.value),\n\t\t}));\n\t}\n\n\t/** Grants from {@link decodeSessions} that are still live at `nowMs`. */\n\tstatic activeSessions(grants: readonly SessionGrant[], nowMs: number | bigint): SessionGrant[] {\n\t\tconst now = BigInt(nowMs);\n\t\t// The chain asserts `now < expiresAtMs`, so a grant is dead AT its expiry.\n\t\treturn grants.filter((g) => now < g.expiresAtMs);\n\t}\n\n\t/**\n\t * @description Grants that are already dead at `nowMs` — the complement of\n\t * {@link activeSessions}, and the list to revoke when reclaiming slots. Use this rather\n\t * than filtering by hand: `nowMs > expiresAtMs` looks equivalent but leaves the grant\n\t * expiring exactly at `nowMs` occupying a slot forever.\n\t */\n\tstatic expiredSessions(grants: readonly SessionGrant[], nowMs: number | bigint): SessionGrant[] {\n\t\tconst now = BigInt(nowMs);\n\t\treturn grants.filter((g) => now >= g.expiresAtMs);\n\t}\n}\n\n// === Generated bindings ===\n// NOTE: this namespace carries the DeepBook spot session calls too\n// (`placeLimitOrder`, `placeMarketOrder`, `cancelLiveOrder(s)`, `withdrawSettledAmounts`).\n// They are generated and callable; they are simply not wrapped on `SessionsContract`.\nexport * as sessionsMoveCalls from './contracts/deepbook_sessions/sessions.js';\nexport * as sessionConfigMoveCalls from './contracts/deepbook_sessions/session_config.js';\nexport {\n\tSessionsApp,\n\tSessionsData,\n\tSessionAuthorized,\n\tSessionRevoked,\n} from './contracts/deepbook_sessions/sessions.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;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