@clober/v2-sdk 0.0.11 → 0.0.12-8.dev.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/README.md +12 -4
- package/dist/cjs/abis/core/book-manager-abi.js +112 -0
- package/dist/cjs/abis/core/book-manager-abi.js.map +1 -0
- package/dist/cjs/abis/core/book-viewer-abi.js +137 -5
- package/dist/cjs/abis/core/book-viewer-abi.js.map +1 -1
- package/dist/cjs/abis/core/controller-abi.js +1 -6
- package/dist/cjs/abis/core/controller-abi.js.map +1 -1
- package/dist/cjs/abis/rebalancer/minter-abi.js +262 -0
- package/dist/cjs/abis/rebalancer/minter-abi.js.map +1 -0
- package/dist/cjs/abis/rebalancer/mock-swap-abi.js +95 -0
- package/dist/cjs/abis/rebalancer/mock-swap-abi.js.map +1 -0
- package/dist/cjs/abis/rebalancer/operator-abi.js +401 -0
- package/dist/cjs/abis/rebalancer/operator-abi.js.map +1 -0
- package/dist/cjs/abis/rebalancer/rebalancer-abi.js +1326 -0
- package/dist/cjs/abis/rebalancer/rebalancer-abi.js.map +1 -0
- package/dist/cjs/abis/rebalancer/strategy-abi.js +895 -0
- package/dist/cjs/abis/rebalancer/strategy-abi.js.map +1 -0
- package/dist/cjs/apis/chart-logs.js +30 -13
- package/dist/cjs/apis/chart-logs.js.map +1 -1
- package/dist/cjs/apis/market.js +45 -22
- package/dist/cjs/apis/market.js.map +1 -1
- package/dist/cjs/apis/odos.js +100 -0
- package/dist/cjs/apis/odos.js.map +1 -0
- package/dist/cjs/apis/open-order.js +75 -44
- package/dist/cjs/apis/open-order.js.map +1 -1
- package/dist/cjs/apis/pool.js +95 -0
- package/dist/cjs/apis/pool.js.map +1 -0
- package/dist/cjs/apis/strategy.js +53 -0
- package/dist/cjs/apis/strategy.js.map +1 -0
- package/dist/cjs/approval.js +83 -26
- package/dist/cjs/approval.js.map +1 -1
- package/dist/cjs/call.js +739 -107
- package/dist/cjs/call.js.map +1 -1
- package/dist/cjs/constants/addresses.js +68 -1
- package/dist/cjs/constants/addresses.js.map +1 -1
- package/dist/cjs/constants/chain.js +23 -2
- package/dist/cjs/constants/chain.js.map +1 -1
- package/dist/cjs/constants/currency.js +86 -3
- package/dist/cjs/constants/currency.js.map +1 -1
- package/dist/cjs/constants/fee.js +21 -2
- package/dist/cjs/constants/fee.js.map +1 -1
- package/dist/cjs/constants/permit.js +14 -0
- package/dist/cjs/constants/permit.js.map +1 -0
- package/dist/cjs/constants/price.js +2 -1
- package/dist/cjs/constants/price.js.map +1 -1
- package/dist/cjs/constants/rise-sepolia.js +29 -0
- package/dist/cjs/constants/rise-sepolia.js.map +1 -0
- package/dist/cjs/constants/subgraph.js +37 -0
- package/dist/cjs/constants/subgraph.js.map +1 -0
- package/dist/cjs/constants/test-chain.js +50 -0
- package/dist/cjs/constants/test-chain.js.map +1 -0
- package/dist/cjs/constants/tick.js +6 -0
- package/dist/cjs/constants/tick.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/model/book.js +62 -35
- package/dist/cjs/model/book.js.map +1 -1
- package/dist/cjs/model/market.js +61 -26
- package/dist/cjs/model/market.js.map +1 -1
- package/dist/cjs/model/pool.js +239 -0
- package/dist/cjs/model/pool.js.map +1 -0
- package/dist/cjs/type.js.map +1 -1
- package/dist/cjs/utils/allowance.js +39 -0
- package/dist/cjs/utils/allowance.js.map +1 -0
- package/dist/cjs/utils/approval.js +2 -3
- package/dist/cjs/utils/approval.js.map +1 -1
- package/dist/cjs/utils/bigint.js +5 -1
- package/dist/cjs/utils/bigint.js.map +1 -1
- package/dist/cjs/utils/book-id.js +7 -7
- package/dist/cjs/utils/book-id.js.map +1 -1
- package/dist/cjs/utils/build-transaction.js +3 -4
- package/dist/cjs/utils/build-transaction.js.map +1 -1
- package/dist/cjs/utils/currency.js +61 -27
- package/dist/cjs/utils/currency.js.map +1 -1
- package/dist/cjs/utils/market.js +1 -1
- package/dist/cjs/utils/market.js.map +1 -1
- package/dist/cjs/utils/math.js +3 -1
- package/dist/cjs/utils/math.js.map +1 -1
- package/dist/cjs/utils/open.js +35 -25
- package/dist/cjs/utils/open.js.map +1 -1
- package/dist/cjs/utils/order.js +50 -126
- package/dist/cjs/utils/order.js.map +1 -1
- package/dist/cjs/utils/pool-key.js +17 -0
- package/dist/cjs/utils/pool-key.js.map +1 -0
- package/dist/cjs/utils/pool.js +88 -0
- package/dist/cjs/utils/pool.js.map +1 -0
- package/dist/cjs/utils/prices.js +40 -5
- package/dist/cjs/utils/prices.js.map +1 -1
- package/dist/cjs/utils/quotes.js +16 -0
- package/dist/cjs/utils/quotes.js.map +1 -0
- package/dist/cjs/utils/tick.js +12 -1
- package/dist/cjs/utils/tick.js.map +1 -1
- package/dist/cjs/utils/time-series.js +31 -0
- package/dist/cjs/utils/time-series.js.map +1 -0
- package/dist/cjs/utils/unit-size.js +14 -0
- package/dist/cjs/utils/unit-size.js.map +1 -0
- package/dist/cjs/utils.js +18 -0
- package/dist/cjs/utils.js.map +1 -0
- package/dist/cjs/view.js +308 -44
- package/dist/cjs/view.js.map +1 -1
- package/dist/esm/abis/core/book-manager-abi.js +109 -0
- package/dist/esm/abis/core/book-manager-abi.js.map +1 -0
- package/dist/esm/abis/core/book-viewer-abi.js +137 -5
- package/dist/esm/abis/core/book-viewer-abi.js.map +1 -1
- package/dist/esm/abis/core/controller-abi.js +1 -6
- package/dist/esm/abis/core/controller-abi.js.map +1 -1
- package/dist/esm/abis/rebalancer/minter-abi.js +259 -0
- package/dist/esm/abis/rebalancer/minter-abi.js.map +1 -0
- package/dist/esm/abis/rebalancer/mock-swap-abi.js +92 -0
- package/dist/esm/abis/rebalancer/mock-swap-abi.js.map +1 -0
- package/dist/esm/abis/rebalancer/operator-abi.js +398 -0
- package/dist/esm/abis/rebalancer/operator-abi.js.map +1 -0
- package/dist/esm/abis/rebalancer/rebalancer-abi.js +1323 -0
- package/dist/esm/abis/rebalancer/rebalancer-abi.js.map +1 -0
- package/dist/esm/abis/rebalancer/strategy-abi.js +892 -0
- package/dist/esm/abis/rebalancer/strategy-abi.js.map +1 -0
- package/dist/esm/apis/chart-logs.js +29 -12
- package/dist/esm/apis/chart-logs.js.map +1 -1
- package/dist/esm/apis/market.js +47 -24
- package/dist/esm/apis/market.js.map +1 -1
- package/dist/esm/apis/odos.js +94 -0
- package/dist/esm/apis/odos.js.map +1 -0
- package/dist/esm/apis/open-order.js +78 -44
- package/dist/esm/apis/open-order.js.map +1 -1
- package/dist/esm/apis/pool.js +96 -0
- package/dist/esm/apis/pool.js.map +1 -0
- package/dist/esm/apis/strategy.js +48 -0
- package/dist/esm/apis/strategy.js.map +1 -0
- package/dist/esm/approval.js +107 -25
- package/dist/esm/approval.js.map +1 -1
- package/dist/esm/call.js +772 -145
- package/dist/esm/call.js.map +1 -1
- package/dist/esm/constants/addresses.js +69 -2
- package/dist/esm/constants/addresses.js.map +1 -1
- package/dist/esm/constants/chain.js +23 -2
- package/dist/esm/constants/chain.js.map +1 -1
- package/dist/esm/constants/currency.js +87 -2
- package/dist/esm/constants/currency.js.map +1 -1
- package/dist/esm/constants/fee.js +21 -2
- package/dist/esm/constants/fee.js.map +1 -1
- package/dist/esm/constants/permit.js +11 -0
- package/dist/esm/constants/permit.js.map +1 -0
- package/dist/esm/constants/price.js +1 -0
- package/dist/esm/constants/price.js.map +1 -1
- package/dist/esm/constants/rise-sepolia.js +26 -0
- package/dist/esm/constants/rise-sepolia.js.map +1 -0
- package/dist/esm/constants/subgraph.js +33 -0
- package/dist/esm/constants/subgraph.js.map +1 -0
- package/dist/esm/constants/test-chain.js +47 -0
- package/dist/esm/constants/test-chain.js.map +1 -0
- package/dist/esm/constants/tick.js +3 -0
- package/dist/esm/constants/tick.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/model/book.js +62 -35
- package/dist/esm/model/book.js.map +1 -1
- package/dist/esm/model/market.js +63 -28
- package/dist/esm/model/market.js.map +1 -1
- package/dist/esm/model/pool.js +236 -0
- package/dist/esm/model/pool.js.map +1 -0
- package/dist/esm/type.js.map +1 -1
- package/dist/esm/utils/allowance.js +35 -0
- package/dist/esm/utils/allowance.js.map +1 -0
- package/dist/esm/utils/approval.js +2 -3
- package/dist/esm/utils/approval.js.map +1 -1
- package/dist/esm/utils/bigint.js +2 -0
- package/dist/esm/utils/bigint.js.map +1 -1
- package/dist/esm/utils/book-id.js +7 -7
- package/dist/esm/utils/book-id.js.map +1 -1
- package/dist/esm/utils/build-transaction.js +3 -4
- package/dist/esm/utils/build-transaction.js.map +1 -1
- package/dist/esm/utils/currency.js +59 -25
- package/dist/esm/utils/currency.js.map +1 -1
- package/dist/esm/utils/market.js +1 -1
- package/dist/esm/utils/market.js.map +1 -1
- package/dist/esm/utils/math.js +1 -0
- package/dist/esm/utils/math.js.map +1 -1
- package/dist/esm/utils/open.js +33 -23
- package/dist/esm/utils/open.js.map +1 -1
- package/dist/esm/utils/order.js +49 -125
- package/dist/esm/utils/order.js.map +1 -1
- package/dist/esm/utils/pool-key.js +12 -0
- package/dist/esm/utils/pool-key.js.map +1 -0
- package/dist/esm/utils/pool.js +84 -0
- package/dist/esm/utils/pool.js.map +1 -0
- package/dist/esm/utils/prices.js +39 -5
- package/dist/esm/utils/prices.js.map +1 -1
- package/dist/esm/utils/quotes.js +12 -0
- package/dist/esm/utils/quotes.js.map +1 -0
- package/dist/esm/utils/tick.js +11 -1
- package/dist/esm/utils/tick.js.map +1 -1
- package/dist/esm/utils/time-series.js +27 -0
- package/dist/esm/utils/time-series.js.map +1 -0
- package/dist/esm/utils/unit-size.js +10 -0
- package/dist/esm/utils/unit-size.js.map +1 -0
- package/dist/esm/utils.js +5 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/esm/view.js +379 -61
- package/dist/esm/view.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/abis/core/book-manager-abi.d.ts +82 -0
- package/dist/types/abis/core/book-manager-abi.d.ts.map +1 -0
- package/dist/types/abis/core/book-viewer-abi.d.ts +107 -5
- package/dist/types/abis/core/book-viewer-abi.d.ts.map +1 -1
- package/dist/types/abis/core/controller-abi.d.ts +1 -5
- package/dist/types/abis/core/controller-abi.d.ts.map +1 -1
- package/dist/types/abis/rebalancer/minter-abi.d.ts +198 -0
- package/dist/types/abis/rebalancer/minter-abi.d.ts.map +1 -0
- package/dist/types/abis/rebalancer/mock-swap-abi.d.ts +70 -0
- package/dist/types/abis/rebalancer/mock-swap-abi.d.ts.map +1 -0
- package/dist/types/abis/rebalancer/operator-abi.d.ts +308 -0
- package/dist/types/abis/rebalancer/operator-abi.d.ts.map +1 -0
- package/dist/types/abis/rebalancer/rebalancer-abi.d.ts +1023 -0
- package/dist/types/abis/rebalancer/rebalancer-abi.d.ts.map +1 -0
- package/dist/types/abis/rebalancer/strategy-abi.d.ts +690 -0
- package/dist/types/abis/rebalancer/strategy-abi.d.ts.map +1 -0
- package/dist/types/apis/chart-logs.d.ts +3 -0
- package/dist/types/apis/chart-logs.d.ts.map +1 -1
- package/dist/types/apis/market.d.ts +2 -1
- package/dist/types/apis/market.d.ts.map +1 -1
- package/dist/types/apis/odos.d.ts +28 -0
- package/dist/types/apis/odos.d.ts.map +1 -0
- package/dist/types/apis/open-order.d.ts +3 -2
- package/dist/types/apis/open-order.d.ts.map +1 -1
- package/dist/types/apis/pool.d.ts +11 -0
- package/dist/types/apis/pool.d.ts.map +1 -0
- package/dist/types/apis/strategy.d.ts +6 -0
- package/dist/types/apis/strategy.d.ts.map +1 -0
- package/dist/types/approval.d.ts +37 -3
- package/dist/types/approval.d.ts.map +1 -1
- package/dist/types/call.d.ts +233 -54
- package/dist/types/call.d.ts.map +1 -1
- package/dist/types/constants/addresses.d.ts +4 -0
- package/dist/types/constants/addresses.d.ts.map +1 -1
- package/dist/types/constants/chain.d.ts +9 -2
- package/dist/types/constants/chain.d.ts.map +1 -1
- package/dist/types/constants/currency.d.ts +8 -0
- package/dist/types/constants/currency.d.ts.map +1 -1
- package/dist/types/constants/fee.d.ts +7 -2
- package/dist/types/constants/fee.d.ts.map +1 -1
- package/dist/types/constants/permit.d.ts +10 -0
- package/dist/types/constants/permit.d.ts.map +1 -0
- package/dist/types/constants/price.d.ts +1 -0
- package/dist/types/constants/price.d.ts.map +1 -1
- package/dist/types/constants/rise-sepolia.d.ts +32 -0
- package/dist/types/constants/rise-sepolia.d.ts.map +1 -0
- package/dist/types/constants/subgraph.d.ts +8 -0
- package/dist/types/constants/subgraph.d.ts.map +1 -0
- package/dist/types/constants/test-chain.d.ts +4 -0
- package/dist/types/constants/test-chain.d.ts.map +1 -0
- package/dist/types/constants/tick.d.ts +3 -0
- package/dist/types/constants/tick.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/model/book.d.ts +25 -33
- package/dist/types/model/book.d.ts.map +1 -1
- package/dist/types/model/currency.d.ts +7 -0
- package/dist/types/model/currency.d.ts.map +1 -1
- package/dist/types/model/depth.d.ts +4 -3
- package/dist/types/model/depth.d.ts.map +1 -1
- package/dist/types/model/market.d.ts +24 -13
- package/dist/types/model/market.d.ts.map +1 -1
- package/dist/types/model/open-order.d.ts +20 -27
- package/dist/types/model/open-order.d.ts.map +1 -1
- package/dist/types/model/pool.d.ts +76 -0
- package/dist/types/model/pool.d.ts.map +1 -0
- package/dist/types/type.d.ts +95 -6
- package/dist/types/type.d.ts.map +1 -1
- package/dist/types/utils/allowance.d.ts +3 -0
- package/dist/types/utils/allowance.d.ts.map +1 -0
- package/dist/types/utils/approval.d.ts +2 -1
- package/dist/types/utils/approval.d.ts.map +1 -1
- package/dist/types/utils/bigint.d.ts +2 -0
- package/dist/types/utils/bigint.d.ts.map +1 -1
- package/dist/types/utils/book-id.d.ts +2 -1
- package/dist/types/utils/book-id.d.ts.map +1 -1
- package/dist/types/utils/build-transaction.d.ts +3 -3
- package/dist/types/utils/build-transaction.d.ts.map +1 -1
- package/dist/types/utils/currency.d.ts +3 -2
- package/dist/types/utils/currency.d.ts.map +1 -1
- package/dist/types/utils/math.d.ts +1 -0
- package/dist/types/utils/math.d.ts.map +1 -1
- package/dist/types/utils/open.d.ts +2 -1
- package/dist/types/utils/open.d.ts.map +1 -1
- package/dist/types/utils/order.d.ts +4 -11
- package/dist/types/utils/order.d.ts.map +1 -1
- package/dist/types/utils/pool-key.d.ts +3 -0
- package/dist/types/utils/pool-key.d.ts.map +1 -0
- package/dist/types/utils/pool.d.ts +11 -0
- package/dist/types/utils/pool.d.ts.map +1 -0
- package/dist/types/utils/prices.d.ts +13 -2
- package/dist/types/utils/prices.d.ts.map +1 -1
- package/dist/types/utils/quotes.d.ts +2 -0
- package/dist/types/utils/quotes.d.ts.map +1 -0
- package/dist/types/utils/tick.d.ts +1 -0
- package/dist/types/utils/tick.d.ts.map +1 -1
- package/dist/types/utils/time-series.d.ts +4 -0
- package/dist/types/utils/time-series.d.ts.map +1 -0
- package/dist/types/utils/unit-size.d.ts +4 -0
- package/dist/types/utils/unit-size.d.ts.map +1 -0
- package/dist/types/utils.d.ts +5 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/dist/types/view.d.ts +236 -30
- package/dist/types/view.d.ts.map +1 -1
- package/package.json +4 -3
- package/dist/cjs/abis/core/params-abi.js +0 -62
- package/dist/cjs/abis/core/params-abi.js.map +0 -1
- package/dist/cjs/apis/subgraph.js +0 -26
- package/dist/cjs/apis/subgraph.js.map +0 -1
- package/dist/cjs/constants/client.js +0 -14
- package/dist/cjs/constants/client.js.map +0 -1
- package/dist/cjs/constants/subgraph-url.js +0 -8
- package/dist/cjs/constants/subgraph-url.js.map +0 -1
- package/dist/cjs/signature.js +0 -145
- package/dist/cjs/signature.js.map +0 -1
- package/dist/cjs/utils/decorator.js +0 -13
- package/dist/cjs/utils/decorator.js.map +0 -1
- package/dist/cjs/utils/unit.js +0 -34
- package/dist/cjs/utils/unit.js.map +0 -1
- package/dist/esm/abis/core/params-abi.js +0 -59
- package/dist/esm/abis/core/params-abi.js.map +0 -1
- package/dist/esm/apis/subgraph.js +0 -22
- package/dist/esm/apis/subgraph.js.map +0 -1
- package/dist/esm/constants/client.js +0 -10
- package/dist/esm/constants/client.js.map +0 -1
- package/dist/esm/constants/subgraph-url.js +0 -5
- package/dist/esm/constants/subgraph-url.js.map +0 -1
- package/dist/esm/signature.js +0 -169
- package/dist/esm/signature.js.map +0 -1
- package/dist/esm/utils/decorator.js +0 -9
- package/dist/esm/utils/decorator.js.map +0 -1
- package/dist/esm/utils/unit.js +0 -30
- package/dist/esm/utils/unit.js.map +0 -1
- package/dist/types/abis/core/params-abi.d.ts +0 -21
- package/dist/types/abis/core/params-abi.d.ts.map +0 -1
- package/dist/types/apis/subgraph.d.ts +0 -3
- package/dist/types/apis/subgraph.d.ts.map +0 -1
- package/dist/types/constants/client.d.ts +0 -5
- package/dist/types/constants/client.d.ts.map +0 -1
- package/dist/types/constants/subgraph-url.d.ts +0 -5
- package/dist/types/constants/subgraph-url.d.ts.map +0 -1
- package/dist/types/signature.d.ts +0 -38
- package/dist/types/signature.d.ts.map +0 -1
- package/dist/types/utils/decorator.d.ts +0 -6
- package/dist/types/utils/decorator.d.ts.map +0 -1
- package/dist/types/utils/unit.d.ts +0 -4
- package/dist/types/utils/unit.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-logs.d.ts","sourceRoot":"","sources":["../../../src/apis/chart-logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"chart-logs.d.ts","sourceRoot":"","sources":["../../../src/apis/chart-logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAIvD,eAAO,MAAM,4BAA4B,EAAE;KACxC,GAAG,IAAI,mBAAmB,GAAG,MAAM;CAcrC,CAAA;AA6DD,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,SAAS,EAClB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,QAAQ,CAAC,CAwBnB;AAiCD,wBAAsB,cAAc,CAClC,OAAO,EAAE,SAAS,EAClB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,mBAAmB,EACjC,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,QAAQ,EAAE,CAAC,CA+HrB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { PublicClient } from 'viem';
|
|
1
2
|
import { CHAIN_IDS } from '../constants/chain';
|
|
2
3
|
import { Market } from '../model/market';
|
|
3
|
-
export declare function fetchMarket(chainId: CHAIN_IDS, tokenAddresses: `0x${string}`[], n?: number): Promise<Market>;
|
|
4
|
+
export declare function fetchMarket(publicClient: PublicClient, chainId: CHAIN_IDS, tokenAddresses: `0x${string}`[], useSubgraph: boolean, n?: number): Promise<Market>;
|
|
4
5
|
//# sourceMappingURL=market.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"market.d.ts","sourceRoot":"","sources":["../../../src/apis/market.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"market.d.ts","sourceRoot":"","sources":["../../../src/apis/market.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AA8FxC,wBAAsB,WAAW,CAC/B,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,SAAS,EAClB,cAAc,EAAE,KAAK,MAAM,EAAE,EAAE,EAC/B,WAAW,EAAE,OAAO,EACpB,CAAC,SAAM,GACN,OAAO,CAAC,MAAM,CAAC,CA4BjB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CHAIN_IDS } from '../constants/chain';
|
|
2
|
+
import { Currency } from '../model/currency';
|
|
3
|
+
export declare function fetchOdosApi<T>(path: string, options?: RequestInit): Promise<T>;
|
|
4
|
+
export declare function fetchQuote({ chainId, amountIn, tokenIn, tokenOut, slippageLimitPercent, userAddress, testnetPrice, }: {
|
|
5
|
+
chainId: CHAIN_IDS;
|
|
6
|
+
amountIn: bigint;
|
|
7
|
+
tokenIn: Currency;
|
|
8
|
+
tokenOut: Currency;
|
|
9
|
+
slippageLimitPercent: number;
|
|
10
|
+
userAddress: `0x${string}`;
|
|
11
|
+
testnetPrice?: number | undefined;
|
|
12
|
+
}): Promise<{
|
|
13
|
+
amountOut: bigint;
|
|
14
|
+
pathId: string;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function fetchCallData({ chainId, amountIn, tokenIn, tokenOut, slippageLimitPercent, userAddress, testnetPrice, }: {
|
|
17
|
+
chainId: CHAIN_IDS;
|
|
18
|
+
amountIn: bigint;
|
|
19
|
+
tokenIn: Currency;
|
|
20
|
+
tokenOut: Currency;
|
|
21
|
+
slippageLimitPercent: number;
|
|
22
|
+
userAddress: `0x${string}`;
|
|
23
|
+
testnetPrice?: number | undefined;
|
|
24
|
+
}): Promise<{
|
|
25
|
+
amountOut: bigint;
|
|
26
|
+
data: `0x${string}`;
|
|
27
|
+
}>;
|
|
28
|
+
//# sourceMappingURL=odos.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"odos.d.ts","sourceRoot":"","sources":["../../../src/apis/odos.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAkB,MAAM,oBAAoB,CAAA;AAE9D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,wBAAsB,YAAY,CAAC,CAAC,EAClC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,CAAC,CAAC,CAWZ;AAED,wBAAsB,UAAU,CAAC,EAC/B,OAAO,EACP,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,oBAAoB,EACpB,WAAW,EACX,YAAY,GACb,EAAE;IACD,OAAO,EAAE,SAAS,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,QAAQ,CAAA;IACjB,QAAQ,EAAE,QAAQ,CAAA;IAClB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,WAAW,EAAE,KAAK,MAAM,EAAE,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAClC,GAAG,OAAO,CAAC;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;CACf,CAAC,CAkDD;AAED,wBAAsB,aAAa,CAAC,EAClC,OAAO,EACP,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,oBAAoB,EACpB,WAAW,EACX,YAAY,GACb,EAAE;IACD,OAAO,EAAE,SAAS,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,QAAQ,CAAA;IACjB,QAAQ,EAAE,QAAQ,CAAA;IAClB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,WAAW,EAAE,KAAK,MAAM,EAAE,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAClC,GAAG,OAAO,CAAC;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,KAAK,MAAM,EAAE,CAAA;CACpB,CAAC,CAyDD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CHAIN_IDS } from '../constants/chain';
|
|
2
2
|
import type { OpenOrder } from '../model/open-order';
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
3
|
+
export declare function fetchOpenOrdersByUserAddressFromSubgraph(chainId: CHAIN_IDS, userAddress: `0x${string}`): Promise<OpenOrder[]>;
|
|
4
|
+
export declare function fetchOpenOrderByOrderIdFromSubgraph(chainId: CHAIN_IDS, orderId: string): Promise<OpenOrder>;
|
|
5
|
+
export declare function fetchOpenOrdersByOrderIdsFromSubgraph(chainId: CHAIN_IDS, orderIds: string[]): Promise<OpenOrder[]>;
|
|
5
6
|
//# sourceMappingURL=open-order.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-order.d.ts","sourceRoot":"","sources":["../../../src/apis/open-order.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAM9C,OAAO,KAAK,EAAE,SAAS,EAAgB,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"open-order.d.ts","sourceRoot":"","sources":["../../../src/apis/open-order.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAM9C,OAAO,KAAK,EAAE,SAAS,EAAgB,MAAM,qBAAqB,CAAA;AA4DlE,wBAAsB,wCAAwC,CAC5D,OAAO,EAAE,SAAS,EAClB,WAAW,EAAE,KAAK,MAAM,EAAE,GACzB,OAAO,CAAC,SAAS,EAAE,CAAC,CAQtB;AAED,wBAAsB,mCAAmC,CACvD,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,SAAS,CAAC,CAYpB;AAED,wBAAsB,qCAAqC,CACzD,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,SAAS,EAAE,CAAC,CAQtB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PublicClient } from 'viem';
|
|
2
|
+
import { CHAIN_IDS } from '../constants/chain';
|
|
3
|
+
import { Pool, PoolSnapshotDto, PoolSpreadProfitDto, PoolVolumeDto } from '../model/pool';
|
|
4
|
+
import { CHART_LOG_INTERVALS, Market } from '../type';
|
|
5
|
+
export declare const fetchPoolPerformance: (chainId: CHAIN_IDS, poolKey: `0x${string}`, volumeFromTimestamp: number, snapshotFromTimestamp: number, snapshotIntervalType: CHART_LOG_INTERVALS, spreadProfitFromTimestamp: number) => Promise<{
|
|
6
|
+
poolVolumes: PoolVolumeDto[];
|
|
7
|
+
poolSnapshots: PoolSnapshotDto[];
|
|
8
|
+
poolSpreadProfits: PoolSpreadProfitDto[];
|
|
9
|
+
}>;
|
|
10
|
+
export declare function fetchPool(publicClient: PublicClient, chainId: CHAIN_IDS, tokenAddresses: `0x${string}`[], salt: `0x${string}`, useSubgraph: boolean, market?: Market): Promise<Pool>;
|
|
11
|
+
//# sourceMappingURL=pool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pool.d.ts","sourceRoot":"","sources":["../../../src/apis/pool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EACL,IAAI,EACJ,eAAe,EACf,mBAAmB,EACnB,aAAa,EACd,MAAM,eAAe,CAAA;AAItB,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAMrD,eAAO,MAAM,oBAAoB,YACtB,SAAS,WACT,KAAK,MAAM,EAAE,uBAED,MAAM,yBAEJ,MAAM,wBACP,mBAAmB,6BAEd,MAAM;;;;EA+BlC,CAAA;AAED,wBAAsB,SAAS,CAC7B,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,SAAS,EAClB,cAAc,EAAE,KAAK,MAAM,EAAE,EAAE,EAC/B,IAAI,EAAE,KAAK,MAAM,EAAE,EACnB,WAAW,EAAE,OAAO,EACpB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CA6Ef"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PublicClient } from 'viem';
|
|
2
|
+
import { CHAIN_IDS } from '../constants/chain';
|
|
3
|
+
import { LastAmounts, Market, StrategyPosition } from '../type';
|
|
4
|
+
export declare function fetchStrategyPosition(publicClient: PublicClient, chainId: CHAIN_IDS, tokenAddresses: `0x${string}`[], salt: `0x${string}`, useSubgraph: boolean, market?: Market): Promise<StrategyPosition>;
|
|
5
|
+
export declare function fetchLastAmounts(publicClient: PublicClient, chainId: CHAIN_IDS, tokenAddresses: `0x${string}`[], salt: `0x${string}`, useSubgraph: boolean, market?: Market): Promise<LastAmounts>;
|
|
6
|
+
//# sourceMappingURL=strategy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strategy.d.ts","sourceRoot":"","sources":["../../../src/apis/strategy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAE,MAAM,MAAM,CAAA;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAM/D,wBAAsB,qBAAqB,CACzC,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,SAAS,EAClB,cAAc,EAAE,KAAK,MAAM,EAAE,EAAE,EAC/B,IAAI,EAAE,KAAK,MAAM,EAAE,EACnB,WAAW,EAAE,OAAO,EACpB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CA8B3B;AAED,wBAAsB,gBAAgB,CACpC,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,SAAS,EAClB,cAAc,EAAE,KAAK,MAAM,EAAE,EAAE,EAC/B,IAAI,EAAE,KAAK,MAAM,EAAE,EACnB,WAAW,EAAE,OAAO,EACpB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,WAAW,CAAC,CA4BtB"}
|
package/dist/types/approval.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WalletClient } from 'viem';
|
|
2
2
|
import { CHAIN_IDS } from './constants/chain';
|
|
3
|
-
import type {
|
|
3
|
+
import type { DefaultWriteContractOptions } from './type';
|
|
4
4
|
/**
|
|
5
5
|
* @dev This function relates with `viem` dependency
|
|
6
6
|
* Sets approval of all open orders for the specified account on the given chain.
|
|
@@ -25,9 +25,43 @@ import type { DefaultOptions } from './type';
|
|
|
25
25
|
* walletClient
|
|
26
26
|
* })
|
|
27
27
|
*/
|
|
28
|
-
export declare const setApprovalOfOpenOrdersForAll: (
|
|
28
|
+
export declare const setApprovalOfOpenOrdersForAll: ({ chainId, walletClient, options, }: {
|
|
29
29
|
chainId: CHAIN_IDS;
|
|
30
30
|
walletClient: WalletClient;
|
|
31
|
-
options?:
|
|
31
|
+
options?: DefaultWriteContractOptions;
|
|
32
|
+
}) => Promise<`0x${string}` | undefined>;
|
|
33
|
+
/**
|
|
34
|
+
* @dev This function relates with `viem` dependency
|
|
35
|
+
* Approves the specified amount of tokens for the given account on the specified chain.
|
|
36
|
+
*
|
|
37
|
+
* @param {CHAIN_IDS} chainId The chain ID.
|
|
38
|
+
* @param {WalletClient} walletClient The wallet client.
|
|
39
|
+
* @param {`0x${string}`} token The ERC20 token address.
|
|
40
|
+
* @param {string | undefined} amount The amount to approve. If not provided, the maximum amount is approved.
|
|
41
|
+
* @param options
|
|
42
|
+
* @param options.rpcUrl The RPC URL of the blockchain.
|
|
43
|
+
* @returns {Promise<`0x${string}` | undefined>} Promise resolving to the transaction hash. If the account is already approved, the promise resolves to `undefined`.
|
|
44
|
+
* @example
|
|
45
|
+
* import { approveERC20 } from '@clober/v2-sdk'
|
|
46
|
+
*
|
|
47
|
+
* const walletClient = createWalletClient({
|
|
48
|
+
* chain: arbitrumSepolia,
|
|
49
|
+
* account: mnemonicToAccount('legal ...'),
|
|
50
|
+
* transport: http(),
|
|
51
|
+
* })
|
|
52
|
+
*
|
|
53
|
+
* const hash = await approveERC20({
|
|
54
|
+
* chainId: 421614,
|
|
55
|
+
* walletClient
|
|
56
|
+
* token: '0x00bfd44e79fb7f6dd5887a9426c8ef85a0cd23e0',
|
|
57
|
+
* amount: '1000.123', // approve 1000.123 USDC
|
|
58
|
+
* })
|
|
59
|
+
*/
|
|
60
|
+
export declare const approveERC20: ({ chainId, walletClient, token, amount, options, }: {
|
|
61
|
+
chainId: CHAIN_IDS;
|
|
62
|
+
walletClient: WalletClient;
|
|
63
|
+
token: `0x${string}`;
|
|
64
|
+
amount?: string;
|
|
65
|
+
options?: DefaultWriteContractOptions;
|
|
32
66
|
}) => Promise<`0x${string}` | undefined>;
|
|
33
67
|
//# sourceMappingURL=approval.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../../src/approval.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../../src/approval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,YAAY,EAAE,MAAM,MAAM,CAAA;AAEzE,OAAO,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAA;AAGxD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAA;AAIzD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,6BAA6B,wCAIvC;IACD,OAAO,EAAE,SAAS,CAAA;IAClB,YAAY,EAAE,YAAY,CAAA;IAC1B,OAAO,CAAC,EAAE,2BAA2B,CAAA;CACtC,KAAG,QAAQ,KAAK,MAAM,EAAE,GAAG,SAAS,CA2CpC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,YAAY,uDAMtB;IACD,OAAO,EAAE,SAAS,CAAA;IAClB,YAAY,EAAE,YAAY,CAAA;IAC1B,KAAK,EAAE,KAAK,MAAM,EAAE,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,2BAA2B,CAAA;CACtC,KAAG,QAAQ,KAAK,MAAM,EAAE,GAAG,SAAS,CAsDpC,CAAA"}
|
package/dist/types/call.d.ts
CHANGED
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
import { CHAIN_IDS } from './constants/chain';
|
|
2
|
-
import type { CurrencyFlow,
|
|
2
|
+
import type { Currency6909Flow, CurrencyFlow, DefaultWriteContractOptions, ERC20PermitParam, Pool, Transaction } from './type';
|
|
3
3
|
/**
|
|
4
4
|
* Build a transaction to open a market.
|
|
5
5
|
*
|
|
6
6
|
* @param chainId The chain ID of the blockchain.
|
|
7
|
+
* @param userAddress The address of the user.
|
|
7
8
|
* @param inputToken The address of the input token.
|
|
8
9
|
* @param outputToken The address of the output token.
|
|
9
|
-
* @param options
|
|
10
|
-
* @param options.rpcUrl The RPC URL of the blockchain.
|
|
10
|
+
* @param options {@link DefaultWriteContractOptions} options.
|
|
11
11
|
* @returns A Promise resolving to a transaction object. If the market is already open, returns undefined.
|
|
12
12
|
* @example
|
|
13
13
|
* import { openMarket } from '@clober/v2-sdk'
|
|
14
14
|
*
|
|
15
15
|
* const transaction = await openMarket({
|
|
16
16
|
* chainId: 421614,
|
|
17
|
+
* userAddress: '0xF8c1869Ecd4df136693C45EcE1b67f85B6bDaE69',
|
|
17
18
|
* inputToken: '0x00bfd44e79fb7f6dd5887a9426c8ef85a0cd23e0',
|
|
18
19
|
* outputToken: '0x0000000000000000000000000000000000000000'
|
|
19
20
|
* })
|
|
20
21
|
*/
|
|
21
|
-
export declare const openMarket: (
|
|
22
|
+
export declare const openMarket: ({ chainId, userAddress, inputToken, outputToken, options, }: {
|
|
22
23
|
chainId: CHAIN_IDS;
|
|
24
|
+
userAddress: `0x${string}`;
|
|
23
25
|
inputToken: `0x${string}`;
|
|
24
26
|
outputToken: `0x${string}`;
|
|
25
|
-
options?:
|
|
27
|
+
options?: DefaultWriteContractOptions & {
|
|
28
|
+
useSubgraph?: boolean;
|
|
29
|
+
};
|
|
26
30
|
}) => Promise<Transaction | undefined>;
|
|
27
31
|
/**
|
|
28
32
|
* Places a limit order on the specified chain for trading tokens.
|
|
@@ -33,23 +37,21 @@ export declare const openMarket: (args: {
|
|
|
33
37
|
* @param {`0x${string}`} outputToken The address of the token to be received as output.
|
|
34
38
|
* @param {string} amount The amount of input tokens for the order.
|
|
35
39
|
* @param {string} price The price at which the order should be executed.
|
|
36
|
-
* @param {
|
|
40
|
+
* @param options {@link DefaultWriteContractOptions} options.
|
|
37
41
|
* @param {erc20PermitParam} [options.erc20PermitParam] The permit signature for token approval.
|
|
38
42
|
* @param {boolean} [options.postOnly] A boolean indicating whether the order is only to be made not taken.
|
|
39
|
-
* @param {
|
|
40
|
-
* @
|
|
43
|
+
* @param {bigint} [options.makeTick] The tick for the make order.
|
|
44
|
+
* @param {bigint} [options.takeLimitTick] The tick for the take order.
|
|
45
|
+
* @param {boolean} [options.roundingUpMakeBid] A boolean indicating whether to round up the make bid.
|
|
46
|
+
* @param {boolean} [options.roundingDownMakeAsk] A boolean indicating whether to round down the make ask.
|
|
47
|
+
* @param {boolean} [options.roundingDownTakenBid] A boolean indicating whether to round down the taken bid.
|
|
48
|
+
* @param {boolean} [options.roundingUpTakenAsk] A boolean indicating whether to round up the taken ask.
|
|
49
|
+
* @returns {Promise<{ transaction: Transaction, result: { make: CurrencyFlow, take: CurrencyFlow, spent: CurrencyFlow }>}
|
|
41
50
|
* Promise resolving to the transaction object representing the limit order with the result of the order.
|
|
42
51
|
* @example
|
|
43
|
-
* import {
|
|
52
|
+
* import { limitOrder } from '@clober/v2-sdk'
|
|
44
53
|
* import { privateKeyToAccount } from 'viem/accounts'
|
|
45
54
|
*
|
|
46
|
-
* const erc20PermitParam = await signERC20Permit({
|
|
47
|
-
* chainId: 421614,
|
|
48
|
-
* walletClient,
|
|
49
|
-
* token: '0x00bfd44e79fb7f6dd5887a9426c8ef85a0cd23e0',
|
|
50
|
-
* amount: '100.123'
|
|
51
|
-
* })
|
|
52
|
-
*
|
|
53
55
|
* const { transaction } = await limitOrder({
|
|
54
56
|
* chainId: 421614,
|
|
55
57
|
* userAddress: '0xF8c1869Ecd4df136693C45EcE1b67f85B6bDaE69
|
|
@@ -57,7 +59,6 @@ export declare const openMarket: (args: {
|
|
|
57
59
|
* outputToken: '0x0000000000000000000000000000000000000000',
|
|
58
60
|
* amount: '100.123', // 100.123 USDC
|
|
59
61
|
* price: '4000.01', // price at 4000.01 (ETH/USDC)
|
|
60
|
-
* options: { erc20PermitParam }
|
|
61
62
|
* })
|
|
62
63
|
*
|
|
63
64
|
* @example
|
|
@@ -72,7 +73,7 @@ export declare const openMarket: (args: {
|
|
|
72
73
|
* price: '4000.01', // price at 4000.01 (ETH/USDC)
|
|
73
74
|
* })
|
|
74
75
|
*/
|
|
75
|
-
export declare const limitOrder: (
|
|
76
|
+
export declare const limitOrder: ({ chainId, userAddress, inputToken, outputToken, amount, price, options, }: {
|
|
76
77
|
chainId: CHAIN_IDS;
|
|
77
78
|
userAddress: `0x${string}`;
|
|
78
79
|
inputToken: `0x${string}`;
|
|
@@ -82,18 +83,38 @@ export declare const limitOrder: (args: {
|
|
|
82
83
|
options?: {
|
|
83
84
|
erc20PermitParam?: ERC20PermitParam;
|
|
84
85
|
postOnly?: boolean;
|
|
85
|
-
|
|
86
|
+
makeTick?: bigint;
|
|
87
|
+
takeLimitTick?: bigint;
|
|
88
|
+
roundingUpMakeBid?: boolean;
|
|
89
|
+
roundingDownMakeAsk?: boolean;
|
|
90
|
+
roundingDownTakenBid?: boolean;
|
|
91
|
+
roundingUpTakenAsk?: boolean;
|
|
92
|
+
useSubgraph?: boolean;
|
|
93
|
+
} & DefaultWriteContractOptions;
|
|
86
94
|
}) => Promise<{
|
|
87
95
|
transaction: Transaction;
|
|
88
96
|
result: {
|
|
89
|
-
make: CurrencyFlow
|
|
90
|
-
|
|
97
|
+
make: CurrencyFlow & {
|
|
98
|
+
price: string;
|
|
99
|
+
};
|
|
100
|
+
taken: CurrencyFlow & {
|
|
101
|
+
events: {
|
|
102
|
+
price: string;
|
|
103
|
+
amount: string;
|
|
104
|
+
}[];
|
|
105
|
+
};
|
|
106
|
+
spent: CurrencyFlow & {
|
|
107
|
+
events: {
|
|
108
|
+
price: string;
|
|
109
|
+
amount: string;
|
|
110
|
+
}[];
|
|
111
|
+
};
|
|
91
112
|
};
|
|
92
113
|
}>;
|
|
93
114
|
/**
|
|
94
115
|
* Executes a market order on the specified chain for trading tokens.
|
|
95
116
|
* If only `amountIn` is provided, spend the specified amount of input tokens.
|
|
96
|
-
* If
|
|
117
|
+
* If only `amountOut` is provided, take the specified amount of output tokens.
|
|
97
118
|
*
|
|
98
119
|
* @param {CHAIN_IDS} chainId The chain ID.
|
|
99
120
|
* @param {`0x${string}`} userAddress The Ethereum address of the user placing the order.
|
|
@@ -101,24 +122,18 @@ export declare const limitOrder: (args: {
|
|
|
101
122
|
* @param {`0x${string}`} outputToken The address of the token to be received as output.
|
|
102
123
|
* @param {string} amountIn The amount of input tokens for the order to spend.
|
|
103
124
|
* @param {string} amountOut The amount of output tokens for the order to take.
|
|
104
|
-
* @param {
|
|
125
|
+
* @param options {@link DefaultWriteContractOptions} options.
|
|
105
126
|
* @param {erc20PermitParam} [options.erc20PermitParam] The permit signature for token approval.
|
|
106
|
-
* @param {string} [options.rpcUrl] The RPC URL of the blockchain.
|
|
107
127
|
* @param {number} [options.slippage] The maximum slippage percentage allowed for the order.
|
|
128
|
+
* @param {boolean} [options.roundingDownTakenBid] A boolean indicating whether to round down the taken bid.
|
|
129
|
+
* @param {boolean} [options.roundingUpTakenAsk] A boolean indicating whether to round up the taken ask.
|
|
108
130
|
* if the slippage is not provided, unlimited slippage is allowed.
|
|
109
|
-
* @returns {Promise<{ transaction: Transaction, result: {
|
|
131
|
+
* @returns {Promise<{ transaction: Transaction, result: { spent: CurrencyFlow, taken: CurrencyFlow } }>}
|
|
110
132
|
* Promise resolving to the transaction object representing the market order with the result of the order.
|
|
111
133
|
* @example
|
|
112
|
-
* import {
|
|
134
|
+
* import { marketOrder } from '@clober/v2-sdk'
|
|
113
135
|
* import { privateKeyToAccount } from 'viem/accounts'
|
|
114
136
|
*
|
|
115
|
-
* const erc20PermitParam = await signERC20Permit({
|
|
116
|
-
* chainId: 421614,
|
|
117
|
-
* walletClient,
|
|
118
|
-
* token: '0x00bfd44e79fb7f6dd5887a9426c8ef85a0cd23e0',
|
|
119
|
-
* amount: '100.123'
|
|
120
|
-
* })
|
|
121
|
-
*
|
|
122
137
|
* const transaction = await marketOrder({
|
|
123
138
|
* chainId: 421614,
|
|
124
139
|
* userAddress: '0xF8c1869Ecd4df136693C45EcE1b67f85B6bDaE69
|
|
@@ -129,22 +144,35 @@ export declare const limitOrder: (args: {
|
|
|
129
144
|
* })
|
|
130
145
|
*
|
|
131
146
|
*/
|
|
132
|
-
export declare const marketOrder: (
|
|
147
|
+
export declare const marketOrder: ({ chainId, userAddress, inputToken, outputToken, amountIn, amountOut, options, }: {
|
|
133
148
|
chainId: CHAIN_IDS;
|
|
134
149
|
userAddress: `0x${string}`;
|
|
135
150
|
inputToken: `0x${string}`;
|
|
136
151
|
outputToken: `0x${string}`;
|
|
137
|
-
amountIn
|
|
152
|
+
amountIn?: string;
|
|
138
153
|
amountOut?: string;
|
|
139
154
|
options?: {
|
|
140
155
|
erc20PermitParam?: ERC20PermitParam;
|
|
141
156
|
slippage?: number;
|
|
142
|
-
|
|
157
|
+
roundingDownTakenBid?: boolean;
|
|
158
|
+
roundingUpTakenAsk?: boolean;
|
|
159
|
+
useSubgraph?: boolean;
|
|
160
|
+
} & DefaultWriteContractOptions;
|
|
143
161
|
}) => Promise<{
|
|
144
162
|
transaction: Transaction;
|
|
145
163
|
result: {
|
|
146
|
-
|
|
147
|
-
|
|
164
|
+
taken: CurrencyFlow & {
|
|
165
|
+
events: {
|
|
166
|
+
price: string;
|
|
167
|
+
amount: string;
|
|
168
|
+
}[];
|
|
169
|
+
};
|
|
170
|
+
spent: CurrencyFlow & {
|
|
171
|
+
events: {
|
|
172
|
+
price: string;
|
|
173
|
+
amount: string;
|
|
174
|
+
}[];
|
|
175
|
+
};
|
|
148
176
|
};
|
|
149
177
|
}>;
|
|
150
178
|
/**
|
|
@@ -154,8 +182,7 @@ export declare const marketOrder: (args: {
|
|
|
154
182
|
* @param {CHAIN_IDS} chainId The chain ID.
|
|
155
183
|
* @param {`0x${string}`} userAddress The Ethereum address of the user.
|
|
156
184
|
* @param {string} id An ID representing the open order to be claimed.
|
|
157
|
-
* @param {
|
|
158
|
-
* @param {string} [options.rpcUrl] The RPC URL to use for executing the transaction.
|
|
185
|
+
* @param options {@link DefaultWriteContractOptions} options.
|
|
159
186
|
* @returns {Promise<{ transaction: Transaction, result: CurrencyFlow }>}
|
|
160
187
|
* Promise resolving to the transaction object representing the claim action with the result of the order.
|
|
161
188
|
* @throws {Error} Throws an error if no open orders are found for the specified user.
|
|
@@ -172,11 +199,13 @@ export declare const marketOrder: (args: {
|
|
|
172
199
|
* id: openOrders.map((order) => order.id)
|
|
173
200
|
* })
|
|
174
201
|
*/
|
|
175
|
-
export declare const claimOrder: (
|
|
202
|
+
export declare const claimOrder: ({ chainId, userAddress, id, options, }: {
|
|
176
203
|
chainId: CHAIN_IDS;
|
|
177
204
|
userAddress: `0x${string}`;
|
|
178
205
|
id: string;
|
|
179
|
-
options?:
|
|
206
|
+
options?: DefaultWriteContractOptions & {
|
|
207
|
+
useSubgraph?: boolean;
|
|
208
|
+
};
|
|
180
209
|
}) => Promise<{
|
|
181
210
|
transaction: Transaction;
|
|
182
211
|
result: CurrencyFlow;
|
|
@@ -188,8 +217,7 @@ export declare const claimOrder: (args: {
|
|
|
188
217
|
* @param {CHAIN_IDS} chainId The chain ID.
|
|
189
218
|
* @param {`0x${string}`} userAddress The Ethereum address of the user.
|
|
190
219
|
* @param {string[]} ids An array of IDs representing the open orders to be claimed.
|
|
191
|
-
* @param {
|
|
192
|
-
* @param {string} [options.rpcUrl] The RPC URL to use for executing the transaction.
|
|
220
|
+
* @param options {@link DefaultWriteContractOptions} options.
|
|
193
221
|
* @returns {Promise<{ transaction: Transaction, result: CurrencyFlow[] }>}
|
|
194
222
|
* Promise resolving to the transaction object representing the claim action with the result of the orders.
|
|
195
223
|
* @throws {Error} Throws an error if no open orders are found for the specified user.
|
|
@@ -206,11 +234,13 @@ export declare const claimOrder: (args: {
|
|
|
206
234
|
* ids: openOrders.map((order) => order.id)
|
|
207
235
|
* )
|
|
208
236
|
*/
|
|
209
|
-
export declare const claimOrders: (
|
|
237
|
+
export declare const claimOrders: ({ chainId, userAddress, ids, options, }: {
|
|
210
238
|
chainId: CHAIN_IDS;
|
|
211
239
|
userAddress: `0x${string}`;
|
|
212
240
|
ids: string[];
|
|
213
|
-
options?:
|
|
241
|
+
options?: DefaultWriteContractOptions & {
|
|
242
|
+
useSubgraph?: boolean;
|
|
243
|
+
};
|
|
214
244
|
}) => Promise<{
|
|
215
245
|
transaction: Transaction;
|
|
216
246
|
result: CurrencyFlow[];
|
|
@@ -222,8 +252,7 @@ export declare const claimOrders: (args: {
|
|
|
222
252
|
* @param {CHAIN_IDS} chainId The chain ID.
|
|
223
253
|
* @param {`0x${string}`} userAddress The Ethereum address of the user.
|
|
224
254
|
* @param {string} id An ID representing the open order to be canceled
|
|
225
|
-
* @param {
|
|
226
|
-
* @param {string} [options.rpcUrl] The RPC URL to use for executing the transaction.
|
|
255
|
+
* @param options {@link DefaultWriteContractOptions} options.
|
|
227
256
|
* @returns {Promise<{ transaction: Transaction, result: CurrencyFlow }>}
|
|
228
257
|
* Promise resolving to the transaction object representing the cancel action with the result of the order.
|
|
229
258
|
* @throws {Error} Throws an error if no open orders are found for the specified user.
|
|
@@ -240,11 +269,13 @@ export declare const claimOrders: (args: {
|
|
|
240
269
|
* id: openOrders.map((order) => order.id)
|
|
241
270
|
* })
|
|
242
271
|
*/
|
|
243
|
-
export declare const cancelOrder: (
|
|
272
|
+
export declare const cancelOrder: ({ chainId, userAddress, id, options, }: {
|
|
244
273
|
chainId: CHAIN_IDS;
|
|
245
274
|
userAddress: `0x${string}`;
|
|
246
275
|
id: string;
|
|
247
|
-
options?:
|
|
276
|
+
options?: DefaultWriteContractOptions & {
|
|
277
|
+
useSubgraph?: boolean;
|
|
278
|
+
};
|
|
248
279
|
}) => Promise<{
|
|
249
280
|
transaction: Transaction;
|
|
250
281
|
result: CurrencyFlow;
|
|
@@ -256,8 +287,7 @@ export declare const cancelOrder: (args: {
|
|
|
256
287
|
* @param {CHAIN_IDS} chainId The chain ID.
|
|
257
288
|
* @param {`0x${string}`} userAddress The Ethereum address of the user.
|
|
258
289
|
* @param {string[]} ids An array of IDs representing the open orders to be canceled.
|
|
259
|
-
* @param {
|
|
260
|
-
* @param {string} [options.rpcUrl] The RPC URL to use for executing the transaction.
|
|
290
|
+
* @param options {@link DefaultWriteContractOptions} options.
|
|
261
291
|
* @returns {Promise<{ transaction: Transaction, result: CurrencyFlow[] }>
|
|
262
292
|
* Promise resolving to the transaction object representing the cancel action with the result of the orders.
|
|
263
293
|
* @throws {Error} Throws an error if no open orders are found for the specified user.
|
|
@@ -274,13 +304,162 @@ export declare const cancelOrder: (args: {
|
|
|
274
304
|
* ids: openOrders.map((order) => order.id)
|
|
275
305
|
* })
|
|
276
306
|
*/
|
|
277
|
-
export declare const cancelOrders: (
|
|
307
|
+
export declare const cancelOrders: ({ chainId, userAddress, ids, options, }: {
|
|
278
308
|
chainId: CHAIN_IDS;
|
|
279
309
|
userAddress: `0x${string}`;
|
|
280
310
|
ids: string[];
|
|
281
|
-
options?:
|
|
311
|
+
options?: DefaultWriteContractOptions & {
|
|
312
|
+
useSubgraph?: boolean;
|
|
313
|
+
};
|
|
282
314
|
}) => Promise<{
|
|
283
315
|
transaction: Transaction;
|
|
284
316
|
result: CurrencyFlow[];
|
|
285
317
|
}>;
|
|
318
|
+
/**
|
|
319
|
+
* Build a transaction to open a pool,
|
|
320
|
+
*
|
|
321
|
+
* @param chainId The chain ID of the blockchain.
|
|
322
|
+
* @param userAddress The address of the user.
|
|
323
|
+
* @param inputToken The address of the input token.
|
|
324
|
+
* @param outputToken The address of the output token.
|
|
325
|
+
* @param options {@link DefaultWriteContractOptions} options.
|
|
326
|
+
* @returns A Promise resolving to a transaction object. If the market is already open, returns undefined.
|
|
327
|
+
* @example
|
|
328
|
+
* import { openPool } from '@clober/v2-sdk'
|
|
329
|
+
*
|
|
330
|
+
* const transaction = await openPool({
|
|
331
|
+
* chainId: 421614,
|
|
332
|
+
* userAddress: '0xF8c1869Ecd4df136693C45EcE1b67f85B6bDaE69',
|
|
333
|
+
* inputToken: '0x00bfd44e79fb7f6dd5887a9426c8ef85a0cd23e0',
|
|
334
|
+
* outputToken: '0x0000000000000000000000000000000000000000',
|
|
335
|
+
* salt: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
|
336
|
+
* })
|
|
337
|
+
*/
|
|
338
|
+
export declare const openPool: ({ chainId, userAddress, tokenA, tokenB, salt, options, }: {
|
|
339
|
+
chainId: CHAIN_IDS;
|
|
340
|
+
userAddress: `0x${string}`;
|
|
341
|
+
tokenA: `0x${string}`;
|
|
342
|
+
tokenB: `0x${string}`;
|
|
343
|
+
salt: `0x${string}`;
|
|
344
|
+
options?: DefaultWriteContractOptions & {
|
|
345
|
+
useSubgraph?: boolean;
|
|
346
|
+
};
|
|
347
|
+
}) => Promise<Transaction | undefined>;
|
|
348
|
+
export declare const addLiquidity: ({ chainId, userAddress, token0, token1, salt, amount0, amount1, options, }: {
|
|
349
|
+
chainId: CHAIN_IDS;
|
|
350
|
+
userAddress: `0x${string}`;
|
|
351
|
+
token0: `0x${string}`;
|
|
352
|
+
token1: `0x${string}`;
|
|
353
|
+
salt: `0x${string}`;
|
|
354
|
+
amount0?: string;
|
|
355
|
+
amount1?: string;
|
|
356
|
+
options?: {
|
|
357
|
+
slippage?: number;
|
|
358
|
+
disableSwap?: boolean;
|
|
359
|
+
token0PermitParams?: ERC20PermitParam;
|
|
360
|
+
token1PermitParams?: ERC20PermitParam;
|
|
361
|
+
token0Price?: number;
|
|
362
|
+
token1Price?: number;
|
|
363
|
+
testnetPrice?: number;
|
|
364
|
+
useSubgraph?: boolean;
|
|
365
|
+
} & DefaultWriteContractOptions;
|
|
366
|
+
}) => Promise<{
|
|
367
|
+
transaction: Transaction | undefined;
|
|
368
|
+
result: {
|
|
369
|
+
currencyA: CurrencyFlow;
|
|
370
|
+
currencyB: CurrencyFlow;
|
|
371
|
+
lpCurrency: Currency6909Flow;
|
|
372
|
+
};
|
|
373
|
+
}>;
|
|
374
|
+
export declare const removeLiquidity: ({ chainId, userAddress, token0, token1, salt, amount, options, }: {
|
|
375
|
+
chainId: CHAIN_IDS;
|
|
376
|
+
userAddress: `0x${string}`;
|
|
377
|
+
token0: `0x${string}`;
|
|
378
|
+
token1: `0x${string}`;
|
|
379
|
+
salt: `0x${string}`;
|
|
380
|
+
amount: string;
|
|
381
|
+
options?: {
|
|
382
|
+
slippage?: number;
|
|
383
|
+
useSubgraph?: boolean;
|
|
384
|
+
} & DefaultWriteContractOptions;
|
|
385
|
+
}) => Promise<{
|
|
386
|
+
transaction: Transaction | undefined;
|
|
387
|
+
result: {
|
|
388
|
+
currencyA: CurrencyFlow;
|
|
389
|
+
currencyB: CurrencyFlow;
|
|
390
|
+
lpCurrency: Currency6909Flow;
|
|
391
|
+
};
|
|
392
|
+
}>;
|
|
393
|
+
export declare const refillOrder: ({ chainId, userAddress, token0, token1, salt, options, }: {
|
|
394
|
+
chainId: CHAIN_IDS;
|
|
395
|
+
userAddress: `0x${string}`;
|
|
396
|
+
token0: `0x${string}`;
|
|
397
|
+
token1: `0x${string}`;
|
|
398
|
+
salt: `0x${string}`;
|
|
399
|
+
options?: DefaultWriteContractOptions & {
|
|
400
|
+
useSubgraph?: boolean;
|
|
401
|
+
pool?: Pool;
|
|
402
|
+
};
|
|
403
|
+
}) => Promise<Transaction>;
|
|
404
|
+
export declare const adjustOrderPrice: ({ chainId, userAddress, token0, token1, salt, oraclePrice, bidPrice, askPrice, alpha, options, }: {
|
|
405
|
+
chainId: CHAIN_IDS;
|
|
406
|
+
userAddress: `0x${string}`;
|
|
407
|
+
token0: `0x${string}`;
|
|
408
|
+
token1: `0x${string}`;
|
|
409
|
+
salt: `0x${string}`;
|
|
410
|
+
oraclePrice: string;
|
|
411
|
+
bidPrice: string;
|
|
412
|
+
askPrice: string;
|
|
413
|
+
alpha: string;
|
|
414
|
+
options?: {
|
|
415
|
+
bidTick?: bigint;
|
|
416
|
+
askTick?: bigint;
|
|
417
|
+
roundingUpBidPrice?: boolean;
|
|
418
|
+
roundingUpAskPrice?: boolean;
|
|
419
|
+
useSubgraph?: boolean;
|
|
420
|
+
pool?: Pool;
|
|
421
|
+
} & DefaultWriteContractOptions;
|
|
422
|
+
}) => Promise<Transaction>;
|
|
423
|
+
export declare const setStrategyConfig: ({ chainId, userAddress, token0, token1, salt, config, options, }: {
|
|
424
|
+
chainId: CHAIN_IDS;
|
|
425
|
+
userAddress: `0x${string}`;
|
|
426
|
+
token0: `0x${string}`;
|
|
427
|
+
token1: `0x${string}`;
|
|
428
|
+
salt: `0x${string}`;
|
|
429
|
+
config: {
|
|
430
|
+
referenceThreshold: string;
|
|
431
|
+
rebalanceThreshold: string;
|
|
432
|
+
rateA: string;
|
|
433
|
+
rateB: string;
|
|
434
|
+
minRateA: string;
|
|
435
|
+
minRateB: string;
|
|
436
|
+
priceThresholdA: string;
|
|
437
|
+
priceThresholdB: string;
|
|
438
|
+
};
|
|
439
|
+
options?: {
|
|
440
|
+
useSubgraph?: boolean;
|
|
441
|
+
} & DefaultWriteContractOptions;
|
|
442
|
+
}) => Promise<Transaction>;
|
|
443
|
+
export declare const pausePool: ({ chainId, userAddress, token0, token1, salt, options, }: {
|
|
444
|
+
chainId: CHAIN_IDS;
|
|
445
|
+
userAddress: `0x${string}`;
|
|
446
|
+
token0: `0x${string}`;
|
|
447
|
+
token1: `0x${string}`;
|
|
448
|
+
salt: `0x${string}`;
|
|
449
|
+
options?: {
|
|
450
|
+
useSubgraph?: boolean;
|
|
451
|
+
pool?: Pool;
|
|
452
|
+
} & DefaultWriteContractOptions;
|
|
453
|
+
}) => Promise<Transaction | undefined>;
|
|
454
|
+
export declare const resumePool: ({ chainId, userAddress, token0, token1, salt, options, }: {
|
|
455
|
+
chainId: CHAIN_IDS;
|
|
456
|
+
userAddress: `0x${string}`;
|
|
457
|
+
token0: `0x${string}`;
|
|
458
|
+
token1: `0x${string}`;
|
|
459
|
+
salt: `0x${string}`;
|
|
460
|
+
options?: {
|
|
461
|
+
useSubgraph?: boolean;
|
|
462
|
+
pool?: Pool;
|
|
463
|
+
} & DefaultWriteContractOptions;
|
|
464
|
+
}) => Promise<Transaction | undefined>;
|
|
286
465
|
//# sourceMappingURL=call.d.ts.map
|
package/dist/types/call.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../src/call.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../src/call.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,2BAA2B,EAC3B,gBAAgB,EAEhB,IAAI,EACJ,WAAW,EACZ,MAAM,QAAQ,CAAA;AAiCf;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,UAAU,gEAMpB;IACD,OAAO,EAAE,SAAS,CAAA;IAClB,WAAW,EAAE,KAAK,MAAM,EAAE,CAAA;IAC1B,UAAU,EAAE,KAAK,MAAM,EAAE,CAAA;IACzB,WAAW,EAAE,KAAK,MAAM,EAAE,CAAA;IAC1B,OAAO,CAAC,EAAE,2BAA2B,GAAG;QACtC,WAAW,CAAC,EAAE,OAAO,CAAA;KACtB,CAAA;CACF,KAAG,QAAQ,WAAW,GAAG,SAAS,CAiDlC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,UAAU,+EAQpB;IACD,OAAO,EAAE,SAAS,CAAA;IAClB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AAW,EAAE,KAAK,MAAM,EAAE,CAAA;IAC1B,MAAM,EAAE,KAAK,MAAM,EAAE,CAAA;IACrB,MAAM,EAAE,KAAK,MAAM,EAAE,CAAA;IACrB,IAAI,EAAE,KAAK,MAAM,EAAE,CAAA;IACnB,OAAO,CAAC,EAAE;QACR,WAAW,CAAC,EAAE,OAAO,CAAA;QACrB,IAAI,CAAC,EAAE,IAAI,CAAA;KACZ,GAAG,2BAA2B,CAAA;CAChC,KAAG,QAAQ,WAAW,GAAG,SAAS,CA+ClC,CAAA"}
|
|
@@ -4,6 +4,10 @@ export declare const CONTRACT_ADDRESSES: {
|
|
|
4
4
|
Controller: `0x${string}`;
|
|
5
5
|
BookManager: `0x${string}`;
|
|
6
6
|
BookViewer: `0x${string}`;
|
|
7
|
+
Rebalancer: `0x${string}`;
|
|
8
|
+
Strategy: `0x${string}`;
|
|
9
|
+
Minter: `0x${string}`;
|
|
10
|
+
Operator: `0x${string}`;
|
|
7
11
|
};
|
|
8
12
|
};
|
|
9
13
|
//# sourceMappingURL=addresses.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../../../src/constants/addresses.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC,eAAO,MAAM,kBAAkB,EAAE;KAC9B,KAAK,IAAI,SAAS,GAAG;QACpB,UAAU,EAAE,KAAK,MAAM,EAAE,CAAA;QACzB,WAAW,EAAE,KAAK,MAAM,EAAE,CAAA;QAC1B,UAAU,EAAE,KAAK,MAAM,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../../../src/constants/addresses.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC,eAAO,MAAM,kBAAkB,EAAE;KAC9B,KAAK,IAAI,SAAS,GAAG;QACpB,UAAU,EAAE,KAAK,MAAM,EAAE,CAAA;QACzB,WAAW,EAAE,KAAK,MAAM,EAAE,CAAA;QAC1B,UAAU,EAAE,KAAK,MAAM,EAAE,CAAA;QACzB,UAAU,EAAE,KAAK,MAAM,EAAE,CAAA;QACzB,QAAQ,EAAE,KAAK,MAAM,EAAE,CAAA;QACvB,MAAM,EAAE,KAAK,MAAM,EAAE,CAAA;QACrB,QAAQ,EAAE,KAAK,MAAM,EAAE,CAAA;KACxB;CA0EF,CAAA"}
|