{"version":3,"file":"marginPool.mjs","names":["marginPoolMoveCalls.mintSupplierCap","#config","marginPoolMoveCalls.withdraw","marginPoolMoveCalls.mintSupplyReferral","marginPoolMoveCalls.withdrawReferralFees","marginPoolMoveCalls.id","marginPoolMoveCalls.deepbookPoolAllowed","marginPoolMoveCalls.totalSupply","marginPoolMoveCalls.supplyShares","marginPoolMoveCalls.totalBorrow","marginPoolMoveCalls.borrowShares","marginPoolMoveCalls.lastUpdateTimestamp","marginPoolMoveCalls.supplyCap","marginPoolMoveCalls.maxUtilizationRate","marginPoolMoveCalls.protocolSpread","marginPoolMoveCalls.minBorrow","marginPoolMoveCalls.interestRate","marginPoolMoveCalls.userSupplyShares","marginPoolMoveCalls.userSupplyAmount"],"sources":["../../src/transactions/marginPool.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\nimport { coinWithBalance } from '@mysten/sui/transactions';\nimport type { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';\n\nimport type { DeepBookConfig } from '../utils/config.js';\nimport { convertQuantity } from '../utils/conversion.js';\nimport * as marginPoolMoveCalls from '../contracts/deepbook_margin/margin_pool.js';\n\n/**\n * MarginPoolContract class for managing MarginPool operations.\n */\nexport class MarginPoolContract {\n\t#config: DeepBookConfig;\n\n\t/**\n\t * @param {DeepBookConfig} config Configuration for MarginPoolContract\n\t */\n\tconstructor(config: DeepBookConfig) {\n\t\tthis.#config = config;\n\t}\n\n\t/**\n\t * @description Mint a supplier cap for margin pool\n\t * @returns A function that takes a Transaction object\n\t */\n\tmintSupplierCap = () => (tx: Transaction) => {\n\t\treturn tx.add(\n\t\t\tmarginPoolMoveCalls.mintSupplierCap({\n\t\t\t\tpackage: this.#config.MARGIN_PACKAGE_ID,\n\t\t\t\targuments: { registry: this.#config.MARGIN_REGISTRY_ID },\n\t\t\t}),\n\t\t);\n\t};\n\n\t/**\n\t * @description Supply to a margin pool\n\t * @param {string} coinKey The key to identify the pool\n\t * @param {TransactionObjectArgument} supplierCap The supplier cap object\n\t * @param {number} amountToDeposit The amount to deposit\n\t * @param {string} referralId The ID of the referral\n\t * @returns A function that takes a Transaction object\n\t */\n\tsupplyToMarginPool =\n\t\t(\n\t\t\tcoinKey: string,\n\t\t\tsupplierCap: TransactionObjectArgument,\n\t\t\tamountToDeposit: number,\n\t\t\treferralId?: string,\n\t\t) =>\n\t\t(tx: Transaction) => {\n\t\t\ttx.setSenderIfNotSet(this.#config.address);\n\t\t\tconst marginPool = this.#config.getMarginPool(coinKey);\n\t\t\tconst coin = this.#config.getCoin(coinKey);\n\t\t\tconst depositInput = convertQuantity(amountToDeposit, coin.scalar);\n\t\t\tconst supply = coinWithBalance({\n\t\t\t\ttype: coin.type,\n\t\t\t\tbalance: depositInput,\n\t\t\t});\n\n\t\t\t// NOTE: left as a positional moveCall (not codegen). This builder's\n\t\t\t// coinWithBalance + `tx.object.option` (an on-chain option::none MoveCall\n\t\t\t// for the Option<ID> referral) interleave commands in a way that a\n\t\t\t// generated named-arg call reorders — so migrating it would change the\n\t\t\t// emitted PTB. Kept verbatim to stay byte-identical.\n\t\t\ttx.moveCall({\n\t\t\t\ttarget: `${this.#config.MARGIN_PACKAGE_ID}::margin_pool::supply`,\n\t\t\t\targuments: [\n\t\t\t\t\ttx.object(marginPool.address),\n\t\t\t\t\ttx.object(this.#config.MARGIN_REGISTRY_ID),\n\t\t\t\t\tsupplierCap,\n\t\t\t\t\tsupply,\n\t\t\t\t\ttx.object.option({\n\t\t\t\t\t\ttype: '0x2::object::ID',\n\t\t\t\t\t\tvalue: referralId ? tx.pure.id(referralId) : null,\n\t\t\t\t\t}),\n\t\t\t\t\ttx.object.clock(),\n\t\t\t\t],\n\t\t\t\ttypeArguments: [marginPool.type],\n\t\t\t});\n\t\t};\n\n\t/**\n\t * @description Withdraw from a margin pool. If amountToWithdraw is not provided, withdraws all.\n\t * @param {string} coinKey The key to identify the pool\n\t * @param {TransactionObjectArgument} supplierCap The supplier cap object\n\t * @param {number} [amountToWithdraw] The amount to withdraw. If omitted, withdraws all.\n\t * @returns A function that takes a Transaction object\n\t */\n\twithdrawFromMarginPool =\n\t\t(coinKey: string, supplierCap: TransactionObjectArgument, amountToWithdraw?: number) =>\n\t\t(tx: Transaction) => {\n\t\t\tconst marginPool = this.#config.getMarginPool(coinKey);\n\t\t\tconst coin = this.#config.getCoin(coinKey);\n\t\t\tconst withdrawInput =\n\t\t\t\tamountToWithdraw !== undefined ? convertQuantity(amountToWithdraw, coin.scalar) : null;\n\t\t\treturn tx.add(\n\t\t\t\tmarginPoolMoveCalls.withdraw({\n\t\t\t\t\tpackage: this.#config.MARGIN_PACKAGE_ID,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\tself: marginPool.address,\n\t\t\t\t\t\tregistry: this.#config.MARGIN_REGISTRY_ID,\n\t\t\t\t\t\tsupplierCap,\n\t\t\t\t\t\tamount: withdrawInput,\n\t\t\t\t\t},\n\t\t\t\t\ttypeArguments: [marginPool.type],\n\t\t\t\t}),\n\t\t\t);\n\t\t};\n\n\t/**\n\t * @description Mint a referral for a margin pool\n\t * @param {string} coinKey The key to identify the pool\n\t * @returns A function that takes a Transaction object\n\t */\n\tmintSupplyReferral = (coinKey: string) => (tx: Transaction) => {\n\t\tconst marginPool = this.#config.getMarginPool(coinKey);\n\t\ttx.add(\n\t\t\tmarginPoolMoveCalls.mintSupplyReferral({\n\t\t\t\tpackage: this.#config.MARGIN_PACKAGE_ID,\n\t\t\t\targuments: { self: marginPool.address, registry: this.#config.MARGIN_REGISTRY_ID },\n\t\t\t\ttypeArguments: [marginPool.type],\n\t\t\t}),\n\t\t);\n\t};\n\n\t/**\n\t * @description Withdraw referral fees from a margin pool\n\t * @param {string} coinKey The key to identify the pool\n\t * @param {string} referralId The ID of the referral\n\t * @returns A function that takes a Transaction object\n\t */\n\twithdrawReferralFees = (coinKey: string, referralId: string) => (tx: Transaction) => {\n\t\tconst marginPool = this.#config.getMarginPool(coinKey);\n\t\treturn tx.add(\n\t\t\tmarginPoolMoveCalls.withdrawReferralFees({\n\t\t\t\tpackage: this.#config.MARGIN_PACKAGE_ID,\n\t\t\t\targuments: {\n\t\t\t\t\tself: marginPool.address,\n\t\t\t\t\tregistry: this.#config.MARGIN_REGISTRY_ID,\n\t\t\t\t\treferral: referralId,\n\t\t\t\t},\n\t\t\t\ttypeArguments: [marginPool.type],\n\t\t\t}),\n\t\t);\n\t};\n\n\t// === Read-only/View Functions ===\n\n\t/**\n\t * @description Get the margin pool ID\n\t * @param {string} coinKey The key to identify the pool\n\t * @returns A function that takes a Transaction object\n\t */\n\tgetId = (coinKey: string) => (tx: Transaction) => {\n\t\tconst marginPool = this.#config.getMarginPool(coinKey);\n\t\treturn tx.add(\n\t\t\tmarginPoolMoveCalls.id({\n\t\t\t\tpackage: this.#config.MARGIN_PACKAGE_ID,\n\t\t\t\targuments: { self: marginPool.address },\n\t\t\t\ttypeArguments: [marginPool.type],\n\t\t\t}),\n\t\t);\n\t};\n\n\t/**\n\t * @description Check if a deepbook pool is allowed for borrowing\n\t * @param {string} coinKey The key to identify the margin pool\n\t * @param {string} deepbookPoolId The ID of the deepbook pool\n\t * @returns A function that takes a Transaction object\n\t */\n\tdeepbookPoolAllowed = (coinKey: string, deepbookPoolId: string) => (tx: Transaction) => {\n\t\tconst marginPool = this.#config.getMarginPool(coinKey);\n\t\treturn tx.add(\n\t\t\tmarginPoolMoveCalls.deepbookPoolAllowed({\n\t\t\t\tpackage: this.#config.MARGIN_PACKAGE_ID,\n\t\t\t\targuments: { self: marginPool.address, deepbookPoolId },\n\t\t\t\ttypeArguments: [marginPool.type],\n\t\t\t}),\n\t\t);\n\t};\n\n\t/**\n\t * @description Get the total supply amount\n\t * @param {string} coinKey The key to identify the pool\n\t * @returns A function that takes a Transaction object\n\t */\n\ttotalSupply = (coinKey: string) => (tx: Transaction) => {\n\t\tconst marginPool = this.#config.getMarginPool(coinKey);\n\t\treturn tx.add(\n\t\t\tmarginPoolMoveCalls.totalSupply({\n\t\t\t\tpackage: this.#config.MARGIN_PACKAGE_ID,\n\t\t\t\targuments: { self: marginPool.address },\n\t\t\t\ttypeArguments: [marginPool.type],\n\t\t\t}),\n\t\t);\n\t};\n\n\t/**\n\t * @description Get the total supply shares\n\t * @param {string} coinKey The key to identify the pool\n\t * @returns A function that takes a Transaction object\n\t */\n\tsupplyShares = (coinKey: string) => (tx: Transaction) => {\n\t\tconst marginPool = this.#config.getMarginPool(coinKey);\n\t\treturn tx.add(\n\t\t\tmarginPoolMoveCalls.supplyShares({\n\t\t\t\tpackage: this.#config.MARGIN_PACKAGE_ID,\n\t\t\t\targuments: { self: marginPool.address },\n\t\t\t\ttypeArguments: [marginPool.type],\n\t\t\t}),\n\t\t);\n\t};\n\n\t/**\n\t * @description Get the total borrow amount\n\t * @param {string} coinKey The key to identify the pool\n\t * @returns A function that takes a Transaction object\n\t */\n\ttotalBorrow = (coinKey: string) => (tx: Transaction) => {\n\t\tconst marginPool = this.#config.getMarginPool(coinKey);\n\t\treturn tx.add(\n\t\t\tmarginPoolMoveCalls.totalBorrow({\n\t\t\t\tpackage: this.#config.MARGIN_PACKAGE_ID,\n\t\t\t\targuments: { self: marginPool.address },\n\t\t\t\ttypeArguments: [marginPool.type],\n\t\t\t}),\n\t\t);\n\t};\n\n\t/**\n\t * @description Get the total borrow shares\n\t * @param {string} coinKey The key to identify the pool\n\t * @returns A function that takes a Transaction object\n\t */\n\tborrowShares = (coinKey: string) => (tx: Transaction) => {\n\t\tconst marginPool = this.#config.getMarginPool(coinKey);\n\t\treturn tx.add(\n\t\t\tmarginPoolMoveCalls.borrowShares({\n\t\t\t\tpackage: this.#config.MARGIN_PACKAGE_ID,\n\t\t\t\targuments: { self: marginPool.address },\n\t\t\t\ttypeArguments: [marginPool.type],\n\t\t\t}),\n\t\t);\n\t};\n\n\t/**\n\t * @description Get the last update timestamp\n\t * @param {string} coinKey The key to identify the pool\n\t * @returns A function that takes a Transaction object\n\t */\n\tlastUpdateTimestamp = (coinKey: string) => (tx: Transaction) => {\n\t\tconst marginPool = this.#config.getMarginPool(coinKey);\n\t\treturn tx.add(\n\t\t\tmarginPoolMoveCalls.lastUpdateTimestamp({\n\t\t\t\tpackage: this.#config.MARGIN_PACKAGE_ID,\n\t\t\t\targuments: { self: marginPool.address },\n\t\t\t\ttypeArguments: [marginPool.type],\n\t\t\t}),\n\t\t);\n\t};\n\n\t/**\n\t * @description Get the supply cap\n\t * @param {string} coinKey The key to identify the pool\n\t * @returns A function that takes a Transaction object\n\t */\n\tsupplyCap = (coinKey: string) => (tx: Transaction) => {\n\t\tconst marginPool = this.#config.getMarginPool(coinKey);\n\t\treturn tx.add(\n\t\t\tmarginPoolMoveCalls.supplyCap({\n\t\t\t\tpackage: this.#config.MARGIN_PACKAGE_ID,\n\t\t\t\targuments: { self: marginPool.address },\n\t\t\t\ttypeArguments: [marginPool.type],\n\t\t\t}),\n\t\t);\n\t};\n\n\t/**\n\t * @description Get the max utilization rate\n\t * @param {string} coinKey The key to identify the pool\n\t * @returns A function that takes a Transaction object\n\t */\n\tmaxUtilizationRate = (coinKey: string) => (tx: Transaction) => {\n\t\tconst marginPool = this.#config.getMarginPool(coinKey);\n\t\treturn tx.add(\n\t\t\tmarginPoolMoveCalls.maxUtilizationRate({\n\t\t\t\tpackage: this.#config.MARGIN_PACKAGE_ID,\n\t\t\t\targuments: { self: marginPool.address },\n\t\t\t\ttypeArguments: [marginPool.type],\n\t\t\t}),\n\t\t);\n\t};\n\n\t/**\n\t * @description Get the protocol spread\n\t * @param {string} coinKey The key to identify the pool\n\t * @returns A function that takes a Transaction object\n\t */\n\tprotocolSpread = (coinKey: string) => (tx: Transaction) => {\n\t\tconst marginPool = this.#config.getMarginPool(coinKey);\n\t\treturn tx.add(\n\t\t\tmarginPoolMoveCalls.protocolSpread({\n\t\t\t\tpackage: this.#config.MARGIN_PACKAGE_ID,\n\t\t\t\targuments: { self: marginPool.address },\n\t\t\t\ttypeArguments: [marginPool.type],\n\t\t\t}),\n\t\t);\n\t};\n\n\t/**\n\t * @description Get the minimum borrow amount\n\t * @param {string} coinKey The key to identify the pool\n\t * @returns A function that takes a Transaction object\n\t */\n\tminBorrow = (coinKey: string) => (tx: Transaction) => {\n\t\tconst marginPool = this.#config.getMarginPool(coinKey);\n\t\treturn tx.add(\n\t\t\tmarginPoolMoveCalls.minBorrow({\n\t\t\t\tpackage: this.#config.MARGIN_PACKAGE_ID,\n\t\t\t\targuments: { self: marginPool.address },\n\t\t\t\ttypeArguments: [marginPool.type],\n\t\t\t}),\n\t\t);\n\t};\n\n\t/**\n\t * @description Get the current interest rate\n\t * @param {string} coinKey The key to identify the pool\n\t * @returns A function that takes a Transaction object\n\t */\n\tinterestRate = (coinKey: string) => (tx: Transaction) => {\n\t\tconst marginPool = this.#config.getMarginPool(coinKey);\n\t\treturn tx.add(\n\t\t\tmarginPoolMoveCalls.interestRate({\n\t\t\t\tpackage: this.#config.MARGIN_PACKAGE_ID,\n\t\t\t\targuments: { self: marginPool.address },\n\t\t\t\ttypeArguments: [marginPool.type],\n\t\t\t}),\n\t\t);\n\t};\n\n\t/**\n\t * @description Get user supply shares for a supplier cap\n\t * @param {string} coinKey The key to identify the pool\n\t * @param {string} supplierCapId The ID of the supplier cap\n\t * @returns A function that takes a Transaction object\n\t */\n\tuserSupplyShares = (coinKey: string, supplierCapId: string) => (tx: Transaction) => {\n\t\tconst marginPool = this.#config.getMarginPool(coinKey);\n\t\treturn tx.add(\n\t\t\tmarginPoolMoveCalls.userSupplyShares({\n\t\t\t\tpackage: this.#config.MARGIN_PACKAGE_ID,\n\t\t\t\targuments: { self: marginPool.address, supplierCapId },\n\t\t\t\ttypeArguments: [marginPool.type],\n\t\t\t}),\n\t\t);\n\t};\n\n\t/**\n\t * @description Get user supply amount for a supplier cap\n\t * @param {string} coinKey The key to identify the pool\n\t * @param {string} supplierCapId The ID of the supplier cap\n\t * @returns A function that takes a Transaction object\n\t */\n\tuserSupplyAmount = (coinKey: string, supplierCapId: string) => (tx: Transaction) => {\n\t\tconst marginPool = this.#config.getMarginPool(coinKey);\n\t\treturn tx.add(\n\t\t\tmarginPoolMoveCalls.userSupplyAmount({\n\t\t\t\tpackage: this.#config.MARGIN_PACKAGE_ID,\n\t\t\t\targuments: { self: marginPool.address, supplierCapId },\n\t\t\t\ttypeArguments: [marginPool.type],\n\t\t\t}),\n\t\t);\n\t};\n}\n"],"mappings":";;;;;;;;AAYA,IAAa,qBAAb,MAAgC;CAC/B;;;;CAKA,YAAY,QAAwB;gCAQX,OAAoB;AAC5C,UAAO,GAAG,IACTA,gBAAoC;IACnC,SAAS,MAAKC,OAAQ;IACtB,WAAW,EAAE,UAAU,MAAKA,OAAQ,oBAAoB;IACxD,CAAC,CACF;;6BAaA,SACA,aACA,iBACA,gBAEA,OAAoB;AACpB,MAAG,kBAAkB,MAAKA,OAAQ,QAAQ;GAC1C,MAAM,aAAa,MAAKA,OAAQ,cAAc,QAAQ;GACtD,MAAM,OAAO,MAAKA,OAAQ,QAAQ,QAAQ;GAC1C,MAAM,eAAe,gBAAgB,iBAAiB,KAAK,OAAO;GAClE,MAAM,SAAS,gBAAgB;IAC9B,MAAM,KAAK;IACX,SAAS;IACT,CAAC;AAOF,MAAG,SAAS;IACX,QAAQ,GAAG,MAAKA,OAAQ,kBAAkB;IAC1C,WAAW;KACV,GAAG,OAAO,WAAW,QAAQ;KAC7B,GAAG,OAAO,MAAKA,OAAQ,mBAAmB;KAC1C;KACA;KACA,GAAG,OAAO,OAAO;MAChB,MAAM;MACN,OAAO,aAAa,GAAG,KAAK,GAAG,WAAW,GAAG;MAC7C,CAAC;KACF,GAAG,OAAO,OAAO;KACjB;IACD,eAAe,CAAC,WAAW,KAAK;IAChC,CAAC;;iCAWF,SAAiB,aAAwC,sBACzD,OAAoB;GACpB,MAAM,aAAa,MAAKA,OAAQ,cAAc,QAAQ;GACtD,MAAM,OAAO,MAAKA,OAAQ,QAAQ,QAAQ;GAC1C,MAAM,gBACL,qBAAqB,SAAY,gBAAgB,kBAAkB,KA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