@1stdex/first-sdk 1.0.41 → 1.0.58
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 +26 -1
- package/dist/cjs/calls/batch/index.js +3 -3
- package/dist/cjs/calls/batch/index.js.map +1 -1
- package/dist/cjs/calls/batch/{prepare-order-with-setup.js → prepare-limit-order-with-setup.js} +4 -16
- package/dist/cjs/calls/batch/prepare-limit-order-with-setup.js.map +1 -0
- package/dist/cjs/calls/batch/prepare-market-order-with-setup.js +0 -12
- package/dist/cjs/calls/batch/prepare-market-order-with-setup.js.map +1 -1
- package/dist/cjs/calls/index.js +2 -5
- package/dist/cjs/calls/index.js.map +1 -1
- package/dist/cjs/calls/market/cancel.js +0 -5
- package/dist/cjs/calls/market/cancel.js.map +1 -1
- package/dist/cjs/calls/market/claim.js +1 -6
- package/dist/cjs/calls/market/claim.js.map +1 -1
- package/dist/cjs/calls/market/limit.js +5 -18
- package/dist/cjs/calls/market/limit.js.map +1 -1
- package/dist/cjs/calls/market/make.js +2 -12
- package/dist/cjs/calls/market/make.js.map +1 -1
- package/dist/cjs/calls/market/market.js +1 -3
- package/dist/cjs/calls/market/market.js.map +1 -1
- package/dist/cjs/constants/abis/core/book-manager-abi.js +1100 -273
- package/dist/cjs/constants/abis/core/book-manager-abi.js.map +1 -1
- package/dist/cjs/constants/abis/core/book-viewer-abi.js +222 -42
- package/dist/cjs/constants/abis/core/book-viewer-abi.js.map +1 -1
- package/dist/cjs/constants/abis/core/claimable-dex-vault-abi.js +2096 -0
- package/dist/cjs/constants/abis/core/claimable-dex-vault-abi.js.map +1 -0
- package/dist/cjs/constants/abis/core/controller-abi.js +731 -134
- package/dist/cjs/constants/abis/core/controller-abi.js.map +1 -1
- package/dist/cjs/constants/abis/core/dex-vault-abi.js +1346 -7
- package/dist/cjs/constants/abis/core/dex-vault-abi.js.map +1 -1
- package/dist/cjs/constants/abis/core/mirror-token-abi.js +938 -164
- package/dist/cjs/constants/abis/core/mirror-token-abi.js.map +1 -1
- package/dist/cjs/constants/abis/core/params-abi.js +0 -1
- package/dist/cjs/constants/abis/core/params-abi.js.map +1 -1
- package/dist/cjs/constants/chain-configs/addresses.js +8 -3
- package/dist/cjs/constants/chain-configs/addresses.js.map +1 -1
- package/dist/cjs/constants/chain-configs/chain.js +2 -0
- package/dist/cjs/constants/chain-configs/chain.js.map +1 -1
- package/dist/cjs/constants/chain-configs/currency.js +9 -1
- package/dist/cjs/constants/chain-configs/currency.js.map +1 -1
- package/dist/cjs/constants/chain-configs/fee.js +2 -0
- package/dist/cjs/constants/chain-configs/fee.js.map +1 -1
- package/dist/cjs/constants/chain-configs/subgraph.js +2 -1
- package/dist/cjs/constants/chain-configs/subgraph.js.map +1 -1
- package/dist/cjs/entities/analytics/apis/index.js +4 -57
- package/dist/cjs/entities/analytics/apis/index.js.map +1 -1
- package/dist/cjs/entities/open-order/apis/index.js +72 -3
- package/dist/cjs/entities/open-order/apis/index.js.map +1 -1
- package/dist/cjs/views/balance.js +4 -4
- package/dist/cjs/views/balance.js.map +1 -1
- package/dist/cjs/views/index.js +3 -2
- package/dist/cjs/views/index.js.map +1 -1
- package/dist/cjs/views/market/order-result.js +38 -22
- package/dist/cjs/views/market/order-result.js.map +1 -1
- package/dist/cjs/views/open-order.js +11 -3
- package/dist/cjs/views/open-order.js.map +1 -1
- package/dist/cjs/views/setup.js +6 -30
- package/dist/cjs/views/setup.js.map +1 -1
- package/dist/esm/calls/approval/market.js +1 -1
- package/dist/esm/calls/approval/open-order.js +1 -1
- package/dist/esm/calls/approval/token.js +1 -1
- package/dist/esm/calls/batch/index.js +1 -1
- package/dist/esm/calls/batch/index.js.map +1 -1
- package/dist/esm/calls/batch/{prepare-order-with-setup.js → prepare-limit-order-with-setup.js} +6 -19
- package/dist/esm/calls/batch/prepare-limit-order-with-setup.js.map +1 -0
- package/dist/esm/calls/batch/prepare-market-order-with-setup.js +3 -16
- package/dist/esm/calls/batch/prepare-market-order-with-setup.js.map +1 -1
- package/dist/esm/calls/index.js +1 -2
- package/dist/esm/calls/index.js.map +1 -1
- package/dist/esm/calls/market/cancel.js +2 -7
- package/dist/esm/calls/market/cancel.js.map +1 -1
- package/dist/esm/calls/market/claim.js +5 -10
- package/dist/esm/calls/market/claim.js.map +1 -1
- package/dist/esm/calls/market/limit.js +7 -20
- package/dist/esm/calls/market/limit.js.map +1 -1
- package/dist/esm/calls/market/make.js +2 -12
- package/dist/esm/calls/market/make.js.map +1 -1
- package/dist/esm/calls/market/market.js +2 -4
- package/dist/esm/calls/market/market.js.map +1 -1
- package/dist/esm/calls/market/open.js +1 -1
- package/dist/esm/calls/vault/deposit-to-vault.js +1 -1
- package/dist/esm/calls/vault/remove-vault.js +1 -1
- package/dist/esm/calls/vault/set-vault.js +1 -1
- package/dist/esm/calls/vault/withdraw-from-vault.js +1 -1
- package/dist/esm/constants/abis/core/book-manager-abi.js +1100 -273
- package/dist/esm/constants/abis/core/book-manager-abi.js.map +1 -1
- package/dist/esm/constants/abis/core/book-viewer-abi.js +222 -42
- package/dist/esm/constants/abis/core/book-viewer-abi.js.map +1 -1
- package/dist/esm/constants/abis/core/claimable-dex-vault-abi.js +2093 -0
- package/dist/esm/constants/abis/core/claimable-dex-vault-abi.js.map +1 -0
- package/dist/esm/constants/abis/core/controller-abi.js +731 -134
- package/dist/esm/constants/abis/core/controller-abi.js.map +1 -1
- package/dist/esm/constants/abis/core/dex-vault-abi.js +1346 -7
- package/dist/esm/constants/abis/core/dex-vault-abi.js.map +1 -1
- package/dist/esm/constants/abis/core/mirror-token-abi.js +938 -164
- package/dist/esm/constants/abis/core/mirror-token-abi.js.map +1 -1
- package/dist/esm/constants/abis/core/params-abi.js +0 -1
- package/dist/esm/constants/abis/core/params-abi.js.map +1 -1
- package/dist/esm/constants/chain-configs/addresses.js +8 -3
- package/dist/esm/constants/chain-configs/addresses.js.map +1 -1
- package/dist/esm/constants/chain-configs/chain.js +3 -1
- package/dist/esm/constants/chain-configs/chain.js.map +1 -1
- package/dist/esm/constants/chain-configs/currency.js +9 -1
- package/dist/esm/constants/chain-configs/currency.js.map +1 -1
- package/dist/esm/constants/chain-configs/fee.js +2 -0
- package/dist/esm/constants/chain-configs/fee.js.map +1 -1
- package/dist/esm/constants/chain-configs/subgraph.js +2 -1
- package/dist/esm/constants/chain-configs/subgraph.js.map +1 -1
- package/dist/esm/entities/analytics/apis/index.js +4 -57
- package/dist/esm/entities/analytics/apis/index.js.map +1 -1
- package/dist/esm/entities/open-order/apis/index.js +69 -2
- package/dist/esm/entities/open-order/apis/index.js.map +1 -1
- package/dist/esm/views/address.js +1 -1
- package/dist/esm/views/balance.js +4 -4
- package/dist/esm/views/balance.js.map +1 -1
- package/dist/esm/views/book.js +1 -1
- package/dist/esm/views/index.js +2 -2
- package/dist/esm/views/index.js.map +1 -1
- package/dist/esm/views/market/chart-log.js +2 -2
- package/dist/esm/views/market/index.js +1 -1
- package/dist/esm/views/market/order-result.js +52 -26
- package/dist/esm/views/market/order-result.js.map +1 -1
- package/dist/esm/views/market/quote.js +2 -2
- package/dist/esm/views/market/token.js +1 -1
- package/dist/esm/views/open-order.js +46 -5
- package/dist/esm/views/open-order.js.map +1 -1
- package/dist/esm/views/order.js +1 -1
- package/dist/esm/views/setup.js +10 -50
- package/dist/esm/views/setup.js.map +1 -1
- package/dist/esm/views/subgraph.js +3 -3
- package/dist/esm/views/vault.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/calls/approval/market.d.ts +1 -1
- package/dist/types/calls/approval/open-order.d.ts +1 -1
- package/dist/types/calls/approval/token.d.ts +1 -1
- package/dist/types/calls/batch/index.d.ts +2 -2
- package/dist/types/calls/batch/index.d.ts.map +1 -1
- package/dist/types/calls/batch/{prepare-order-with-setup.d.ts → prepare-limit-order-with-setup.d.ts} +5 -8
- package/dist/types/calls/batch/prepare-limit-order-with-setup.d.ts.map +1 -0
- package/dist/types/calls/batch/prepare-market-order-with-setup.d.ts +2 -2
- package/dist/types/calls/batch/prepare-market-order-with-setup.d.ts.map +1 -1
- package/dist/types/calls/index.d.ts +1 -2
- package/dist/types/calls/index.d.ts.map +1 -1
- package/dist/types/calls/market/cancel.d.ts +2 -2
- package/dist/types/calls/market/cancel.d.ts.map +1 -1
- package/dist/types/calls/market/claim.d.ts +4 -4
- package/dist/types/calls/market/claim.d.ts.map +1 -1
- package/dist/types/calls/market/limit.d.ts +3 -6
- package/dist/types/calls/market/limit.d.ts.map +1 -1
- package/dist/types/calls/market/make.d.ts +0 -2
- package/dist/types/calls/market/make.d.ts.map +1 -1
- package/dist/types/calls/market/market.d.ts +1 -2
- package/dist/types/calls/market/market.d.ts.map +1 -1
- package/dist/types/calls/market/open.d.ts +1 -1
- package/dist/types/calls/vault/deposit-to-vault.d.ts +1 -1
- package/dist/types/calls/vault/remove-vault.d.ts +1 -1
- package/dist/types/calls/vault/set-vault.d.ts +1 -1
- package/dist/types/calls/vault/withdraw-from-vault.d.ts +1 -1
- package/dist/types/constants/abis/core/book-manager-abi.d.ts +67 -159
- package/dist/types/constants/abis/core/book-manager-abi.d.ts.map +1 -1
- package/dist/types/constants/abis/core/book-viewer-abi.d.ts +0 -8
- package/dist/types/constants/abis/core/book-viewer-abi.d.ts.map +1 -1
- package/dist/types/constants/abis/core/{claimable-dex-vault.d.ts → claimable-dex-vault-abi.d.ts} +74 -117
- package/dist/types/constants/abis/core/{claimable-dex-vault.d.ts.map → claimable-dex-vault-abi.d.ts.map} +1 -1
- package/dist/types/constants/abis/core/controller-abi.d.ts +25 -25
- package/dist/types/constants/abis/core/controller-abi.d.ts.map +1 -1
- package/dist/types/constants/abis/core/dex-vault-abi.d.ts +1008 -4
- package/dist/types/constants/abis/core/dex-vault-abi.d.ts.map +1 -1
- package/dist/types/constants/abis/core/mirror-token-abi.d.ts +10 -0
- package/dist/types/constants/abis/core/mirror-token-abi.d.ts.map +1 -1
- package/dist/types/constants/abis/core/params-abi.d.ts.map +1 -1
- package/dist/types/constants/chain-configs/addresses.d.ts.map +1 -1
- package/dist/types/constants/chain-configs/chain.d.ts +1 -0
- package/dist/types/constants/chain-configs/chain.d.ts.map +1 -1
- package/dist/types/constants/chain-configs/currency.d.ts.map +1 -1
- package/dist/types/constants/chain-configs/fee.d.ts.map +1 -1
- package/dist/types/constants/chain-configs/subgraph.d.ts.map +1 -1
- package/dist/types/entities/analytics/apis/index.d.ts.map +1 -1
- package/dist/types/entities/analytics/types.d.ts +1 -7
- package/dist/types/entities/analytics/types.d.ts.map +1 -1
- package/dist/types/entities/open-order/apis/index.d.ts +3 -1
- package/dist/types/entities/open-order/apis/index.d.ts.map +1 -1
- package/dist/types/views/address.d.ts +1 -1
- package/dist/types/views/balance.d.ts +2 -2
- package/dist/types/views/book.d.ts +1 -1
- package/dist/types/views/index.d.ts +2 -2
- package/dist/types/views/index.d.ts.map +1 -1
- package/dist/types/views/market/chart-log.d.ts +2 -2
- package/dist/types/views/market/index.d.ts +1 -1
- package/dist/types/views/market/order-result.d.ts +2 -2
- package/dist/types/views/market/order-result.d.ts.map +1 -1
- package/dist/types/views/market/quote.d.ts +2 -2
- package/dist/types/views/market/token.d.ts +1 -1
- package/dist/types/views/open-order.d.ts +49 -3
- package/dist/types/views/open-order.d.ts.map +1 -1
- package/dist/types/views/order.d.ts +1 -1
- package/dist/types/views/setup.d.ts +5 -32
- package/dist/types/views/setup.d.ts.map +1 -1
- package/dist/types/views/subgraph.d.ts +3 -3
- package/dist/types/views/vault.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/calls/approval/order.js +0 -44
- package/dist/cjs/calls/approval/order.js.map +0 -1
- package/dist/cjs/calls/batch/prepare-order-with-setup.js.map +0 -1
- package/dist/cjs/constants/abis/core/claimable-dex-vault.js +0 -1166
- package/dist/cjs/constants/abis/core/claimable-dex-vault.js.map +0 -1
- package/dist/cjs/entities/open-order/apis/operator.js +0 -15
- package/dist/cjs/entities/open-order/apis/operator.js.map +0 -1
- package/dist/esm/calls/approval/order.js +0 -80
- package/dist/esm/calls/approval/order.js.map +0 -1
- package/dist/esm/calls/batch/prepare-order-with-setup.js.map +0 -1
- package/dist/esm/constants/abis/core/claimable-dex-vault.js +0 -1163
- package/dist/esm/constants/abis/core/claimable-dex-vault.js.map +0 -1
- package/dist/esm/entities/open-order/apis/operator.js +0 -11
- package/dist/esm/entities/open-order/apis/operator.js.map +0 -1
- package/dist/types/calls/approval/order.d.ts +0 -56
- package/dist/types/calls/approval/order.d.ts.map +0 -1
- package/dist/types/calls/batch/prepare-order-with-setup.d.ts.map +0 -1
- package/dist/types/entities/open-order/apis/operator.d.ts +0 -4
- package/dist/types/entities/open-order/apis/operator.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dex-vault-abi.d.ts","sourceRoot":"","sources":["../../../../../src/constants/abis/core/dex-vault-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"dex-vault-abi.d.ts","sourceRoot":"","sources":["../../../../../src/constants/abis/core/dex-vault-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAi1ChB,CAAC"}
|
|
@@ -450,6 +450,16 @@ export declare const MIRROR_TOKEN_ABI: readonly [{
|
|
|
450
450
|
}];
|
|
451
451
|
readonly name: "OwnershipTransferred";
|
|
452
452
|
readonly type: "event";
|
|
453
|
+
}, {
|
|
454
|
+
readonly anonymous: false;
|
|
455
|
+
readonly inputs: readonly [{
|
|
456
|
+
readonly indexed: true;
|
|
457
|
+
readonly internalType: "address";
|
|
458
|
+
readonly name: "parentDeflator";
|
|
459
|
+
readonly type: "address";
|
|
460
|
+
}];
|
|
461
|
+
readonly name: "ParentDeflatorSet";
|
|
462
|
+
readonly type: "event";
|
|
453
463
|
}, {
|
|
454
464
|
readonly anonymous: false;
|
|
455
465
|
readonly inputs: readonly [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mirror-token-abi.d.ts","sourceRoot":"","sources":["../../../../../src/constants/abis/core/mirror-token-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"mirror-token-abi.d.ts","sourceRoot":"","sources":["../../../../../src/constants/abis/core/mirror-token-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0rDnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"params-abi.d.ts","sourceRoot":"","sources":["../../../../../src/constants/abis/core/params-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"params-abi.d.ts","sourceRoot":"","sources":["../../../../../src/constants/abis/core/params-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB;;;;;;;;;GAYjC,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;GAOlC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;GAUnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../../../../src/constants/chain-configs/addresses.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,eAAO,MAAM,kBAAkB,EAAE;KAC9B,KAAK,IAAI,SAAS,GAAG;QACpB,UAAU,EAAE,KAAK,MAAM,EAAE,CAAC;QAC1B,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;QAC3B,UAAU,EAAE,KAAK,MAAM,EAAE,CAAC;KAC3B;
|
|
1
|
+
{"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../../../../src/constants/chain-configs/addresses.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,eAAO,MAAM,kBAAkB,EAAE;KAC9B,KAAK,IAAI,SAAS,GAAG;QACpB,UAAU,EAAE,KAAK,MAAM,EAAE,CAAC;QAC1B,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;QAC3B,UAAU,EAAE,KAAK,MAAM,EAAE,CAAC;KAC3B;CAsBF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../../../src/constants/chain-configs/chain.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../../../src/constants/chain-configs/chain.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,KAAK,EAEX,MAAM,aAAa,CAAC;AAGrB,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC;AAGF,oBAAY,SAAS;IACnB,YAA6B;IAC7B,IAAc;IACd,gBAAqC;IACrC,KAAgB;CACjB;AAED,eAAO,MAAM,SAAS,EAAE;KACrB,KAAK,IAAI,SAAS,GAAG,KAAK;CAM5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"currency.d.ts","sourceRoot":"","sources":["../../../../src/constants/chain-configs/currency.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIpC,eAAO,MAAM,YAAY,EAAE;KACxB,KAAK,IAAI,SAAS,GAAG,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"currency.d.ts","sourceRoot":"","sources":["../../../../src/constants/chain-configs/currency.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIpC,eAAO,MAAM,YAAY,EAAE;KACxB,KAAK,IAAI,SAAS,GAAG,QAAQ,EAAE;CAkCjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fee.d.ts","sourceRoot":"","sources":["../../../../src/constants/chain-configs/fee.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,eAAO,MAAM,oBAAoB,EAAE;KAChC,KAAK,IAAI,SAAS,GAAG,SAAS;
|
|
1
|
+
{"version":3,"file":"fee.d.ts","sourceRoot":"","sources":["../../../../src/constants/chain-configs/fee.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,eAAO,MAAM,oBAAoB,EAAE;KAChC,KAAK,IAAI,SAAS,GAAG,SAAS;CAMhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE;KAChC,KAAK,IAAI,SAAS,GAAG,SAAS;CAMhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subgraph.d.ts","sourceRoot":"","sources":["../../../../src/constants/chain-configs/subgraph.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,eAAO,MAAM,YAAY,EAAE;KAAG,KAAK,IAAI,SAAS,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"subgraph.d.ts","sourceRoot":"","sources":["../../../../src/constants/chain-configs/subgraph.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,eAAO,MAAM,YAAY,EAAE;KAAG,KAAK,IAAI,SAAS,GAAG,MAAM;CAQxD,CAAC;AAEF,qBAAa,QAAQ;WACC,GAAG,CAAC,CAAC,EACvB,OAAO,EAAE,SAAS,EAClB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,EAAE,GACZ,OAAO,CAAC,CAAC,CAAC;CAkBd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/entities/analytics/apis/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAEnE,OAAO,EACL,gBAAgB,EAChB,OAAO,EAEP,kBAAkB,EACnB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/entities/analytics/apis/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAEnE,OAAO,EACL,gBAAgB,EAChB,OAAO,EAEP,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAiElB,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,SAAS,GACjB,OAAO,CAAC,gBAAgB,CAAC,CAkH3B;AAED,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,SAAS,EAClB,WAAW,EAAE,KAAK,MAAM,EAAE,GACzB,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAqC/B;AAED,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,SAAS,GACjB,OAAO,CAAC,OAAO,EAAE,CAAC,CAuBpB;AAED,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,SAAS,EAClB,WAAW,EAAE,KAAK,MAAM,EAAE,GACzB,OAAO,CAAC,MAAM,CAAC,CAoBjB;AAcD,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,SAAS,EAClB,WAAW,EAAE,KAAK,MAAM,EAAE,GACzB,OAAO,CAAC;IACT,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC,CAgDD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Currency } from '../currency/types';
|
|
2
|
-
export type TransactionType = 'Limit' | 'Claim' | 'Cancel' | 'Market' | '
|
|
2
|
+
export type TransactionType = 'Limit' | 'Claim' | 'Cancel' | 'Market' | 'Unknown';
|
|
3
3
|
export type AnalyticsSnapshot = {
|
|
4
4
|
timestamp: number;
|
|
5
5
|
activeUsers: number;
|
|
@@ -16,11 +16,6 @@ export type AnalyticsSnapshot = {
|
|
|
16
16
|
currency: Currency;
|
|
17
17
|
usd: number;
|
|
18
18
|
}>;
|
|
19
|
-
poolTotalValueLockedUSD: number;
|
|
20
|
-
poolTotalValueLockedUSDMap: Record<`0x${string}`, {
|
|
21
|
-
currency: Currency;
|
|
22
|
-
usd: number;
|
|
23
|
-
}>;
|
|
24
19
|
totalValueLockedUSD: number;
|
|
25
20
|
totalValueLockedUSDMap: Record<`0x${string}`, {
|
|
26
21
|
currency: Currency;
|
|
@@ -38,7 +33,6 @@ export type UserVolumeSnapshot = {
|
|
|
38
33
|
export type AnalyticsSummary = {
|
|
39
34
|
accumulatedUniqueUsers: number;
|
|
40
35
|
accumulatedUniqueTransactions: number;
|
|
41
|
-
accumulatedUniqueSwapTransactions: number;
|
|
42
36
|
accumulatedVolumeUSD: number;
|
|
43
37
|
accumulatedProtocolFeesUSD: number;
|
|
44
38
|
analyticsSnapshots: AnalyticsSnapshot[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/entities/analytics/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,SAAS,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/entities/analytics/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IACvD,YAAY,EAAE,MAAM,CAAC,KAAK,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC;IAE5C,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC,KAAK,MAAM,EAAE,EAAE;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAE5E,kBAAkB,EAAE,MAAM,CAAC;IAC3B,qBAAqB,EAAE,MAAM,CAC3B,KAAK,MAAM,EAAE,EACb;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CACpC,CAAC;IAEF,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,MAAM,CAC5B,KAAK,MAAM,EAAE,EACb;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CACpC,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC,KAAK,MAAM,EAAE,EAAE;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC7E,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,6BAA6B,EAAE,MAAM,CAAC;IACtC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,0BAA0B,EAAE,MAAM,CAAC;IACnC,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,EAAE,KAAK,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC"}
|
|
@@ -2,7 +2,9 @@ import { PublicClient } from 'viem';
|
|
|
2
2
|
import { CHAIN_IDS } from '../../../constants/chain-configs/chain';
|
|
3
3
|
import { OnChainOpenOrder } from '../types';
|
|
4
4
|
import type { OpenOrder } from '../types';
|
|
5
|
-
export declare function fetchOpenOrdersByUserAddressFromSubgraph(chainId: CHAIN_IDS, userAddress: `0x${string}`): Promise<OpenOrder[]>;
|
|
5
|
+
export declare function fetchOpenOrdersByUserAddressFromSubgraph(chainId: CHAIN_IDS, userAddress: `0x${string}`, tokenAddress?: `0x${string}`): Promise<OpenOrder[]>;
|
|
6
|
+
export declare function fetchCancelableOrdersByUserAddressFromSubgraph(chainId: CHAIN_IDS, userAddress: `0x${string}`, tokenAddresses?: `0x${string}`[]): Promise<OpenOrder[]>;
|
|
7
|
+
export declare function fetchClaimableOrdersFromSubgraph(chainId: CHAIN_IDS, userAddress?: `0x${string}`, tokenAddresses?: `0x${string}`[]): Promise<OpenOrder[]>;
|
|
6
8
|
export declare function fetchOpenOrderByOrderIdFromSubgraph(chainId: CHAIN_IDS, orderId: string): Promise<OpenOrder>;
|
|
7
9
|
export declare function fetchOpenOrdersByOrderIdsFromSubgraph(chainId: CHAIN_IDS, orderIds: string[]): Promise<OpenOrder[]>;
|
|
8
10
|
export declare const fetchOnChainOrders: (publicClient: PublicClient, chainId: CHAIN_IDS, orderIds: bigint[]) => Promise<OnChainOpenOrder[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/entities/open-order/apis/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEb,MAAM,MAAM,CAAC;AAEd,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAkBnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAyI1C,wBAAsB,wCAAwC,CAC5D,OAAO,EAAE,SAAS,EAClB,WAAW,EAAE,KAAK,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/entities/open-order/apis/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEb,MAAM,MAAM,CAAC;AAEd,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAkBnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAyI1C,wBAAsB,wCAAwC,CAC5D,OAAO,EAAE,SAAS,EAClB,WAAW,EAAE,KAAK,MAAM,EAAE,EAC1B,YAAY,CAAC,EAAE,KAAK,MAAM,EAAE,GAC3B,OAAO,CAAC,SAAS,EAAE,CAAC,CA6BtB;AAED,wBAAsB,8CAA8C,CAClE,OAAO,EAAE,SAAS,EAClB,WAAW,EAAE,KAAK,MAAM,EAAE,EAC1B,cAAc,CAAC,EAAE,KAAK,MAAM,EAAE,EAAE,GAC/B,OAAO,CAAC,SAAS,EAAE,CAAC,CA6BtB;AAED,wBAAsB,gCAAgC,CACpD,OAAO,EAAE,SAAS,EAClB,WAAW,CAAC,EAAE,KAAK,MAAM,EAAE,EAC3B,cAAc,CAAC,EAAE,KAAK,MAAM,EAAE,EAAE,GAC/B,OAAO,CAAC,SAAS,EAAE,CAAC,CAuCtB;AAED,wBAAsB,mCAAmC,CACvD,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,SAAS,CAAC,CAiBpB;AAED,wBAAsB,qCAAqC,CACzD,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,SAAS,EAAE,CAAC,CAatB;AAED,eAAO,MAAM,kBAAkB,iBACf,YAAY,WACjB,SAAS,YACR,MAAM,EAAE,KACjB,QAAQ,gBAAgB,EAAE,CAwG5B,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { CHAIN_IDS } from '../constants/chain-configs/chain';
|
|
|
5
5
|
* @returns Contract addresses
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
|
-
* import { getContractAddresses } from '@
|
|
8
|
+
* import { getContractAddresses } from '@1stdex/first-sdk'
|
|
9
9
|
*
|
|
10
10
|
* const addresses = await getContractAddresses({
|
|
11
11
|
* chainId: 421614,
|
|
@@ -10,7 +10,7 @@ import { CurrencyAmount } from '../types';
|
|
|
10
10
|
* @param options Optional RPC URL.
|
|
11
11
|
* @returns A Promise resolving to balance information.
|
|
12
12
|
* @example
|
|
13
|
-
* import { getTradingBalance } from '@
|
|
13
|
+
* import { getTradingBalance } from '@1stdex/first-sdk'
|
|
14
14
|
*
|
|
15
15
|
* const balance = await getTradingBalance({
|
|
16
16
|
* chainId: 421614,
|
|
@@ -42,7 +42,7 @@ export declare const getTradingBalance: ({ chainId, userAddress, tokenAddress, o
|
|
|
42
42
|
* @param options Optional RPC URL.
|
|
43
43
|
* @returns A Promise resolving to portfolio balance information.
|
|
44
44
|
* @example
|
|
45
|
-
* import { getPortfolioBalance } from '@
|
|
45
|
+
* import { getPortfolioBalance } from '@1stdex/first-sdk'
|
|
46
46
|
*
|
|
47
47
|
* const portfolio = await getPortfolioBalance({
|
|
48
48
|
* chainId: 421614,
|
|
@@ -12,7 +12,7 @@ import { CHAIN_IDS } from '../constants/chain-configs/chain';
|
|
|
12
12
|
* - usdValue: The USD value of the position as a string
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
|
-
* import { getBookPositionValue } from '@
|
|
15
|
+
* import { getBookPositionValue } from '@1stdex/first-sdk'
|
|
16
16
|
*
|
|
17
17
|
* const result = await getBookPositionValue({
|
|
18
18
|
* chainId: 421614,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export { getMarket, getChartLogs, getLatestChartLog, getExpectedOutput, getExpectedInput, getMarketSnapshots, getMarketSnapshot, getQuoteToken, parseMakeOrderIdsFromReceipt, getLimitOrderResult, getMakeOrderResult, } from './market';
|
|
2
2
|
export { getPriceNeighborhood } from './tick';
|
|
3
|
-
export { getOpenOrder, getOpenOrders } from './open-order';
|
|
3
|
+
export { getOpenOrder, getOpenOrders, getCancelableOrders, getClaimableOrders, } from './open-order';
|
|
4
4
|
export { getSubgraphEndpoint, getSubgraphBlockNumber, getSubgraphBlock, } from './subgraph';
|
|
5
5
|
export { getContractAddresses } from './address';
|
|
6
6
|
export { getCurrencies, getStableCurrencies, getLatestPriceMap, getDailyClosePriceMap, getLatestPrice, } from './currency';
|
|
7
7
|
export { getProtocolAnalytics, getUserDailyVolumes, getTopUsersByNativeVolume, getUserNativeVolume, getReferralSummary, } from './analytics';
|
|
8
8
|
export { getVault } from './vault';
|
|
9
9
|
export { getTradingBalance, getPortfolioBalance } from './balance';
|
|
10
|
-
export {
|
|
10
|
+
export { checkTokenAllowances, needsVaultDeposit, getOrderSetupStatus, } from './setup';
|
|
11
11
|
export { getBookPositionValue } from './book';
|
|
12
12
|
export { getOrderPositionValue } from './order';
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,4BAA4B,EAC5B,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,4BAA4B,EAC5B,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { CHART_LOG_INTERVALS, ChartLog } from '../../types';
|
|
|
9
9
|
* @returns {Promise<ChartLog>} A promise that resolves with the latest chart log.
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
|
-
* import { getLatestChartLog } from '@
|
|
12
|
+
* import { getLatestChartLog } from '@1stdex/first-sdk'
|
|
13
13
|
*
|
|
14
14
|
* const logs = await getLatestChartLog({
|
|
15
15
|
* chainId: 421614,
|
|
@@ -34,7 +34,7 @@ export declare const getLatestChartLog: ({ chainId, quote, base, }: {
|
|
|
34
34
|
* @returns {Promise<ChartLog[]>} A promise that resolves with an array of chart logs within the specified interval.
|
|
35
35
|
*
|
|
36
36
|
* @example
|
|
37
|
-
* import { getLatestChartLog, CHART_LOG_INTERVALS } from '@
|
|
37
|
+
* import { getLatestChartLog, CHART_LOG_INTERVALS } from '@1stdex/first-sdk'
|
|
38
38
|
*
|
|
39
39
|
* const logs = await getChartLogs({
|
|
40
40
|
* chainId: 421614,
|
|
@@ -15,7 +15,7 @@ export { getLimitOrderResult, getMakeOrderResult } from './order-result';
|
|
|
15
15
|
* @returns A market {@link Market}
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
|
-
* import { getMarket } from '@
|
|
18
|
+
* import { getMarket } from '@1stdex/first-sdk'
|
|
19
19
|
*
|
|
20
20
|
* const market = await getMarket({
|
|
21
21
|
* chainId: 421614,
|
|
@@ -8,7 +8,7 @@ import { CurrencyFlow, DefaultReadContractOptions } from '../../types';
|
|
|
8
8
|
* @returns Limit order result with make, taken, and spent flows, plus provider and referrer fees
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
|
-
* import { getLimitOrderResult } from '@
|
|
11
|
+
* import { getLimitOrderResult } from '@1stdex/first-sdk'
|
|
12
12
|
*
|
|
13
13
|
* const result = await getLimitOrderResult({
|
|
14
14
|
* chainId: 421614,
|
|
@@ -48,7 +48,7 @@ export declare const getLimitOrderResult: ({ chainId, txHash, options, }: {
|
|
|
48
48
|
* @returns Make order result with taken and spent flows (no make), plus provider and referrer fees
|
|
49
49
|
*
|
|
50
50
|
* @example
|
|
51
|
-
* import { getMakeOrderResult } from '@
|
|
51
|
+
* import { getMakeOrderResult } from '@1stdex/first-sdk'
|
|
52
52
|
*
|
|
53
53
|
* const result = await getMakeOrderResult({
|
|
54
54
|
* chainId: 421614,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-result.d.ts","sourceRoot":"","sources":["../../../../src/views/market/order-result.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAa,MAAM,qCAAqC,CAAC;AAE3E,OAAO,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"order-result.d.ts","sourceRoot":"","sources":["../../../../src/views/market/order-result.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAa,MAAM,qCAAqC,CAAC;AAE3E,OAAO,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AA8LvE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,kCAI7B;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,MAAM,EAAE,KAAK,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,0BAA0B,CAAC;CACtC,KAAG,QAAQ;IACV,IAAI,EAAE,YAAY,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACvC,KAAK,EAAE,YAAY,GAAG;QACpB,MAAM,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;QAC5C,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,KAAK,EAAE,YAAY,GAAG;QACpB,MAAM,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;QAC5C,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,EAAE,YAAY,CAAC;CAC5B,CA2YA,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,kCAI5B;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,MAAM,EAAE,KAAK,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,0BAA0B,CAAC;CACtC,KAAG,QAAQ;IACV,KAAK,EAAE,YAAY,GAAG;QACpB,MAAM,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;QAC5C,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,KAAK,EAAE,YAAY,GAAG;QACpB,MAAM,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;QAC5C,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,EAAE,YAAY,CAAC;CAC5B,CAqQA,CAAC"}
|
|
@@ -13,7 +13,7 @@ import { DefaultReadContractOptions } from '../../types';
|
|
|
13
13
|
* @param options.roundingUpTakenAsk Whether to round up the taken ask.
|
|
14
14
|
* @returns A Promise resolving to an object containing the taken amount, spend amount and result of the calculation.
|
|
15
15
|
* @example
|
|
16
|
-
* import { getExpectedOutput } from '@
|
|
16
|
+
* import { getExpectedOutput } from '@1stdex/first-sdk'
|
|
17
17
|
*
|
|
18
18
|
* const { takenAmount, spentAmount } = await getExpectedOutput({
|
|
19
19
|
* chainId: 421614,
|
|
@@ -57,7 +57,7 @@ export declare const getExpectedOutput: ({ chainId, inputToken, outputToken, amo
|
|
|
57
57
|
* @param options.useSubgraph Whether to use the subgraph to fetch the market data.
|
|
58
58
|
* @returns A Promise resolving to an object containing the taken amount, spent amount and result of the calculation.
|
|
59
59
|
* @example
|
|
60
|
-
* import { getExpectedInput } from '@
|
|
60
|
+
* import { getExpectedInput } from '@1stdex/first-sdk'
|
|
61
61
|
*
|
|
62
62
|
* const { takenAmount, spentAmount } = await getExpectedInput({
|
|
63
63
|
* chainId: 421614,
|
|
@@ -8,7 +8,7 @@ import { CHAIN_IDS } from '../../constants/chain-configs/chain';
|
|
|
8
8
|
* @returns {string} The address of the quote token.
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
|
-
* import { getQuoteToken } from '@
|
|
11
|
+
* import { getQuoteToken } from '@1stdex/first-sdk'
|
|
12
12
|
*
|
|
13
13
|
* const quote = await getQuoteToken({
|
|
14
14
|
* chainId: 421614,
|
|
@@ -8,7 +8,7 @@ import { OpenOrder } from '../entities/open-order/types';
|
|
|
8
8
|
* @param options {@link DefaultReadContractOptions} options.
|
|
9
9
|
* @returns {Promise<OpenOrder>} Promise resolving to the open order object, or undefined if not found.
|
|
10
10
|
* @example
|
|
11
|
-
* import { getOpenOrder } from '@
|
|
11
|
+
* import { getOpenOrder } from '@1stdex/first-sdk'
|
|
12
12
|
*
|
|
13
13
|
* const openOrder = await getOpenOrder({
|
|
14
14
|
* chainId: 421614,
|
|
@@ -24,18 +24,64 @@ export declare const getOpenOrder: ({ chainId, id, }: {
|
|
|
24
24
|
*
|
|
25
25
|
* @param {CHAIN_IDS} chainId The chain ID.
|
|
26
26
|
* @param {`0x${string}`} userAddress The Ethereum address of the user.
|
|
27
|
+
* @param {`0x${string}`} tokenAddress Optional. Filter orders where this address is either quote or base token.
|
|
27
28
|
* @param options {@link DefaultReadContractOptions} options.
|
|
28
29
|
* @returns {Promise<OpenOrder[]>} Promise resolving to an array of open orders.
|
|
29
30
|
* @example
|
|
30
|
-
* import { getOpenOrders } from '@
|
|
31
|
+
* import { getOpenOrders } from '@1stdex/first-sdk'
|
|
31
32
|
*
|
|
32
33
|
* const openOrders = await getOpenOrders({
|
|
33
34
|
* chainId: 421614,
|
|
34
35
|
* userAddress: '0x5F79EE8f8fA862E98201120d83c4eC39D9468D49'
|
|
35
36
|
* })
|
|
36
37
|
*/
|
|
37
|
-
export declare const getOpenOrders: ({ chainId, userAddress, }: {
|
|
38
|
+
export declare const getOpenOrders: ({ chainId, userAddress, tokenAddress, }: {
|
|
38
39
|
chainId: CHAIN_IDS;
|
|
39
40
|
userAddress: `0x${string}`;
|
|
41
|
+
tokenAddress?: `0x${string}`;
|
|
42
|
+
}) => Promise<OpenOrder[]>;
|
|
43
|
+
/**
|
|
44
|
+
* Retrieves cancelable orders for the specified user on the given chain.
|
|
45
|
+
* Only returns orders with cancelableUnitAmount > 0.
|
|
46
|
+
*
|
|
47
|
+
* @param {CHAIN_IDS} chainId The chain ID.
|
|
48
|
+
* @param {`0x${string}`} userAddress The Ethereum address of the user.
|
|
49
|
+
* @param {`0x${string}`[]} tokenAddresses Optional. Filter orders where any of these addresses is either quote or base token. If empty array, no filtering is applied.
|
|
50
|
+
* @param options {@link DefaultReadContractOptions} options.
|
|
51
|
+
* @returns {Promise<OpenOrder[]>} Promise resolving to an array of cancelable orders.
|
|
52
|
+
* @example
|
|
53
|
+
* import { getCancelableOrders } from '@1stdex/first-sdk'
|
|
54
|
+
*
|
|
55
|
+
* const cancelableOrders = await getCancelableOrders({
|
|
56
|
+
* chainId: 421614,
|
|
57
|
+
* userAddress: '0x5F79EE8f8fA862E98201120d83c4eC39D9468D49'
|
|
58
|
+
* })
|
|
59
|
+
*/
|
|
60
|
+
export declare const getCancelableOrders: ({ chainId, userAddress, tokenAddresses, }: {
|
|
61
|
+
chainId: CHAIN_IDS;
|
|
62
|
+
userAddress: `0x${string}`;
|
|
63
|
+
tokenAddresses?: `0x${string}`[];
|
|
64
|
+
}) => Promise<OpenOrder[]>;
|
|
65
|
+
/**
|
|
66
|
+
* Retrieves claimable orders on the given chain.
|
|
67
|
+
* Only returns orders with claimableUnitAmount > 0.
|
|
68
|
+
*
|
|
69
|
+
* @param {CHAIN_IDS} chainId The chain ID.
|
|
70
|
+
* @param {`0x${string}`} userAddress Optional. The Ethereum address of the user to filter by.
|
|
71
|
+
* @param {`0x${string}`[]} tokenAddresses Optional. Filter orders where any of these addresses is either quote or base token. If empty array, no filtering is applied.
|
|
72
|
+
* @param options {@link DefaultReadContractOptions} options.
|
|
73
|
+
* @returns {Promise<OpenOrder[]>} Promise resolving to an array of claimable orders.
|
|
74
|
+
* @example
|
|
75
|
+
* import { getClaimableOrders } from '@1stdex/first-sdk'
|
|
76
|
+
*
|
|
77
|
+
* const claimableOrders = await getClaimableOrders({
|
|
78
|
+
* chainId: 421614,
|
|
79
|
+
* userAddress: '0x5F79EE8f8fA862E98201120d83c4eC39D9468D49'
|
|
80
|
+
* })
|
|
81
|
+
*/
|
|
82
|
+
export declare const getClaimableOrders: ({ chainId, userAddress, tokenAddresses, }: {
|
|
83
|
+
chainId: CHAIN_IDS;
|
|
84
|
+
userAddress?: `0x${string}`;
|
|
85
|
+
tokenAddresses?: `0x${string}`[];
|
|
40
86
|
}) => Promise<OpenOrder[]>;
|
|
41
87
|
//# sourceMappingURL=open-order.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-order.d.ts","sourceRoot":"","sources":["../../../src/views/open-order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"open-order.d.ts","sourceRoot":"","sources":["../../../src/views/open-order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAQzD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,YAAY,qBAGtB;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;CACZ,KAAG,QAAQ,SAAS,CAEpB,CAAC;AACF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,aAAa,4CAIvB;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;CAC9B,KAAG,QAAQ,SAAS,EAAE,CAMtB,CAAC;AACF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mBAAmB,8CAI7B;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;IAC3B,cAAc,CAAC,EAAE,KAAK,MAAM,EAAE,EAAE,CAAC;CAClC,KAAG,QAAQ,SAAS,EAAE,CAMtB,CAAC;AACF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,kBAAkB,8CAI5B;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;IAC5B,cAAc,CAAC,EAAE,KAAK,MAAM,EAAE,EAAE,CAAC;CAClC,KAAG,QAAQ,SAAS,EAAE,CAEtB,CAAC"}
|
|
@@ -11,7 +11,7 @@ import { CHAIN_IDS } from '../constants/chain-configs/chain';
|
|
|
11
11
|
* - usdValue: The USD value of the position as a string
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
|
-
* import { getOrderPositionValue } from '@
|
|
14
|
+
* import { getOrderPositionValue } from '@1stdex/first-sdk'
|
|
15
15
|
*
|
|
16
16
|
* const result = await getOrderPositionValue({
|
|
17
17
|
* chainId: 421614,
|
|
@@ -1,29 +1,5 @@
|
|
|
1
1
|
import { CHAIN_IDS } from '../constants/chain-configs/chain';
|
|
2
2
|
import { CurrencyAmount } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Check if an operator is approved for a user.
|
|
5
|
-
*
|
|
6
|
-
* @param chainId The chain ID.
|
|
7
|
-
* @param userAddress The user address.
|
|
8
|
-
* @param operator The operator address (defaults to Controller).
|
|
9
|
-
* @param options Optional RPC URL.
|
|
10
|
-
* @returns Promise resolving to true if operator is approved.
|
|
11
|
-
* @example
|
|
12
|
-
* import { isOrderOperatorApproved } from '@clober/v2-sdk'
|
|
13
|
-
*
|
|
14
|
-
* const isApproved = await isOrderOperatorApproved({
|
|
15
|
-
* chainId: 421614,
|
|
16
|
-
* userAddress: '0xF8c1869Ecd4df136693C45EcE1b67f85B6bDaE69'
|
|
17
|
-
* })
|
|
18
|
-
*/
|
|
19
|
-
export declare const isOrderOperatorApproved: ({ chainId, userAddress, operator, options, }: {
|
|
20
|
-
chainId: CHAIN_IDS;
|
|
21
|
-
userAddress: `0x${string}`;
|
|
22
|
-
operator?: `0x${string}`;
|
|
23
|
-
options?: {
|
|
24
|
-
rpcUrl?: string;
|
|
25
|
-
};
|
|
26
|
-
}) => Promise<boolean>;
|
|
27
3
|
/**
|
|
28
4
|
* Check token allowances for trading.
|
|
29
5
|
* Returns which allowances are sufficient (above threshold).
|
|
@@ -34,7 +10,7 @@ export declare const isOrderOperatorApproved: ({ chainId, userAddress, operator,
|
|
|
34
10
|
* @param options Optional RPC URL.
|
|
35
11
|
* @returns Promise resolving to allowance status object.
|
|
36
12
|
* @example
|
|
37
|
-
* import { checkTokenAllowances } from '@
|
|
13
|
+
* import { checkTokenAllowances } from '@1stdex/first-sdk'
|
|
38
14
|
*
|
|
39
15
|
* const status = await checkTokenAllowances({
|
|
40
16
|
* chainId: 421614,
|
|
@@ -68,7 +44,7 @@ export declare const checkTokenAllowances: ({ chainId, userAddress, tokenAddress
|
|
|
68
44
|
* @param options Optional RPC URL.
|
|
69
45
|
* @returns Promise resolving to true if deposit is needed.
|
|
70
46
|
* @example
|
|
71
|
-
* import { needsVaultDeposit } from '@
|
|
47
|
+
* import { needsVaultDeposit } from '@1stdex/first-sdk'
|
|
72
48
|
*
|
|
73
49
|
* const needsDeposit = await needsVaultDeposit({
|
|
74
50
|
* chainId: 421614,
|
|
@@ -88,16 +64,16 @@ export declare const needsVaultDeposit: ({ chainId, userAddress, tokenAddress, r
|
|
|
88
64
|
}) => Promise<boolean>;
|
|
89
65
|
/**
|
|
90
66
|
* Get complete order setup status in a single call.
|
|
91
|
-
* Checks
|
|
67
|
+
* Checks token allowances and vault balance.
|
|
92
68
|
*
|
|
93
69
|
* @param chainId The chain ID.
|
|
94
70
|
* @param userAddress The user address.
|
|
95
71
|
* @param tokenAddress The token address.
|
|
96
72
|
* @param requiredAmount The amount needed for the order (decimal-adjusted string).
|
|
97
|
-
* @param options Optional RPC URL
|
|
73
|
+
* @param options Optional RPC URL.
|
|
98
74
|
* @returns Promise resolving to complete setup status.
|
|
99
75
|
* @example
|
|
100
|
-
* import { getOrderSetupStatus } from '@
|
|
76
|
+
* import { getOrderSetupStatus } from '@1stdex/first-sdk'
|
|
101
77
|
*
|
|
102
78
|
* const status = await getOrderSetupStatus({
|
|
103
79
|
* chainId: 421614,
|
|
@@ -106,7 +82,6 @@ export declare const needsVaultDeposit: ({ chainId, userAddress, tokenAddress, r
|
|
|
106
82
|
* requiredAmount: "100"
|
|
107
83
|
* })
|
|
108
84
|
*
|
|
109
|
-
* if (!status.operatorApproved) await setOrderOperatorApproval(...)
|
|
110
85
|
* if (!status.allAllowancesSet) await setTokenAllowances(...)
|
|
111
86
|
* if (status.needsDeposit) await depositToVault(...)
|
|
112
87
|
*/
|
|
@@ -117,10 +92,8 @@ export declare const getOrderSetupStatus: ({ chainId, userAddress, tokenAddress,
|
|
|
117
92
|
requiredAmount: string;
|
|
118
93
|
options?: {
|
|
119
94
|
rpcUrl?: string;
|
|
120
|
-
operator?: `0x${string}`;
|
|
121
95
|
};
|
|
122
96
|
}) => Promise<{
|
|
123
|
-
operatorApproved: boolean;
|
|
124
97
|
tokenAllowances: {
|
|
125
98
|
tokenToController: boolean;
|
|
126
99
|
vaultToController: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/views/setup.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAa,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/views/setup.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAa,MAAM,kCAAkC,CAAC;AAIxE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAI1C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,oBAAoB,qDAK9B;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;IAC3B,YAAY,EAAE,KAAK,MAAM,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/B,KAAG,QAAQ;IACV,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;CAC7B,CAiDA,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,iBAAiB,qEAM3B;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;IAC3B,YAAY,EAAE,KAAK,MAAM,EAAE,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/B,KAAG,QAAQ,OAAO,CAoBlB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,mBAAmB,qEAM7B;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;IAC3B,YAAY,EAAE,KAAK,MAAM,EAAE,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/B,KAAG,QAAQ;IACV,eAAe,EAAE;QACf,iBAAiB,EAAE,OAAO,CAAC;QAC3B,iBAAiB,EAAE,OAAO,CAAC;QAC3B,kBAAkB,EAAE,OAAO,CAAC;QAC5B,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,YAAY,EAAE,cAAc,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;CACvB,CA8EA,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { CHAIN_IDS } from '../constants/chain-configs/chain';
|
|
|
5
5
|
* @returns Subgraph endpoint
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
|
-
* import { getSubgraphEndpoint } from '@
|
|
8
|
+
* import { getSubgraphEndpoint } from '@1stdex/first-sdk'
|
|
9
9
|
*
|
|
10
10
|
* const endpoint = await getSubgraphEndpoint({
|
|
11
11
|
* chainId: 421614,
|
|
@@ -20,7 +20,7 @@ export declare const getSubgraphEndpoint: ({ chainId }: {
|
|
|
20
20
|
* @returns Contract addresses
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
|
-
* import { getContractAddresses } from '@
|
|
23
|
+
* import { getContractAddresses } from '@1stdex/first-sdk'
|
|
24
24
|
*
|
|
25
25
|
* const blockNumber = await getSubgraphBlockNumber({
|
|
26
26
|
* chainId: 421614,
|
|
@@ -35,7 +35,7 @@ export declare const getSubgraphBlockNumber: ({ chainId, }: {
|
|
|
35
35
|
* @returns Contract addresses
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
|
-
* import { getContractAddresses } from '@
|
|
38
|
+
* import { getContractAddresses } from '@1stdex/first-sdk'
|
|
39
39
|
*
|
|
40
40
|
* const blockNumber = await getSubgraphBlock({
|
|
41
41
|
* chainId: 421614,
|
|
@@ -8,7 +8,7 @@ import { Vault } from '../entities/vault/types';
|
|
|
8
8
|
* @param options Optional RPC URL.
|
|
9
9
|
* @returns A Promise resolving to a Vault object.
|
|
10
10
|
* @example
|
|
11
|
-
* import { getVault } from '@
|
|
11
|
+
* import { getVault } from '@1stdex/first-sdk'
|
|
12
12
|
*
|
|
13
13
|
* const vault = await getVault({
|
|
14
14
|
* chainId: 421614,
|
package/package.json
CHANGED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.approveControllerAsOrderOperator = exports.setOrderOperatorApproval = void 0;
|
|
4
|
-
const viem_1 = require("viem");
|
|
5
|
-
const chain_1 = require("../../constants/chain-configs/chain");
|
|
6
|
-
const addresses_1 = require("../../constants/chain-configs/addresses");
|
|
7
|
-
const build_transaction_1 = require("../../utils/build-transaction");
|
|
8
|
-
const setOrderOperatorApproval = async ({ chainId, userAddress, operator, approved, options, }) => {
|
|
9
|
-
const publicClient = (0, viem_1.createPublicClient)({
|
|
10
|
-
chain: chain_1.CHAIN_MAP[chainId],
|
|
11
|
-
transport: options?.rpcUrl ? (0, viem_1.http)(options.rpcUrl) : (0, viem_1.http)(),
|
|
12
|
-
});
|
|
13
|
-
return (0, build_transaction_1.buildTransaction)(publicClient, {
|
|
14
|
-
chain: chain_1.CHAIN_MAP[chainId],
|
|
15
|
-
account: userAddress,
|
|
16
|
-
address: addresses_1.CONTRACT_ADDRESSES[chainId].BookManager,
|
|
17
|
-
abi: [
|
|
18
|
-
{
|
|
19
|
-
inputs: [
|
|
20
|
-
{ internalType: 'address', name: 'operator', type: 'address' },
|
|
21
|
-
{ internalType: 'bool', name: 'approved', type: 'bool' },
|
|
22
|
-
],
|
|
23
|
-
name: 'setOrderOperator',
|
|
24
|
-
outputs: [],
|
|
25
|
-
stateMutability: 'nonpayable',
|
|
26
|
-
type: 'function',
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
functionName: 'setOrderOperator',
|
|
30
|
-
args: [operator, approved],
|
|
31
|
-
}, options?.gasLimit);
|
|
32
|
-
};
|
|
33
|
-
exports.setOrderOperatorApproval = setOrderOperatorApproval;
|
|
34
|
-
const approveControllerAsOrderOperator = async ({ chainId, userAddress, options, }) => {
|
|
35
|
-
return (0, exports.setOrderOperatorApproval)({
|
|
36
|
-
chainId,
|
|
37
|
-
userAddress,
|
|
38
|
-
operator: addresses_1.CONTRACT_ADDRESSES[chainId].Controller,
|
|
39
|
-
approved: true,
|
|
40
|
-
...(options && { options }),
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
exports.approveControllerAsOrderOperator = approveControllerAsOrderOperator;
|
|
44
|
-
//# sourceMappingURL=order.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../../../src/calls/approval/order.ts"],"names":[],"mappings":";;;AAAA,+BAAgD;AAEhD,+DAA2E;AAE3E,uEAA6E;AAC7E,qEAAiE;AAwB1D,MAAM,wBAAwB,GAAG,KAAK,EAAE,EAC7C,OAAO,EACP,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,GAOR,EAAwB,EAAE;IACzB,MAAM,YAAY,GAAG,IAAA,yBAAkB,EAAC;QACtC,KAAK,EAAE,iBAAS,CAAC,OAAO,CAAC;QACzB,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,IAAA,WAAI,EAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAA,WAAI,GAAE;KAC3D,CAAC,CAAC;IAEH,OAAO,IAAA,oCAAgB,EACrB,YAAY,EACZ;QACE,KAAK,EAAE,iBAAS,CAAC,OAAO,CAAC;QACzB,OAAO,EAAE,WAAW;QACpB,OAAO,EAAE,8BAAkB,CAAC,OAAO,CAAE,CAAC,WAAW;QACjD,GAAG,EAAE;YACH;gBACE,MAAM,EAAE;oBACN,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE;oBAC9D,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE;iBACzD;gBACD,IAAI,EAAE,kBAAkB;gBACxB,OAAO,EAAE,EAAE;gBACX,eAAe,EAAE,YAAY;gBAC7B,IAAI,EAAE,UAAU;aACjB;SACO;QACV,YAAY,EAAE,kBAAkB;QAChC,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;KAC3B,EACD,OAAO,EAAE,QAAQ,CAClB,CAAC;AACJ,CAAC,CAAC;AAzCW,QAAA,wBAAwB,4BAyCnC;AAqBK,MAAM,gCAAgC,GAAG,KAAK,EAAE,EACrD,OAAO,EACP,WAAW,EACX,OAAO,GAKR,EAAwB,EAAE;IACzB,OAAO,IAAA,gCAAwB,EAAC;QAC9B,OAAO;QACP,WAAW;QACX,QAAQ,EAAE,8BAAkB,CAAC,OAAO,CAAE,CAAC,UAAU;QACjD,QAAQ,EAAE,IAAI;QACd,GAAG,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,CAAC;KAC5B,CAAC,CAAC;AACL,CAAC,CAAC;AAhBW,QAAA,gCAAgC,oCAgB3C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prepare-order-with-setup.js","sourceRoot":"","sources":["../../../../src/calls/batch/prepare-order-with-setup.ts"],"names":[],"mappings":"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"}
|