@haneullabs/deepbook-v3 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +984 -0
- package/README.md +1 -0
- package/dist/cjs/client.d.ts +861 -0
- package/dist/cjs/client.js +1982 -0
- package/dist/cjs/client.js.map +7 -0
- package/dist/cjs/contracts/deepbook/account.d.ts +105 -0
- package/dist/cjs/contracts/deepbook/account.js +163 -0
- package/dist/cjs/contracts/deepbook/account.js.map +7 -0
- package/dist/cjs/contracts/deepbook/balance_manager.d.ts +268 -0
- package/dist/cjs/contracts/deepbook/balance_manager.js +361 -0
- package/dist/cjs/contracts/deepbook/balance_manager.js.map +7 -0
- package/dist/cjs/contracts/deepbook/balances.d.ts +10 -0
- package/dist/cjs/contracts/deepbook/balances.js +35 -0
- package/dist/cjs/contracts/deepbook/balances.js.map +7 -0
- package/dist/cjs/contracts/deepbook/big_vector.d.ts +62 -0
- package/dist/cjs/contracts/deepbook/big_vector.js +80 -0
- package/dist/cjs/contracts/deepbook/big_vector.js.map +7 -0
- package/dist/cjs/contracts/deepbook/book.d.ts +34 -0
- package/dist/cjs/contracts/deepbook/book.js +50 -0
- package/dist/cjs/contracts/deepbook/book.js.map +7 -0
- package/dist/cjs/contracts/deepbook/constants.d.ts +176 -0
- package/dist/cjs/contracts/deepbook/constants.js +338 -0
- package/dist/cjs/contracts/deepbook/constants.js.map +7 -0
- package/dist/cjs/contracts/deepbook/deep_price.d.ts +60 -0
- package/dist/cjs/contracts/deepbook/deep_price.js +87 -0
- package/dist/cjs/contracts/deepbook/deep_price.js.map +7 -0
- package/dist/cjs/contracts/deepbook/deps/std/type_name.d.ts +14 -0
- package/dist/cjs/contracts/deepbook/deps/std/type_name.js +42 -0
- package/dist/cjs/contracts/deepbook/deps/std/type_name.js.map +7 -0
- package/dist/cjs/contracts/deepbook/deps/sui/bag.d.ts +33 -0
- package/dist/cjs/contracts/deepbook/deps/sui/bag.js +47 -0
- package/dist/cjs/contracts/deepbook/deps/sui/bag.js.map +7 -0
- package/dist/cjs/contracts/deepbook/deps/sui/balance.d.ts +9 -0
- package/dist/cjs/contracts/deepbook/deps/sui/balance.js +33 -0
- package/dist/cjs/contracts/deepbook/deps/sui/balance.js.map +7 -0
- package/dist/cjs/contracts/deepbook/deps/sui/object.d.ts +5 -0
- package/dist/cjs/contracts/deepbook/deps/sui/object.js +33 -0
- package/dist/cjs/contracts/deepbook/deps/sui/object.js.map +7 -0
- package/dist/cjs/contracts/deepbook/deps/sui/table.d.ts +28 -0
- package/dist/cjs/contracts/deepbook/deps/sui/table.js +47 -0
- package/dist/cjs/contracts/deepbook/deps/sui/table.js.map +7 -0
- package/dist/cjs/contracts/deepbook/deps/sui/vec_map.d.ts +27 -0
- package/dist/cjs/contracts/deepbook/deps/sui/vec_map.js +45 -0
- package/dist/cjs/contracts/deepbook/deps/sui/vec_map.js.map +7 -0
- package/dist/cjs/contracts/deepbook/deps/sui/vec_set.d.ts +15 -0
- package/dist/cjs/contracts/deepbook/deps/sui/vec_set.js +35 -0
- package/dist/cjs/contracts/deepbook/deps/sui/vec_set.js.map +7 -0
- package/dist/cjs/contracts/deepbook/deps/sui/versioned.d.ts +7 -0
- package/dist/cjs/contracts/deepbook/deps/sui/versioned.js +45 -0
- package/dist/cjs/contracts/deepbook/deps/sui/versioned.js.map +7 -0
- package/dist/cjs/contracts/deepbook/ewma.d.ts +17 -0
- package/dist/cjs/contracts/deepbook/ewma.js +39 -0
- package/dist/cjs/contracts/deepbook/ewma.js.map +7 -0
- package/dist/cjs/contracts/deepbook/fill.d.ts +153 -0
- package/dist/cjs/contracts/deepbook/fill.js +251 -0
- package/dist/cjs/contracts/deepbook/fill.js.map +7 -0
- package/dist/cjs/contracts/deepbook/governance.d.ts +63 -0
- package/dist/cjs/contracts/deepbook/governance.js +79 -0
- package/dist/cjs/contracts/deepbook/governance.js.map +7 -0
- package/dist/cjs/contracts/deepbook/history.d.ts +60 -0
- package/dist/cjs/contracts/deepbook/history.js +78 -0
- package/dist/cjs/contracts/deepbook/history.js.map +7 -0
- package/dist/cjs/contracts/deepbook/math.d.ts +94 -0
- package/dist/cjs/contracts/deepbook/math.js +132 -0
- package/dist/cjs/contracts/deepbook/math.js.map +7 -0
- package/dist/cjs/contracts/deepbook/order.d.ts +135 -0
- package/dist/cjs/contracts/deepbook/order.js +218 -0
- package/dist/cjs/contracts/deepbook/order.js.map +7 -0
- package/dist/cjs/contracts/deepbook/order_info.d.ts +296 -0
- package/dist/cjs/contracts/deepbook/order_info.js +386 -0
- package/dist/cjs/contracts/deepbook/order_info.js.map +7 -0
- package/dist/cjs/contracts/deepbook/order_query.d.ts +85 -0
- package/dist/cjs/contracts/deepbook/order_query.js +96 -0
- package/dist/cjs/contracts/deepbook/order_query.js.map +7 -0
- package/dist/cjs/contracts/deepbook/pool.d.ts +1218 -0
- package/dist/cjs/contracts/deepbook/pool.js +1236 -0
- package/dist/cjs/contracts/deepbook/pool.js.map +7 -0
- package/dist/cjs/contracts/deepbook/registry.d.ts +134 -0
- package/dist/cjs/contracts/deepbook/registry.js +182 -0
- package/dist/cjs/contracts/deepbook/registry.js.map +7 -0
- package/dist/cjs/contracts/deepbook/state.d.ts +117 -0
- package/dist/cjs/contracts/deepbook/state.js +104 -0
- package/dist/cjs/contracts/deepbook/state.js.map +7 -0
- package/dist/cjs/contracts/deepbook/trade_params.d.ts +7 -0
- package/dist/cjs/contracts/deepbook/trade_params.js +35 -0
- package/dist/cjs/contracts/deepbook/trade_params.js.map +7 -0
- package/dist/cjs/contracts/deepbook/vault.d.ts +30 -0
- package/dist/cjs/contracts/deepbook/vault.js +65 -0
- package/dist/cjs/contracts/deepbook/vault.js.map +7 -0
- package/dist/cjs/contracts/utils/index.d.ts +25 -0
- package/dist/cjs/contracts/utils/index.js +148 -0
- package/dist/cjs/contracts/utils/index.js.map +7 -0
- package/dist/cjs/index.d.ts +23 -0
- package/dist/cjs/index.js +81 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/package.json +4 -0
- package/dist/cjs/pyth/PriceServiceConnection.d.ts +26 -0
- package/dist/cjs/pyth/PriceServiceConnection.js +68 -0
- package/dist/cjs/pyth/PriceServiceConnection.js.map +7 -0
- package/dist/cjs/pyth/pyth-helpers.d.ts +7 -0
- package/dist/cjs/pyth/pyth-helpers.js +36 -0
- package/dist/cjs/pyth/pyth-helpers.js.map +7 -0
- package/dist/cjs/pyth/pyth.d.ts +65 -0
- package/dist/cjs/pyth/pyth.js +269 -0
- package/dist/cjs/pyth/pyth.js.map +7 -0
- package/dist/cjs/transactions/balanceManager.d.ts +168 -0
- package/dist/cjs/transactions/balanceManager.js +384 -0
- package/dist/cjs/transactions/balanceManager.js.map +7 -0
- package/dist/cjs/transactions/deepbook.d.ts +477 -0
- package/dist/cjs/transactions/deepbook.js +1335 -0
- package/dist/cjs/transactions/deepbook.js.map +7 -0
- package/dist/cjs/transactions/deepbookAdmin.d.ts +105 -0
- package/dist/cjs/transactions/deepbookAdmin.js +334 -0
- package/dist/cjs/transactions/deepbookAdmin.js.map +7 -0
- package/dist/cjs/transactions/flashLoans.d.ts +56 -0
- package/dist/cjs/transactions/flashLoans.js +124 -0
- package/dist/cjs/transactions/flashLoans.js.map +7 -0
- package/dist/cjs/transactions/governance.d.ts +42 -0
- package/dist/cjs/transactions/governance.js +135 -0
- package/dist/cjs/transactions/governance.js.map +7 -0
- package/dist/cjs/transactions/marginAdmin.d.ts +133 -0
- package/dist/cjs/transactions/marginAdmin.js +393 -0
- package/dist/cjs/transactions/marginAdmin.js.map +7 -0
- package/dist/cjs/transactions/marginLiquidations.d.ts +61 -0
- package/dist/cjs/transactions/marginLiquidations.js +173 -0
- package/dist/cjs/transactions/marginLiquidations.js.map +7 -0
- package/dist/cjs/transactions/marginMaintainer.d.ts +80 -0
- package/dist/cjs/transactions/marginMaintainer.js +251 -0
- package/dist/cjs/transactions/marginMaintainer.js.map +7 -0
- package/dist/cjs/transactions/marginManager.d.ts +236 -0
- package/dist/cjs/transactions/marginManager.js +688 -0
- package/dist/cjs/transactions/marginManager.js.map +7 -0
- package/dist/cjs/transactions/marginPool.d.ts +134 -0
- package/dist/cjs/transactions/marginPool.js +330 -0
- package/dist/cjs/transactions/marginPool.js.map +7 -0
- package/dist/cjs/transactions/marginRegistry.d.ts +94 -0
- package/dist/cjs/transactions/marginRegistry.js +221 -0
- package/dist/cjs/transactions/marginRegistry.js.map +7 -0
- package/dist/cjs/transactions/marginTPSL.d.ts +93 -0
- package/dist/cjs/transactions/marginTPSL.js +286 -0
- package/dist/cjs/transactions/marginTPSL.js.map +7 -0
- package/dist/cjs/transactions/poolProxy.d.ts +104 -0
- package/dist/cjs/transactions/poolProxy.js +435 -0
- package/dist/cjs/transactions/poolProxy.js.map +7 -0
- package/dist/cjs/types/bcs.d.ts +5 -0
- package/dist/cjs/types/bcs.js +33 -0
- package/dist/cjs/types/bcs.js.map +7 -0
- package/dist/cjs/types/index.d.ts +218 -0
- package/dist/cjs/types/index.js +38 -0
- package/dist/cjs/types/index.js.map +7 -0
- package/dist/cjs/utils/config.d.ts +65 -0
- package/dist/cjs/utils/config.js +144 -0
- package/dist/cjs/utils/config.js.map +7 -0
- package/dist/cjs/utils/constants.d.ts +76 -0
- package/dist/cjs/utils/constants.js +382 -0
- package/dist/cjs/utils/constants.js.map +7 -0
- package/dist/cjs/utils/errors.d.ts +42 -0
- package/dist/cjs/utils/errors.js +70 -0
- package/dist/cjs/utils/errors.js.map +7 -0
- package/dist/cjs/utils/validation.d.ts +50 -0
- package/dist/cjs/utils/validation.js +67 -0
- package/dist/cjs/utils/validation.js.map +7 -0
- package/dist/esm/client.d.ts +861 -0
- package/dist/esm/client.js +1967 -0
- package/dist/esm/client.js.map +7 -0
- package/dist/esm/contracts/deepbook/account.d.ts +105 -0
- package/dist/esm/contracts/deepbook/account.js +133 -0
- package/dist/esm/contracts/deepbook/account.js.map +7 -0
- package/dist/esm/contracts/deepbook/balance_manager.d.ts +268 -0
- package/dist/esm/contracts/deepbook/balance_manager.js +331 -0
- package/dist/esm/contracts/deepbook/balance_manager.js.map +7 -0
- package/dist/esm/contracts/deepbook/balances.d.ts +10 -0
- package/dist/esm/contracts/deepbook/balances.js +15 -0
- package/dist/esm/contracts/deepbook/balances.js.map +7 -0
- package/dist/esm/contracts/deepbook/big_vector.d.ts +62 -0
- package/dist/esm/contracts/deepbook/big_vector.js +50 -0
- package/dist/esm/contracts/deepbook/big_vector.js.map +7 -0
- package/dist/esm/contracts/deepbook/book.d.ts +34 -0
- package/dist/esm/contracts/deepbook/book.js +20 -0
- package/dist/esm/contracts/deepbook/book.js.map +7 -0
- package/dist/esm/contracts/deepbook/constants.d.ts +176 -0
- package/dist/esm/contracts/deepbook/constants.js +318 -0
- package/dist/esm/contracts/deepbook/constants.js.map +7 -0
- package/dist/esm/contracts/deepbook/deep_price.d.ts +60 -0
- package/dist/esm/contracts/deepbook/deep_price.js +67 -0
- package/dist/esm/contracts/deepbook/deep_price.js.map +7 -0
- package/dist/esm/contracts/deepbook/deps/std/type_name.d.ts +14 -0
- package/dist/esm/contracts/deepbook/deps/std/type_name.js +22 -0
- package/dist/esm/contracts/deepbook/deps/std/type_name.js.map +7 -0
- package/dist/esm/contracts/deepbook/deps/sui/bag.d.ts +33 -0
- package/dist/esm/contracts/deepbook/deps/sui/bag.js +17 -0
- package/dist/esm/contracts/deepbook/deps/sui/bag.js.map +7 -0
- package/dist/esm/contracts/deepbook/deps/sui/balance.d.ts +9 -0
- package/dist/esm/contracts/deepbook/deps/sui/balance.js +13 -0
- package/dist/esm/contracts/deepbook/deps/sui/balance.js.map +7 -0
- package/dist/esm/contracts/deepbook/deps/sui/object.d.ts +5 -0
- package/dist/esm/contracts/deepbook/deps/sui/object.js +13 -0
- package/dist/esm/contracts/deepbook/deps/sui/object.js.map +7 -0
- package/dist/esm/contracts/deepbook/deps/sui/table.d.ts +28 -0
- package/dist/esm/contracts/deepbook/deps/sui/table.js +17 -0
- package/dist/esm/contracts/deepbook/deps/sui/table.js.map +7 -0
- package/dist/esm/contracts/deepbook/deps/sui/vec_map.d.ts +27 -0
- package/dist/esm/contracts/deepbook/deps/sui/vec_map.js +25 -0
- package/dist/esm/contracts/deepbook/deps/sui/vec_map.js.map +7 -0
- package/dist/esm/contracts/deepbook/deps/sui/vec_set.d.ts +15 -0
- package/dist/esm/contracts/deepbook/deps/sui/vec_set.js +15 -0
- package/dist/esm/contracts/deepbook/deps/sui/vec_set.js.map +7 -0
- package/dist/esm/contracts/deepbook/deps/sui/versioned.d.ts +7 -0
- package/dist/esm/contracts/deepbook/deps/sui/versioned.js +15 -0
- package/dist/esm/contracts/deepbook/deps/sui/versioned.js.map +7 -0
- package/dist/esm/contracts/deepbook/ewma.d.ts +17 -0
- package/dist/esm/contracts/deepbook/ewma.js +19 -0
- package/dist/esm/contracts/deepbook/ewma.js.map +7 -0
- package/dist/esm/contracts/deepbook/fill.d.ts +153 -0
- package/dist/esm/contracts/deepbook/fill.js +221 -0
- package/dist/esm/contracts/deepbook/fill.js.map +7 -0
- package/dist/esm/contracts/deepbook/governance.d.ts +63 -0
- package/dist/esm/contracts/deepbook/governance.js +49 -0
- package/dist/esm/contracts/deepbook/governance.js.map +7 -0
- package/dist/esm/contracts/deepbook/history.d.ts +60 -0
- package/dist/esm/contracts/deepbook/history.js +48 -0
- package/dist/esm/contracts/deepbook/history.js.map +7 -0
- package/dist/esm/contracts/deepbook/math.d.ts +94 -0
- package/dist/esm/contracts/deepbook/math.js +112 -0
- package/dist/esm/contracts/deepbook/math.js.map +7 -0
- package/dist/esm/contracts/deepbook/order.d.ts +135 -0
- package/dist/esm/contracts/deepbook/order.js +188 -0
- package/dist/esm/contracts/deepbook/order.js.map +7 -0
- package/dist/esm/contracts/deepbook/order_info.d.ts +296 -0
- package/dist/esm/contracts/deepbook/order_info.js +356 -0
- package/dist/esm/contracts/deepbook/order_info.js.map +7 -0
- package/dist/esm/contracts/deepbook/order_query.d.ts +85 -0
- package/dist/esm/contracts/deepbook/order_query.js +66 -0
- package/dist/esm/contracts/deepbook/order_query.js.map +7 -0
- package/dist/esm/contracts/deepbook/pool.d.ts +1218 -0
- package/dist/esm/contracts/deepbook/pool.js +1206 -0
- package/dist/esm/contracts/deepbook/pool.js.map +7 -0
- package/dist/esm/contracts/deepbook/registry.d.ts +134 -0
- package/dist/esm/contracts/deepbook/registry.js +152 -0
- package/dist/esm/contracts/deepbook/registry.js.map +7 -0
- package/dist/esm/contracts/deepbook/state.d.ts +117 -0
- package/dist/esm/contracts/deepbook/state.js +74 -0
- package/dist/esm/contracts/deepbook/state.js.map +7 -0
- package/dist/esm/contracts/deepbook/trade_params.d.ts +7 -0
- package/dist/esm/contracts/deepbook/trade_params.js +15 -0
- package/dist/esm/contracts/deepbook/trade_params.js.map +7 -0
- package/dist/esm/contracts/deepbook/vault.d.ts +30 -0
- package/dist/esm/contracts/deepbook/vault.js +35 -0
- package/dist/esm/contracts/deepbook/vault.js.map +7 -0
- package/dist/esm/contracts/utils/index.d.ts +25 -0
- package/dist/esm/contracts/utils/index.js +128 -0
- package/dist/esm/contracts/utils/index.js.map +7 -0
- package/dist/esm/index.d.ts +23 -0
- package/dist/esm/index.js +81 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/package.json +4 -0
- package/dist/esm/pyth/PriceServiceConnection.d.ts +26 -0
- package/dist/esm/pyth/PriceServiceConnection.js +38 -0
- package/dist/esm/pyth/PriceServiceConnection.js.map +7 -0
- package/dist/esm/pyth/pyth-helpers.d.ts +7 -0
- package/dist/esm/pyth/pyth-helpers.js +16 -0
- package/dist/esm/pyth/pyth-helpers.js.map +7 -0
- package/dist/esm/pyth/pyth.d.ts +65 -0
- package/dist/esm/pyth/pyth.js +249 -0
- package/dist/esm/pyth/pyth.js.map +7 -0
- package/dist/esm/transactions/balanceManager.d.ts +168 -0
- package/dist/esm/transactions/balanceManager.js +364 -0
- package/dist/esm/transactions/balanceManager.js.map +7 -0
- package/dist/esm/transactions/deepbook.d.ts +477 -0
- package/dist/esm/transactions/deepbook.js +1321 -0
- package/dist/esm/transactions/deepbook.js.map +7 -0
- package/dist/esm/transactions/deepbookAdmin.d.ts +105 -0
- package/dist/esm/transactions/deepbookAdmin.js +314 -0
- package/dist/esm/transactions/deepbookAdmin.js.map +7 -0
- package/dist/esm/transactions/flashLoans.d.ts +56 -0
- package/dist/esm/transactions/flashLoans.js +104 -0
- package/dist/esm/transactions/flashLoans.js.map +7 -0
- package/dist/esm/transactions/governance.d.ts +42 -0
- package/dist/esm/transactions/governance.js +115 -0
- package/dist/esm/transactions/governance.js.map +7 -0
- package/dist/esm/transactions/marginAdmin.d.ts +133 -0
- package/dist/esm/transactions/marginAdmin.js +373 -0
- package/dist/esm/transactions/marginAdmin.js.map +7 -0
- package/dist/esm/transactions/marginLiquidations.d.ts +61 -0
- package/dist/esm/transactions/marginLiquidations.js +153 -0
- package/dist/esm/transactions/marginLiquidations.js.map +7 -0
- package/dist/esm/transactions/marginMaintainer.d.ts +80 -0
- package/dist/esm/transactions/marginMaintainer.js +231 -0
- package/dist/esm/transactions/marginMaintainer.js.map +7 -0
- package/dist/esm/transactions/marginManager.d.ts +236 -0
- package/dist/esm/transactions/marginManager.js +668 -0
- package/dist/esm/transactions/marginManager.js.map +7 -0
- package/dist/esm/transactions/marginPool.d.ts +134 -0
- package/dist/esm/transactions/marginPool.js +310 -0
- package/dist/esm/transactions/marginPool.js.map +7 -0
- package/dist/esm/transactions/marginRegistry.d.ts +94 -0
- package/dist/esm/transactions/marginRegistry.js +201 -0
- package/dist/esm/transactions/marginRegistry.js.map +7 -0
- package/dist/esm/transactions/marginTPSL.d.ts +93 -0
- package/dist/esm/transactions/marginTPSL.js +266 -0
- package/dist/esm/transactions/marginTPSL.js.map +7 -0
- package/dist/esm/transactions/poolProxy.d.ts +104 -0
- package/dist/esm/transactions/poolProxy.js +415 -0
- package/dist/esm/transactions/poolProxy.js.map +7 -0
- package/dist/esm/types/bcs.d.ts +5 -0
- package/dist/esm/types/bcs.js +13 -0
- package/dist/esm/types/bcs.js.map +7 -0
- package/dist/esm/types/index.d.ts +218 -0
- package/dist/esm/types/index.js +18 -0
- package/dist/esm/types/index.js.map +7 -0
- package/dist/esm/utils/config.d.ts +65 -0
- package/dist/esm/utils/config.js +135 -0
- package/dist/esm/utils/config.js.map +7 -0
- package/dist/esm/utils/constants.d.ts +76 -0
- package/dist/esm/utils/constants.js +362 -0
- package/dist/esm/utils/constants.js.map +7 -0
- package/dist/esm/utils/errors.d.ts +42 -0
- package/dist/esm/utils/errors.js +50 -0
- package/dist/esm/utils/errors.js.map +7 -0
- package/dist/esm/utils/validation.d.ts +50 -0
- package/dist/esm/utils/validation.js +47 -0
- package/dist/esm/utils/validation.js.map +7 -0
- package/dist/tsconfig.esm.tsbuildinfo +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +63 -0
- package/src/client.ts +2451 -0
- package/src/contracts/deepbook/account.ts +199 -0
- package/src/contracts/deepbook/balance_manager.ts +532 -0
- package/src/contracts/deepbook/balances.ts +19 -0
- package/src/contracts/deepbook/big_vector.ts +74 -0
- package/src/contracts/deepbook/book.ts +24 -0
- package/src/contracts/deepbook/constants.ts +458 -0
- package/src/contracts/deepbook/deep_price.ts +84 -0
- package/src/contracts/deepbook/deps/std/type_name.ts +23 -0
- package/src/contracts/deepbook/deps/sui/bag.ts +41 -0
- package/src/contracts/deepbook/deps/sui/balance.ts +18 -0
- package/src/contracts/deepbook/deps/sui/object.ts +14 -0
- package/src/contracts/deepbook/deps/sui/table.ts +36 -0
- package/src/contracts/deepbook/deps/sui/vec_map.ts +33 -0
- package/src/contracts/deepbook/deps/sui/vec_set.ts +22 -0
- package/src/contracts/deepbook/deps/sui/versioned.ts +13 -0
- package/src/contracts/deepbook/ewma.ts +26 -0
- package/src/contracts/deepbook/fill.ts +336 -0
- package/src/contracts/deepbook/governance.ts +52 -0
- package/src/contracts/deepbook/history.ts +51 -0
- package/src/contracts/deepbook/math.ts +210 -0
- package/src/contracts/deepbook/order.ts +269 -0
- package/src/contracts/deepbook/order_info.ts +513 -0
- package/src/contracts/deepbook/order_query.ts +115 -0
- package/src/contracts/deepbook/pool.ts +2269 -0
- package/src/contracts/deepbook/registry.ts +242 -0
- package/src/contracts/deepbook/state.ts +74 -0
- package/src/contracts/deepbook/trade_params.ts +16 -0
- package/src/contracts/deepbook/vault.ts +37 -0
- package/src/contracts/utils/index.ts +184 -0
- package/src/index.ts +95 -0
- package/src/pyth/PriceServiceConnection.ts +48 -0
- package/src/pyth/pyth-helpers.ts +23 -0
- package/src/pyth/pyth.ts +305 -0
- package/src/transactions/balanceManager.ts +399 -0
- package/src/transactions/deepbook.ts +1519 -0
- package/src/transactions/deepbookAdmin.ts +332 -0
- package/src/transactions/flashLoans.ts +123 -0
- package/src/transactions/governance.ts +123 -0
- package/src/transactions/marginAdmin.ts +396 -0
- package/src/transactions/marginLiquidations.ts +175 -0
- package/src/transactions/marginMaintainer.ts +280 -0
- package/src/transactions/marginManager.ts +708 -0
- package/src/transactions/marginPool.ts +339 -0
- package/src/transactions/marginRegistry.ts +212 -0
- package/src/transactions/marginTPSL.ts +296 -0
- package/src/transactions/poolProxy.ts +438 -0
- package/src/types/bcs.ts +8 -0
- package/src/types/index.ts +255 -0
- package/src/utils/config.ts +177 -0
- package/src/utils/constants.ts +374 -0
- package/src/utils/errors.ts +67 -0
- package/src/utils/validation.ts +91 -0
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
import type { Transaction } from '@haneullabs/haneul/transactions';
|
|
2
|
+
import type { CanPlaceLimitOrderParams, CanPlaceMarketOrderParams, CreatePermissionlessPoolParams, PlaceLimitOrderParams, PlaceMarketOrderParams, SwapParams, SwapWithManagerParams } from '../types/index.js';
|
|
3
|
+
import type { DeepBookConfig } from '../utils/config.js';
|
|
4
|
+
/**
|
|
5
|
+
* DeepBookContract class for managing DeepBook operations.
|
|
6
|
+
*/
|
|
7
|
+
export declare class DeepBookContract {
|
|
8
|
+
#private;
|
|
9
|
+
/**
|
|
10
|
+
* @param {DeepBookConfig} config Configuration for DeepBookContract
|
|
11
|
+
*/
|
|
12
|
+
constructor(config: DeepBookConfig);
|
|
13
|
+
/**
|
|
14
|
+
* @description Place a limit order
|
|
15
|
+
* @param {PlaceLimitOrderParams} params Parameters for placing a limit order
|
|
16
|
+
* @returns A function that takes a Transaction object
|
|
17
|
+
*/
|
|
18
|
+
placeLimitOrder: (params: PlaceLimitOrderParams) => (tx: Transaction) => void;
|
|
19
|
+
/**
|
|
20
|
+
* @description Place a market order
|
|
21
|
+
* @param {PlaceMarketOrderParams} params Parameters for placing a market order
|
|
22
|
+
* @returns A function that takes a Transaction object
|
|
23
|
+
*/
|
|
24
|
+
placeMarketOrder: (params: PlaceMarketOrderParams) => (tx: Transaction) => void;
|
|
25
|
+
/**
|
|
26
|
+
* @description Modify an existing order
|
|
27
|
+
* @param {string} poolKey The key to identify the pool
|
|
28
|
+
* @param {string} balanceManagerKey The key to identify the BalanceManager
|
|
29
|
+
* @param {string} orderId Order ID to modify
|
|
30
|
+
* @param {number} newQuantity New quantity for the order
|
|
31
|
+
* @returns A function that takes a Transaction object
|
|
32
|
+
*/
|
|
33
|
+
modifyOrder: (poolKey: string, balanceManagerKey: string, orderId: string, newQuantity: number) => (tx: Transaction) => void;
|
|
34
|
+
/**
|
|
35
|
+
* @description Cancel an existing order
|
|
36
|
+
* @param {string} poolKey The key to identify the pool
|
|
37
|
+
* @param {string} balanceManagerKey The key to identify the BalanceManager
|
|
38
|
+
* @param {string} orderId Order ID to cancel
|
|
39
|
+
* @returns A function that takes a Transaction object
|
|
40
|
+
*/
|
|
41
|
+
cancelOrder: (poolKey: string, balanceManagerKey: string, orderId: string) => (tx: Transaction) => void;
|
|
42
|
+
/**
|
|
43
|
+
* @description Cancel multiple orders
|
|
44
|
+
* @param {string} poolKey The key to identify the pool
|
|
45
|
+
* @param {string} balanceManagerKey The key to identify the BalanceManager
|
|
46
|
+
* @param {string[]} orderIds Array of order IDs to cancel
|
|
47
|
+
* @returns A function that takes a Transaction object
|
|
48
|
+
*/
|
|
49
|
+
cancelOrders: (poolKey: string, balanceManagerKey: string, orderIds: string[]) => (tx: Transaction) => void;
|
|
50
|
+
/**
|
|
51
|
+
* @description Cancel all open orders for a balance manager
|
|
52
|
+
* @param {string} poolKey The key to identify the pool
|
|
53
|
+
* @param {string} balanceManagerKey The key to identify the BalanceManager
|
|
54
|
+
* @returns A function that takes a Transaction object
|
|
55
|
+
*/
|
|
56
|
+
cancelAllOrders: (poolKey: string, balanceManagerKey: string) => (tx: Transaction) => void;
|
|
57
|
+
/**
|
|
58
|
+
* @description Withdraw settled amounts for a balance manager
|
|
59
|
+
* @param {string} poolKey The key to identify the pool
|
|
60
|
+
* @param {string} balanceManagerKey The key to identify the BalanceManager
|
|
61
|
+
* @returns A function that takes a Transaction object
|
|
62
|
+
*/
|
|
63
|
+
withdrawSettledAmounts: (poolKey: string, balanceManagerKey: string) => (tx: Transaction) => void;
|
|
64
|
+
/**
|
|
65
|
+
* @description Withdraw settled amounts permissionlessly for a balance manager
|
|
66
|
+
* @param {string} poolKey The key to identify the pool
|
|
67
|
+
* @param {string} balanceManagerKey The key to identify the BalanceManager
|
|
68
|
+
* @returns A function that takes a Transaction object
|
|
69
|
+
*/
|
|
70
|
+
withdrawSettledAmountsPermissionless: (poolKey: string, balanceManagerKey: string) => (tx: Transaction) => void;
|
|
71
|
+
/**
|
|
72
|
+
* @description Add a deep price point for a target pool using a reference pool
|
|
73
|
+
* @param {string} targetPoolKey The key to identify the target pool
|
|
74
|
+
* @param {string} referencePoolKey The key to identify the reference pool
|
|
75
|
+
* @returns A function that takes a Transaction object
|
|
76
|
+
*/
|
|
77
|
+
addDeepPricePoint: (targetPoolKey: string, referencePoolKey: string) => (tx: Transaction) => void;
|
|
78
|
+
/**
|
|
79
|
+
* @description Claim rebates for a balance manager
|
|
80
|
+
* @param {string} poolKey The key to identify the pool
|
|
81
|
+
* @param {string} balanceManagerKey The key to identify the BalanceManager
|
|
82
|
+
* @returns A function that takes a Transaction object
|
|
83
|
+
*/
|
|
84
|
+
claimRebates: (poolKey: string, balanceManagerKey: string) => (tx: Transaction) => void;
|
|
85
|
+
/**
|
|
86
|
+
* @description Mint a referral for a pool
|
|
87
|
+
* @param {string} poolKey The key to identify the pool
|
|
88
|
+
* @param {number} multiplier The multiplier for the referral
|
|
89
|
+
* @returns A function that takes a Transaction object
|
|
90
|
+
*/
|
|
91
|
+
mintReferral: (poolKey: string, multiplier: number) => (tx: Transaction) => void;
|
|
92
|
+
/**
|
|
93
|
+
* @description Update the referral multiplier for a pool (DeepBookPoolReferral)
|
|
94
|
+
* @param {string} poolKey The key to identify the pool
|
|
95
|
+
* @param {string} referral The referral (DeepBookPoolReferral) to update
|
|
96
|
+
* @param {number} multiplier The multiplier for the referral
|
|
97
|
+
* @returns A function that takes a Transaction object
|
|
98
|
+
*/
|
|
99
|
+
updatePoolReferralMultiplier: (poolKey: string, referral: string, multiplier: number) => (tx: Transaction) => void;
|
|
100
|
+
/**
|
|
101
|
+
* @description Claim the rewards for a referral (DeepBookPoolReferral)
|
|
102
|
+
* @param {string} poolKey The key to identify the pool
|
|
103
|
+
* @param {string} referral The referral (DeepBookPoolReferral) to claim the rewards for
|
|
104
|
+
* @returns A function that takes a Transaction object
|
|
105
|
+
*/
|
|
106
|
+
claimPoolReferralRewards: (poolKey: string, referral: string) => (tx: Transaction) => {
|
|
107
|
+
baseRewards: {
|
|
108
|
+
$kind: "NestedResult";
|
|
109
|
+
NestedResult: [number, number];
|
|
110
|
+
};
|
|
111
|
+
quoteRewards: {
|
|
112
|
+
$kind: "NestedResult";
|
|
113
|
+
NestedResult: [number, number];
|
|
114
|
+
};
|
|
115
|
+
deepRewards: {
|
|
116
|
+
$kind: "NestedResult";
|
|
117
|
+
NestedResult: [number, number];
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* @description Update the allowed versions for a pool
|
|
122
|
+
* @param {string} poolKey The key of the pool to be updated
|
|
123
|
+
* @returns A function that takes a Transaction object
|
|
124
|
+
*/
|
|
125
|
+
updatePoolAllowedVersions: (poolKey: string) => (tx: Transaction) => void;
|
|
126
|
+
/**
|
|
127
|
+
* @description Gets an order
|
|
128
|
+
* @param {string} poolKey The key to identify the pool
|
|
129
|
+
* @param {string} orderId Order ID to get
|
|
130
|
+
* @returns A function that takes a Transaction object
|
|
131
|
+
*/
|
|
132
|
+
getOrder: (poolKey: string, orderId: string) => (tx: Transaction) => void;
|
|
133
|
+
/**
|
|
134
|
+
* @description Prepares a transaction to retrieve multiple orders from a specified pool.
|
|
135
|
+
* @param {string} poolKey - The identifier key for the pool to retrieve orders from.
|
|
136
|
+
* @param {string[]} orderIds - Array of order IDs to retrieve.
|
|
137
|
+
* @returns {Function} A function that takes a Transaction object
|
|
138
|
+
*/
|
|
139
|
+
getOrders: (poolKey: string, orderIds: string[]) => (tx: Transaction) => void;
|
|
140
|
+
/**
|
|
141
|
+
* @description Burn DEEP tokens from the pool
|
|
142
|
+
* @param {string} poolKey The key to identify the pool
|
|
143
|
+
* @returns A function that takes a Transaction object
|
|
144
|
+
*/
|
|
145
|
+
burnDeep: (poolKey: string) => (tx: Transaction) => void;
|
|
146
|
+
/**
|
|
147
|
+
* @description Get the mid price for a pool
|
|
148
|
+
* @param {string} poolKey The key to identify the pool
|
|
149
|
+
* @returns A function that takes a Transaction object
|
|
150
|
+
*/
|
|
151
|
+
midPrice: (poolKey: string) => (tx: Transaction) => void;
|
|
152
|
+
/**
|
|
153
|
+
* @description Check if a pool is whitelisted
|
|
154
|
+
* @param {string} poolKey The key to identify the pool
|
|
155
|
+
* @returns A function that takes a Transaction object
|
|
156
|
+
*/
|
|
157
|
+
whitelisted: (poolKey: string) => (tx: Transaction) => void;
|
|
158
|
+
/**
|
|
159
|
+
* @description Get the quote quantity out for a given base quantity in
|
|
160
|
+
* @param {string} poolKey The key to identify the pool
|
|
161
|
+
* @param {number} baseQuantity Base quantity to convert
|
|
162
|
+
* @returns A function that takes a Transaction object
|
|
163
|
+
*/
|
|
164
|
+
getQuoteQuantityOut: (poolKey: string, baseQuantity: number) => (tx: Transaction) => void;
|
|
165
|
+
/**
|
|
166
|
+
* @description Get the base quantity out for a given quote quantity in
|
|
167
|
+
* @param {string} poolKey The key to identify the pool
|
|
168
|
+
* @param {number} quoteQuantity Quote quantity to convert
|
|
169
|
+
* @returns A function that takes a Transaction object
|
|
170
|
+
*/
|
|
171
|
+
getBaseQuantityOut: (poolKey: string, quoteQuantity: number) => (tx: Transaction) => void;
|
|
172
|
+
/**
|
|
173
|
+
* @description Get the quantity out for a given base or quote quantity
|
|
174
|
+
* @param {string} poolKey The key to identify the pool
|
|
175
|
+
* @param {number} baseQuantity Base quantity to convert
|
|
176
|
+
* @param {number} quoteQuantity Quote quantity to convert
|
|
177
|
+
* @returns A function that takes a Transaction object
|
|
178
|
+
*/
|
|
179
|
+
getQuantityOut: (poolKey: string, baseQuantity: number, quoteQuantity: number) => (tx: Transaction) => void;
|
|
180
|
+
/**
|
|
181
|
+
* @description Get open orders for a balance manager in a pool
|
|
182
|
+
* @param {string} poolKey The key to identify the pool
|
|
183
|
+
* @param {string} managerKey Key of the balance manager
|
|
184
|
+
* @returns A function that takes a Transaction object
|
|
185
|
+
*/
|
|
186
|
+
accountOpenOrders: (poolKey: string, managerKey: string) => (tx: Transaction) => void;
|
|
187
|
+
/**
|
|
188
|
+
* @description Get level 2 order book specifying range of price
|
|
189
|
+
* @param {string} poolKey The key to identify the pool
|
|
190
|
+
* @param {number} priceLow Lower bound of the price range
|
|
191
|
+
* @param {number} priceHigh Upper bound of the price range
|
|
192
|
+
* @param {boolean} isBid Whether to get bid or ask orders
|
|
193
|
+
* @returns A function that takes a Transaction object
|
|
194
|
+
*/
|
|
195
|
+
getLevel2Range: (poolKey: string, priceLow: number, priceHigh: number, isBid: boolean) => (tx: Transaction) => void;
|
|
196
|
+
/**
|
|
197
|
+
* @description Get level 2 order book ticks from mid-price for a pool
|
|
198
|
+
* @param {string} poolKey The key to identify the pool
|
|
199
|
+
* @param {number} tickFromMid Number of ticks from mid-price
|
|
200
|
+
* @returns A function that takes a Transaction object
|
|
201
|
+
*/
|
|
202
|
+
getLevel2TicksFromMid: (poolKey: string, tickFromMid: number) => (tx: Transaction) => void;
|
|
203
|
+
/**
|
|
204
|
+
* @description Get the vault balances for a pool
|
|
205
|
+
* @param {string} poolKey The key to identify the pool
|
|
206
|
+
* @returns A function that takes a Transaction object
|
|
207
|
+
*/
|
|
208
|
+
vaultBalances: (poolKey: string) => (tx: Transaction) => void;
|
|
209
|
+
/**
|
|
210
|
+
* @description Get the pool ID by asset types
|
|
211
|
+
* @param {string} baseType Type of the base asset
|
|
212
|
+
* @param {string} quoteType Type of the quote asset
|
|
213
|
+
* @returns A function that takes a Transaction object
|
|
214
|
+
*/
|
|
215
|
+
getPoolIdByAssets: (baseType: string, quoteType: string) => (tx: Transaction) => void;
|
|
216
|
+
/**
|
|
217
|
+
* @description Swap exact base amount for quote amount
|
|
218
|
+
* @param {SwapParams} params Parameters for the swap
|
|
219
|
+
* @returns A function that takes a Transaction object
|
|
220
|
+
*/
|
|
221
|
+
swapExactBaseForQuote: (params: SwapParams) => (tx: Transaction) => readonly [{
|
|
222
|
+
$kind: "NestedResult";
|
|
223
|
+
NestedResult: [number, number];
|
|
224
|
+
}, {
|
|
225
|
+
$kind: "NestedResult";
|
|
226
|
+
NestedResult: [number, number];
|
|
227
|
+
}, {
|
|
228
|
+
$kind: "NestedResult";
|
|
229
|
+
NestedResult: [number, number];
|
|
230
|
+
}];
|
|
231
|
+
/**
|
|
232
|
+
* @description Swap exact quote amount for base amount
|
|
233
|
+
* @param {SwapParams} params Parameters for the swap
|
|
234
|
+
* @returns A function that takes a Transaction object
|
|
235
|
+
*/
|
|
236
|
+
swapExactQuoteForBase: (params: SwapParams) => (tx: Transaction) => readonly [{
|
|
237
|
+
$kind: "NestedResult";
|
|
238
|
+
NestedResult: [number, number];
|
|
239
|
+
}, {
|
|
240
|
+
$kind: "NestedResult";
|
|
241
|
+
NestedResult: [number, number];
|
|
242
|
+
}, {
|
|
243
|
+
$kind: "NestedResult";
|
|
244
|
+
NestedResult: [number, number];
|
|
245
|
+
}];
|
|
246
|
+
/**
|
|
247
|
+
* @description Swap exact quantity without a balance manager
|
|
248
|
+
* @param {SwapParams & {isBaseToCoin: boolean}} params Parameters for the swap
|
|
249
|
+
* @returns A function that takes a Transaction object
|
|
250
|
+
*/
|
|
251
|
+
swapExactQuantity: (params: SwapParams & {
|
|
252
|
+
isBaseToCoin: boolean;
|
|
253
|
+
}) => (tx: Transaction) => readonly [{
|
|
254
|
+
$kind: "NestedResult";
|
|
255
|
+
NestedResult: [number, number];
|
|
256
|
+
}, {
|
|
257
|
+
$kind: "NestedResult";
|
|
258
|
+
NestedResult: [number, number];
|
|
259
|
+
}, {
|
|
260
|
+
$kind: "NestedResult";
|
|
261
|
+
NestedResult: [number, number];
|
|
262
|
+
}];
|
|
263
|
+
/**
|
|
264
|
+
* @description Swap exact base for quote with a balance manager
|
|
265
|
+
* @param {SwapWithManagerParams} params Parameters for the swap
|
|
266
|
+
* @returns A function that takes a Transaction object
|
|
267
|
+
*/
|
|
268
|
+
swapExactBaseForQuoteWithManager: (params: SwapWithManagerParams) => (tx: Transaction) => readonly [{
|
|
269
|
+
$kind: "NestedResult";
|
|
270
|
+
NestedResult: [number, number];
|
|
271
|
+
}, {
|
|
272
|
+
$kind: "NestedResult";
|
|
273
|
+
NestedResult: [number, number];
|
|
274
|
+
}];
|
|
275
|
+
/**
|
|
276
|
+
* @description Swap exact quote for base with a balance manager
|
|
277
|
+
* @param {SwapWithManagerParams} params Parameters for the swap
|
|
278
|
+
* @returns A function that takes a Transaction object
|
|
279
|
+
*/
|
|
280
|
+
swapExactQuoteForBaseWithManager: (params: SwapWithManagerParams) => (tx: Transaction) => readonly [{
|
|
281
|
+
$kind: "NestedResult";
|
|
282
|
+
NestedResult: [number, number];
|
|
283
|
+
}, {
|
|
284
|
+
$kind: "NestedResult";
|
|
285
|
+
NestedResult: [number, number];
|
|
286
|
+
}];
|
|
287
|
+
/**
|
|
288
|
+
* @description Swap exact quantity (base or quote) with a balance manager
|
|
289
|
+
* @param {SwapWithManagerParams & {isBaseToCoin: boolean}} params Parameters for the swap
|
|
290
|
+
* @returns A function that takes a Transaction object
|
|
291
|
+
*/
|
|
292
|
+
swapExactQuantityWithManager: (params: SwapWithManagerParams & {
|
|
293
|
+
isBaseToCoin: boolean;
|
|
294
|
+
}) => (tx: Transaction) => readonly [{
|
|
295
|
+
$kind: "NestedResult";
|
|
296
|
+
NestedResult: [number, number];
|
|
297
|
+
}, {
|
|
298
|
+
$kind: "NestedResult";
|
|
299
|
+
NestedResult: [number, number];
|
|
300
|
+
}];
|
|
301
|
+
/**
|
|
302
|
+
* @description Create a new pool permissionlessly
|
|
303
|
+
* @param {CreatePermissionlessPoolParams} params Parameters for creating permissionless pool
|
|
304
|
+
* @returns A function that takes a Transaction object
|
|
305
|
+
*/
|
|
306
|
+
createPermissionlessPool: (params: CreatePermissionlessPoolParams) => (tx: Transaction) => void;
|
|
307
|
+
/**
|
|
308
|
+
* @description Get the trade parameters for a given pool, including taker fee, maker fee, and stake required.
|
|
309
|
+
* @param {string} poolKey Key of the pool
|
|
310
|
+
* @returns A function that takes a Transaction object
|
|
311
|
+
*/
|
|
312
|
+
poolTradeParams: (poolKey: string) => (tx: Transaction) => void;
|
|
313
|
+
/**
|
|
314
|
+
* @description Get the book parameters for a given pool, including tick size, lot size, and min size.
|
|
315
|
+
* @param {string} poolKey Key of the pool
|
|
316
|
+
* @returns A function that takes a Transaction object
|
|
317
|
+
*/
|
|
318
|
+
poolBookParams: (poolKey: string) => (tx: Transaction) => void;
|
|
319
|
+
/**
|
|
320
|
+
* @description Get the account information for a given pool and balance manager
|
|
321
|
+
* @param {string} poolKey Key of the pool
|
|
322
|
+
* @param {string} managerKey The key of the BalanceManager
|
|
323
|
+
* @returns A function that takes a Transaction object
|
|
324
|
+
*/
|
|
325
|
+
account: (poolKey: string, managerKey: string) => (tx: Transaction) => void;
|
|
326
|
+
/**
|
|
327
|
+
* @description Get the locked balance for a given pool and balance manager
|
|
328
|
+
* @param {string} poolKey Key of the pool
|
|
329
|
+
* @param {string} managerKey The key of the BalanceManager
|
|
330
|
+
* @returns A function that takes a Transaction object
|
|
331
|
+
*/
|
|
332
|
+
lockedBalance: (poolKey: string, managerKey: string) => (tx: Transaction) => void;
|
|
333
|
+
/**
|
|
334
|
+
* @description Get the DEEP price conversion for a pool
|
|
335
|
+
* @param {string} poolKey The key to identify the pool
|
|
336
|
+
* @returns A function that takes a Transaction object
|
|
337
|
+
*/
|
|
338
|
+
getPoolDeepPrice: (poolKey: string) => (tx: Transaction) => void;
|
|
339
|
+
/**
|
|
340
|
+
* @description Get the balance manager IDs for a given owner
|
|
341
|
+
* @param {string} owner The owner address to get balance manager IDs for
|
|
342
|
+
* @returns A function that takes a Transaction object
|
|
343
|
+
*/
|
|
344
|
+
getBalanceManagerIds: (owner: string) => (tx: Transaction) => void;
|
|
345
|
+
/**
|
|
346
|
+
* @description Get the balances for a referral (DeepBookPoolReferral)
|
|
347
|
+
* @param {string} poolKey The key to identify the pool
|
|
348
|
+
* @param {string} referral The referral (DeepBookPoolReferral) to get the balances for
|
|
349
|
+
* @returns A function that takes a Transaction object
|
|
350
|
+
*/
|
|
351
|
+
getPoolReferralBalances: (poolKey: string, referral: string) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
352
|
+
/**
|
|
353
|
+
* @description Get the multiplier for a referral (DeepBookPoolReferral)
|
|
354
|
+
* @param {string} poolKey The key to identify the pool
|
|
355
|
+
* @param {string} referral The referral (DeepBookPoolReferral) to get the multiplier for
|
|
356
|
+
* @returns A function that takes a Transaction object
|
|
357
|
+
*/
|
|
358
|
+
poolReferralMultiplier: (poolKey: string, referral: string) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
359
|
+
/**
|
|
360
|
+
* @description Check if a pool is a stable pool
|
|
361
|
+
* @param {string} poolKey The key to identify the pool
|
|
362
|
+
* @returns A function that takes a Transaction object
|
|
363
|
+
*/
|
|
364
|
+
stablePool: (poolKey: string) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
365
|
+
/**
|
|
366
|
+
* @description Check if a pool is registered
|
|
367
|
+
* @param {string} poolKey The key to identify the pool
|
|
368
|
+
* @returns A function that takes a Transaction object
|
|
369
|
+
*/
|
|
370
|
+
registeredPool: (poolKey: string) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
371
|
+
/**
|
|
372
|
+
* @description Get the quote quantity out for a given base quantity using input token as fee
|
|
373
|
+
* @param {string} poolKey The key to identify the pool
|
|
374
|
+
* @param {number} baseQuantity Base quantity to convert
|
|
375
|
+
* @returns A function that takes a Transaction object
|
|
376
|
+
*/
|
|
377
|
+
getQuoteQuantityOutInputFee: (poolKey: string, baseQuantity: number) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
378
|
+
/**
|
|
379
|
+
* @description Get the base quantity out for a given quote quantity using input token as fee
|
|
380
|
+
* @param {string} poolKey The key to identify the pool
|
|
381
|
+
* @param {number} quoteQuantity Quote quantity to convert
|
|
382
|
+
* @returns A function that takes a Transaction object
|
|
383
|
+
*/
|
|
384
|
+
getBaseQuantityOutInputFee: (poolKey: string, quoteQuantity: number) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
385
|
+
/**
|
|
386
|
+
* @description Get the quantity out for a given base or quote quantity using input token as fee
|
|
387
|
+
* @param {string} poolKey The key to identify the pool
|
|
388
|
+
* @param {number} baseQuantity Base quantity to convert
|
|
389
|
+
* @param {number} quoteQuantity Quote quantity to convert
|
|
390
|
+
* @returns A function that takes a Transaction object
|
|
391
|
+
*/
|
|
392
|
+
getQuantityOutInputFee: (poolKey: string, baseQuantity: number, quoteQuantity: number) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
393
|
+
/**
|
|
394
|
+
* @description Get the base quantity needed to receive a target quote quantity
|
|
395
|
+
* @param {string} poolKey The key to identify the pool
|
|
396
|
+
* @param {number} targetQuoteQuantity Target quote quantity
|
|
397
|
+
* @param {boolean} payWithDeep Whether to pay fees with DEEP
|
|
398
|
+
* @returns A function that takes a Transaction object
|
|
399
|
+
*/
|
|
400
|
+
getBaseQuantityIn: (poolKey: string, targetQuoteQuantity: number, payWithDeep: boolean) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
401
|
+
/**
|
|
402
|
+
* @description Get the quote quantity needed to receive a target base quantity
|
|
403
|
+
* @param {string} poolKey The key to identify the pool
|
|
404
|
+
* @param {number} targetBaseQuantity Target base quantity
|
|
405
|
+
* @param {boolean} payWithDeep Whether to pay fees with DEEP
|
|
406
|
+
* @returns A function that takes a Transaction object
|
|
407
|
+
*/
|
|
408
|
+
getQuoteQuantityIn: (poolKey: string, targetBaseQuantity: number, payWithDeep: boolean) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
409
|
+
/**
|
|
410
|
+
* @description Get account order details for a balance manager
|
|
411
|
+
* @param {string} poolKey The key to identify the pool
|
|
412
|
+
* @param {string} managerKey Key of the balance manager
|
|
413
|
+
* @returns A function that takes a Transaction object
|
|
414
|
+
*/
|
|
415
|
+
getAccountOrderDetails: (poolKey: string, managerKey: string) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
416
|
+
/**
|
|
417
|
+
* @description Get the DEEP required for an order
|
|
418
|
+
* @param {string} poolKey The key to identify the pool
|
|
419
|
+
* @param {number} baseQuantity Base quantity
|
|
420
|
+
* @param {number} price Price
|
|
421
|
+
* @returns A function that takes a Transaction object
|
|
422
|
+
*/
|
|
423
|
+
getOrderDeepRequired: (poolKey: string, baseQuantity: number, price: number) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
424
|
+
/**
|
|
425
|
+
* @description Check if account exists for a balance manager
|
|
426
|
+
* @param {string} poolKey The key to identify the pool
|
|
427
|
+
* @param {string} managerKey Key of the balance manager
|
|
428
|
+
* @returns A function that takes a Transaction object
|
|
429
|
+
*/
|
|
430
|
+
accountExists: (poolKey: string, managerKey: string) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
431
|
+
/**
|
|
432
|
+
* @description Get the next epoch trade parameters for a pool
|
|
433
|
+
* @param {string} poolKey The key to identify the pool
|
|
434
|
+
* @returns A function that takes a Transaction object
|
|
435
|
+
*/
|
|
436
|
+
poolTradeParamsNext: (poolKey: string) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
437
|
+
/**
|
|
438
|
+
* @description Get the quorum for a pool
|
|
439
|
+
* @param {string} poolKey The key to identify the pool
|
|
440
|
+
* @returns A function that takes a Transaction object
|
|
441
|
+
*/
|
|
442
|
+
quorum: (poolKey: string) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
443
|
+
/**
|
|
444
|
+
* @description Get the pool ID
|
|
445
|
+
* @param {string} poolKey The key to identify the pool
|
|
446
|
+
* @returns A function that takes a Transaction object
|
|
447
|
+
*/
|
|
448
|
+
poolId: (poolKey: string) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
449
|
+
/**
|
|
450
|
+
* @description Check if a limit order can be placed
|
|
451
|
+
* @param {CanPlaceLimitOrderParams} params Parameters for checking limit order validity
|
|
452
|
+
* @returns A function that takes a Transaction object
|
|
453
|
+
*/
|
|
454
|
+
canPlaceLimitOrder: (params: CanPlaceLimitOrderParams) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
455
|
+
/**
|
|
456
|
+
* @description Check if a market order can be placed
|
|
457
|
+
* @param {CanPlaceMarketOrderParams} params Parameters for checking market order validity
|
|
458
|
+
* @returns A function that takes a Transaction object
|
|
459
|
+
*/
|
|
460
|
+
canPlaceMarketOrder: (params: CanPlaceMarketOrderParams) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
461
|
+
/**
|
|
462
|
+
* @description Check if market order params are valid
|
|
463
|
+
* @param {string} poolKey The key to identify the pool
|
|
464
|
+
* @param {number} quantity Quantity
|
|
465
|
+
* @returns A function that takes a Transaction object
|
|
466
|
+
*/
|
|
467
|
+
checkMarketOrderParams: (poolKey: string, quantity: number) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
468
|
+
/**
|
|
469
|
+
* @description Check if limit order params are valid
|
|
470
|
+
* @param {string} poolKey The key to identify the pool
|
|
471
|
+
* @param {number} price Price
|
|
472
|
+
* @param {number} quantity Quantity
|
|
473
|
+
* @param {number} expireTimestamp Expiration timestamp
|
|
474
|
+
* @returns A function that takes a Transaction object
|
|
475
|
+
*/
|
|
476
|
+
checkLimitOrderParams: (poolKey: string, price: number, quantity: number, expireTimestamp: number) => (tx: Transaction) => import("@haneullabs/haneul/transactions").TransactionResult;
|
|
477
|
+
}
|