thirdweb 5.96.9-nightly-2c6bd620b508ad50535b0ec44916741a8c0a6a26-20250506000341 → 5.97.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/dist/cjs/bridge/Buy.js +55 -3
- package/dist/cjs/bridge/Buy.js.map +1 -1
- package/dist/cjs/bridge/Chains.js +65 -0
- package/dist/cjs/bridge/Chains.js.map +1 -0
- package/dist/cjs/bridge/Routes.js +20 -1
- package/dist/cjs/bridge/Routes.js.map +1 -1
- package/dist/cjs/bridge/Sell.js +55 -3
- package/dist/cjs/bridge/Sell.js.map +1 -1
- package/dist/cjs/bridge/index.js +3 -1
- package/dist/cjs/bridge/index.js.map +1 -1
- package/dist/cjs/bridge/types/Chain.js +3 -0
- package/dist/cjs/bridge/types/Chain.js.map +1 -0
- package/dist/cjs/pay/buyWithCrypto/getHistory.js +1 -0
- package/dist/cjs/pay/buyWithCrypto/getHistory.js.map +1 -1
- package/dist/cjs/pay/buyWithCrypto/getQuote.js +1 -0
- package/dist/cjs/pay/buyWithCrypto/getQuote.js.map +1 -1
- package/dist/cjs/pay/buyWithCrypto/getStatus.js +1 -0
- package/dist/cjs/pay/buyWithCrypto/getStatus.js.map +1 -1
- package/dist/cjs/pay/buyWithCrypto/getTransfer.js +1 -0
- package/dist/cjs/pay/buyWithCrypto/getTransfer.js.map +1 -1
- package/dist/cjs/pay/buyWithFiat/getHistory.js +1 -0
- package/dist/cjs/pay/buyWithFiat/getHistory.js.map +1 -1
- package/dist/cjs/pay/buyWithFiat/getPostOnRampQuote.js +1 -0
- package/dist/cjs/pay/buyWithFiat/getPostOnRampQuote.js.map +1 -1
- package/dist/cjs/pay/buyWithFiat/getQuote.js.map +1 -1
- package/dist/cjs/pay/buyWithFiat/getStatus.js +1 -0
- package/dist/cjs/pay/buyWithFiat/getStatus.js.map +1 -1
- package/dist/cjs/pay/buyWithFiat/isSwapRequiredPostOnramp.js +1 -0
- package/dist/cjs/pay/buyWithFiat/isSwapRequiredPostOnramp.js.map +1 -1
- package/dist/cjs/react/core/hooks/pay/useBuyWithCryptoHistory.js +1 -0
- package/dist/cjs/react/core/hooks/pay/useBuyWithCryptoHistory.js.map +1 -1
- package/dist/cjs/react/core/hooks/pay/useBuyWithCryptoQuote.js +1 -0
- package/dist/cjs/react/core/hooks/pay/useBuyWithCryptoQuote.js.map +1 -1
- package/dist/cjs/react/core/hooks/pay/useBuyWithCryptoStatus.js +1 -0
- package/dist/cjs/react/core/hooks/pay/useBuyWithCryptoStatus.js.map +1 -1
- package/dist/cjs/react/core/hooks/pay/useBuyWithFiatHistory.js +1 -0
- package/dist/cjs/react/core/hooks/pay/useBuyWithFiatHistory.js.map +1 -1
- package/dist/cjs/react/core/hooks/pay/useBuyWithFiatQuote.js +1 -0
- package/dist/cjs/react/core/hooks/pay/useBuyWithFiatQuote.js.map +1 -1
- package/dist/cjs/react/core/hooks/pay/useBuyWithFiatStatus.js +1 -0
- package/dist/cjs/react/core/hooks/pay/useBuyWithFiatStatus.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/bridge/Buy.js +55 -3
- package/dist/esm/bridge/Buy.js.map +1 -1
- package/dist/esm/bridge/Chains.js +62 -0
- package/dist/esm/bridge/Chains.js.map +1 -0
- package/dist/esm/bridge/Routes.js +20 -1
- package/dist/esm/bridge/Routes.js.map +1 -1
- package/dist/esm/bridge/Sell.js +55 -3
- package/dist/esm/bridge/Sell.js.map +1 -1
- package/dist/esm/bridge/index.js +1 -0
- package/dist/esm/bridge/index.js.map +1 -1
- package/dist/esm/bridge/types/Chain.js +2 -0
- package/dist/esm/bridge/types/Chain.js.map +1 -0
- package/dist/esm/pay/buyWithCrypto/getHistory.js +1 -0
- package/dist/esm/pay/buyWithCrypto/getHistory.js.map +1 -1
- package/dist/esm/pay/buyWithCrypto/getQuote.js +1 -0
- package/dist/esm/pay/buyWithCrypto/getQuote.js.map +1 -1
- package/dist/esm/pay/buyWithCrypto/getStatus.js +1 -0
- package/dist/esm/pay/buyWithCrypto/getStatus.js.map +1 -1
- package/dist/esm/pay/buyWithCrypto/getTransfer.js +1 -0
- package/dist/esm/pay/buyWithCrypto/getTransfer.js.map +1 -1
- package/dist/esm/pay/buyWithFiat/getHistory.js +1 -0
- package/dist/esm/pay/buyWithFiat/getHistory.js.map +1 -1
- package/dist/esm/pay/buyWithFiat/getPostOnRampQuote.js +1 -0
- package/dist/esm/pay/buyWithFiat/getPostOnRampQuote.js.map +1 -1
- package/dist/esm/pay/buyWithFiat/getQuote.js.map +1 -1
- package/dist/esm/pay/buyWithFiat/getStatus.js +1 -0
- package/dist/esm/pay/buyWithFiat/getStatus.js.map +1 -1
- package/dist/esm/pay/buyWithFiat/isSwapRequiredPostOnramp.js +1 -0
- package/dist/esm/pay/buyWithFiat/isSwapRequiredPostOnramp.js.map +1 -1
- package/dist/esm/react/core/hooks/pay/useBuyWithCryptoHistory.js +1 -0
- package/dist/esm/react/core/hooks/pay/useBuyWithCryptoHistory.js.map +1 -1
- package/dist/esm/react/core/hooks/pay/useBuyWithCryptoQuote.js +1 -0
- package/dist/esm/react/core/hooks/pay/useBuyWithCryptoQuote.js.map +1 -1
- package/dist/esm/react/core/hooks/pay/useBuyWithCryptoStatus.js +1 -0
- package/dist/esm/react/core/hooks/pay/useBuyWithCryptoStatus.js.map +1 -1
- package/dist/esm/react/core/hooks/pay/useBuyWithFiatHistory.js +1 -0
- package/dist/esm/react/core/hooks/pay/useBuyWithFiatHistory.js.map +1 -1
- package/dist/esm/react/core/hooks/pay/useBuyWithFiatQuote.js +1 -0
- package/dist/esm/react/core/hooks/pay/useBuyWithFiatQuote.js.map +1 -1
- package/dist/esm/react/core/hooks/pay/useBuyWithFiatStatus.js +1 -0
- package/dist/esm/react/core/hooks/pay/useBuyWithFiatStatus.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/types/bridge/Buy.d.ts +49 -0
- package/dist/types/bridge/Buy.d.ts.map +1 -1
- package/dist/types/bridge/Chains.d.ts +57 -0
- package/dist/types/bridge/Chains.d.ts.map +1 -0
- package/dist/types/bridge/Routes.d.ts +17 -0
- package/dist/types/bridge/Routes.d.ts.map +1 -1
- package/dist/types/bridge/Sell.d.ts +49 -0
- package/dist/types/bridge/Sell.d.ts.map +1 -1
- package/dist/types/bridge/index.d.ts +2 -0
- package/dist/types/bridge/index.d.ts.map +1 -1
- package/dist/types/bridge/types/Chain.d.ts +36 -0
- package/dist/types/bridge/types/Chain.d.ts.map +1 -0
- package/dist/types/pay/buyWithCrypto/getHistory.d.ts +1 -0
- package/dist/types/pay/buyWithCrypto/getHistory.d.ts.map +1 -1
- package/dist/types/pay/buyWithCrypto/getQuote.d.ts +1 -0
- package/dist/types/pay/buyWithCrypto/getQuote.d.ts.map +1 -1
- package/dist/types/pay/buyWithCrypto/getStatus.d.ts +1 -0
- package/dist/types/pay/buyWithCrypto/getStatus.d.ts.map +1 -1
- package/dist/types/pay/buyWithCrypto/getTransfer.d.ts +1 -0
- package/dist/types/pay/buyWithCrypto/getTransfer.d.ts.map +1 -1
- package/dist/types/pay/buyWithFiat/getHistory.d.ts +2 -0
- package/dist/types/pay/buyWithFiat/getHistory.d.ts.map +1 -1
- package/dist/types/pay/buyWithFiat/getPostOnRampQuote.d.ts +1 -0
- package/dist/types/pay/buyWithFiat/getPostOnRampQuote.d.ts.map +1 -1
- package/dist/types/pay/buyWithFiat/getQuote.d.ts +2 -0
- package/dist/types/pay/buyWithFiat/getQuote.d.ts.map +1 -1
- package/dist/types/pay/buyWithFiat/getStatus.d.ts +2 -0
- package/dist/types/pay/buyWithFiat/getStatus.d.ts.map +1 -1
- package/dist/types/pay/buyWithFiat/isSwapRequiredPostOnramp.d.ts +1 -0
- package/dist/types/pay/buyWithFiat/isSwapRequiredPostOnramp.d.ts.map +1 -1
- package/dist/types/react/core/hooks/pay/useBuyWithCryptoHistory.d.ts +1 -0
- package/dist/types/react/core/hooks/pay/useBuyWithCryptoHistory.d.ts.map +1 -1
- package/dist/types/react/core/hooks/pay/useBuyWithCryptoQuote.d.ts +1 -0
- package/dist/types/react/core/hooks/pay/useBuyWithCryptoQuote.d.ts.map +1 -1
- package/dist/types/react/core/hooks/pay/useBuyWithCryptoStatus.d.ts +1 -0
- package/dist/types/react/core/hooks/pay/useBuyWithCryptoStatus.d.ts.map +1 -1
- package/dist/types/react/core/hooks/pay/useBuyWithFiatHistory.d.ts +1 -0
- package/dist/types/react/core/hooks/pay/useBuyWithFiatHistory.d.ts.map +1 -1
- package/dist/types/react/core/hooks/pay/useBuyWithFiatQuote.d.ts +1 -0
- package/dist/types/react/core/hooks/pay/useBuyWithFiatQuote.d.ts.map +1 -1
- package/dist/types/react/core/hooks/pay/useBuyWithFiatStatus.d.ts +1 -0
- package/dist/types/react/core/hooks/pay/useBuyWithFiatStatus.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/bridge/Buy.test.ts +36 -0
- package/src/bridge/Buy.ts +57 -1
- package/src/bridge/Chains.test.ts +28 -0
- package/src/bridge/Chains.ts +75 -0
- package/src/bridge/Routes.ts +21 -0
- package/src/bridge/Sell.test.ts +36 -0
- package/src/bridge/Sell.ts +57 -1
- package/src/bridge/index.ts +2 -0
- package/src/bridge/types/Chain.ts +40 -0
- package/src/pay/buyWithCrypto/getHistory.ts +1 -0
- package/src/pay/buyWithCrypto/getQuote.ts +1 -0
- package/src/pay/buyWithCrypto/getStatus.ts +1 -0
- package/src/pay/buyWithCrypto/getTransfer.ts +1 -0
- package/src/pay/buyWithFiat/getHistory.ts +2 -0
- package/src/pay/buyWithFiat/getPostOnRampQuote.ts +1 -0
- package/src/pay/buyWithFiat/getQuote.ts +2 -0
- package/src/pay/buyWithFiat/getStatus.ts +2 -0
- package/src/pay/buyWithFiat/isSwapRequiredPostOnramp.ts +1 -0
- package/src/react/core/hooks/pay/useBuyWithCryptoHistory.ts +1 -0
- package/src/react/core/hooks/pay/useBuyWithCryptoQuote.ts +1 -0
- package/src/react/core/hooks/pay/useBuyWithCryptoStatus.ts +1 -0
- package/src/react/core/hooks/pay/useBuyWithFiatHistory.ts +1 -0
- package/src/react/core/hooks/pay/useBuyWithFiatQuote.ts +1 -0
- package/src/react/core/hooks/pay/useBuyWithFiatStatus.ts +1 -0
- package/src/version.ts +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getHistory.js","sourceRoot":"","sources":["../../../../src/pay/buyWithFiat/getHistory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;
|
1
|
+
{"version":3,"file":"getHistory.js","sourceRoot":"","sources":["../../../../src/pay/buyWithFiat/getHistory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AAyC3E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,MAAgC;IAEhC,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,IAAI,eAAe,EAAE,CAAC;QAC1C,WAAW,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;QAC1D,WAAW,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QACrD,WAAW,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QAErD,MAAM,WAAW,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC;QAC3C,MAAM,GAAG,GAAG,GAAG,gCAAgC,EAAE,IAAI,WAAW,EAAE,CAAC;QAEnE,MAAM,QAAQ,GAAG,MAAM,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;QAE1D,kFAAkF;QAClF,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;YACtD,MAAM,IAAI,KAAK,CACb,uBAAuB,QAAQ,CAAC,MAAM,MAAM,QAAQ,CAAC,UAAU,KAAK,KAAK,IAAI,eAAe,EAAE,CAC/F,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,GAA2B,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACpE,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,iBAAiB,KAAK,EAAE,CAAC,CAAC;IAC5C,CAAC;AACH,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getPostOnRampQuote.js","sourceRoot":"","sources":["../../../../src/pay/buyWithFiat/getPostOnRampQuote.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,qBAAqB,GACtB,MAAM,8BAA8B,CAAC;AAqBtC
|
1
|
+
{"version":3,"file":"getPostOnRampQuote.js","sourceRoot":"","sources":["../../../../src/pay/buyWithFiat/getPostOnRampQuote.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,qBAAqB,GACtB,MAAM,8BAA8B,CAAC;AAqBtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,EACvC,MAAM,EACN,iBAAiB,GACQ;IACzB,IAAI,iBAAiB,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO,qBAAqB,CAAC;QAC3B,MAAM;QACN,QAAQ,EAAE,iBAAiB,CAAC,QAAQ;QACpC,8FAA8F;QAC9F,WAAW,EAAE,iBAAiB,CAAC,WAAW;QAC1C,SAAS,EAAE,iBAAiB,CAAC,SAAS;QACtC,WAAW,EAAE,iBAAiB,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO;QACxD,gBAAgB,EAAE,iBAAiB,CAAC,KAAK,CAAC,WAAW,CAAC,YAAY;QAClE,SAAS,EAAE,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO;QAClD,cAAc,EAAE,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY;QAC5D,QAAQ,EAAE,iBAAiB,CAAC,KAAK,CAAC,sBAAsB;KACzD,CAAC,CAAC;AACL,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getQuote.js","sourceRoot":"","sources":["../../../../src/pay/buyWithFiat/getQuote.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;
|
1
|
+
{"version":3,"file":"getQuote.js","sourceRoot":"","sources":["../../../../src/pay/buyWithFiat/getQuote.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AA2NzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,MAAiC;IAEjC,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAElD,MAAM,QAAQ,GAAG,M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ACH,CAAC"}
|
@@ -40,6 +40,7 @@ import { getPayBuyWithFiatStatusEndpoint } from "../utils/definitions.js";
|
|
40
40
|
* // when the fiatStatus.status is "ON_RAMP_TRANSFER_COMPLETED" - the process is complete
|
41
41
|
* // when the fiatStatus.status is "CRYPTO_SWAP_REQUIRED" - start the swap process
|
42
42
|
* ```
|
43
|
+
* @deprecated
|
43
44
|
* @buyCrypto
|
44
45
|
*/
|
45
46
|
export async function getBuyWithFiatStatus(params) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getStatus.js","sourceRoot":"","sources":["../../../../src/pay/buyWithFiat/getStatus.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAKtD,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;
|
1
|
+
{"version":3,"file":"getStatus.js","sourceRoot":"","sources":["../../../../src/pay/buyWithFiat/getStatus.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAKtD,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAiI1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAkC;IAElC,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,IAAI,eAAe,CAAC;YACtC,QAAQ,EAAE,MAAM,CAAC,QAAQ;SAC1B,CAAC,CAAC;QAEH,MAAM,WAAW,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC;QAC3C,MAAM,GAAG,GAAG,GAAG,+BAA+B,EAAE,IAAI,WAAW,EAAE,CAAC;QAElE,MAAM,QAAQ,GAAG,MAAM,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;QAE1D,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;YACtD,MAAM,IAAI,KAAK,CACb,uBAAuB,QAAQ,CAAC,MAAM,MAAM,QAAQ,CAAC,UAAU,KAAK,KAAK,IAAI,eAAe,EAAE,CAC/F,CAAC;QACJ,CAAC;QAED,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;IACxC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QACrC,MAAM,IAAI,KAAK,CAAC,iBAAiB,KAAK,EAAE,CAAC,CAAC;IAC5C,CAAC;AACH,CAAC"}
|
@@ -9,6 +9,7 @@ import { getAddress } from "../../utils/address.js";
|
|
9
9
|
*
|
10
10
|
* @param buyWithFiatQuote - The quote of type [`BuyWithFiatQuote`](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatQuote) returned
|
11
11
|
* by the [`getBuyWithFiatQuote`](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatQuote) function.
|
12
|
+
* @deprecated
|
12
13
|
* @buyCrypto
|
13
14
|
*/
|
14
15
|
export function isSwapRequiredPostOnramp(buyWithFiatQuote) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"isSwapRequiredPostOnramp.js","sourceRoot":"","sources":["../../../../src/pay/buyWithFiat/isSwapRequiredPostOnramp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAIpD
|
1
|
+
{"version":3,"file":"isSwapRequiredPostOnramp.js","sourceRoot":"","sources":["../../../../src/pay/buyWithFiat/isSwapRequiredPostOnramp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAIpD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,wBAAwB,CACtC,gBAAmE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SAC5C;QACD;YACE,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,gBAAgB,CAAC,OAAO;YAC/B,MAAM,EAAE,gBAAgB,CAAC,oBAAoB;SAC9C;KACF,CAAC;AACJ,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useBuyWithCryptoHistory.js","sourceRoot":"","sources":["../../../../../../src/react/core/hooks/pay/useBuyWithCryptoHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,GACT,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,uBAAuB,GACxB,MAAM,6CAA6C,CAAC;AAUrD
|
1
|
+
{"version":3,"file":"useBuyWithCryptoHistory.js","sourceRoot":"","sources":["../../../../../../src/react/core/hooks/pay/useBuyWithCryptoHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,GACT,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,uBAAuB,GACxB,MAAM,6CAA6C,CAAC;AAUrD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAAmC,EACnC,WAA8C;IAE9C,OAAO,QAAQ,CAAC;QACd,GAAG,WAAW;QACd,QAAQ,EAAE,CAAC,yBAAyB,EAAE,MAAM,CAAC;QAC7C,OAAO,EAAE,GAAG,EAAE;YACZ,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;YAC9C,CAAC;YACD,OAAO,uBAAuB,CAAC,MAAM,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,EAAE,CAAC,CAAC,MAAM;KAClB,CAAC,CAAC;AACL,CAAC"}
|
@@ -54,6 +54,7 @@ import { getBuyWithCryptoQuote, } from "../../../../pay/buyWithCrypto/getQuote.j
|
|
54
54
|
* return <button onClick={handleBuyWithCrypto}>Swap</button>
|
55
55
|
* }
|
56
56
|
* ```
|
57
|
+
* @deprecated
|
57
58
|
* @buyCrypto
|
58
59
|
*/
|
59
60
|
export function useBuyWithCryptoQuote(params, queryParams) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useBuyWithCryptoQuote.js","sourceRoot":"","sources":["../../../../../../src/react/core/hooks/pay/useBuyWithCryptoQuote.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,GACT,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,qBAAqB,GACtB,MAAM,2CAA2C,CAAC;AAUnD
|
1
|
+
{"version":3,"file":"useBuyWithCryptoQuote.js","sourceRoot":"","sources":["../../../../../../src/react/core/hooks/pay/useBuyWithCryptoQuote.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,GACT,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,qBAAqB,GACtB,MAAM,2CAA2C,CAAC;AAUnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,MAAM,UAAU,qBAAqB,CACnC,MAAoC,EACpC,WAA4C;IAE5C,OAAO,QAAQ,CAAC;QACd,GAAG,WAAW;QACd,QAAQ,EAAE,CAAC,oBAAoB,EAAE,MAAM,CAAC;QACxC,eAAe,EAAE,MAAM;QACvB,OAAO,EAAE,GAAG,EAAE;YACZ,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;YAC9C,CAAC;YAED,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,KAAK,EAAE,KAAK;KACb,CAAC,CAAC;AACL,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useBuyWithCryptoStatus.js","sourceRoot":"","sources":["../../../../../../src/react/core/hooks/pay/useBuyWithCryptoStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAGL,sBAAsB,GACvB,MAAM,4CAA4C,CAAC;AAEpD
|
1
|
+
{"version":3,"file":"useBuyWithCryptoStatus.js","sourceRoot":"","sources":["../../../../../../src/react/core/hooks/pay/useBuyWithCryptoStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAGL,sBAAsB,GACvB,MAAM,4CAA4C,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAAiC;IACtE,OAAO,QAAQ,CAA6B;QAC1C,QAAQ,EAAE,CAAC,wBAAwB,EAAE,MAAM,EAAE,eAAe,CAAU;QACtE,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC;YAC/B,CAAC;YACD,OAAO,sBAAsB,CAAC,MAAM,CAAC,CAAC;QACxC,CAAC;QACD,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE;YACzB,MAAM,MAAM,GAAI,KAAK,CAAC,KAAK,CAAC,IAA4B,EAAE,MAAM,CAAC;YACjE,IAAI,MAAM,KAAK,WAAW,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;gBAClD,OAAO,KAAK,CAAC;YACf,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,2BAA2B,EAAE,IAAI;QACjC,KAAK,EAAE,IAAI;KACZ,CAAC,CAAC;AACL,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useBuyWithFiatHistory.js","sourceRoot":"","sources":["../../../../../../src/react/core/hooks/pay/useBuyWithFiatHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,GACT,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,qBAAqB,GACtB,MAAM,2CAA2C,CAAC;AAUnD
|
1
|
+
{"version":3,"file":"useBuyWithFiatHistory.js","sourceRoot":"","sources":["../../../../../../src/react/core/hooks/pay/useBuyWithFiatHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,GACT,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,qBAAqB,GACtB,MAAM,2CAA2C,CAAC;AAUnD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,qBAAqB,CACnC,MAAiC,EACjC,WAA4C;IAE5C,OAAO,QAAQ,CAAC;QACd,GAAG,WAAW;QACd,QAAQ,EAAE,CAAC,oBAAoB,EAAE,MAAM,CAAC;QACxC,OAAO,EAAE,GAAG,EAAE;YACZ,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;YACzC,CAAC;YACD,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,EAAE,CAAC,CAAC,MAAM;KAClB,CAAC,CAAC;AACL,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useBuyWithFiatQuote.js","sourceRoot":"","sources":["../../../../../../src/react/core/hooks/pay/useBuyWithFiatQuote.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,GACT,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,mBAAmB,GACpB,MAAM,yCAAyC,CAAC;AAUjD
|
1
|
+
{"version":3,"file":"useBuyWithFiatQuote.js","sourceRoot":"","sources":["../../../../../../src/react/core/hooks/pay/useBuyWithFiatQuote.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,GACT,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,mBAAmB,GACpB,MAAM,yCAAyC,CAAC;AAUjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAkC,EAClC,YAA2C;IAE3C,OAAO,QAAQ,CAAC;QACd,GAAG,YAAY;QACf,QAAQ,EAAE,CAAC,qBAAqB,EAAE,MAAM,CAAC;QACzC,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;YACxC,CAAC;YACD,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;QACrC,CAAC;QACD,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,KAAK,EAAE,KAAK;KACb,CAAC,CAAC;AACL,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useBuyWithFiatStatus.js","sourceRoot":"","sources":["../../../../../../src/react/core/hooks/pay/useBuyWithFiatStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAGL,oBAAoB,GACrB,MAAM,0CAA0C,CAAC;AAGlD
|
1
|
+
{"version":3,"file":"useBuyWithFiatStatus.js","sourceRoot":"","sources":["../../../../../../src/react/core/hooks/pay/useBuyWithFiatStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAGL,oBAAoB,GACrB,MAAM,0CAA0C,CAAC;AAGlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAA+D;IAE/D,OAAO,QAAQ,CAAC;QACd,QAAQ,EAAE,CAAC,sBAAsB,EAAE,MAAM,CAAC;QAC1C,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;YACxC,CAAC;YACD,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE;YACzB,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAyB,CAAC;YACnD,MAAM,MAAM,GAAG,IAAI,EAAE,MAAM,CAAC;YAC5B,IACE,MAAM,KAAK,yBAAyB;gBACpC,MAAM,KAAK,gBAAgB;gBAC3B,MAAM,KAAK,uBAAuB;gBAClC,gFAAgF;gBAChF,CAAC,MAAM,KAAK,4BAA4B;oBACtC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,KAAK,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,OAAO;oBAC/D,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,WAAW,EAAE;wBAC5C,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,EACvD,CAAC;gBACD,OAAO,KAAK,CAAC;YACf,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,2BAA2B,EAAE,IAAI;QACjC,KAAK,EAAE,IAAI;QACX,GAAG,MAAM,EAAE,YAAY;KACxB,CAAC,CAAC;AACL,CAAC"}
|
package/dist/esm/version.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export const version = "5.
|
1
|
+
export const version = "5.97.0";
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/dist/esm/version.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC"}
|
@@ -66,12 +66,27 @@ import type { PreparedQuote, Quote } from "./types/Quote.js";
|
|
66
66
|
*
|
67
67
|
* You can access this functions input and output types with `Buy.quote.Options` and `Buy.quote.Result`, respectively.
|
68
68
|
*
|
69
|
+
* To limit quotes to routes that have a certain number of steps involved, use the `maxSteps` option.
|
70
|
+
*
|
71
|
+
* ```ts
|
72
|
+
* const quote = await Bridge.Buy.quote({
|
73
|
+
* originChainId: 1,
|
74
|
+
* originTokenAddress: NATIVE_TOKEN_ADDRESS,
|
75
|
+
* destinationChainId: 10,
|
76
|
+
* destinationTokenAddress: NATIVE_TOKEN_ADDRESS,
|
77
|
+
* amount: toWei("0.01"),
|
78
|
+
* maxSteps: 2, // Will only return a quote for routes with 2 or fewer steps
|
79
|
+
* client: thirdwebClient,
|
80
|
+
* });
|
81
|
+
* ```
|
82
|
+
*
|
69
83
|
* @param options - The options for the quote.
|
70
84
|
* @param options.originChainId - The chain ID of the origin token.
|
71
85
|
* @param options.originTokenAddress - The address of the origin token.
|
72
86
|
* @param options.destinationChainId - The chain ID of the destination token.
|
73
87
|
* @param options.destinationTokenAddress - The address of the destination token.
|
74
88
|
* @param options.amount - The amount of the destination token to receive.
|
89
|
+
* @param [options.maxSteps] - Limit the number of total steps in the route.
|
75
90
|
* @param options.client - Your thirdweb client.
|
76
91
|
*
|
77
92
|
* @returns A promise that resolves to a non-finalized quote for the requested buy.
|
@@ -88,6 +103,7 @@ export declare namespace quote {
|
|
88
103
|
destinationChainId: number;
|
89
104
|
destinationTokenAddress: ox__Address.Address;
|
90
105
|
client: ThirdwebClient;
|
106
|
+
maxSteps?: number;
|
91
107
|
} & ({
|
92
108
|
buyAmountWei: bigint;
|
93
109
|
} | {
|
@@ -193,6 +209,37 @@ export declare namespace quote {
|
|
193
209
|
*
|
194
210
|
* You can access this functions input and output types with `Buy.prepare.Options` and `Buy.prepare.Result`, respectively.
|
195
211
|
*
|
212
|
+
* You can include arbitrary data to be included on any webhooks and status responses with the `purchaseData` option.
|
213
|
+
*
|
214
|
+
* ```ts
|
215
|
+
* const quote = await Bridge.Buy.prepare({
|
216
|
+
* originChainId: 1,
|
217
|
+
* originTokenAddress: NATIVE_TOKEN_ADDRESS,
|
218
|
+
* destinationChainId: 10,
|
219
|
+
* destinationTokenAddress: NATIVE_TOKEN_ADDRESS,
|
220
|
+
* amount: toWei("0.01"),
|
221
|
+
* purchaseData: {
|
222
|
+
* size: "large",
|
223
|
+
* shippingAddress: "123 Main St, New York, NY 10001",
|
224
|
+
* },
|
225
|
+
* client: thirdwebClient,
|
226
|
+
* });
|
227
|
+
* ```
|
228
|
+
*
|
229
|
+
* To limit quotes to routes that have a certain number of steps involved, use the `maxSteps` option.
|
230
|
+
*
|
231
|
+
* ```ts
|
232
|
+
* const quote = await Bridge.Buy.prepare({
|
233
|
+
* originChainId: 1,
|
234
|
+
* originTokenAddress: NATIVE_TOKEN_ADDRESS,
|
235
|
+
* destinationChainId: 10,
|
236
|
+
* destinationTokenAddress: NATIVE_TOKEN_ADDRESS,
|
237
|
+
* amount: toWei("0.01"),
|
238
|
+
* maxSteps: 2, // Will only return a quote for routes with 2 or fewer steps
|
239
|
+
* client: thirdwebClient,
|
240
|
+
* });
|
241
|
+
* ```
|
242
|
+
*
|
196
243
|
* @param options - The options for the quote.
|
197
244
|
* @param options.originChainId - The chain ID of the origin token.
|
198
245
|
* @param options.originTokenAddress - The address of the origin token.
|
@@ -202,6 +249,7 @@ export declare namespace quote {
|
|
202
249
|
* @param options.sender - The address of the sender.
|
203
250
|
* @param options.receiver - The address of the recipient.
|
204
251
|
* @param options.purchaseData - Arbitrary data to be passed to the purchase function and included with any webhooks or status calls.
|
252
|
+
* @param [options.maxSteps] - Limit the number of total steps in the route.
|
205
253
|
* @param options.client - Your thirdweb client.
|
206
254
|
*
|
207
255
|
* @returns A promise that resolves to a finalized quote and transactions for the requested buy.
|
@@ -222,6 +270,7 @@ export declare namespace prepare {
|
|
222
270
|
amount: bigint;
|
223
271
|
client: ThirdwebClient;
|
224
272
|
purchaseData?: unknown;
|
273
|
+
maxSteps?: number;
|
225
274
|
};
|
226
275
|
type Result = PreparedQuote & {
|
227
276
|
intent: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Buy.d.ts","sourceRoot":"","sources":["../../../src/bridge/Buy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,IAAI,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
1
|
+
{"version":3,"file":"Buy.d.ts","sourceRoot":"","sources":["../../../src/bridge/Buy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,IAAI,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AACH,wBAAsB,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAgDzE;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,KAAK,OAAO,GAAG;QACb,aAAa,EAAE,MAAM,CAAC;QACtB,kBAAkB,EAAE,WAAW,CAAC,OAAO,CAAC;QACxC,kBAAkB,EAAE,MAAM,CAAC;QAC3B,uBAAuB,EAAE,WAAW,CAAC,OAAO,CAAC;QAC7C,MAAM,EAAE,cAAc,CAAC;QACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,CACA;QACE,YAAY,EAAE,MAAM,CAAC;KACtB,GACD;QACE,MAAM,EAAE,MAAM,CAAC;KAChB,CACJ,CAAC;IAEF,KAAK,MAAM,GAAG,KAAK,GAAG;QACpB,MAAM,EAAE;YACN,aAAa,EAAE,MAAM,CAAC;YACtB,kBAAkB,E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
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import type { ThirdwebClient } from "../client/client.js";
|
2
|
+
import type { Chain } from "./types/Chain.js";
|
3
|
+
/**
|
4
|
+
* Retrieves supported Universal Bridge chains.
|
5
|
+
*
|
6
|
+
* @example
|
7
|
+
* ```typescript
|
8
|
+
* import { Bridge } from "thirdweb";
|
9
|
+
*
|
10
|
+
* const chains = await Bridge.chains({
|
11
|
+
* client: thirdwebClient,
|
12
|
+
* });
|
13
|
+
* ```
|
14
|
+
*
|
15
|
+
* Returned chains might look something like:
|
16
|
+
* ```typescript
|
17
|
+
* [
|
18
|
+
* {
|
19
|
+
* chainId: 1,
|
20
|
+
* name: "Ethereum",
|
21
|
+
* icon: "https://assets.thirdweb.com/chains/1.png",
|
22
|
+
* nativeCurrency: {
|
23
|
+
* name: "Ether",
|
24
|
+
* symbol: "ETH",
|
25
|
+
* decimals: 18
|
26
|
+
* }
|
27
|
+
* },
|
28
|
+
* {
|
29
|
+
* chainId: 137,
|
30
|
+
* name: "Polygon",
|
31
|
+
* icon: "https://assets.thirdweb.com/chains/137.png",
|
32
|
+
* nativeCurrency: {
|
33
|
+
* name: "MATIC",
|
34
|
+
* symbol: "MATIC",
|
35
|
+
* decimals: 18
|
36
|
+
* }
|
37
|
+
* }
|
38
|
+
* ]
|
39
|
+
* ```
|
40
|
+
*
|
41
|
+
* @param options - The options for fetching chains.
|
42
|
+
* @param options.client - Your thirdweb client.
|
43
|
+
*
|
44
|
+
* @returns A promise that resolves to an array of chains.
|
45
|
+
*
|
46
|
+
* @throws Will throw an error if there is an issue fetching the chains.
|
47
|
+
* @bridge
|
48
|
+
* @beta
|
49
|
+
*/
|
50
|
+
export declare function chains(options: chains.Options): Promise<chains.Result>;
|
51
|
+
export declare namespace chains {
|
52
|
+
type Options = {
|
53
|
+
client: ThirdwebClient;
|
54
|
+
};
|
55
|
+
type Result = Chain[];
|
56
|
+
}
|
57
|
+
//# sourceMappingURL=Chains.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Chains.d.ts","sourceRoot":"","sources":["../../../src/bridge/Chains.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAsB,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAc5E;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,KAAK,OAAO,GAAG;QACb,MAAM,EAAE,cAAc,CAAC;KACxB,CAAC;IAEF,KAAK,MAAM,GAAG,KAAK,EAAE,CAAC;CACvB"}
|
@@ -83,6 +83,21 @@ import type { Route } from "./types/Route.js";
|
|
83
83
|
* });
|
84
84
|
* ```
|
85
85
|
*
|
86
|
+
* You can sort the returned routes by `popularity`:
|
87
|
+
* ```ts
|
88
|
+
* import { Bridge } from "thirdweb";
|
89
|
+
*
|
90
|
+
* // Get the 10 most popular routes starting from mainnet ETH
|
91
|
+
* const routes = await Bridge.routes({
|
92
|
+
* originChainId: 1,
|
93
|
+
* originTokenAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
|
94
|
+
* limit: 10,
|
95
|
+
* offset: 0,
|
96
|
+
* sortBy: "popularity",
|
97
|
+
* client: thirdwebClient,
|
98
|
+
* });
|
99
|
+
* ```
|
100
|
+
*
|
86
101
|
* @param options - The options for the quote.
|
87
102
|
* @param options.client - Your thirdweb client.
|
88
103
|
* @param options.originChainId - Filter by a specific origin chain ID.
|
@@ -91,6 +106,7 @@ import type { Route } from "./types/Route.js";
|
|
91
106
|
* @param options.destinationTokenAddress - Filter by a specific destination token address.
|
92
107
|
* @param options.transactionHash - Filter by a specific transaction hash.
|
93
108
|
* @param options.maxSteps - Limit the number of steps returned.
|
109
|
+
* @param options.sortBy - Sort the routes by various categories.
|
94
110
|
* @param options.limit - Limit the number of routes returned.
|
95
111
|
* @param options.offset - Offset the number of routes returned.
|
96
112
|
*
|
@@ -109,6 +125,7 @@ export declare namespace routes {
|
|
109
125
|
destinationChainId?: number;
|
110
126
|
destinationTokenAddress?: ox__Address.Address;
|
111
127
|
transactionHash?: ox__Hex.Hex;
|
128
|
+
sortBy?: "popularity";
|
112
129
|
maxSteps?: number;
|
113
130
|
limit?: number;
|
114
131
|
offset?: number;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Routes.d.ts","sourceRoot":"","sources":["../../../src/bridge/Routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,IAAI,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C
|
1
|
+
{"version":3,"file":"Routes.d.ts","sourceRoot":"","sources":["../../../src/bridge/Routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,IAAI,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkHG;AACH,wBAAsB,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAgD5E;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,KAAK,OAAO,GAAG;QACb,MAAM,EAAE,cAAc,CAAC;QACvB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,kBAAkB,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC;QACzC,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,uBAAuB,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC;QAC9C,eAAe,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC;QAC9B,MAAM,CAAC,EAAE,YAAY,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IAEF,KAAK,MAAM,GAAG,KAAK,EAAE,CAAC;CACvB"}
|
@@ -66,12 +66,27 @@ import type { PreparedQuote, Quote } from "./types/Quote.js";
|
|
66
66
|
*
|
67
67
|
* You can access this functions input and output types with `Sell.quote.Options` and `Sell.quote.Result`, respectively.
|
68
68
|
*
|
69
|
+
* To limit quotes to routes that have a certain number of steps involved, use the `maxSteps` option.
|
70
|
+
*
|
71
|
+
* ```ts
|
72
|
+
* const quote = await Bridge.Sell.quote({
|
73
|
+
* originChainId: 1,
|
74
|
+
* originTokenAddress: NATIVE_TOKEN_ADDRESS,
|
75
|
+
* destinationChainId: 10,
|
76
|
+
* destinationTokenAddress: NATIVE_TOKEN_ADDRESS,
|
77
|
+
* amount: toWei("0.01"),
|
78
|
+
* maxSteps: 2, // Will only return a quote for routes with 2 or fewer steps
|
79
|
+
* client: thirdwebClient,
|
80
|
+
* });
|
81
|
+
* ```
|
82
|
+
*
|
69
83
|
* @param options - The options for the quote.
|
70
84
|
* @param options.originChainId - The chain ID of the origin token.
|
71
85
|
* @param options.originTokenAddress - The address of the origin token.
|
72
86
|
* @param options.destinationChainId - The chain ID of the destination token.
|
73
87
|
* @param options.destinationTokenAddress - The address of the destination token.
|
74
88
|
* @param options.amount - The amount of the origin token to sell.
|
89
|
+
* @param [options.maxSteps] - Limit the number of total steps in the route.
|
75
90
|
* @param options.client - Your thirdweb client.
|
76
91
|
*
|
77
92
|
* @returns A promise that resolves to a non-finalized quote for the requested sell.
|
@@ -89,6 +104,7 @@ export declare namespace quote {
|
|
89
104
|
destinationTokenAddress: ox__Address.Address;
|
90
105
|
amount: bigint;
|
91
106
|
client: ThirdwebClient;
|
107
|
+
maxSteps?: number;
|
92
108
|
};
|
93
109
|
type Result = Quote & {
|
94
110
|
intent: {
|
@@ -189,6 +205,37 @@ export declare namespace quote {
|
|
189
205
|
*
|
190
206
|
* You can access this functions input and output types with `Sell.prepare.Options` and `Sell.prepare.Result`, respectively.
|
191
207
|
*
|
208
|
+
* You can include arbitrary data to be included on any webhooks and status responses with the `purchaseData` option.
|
209
|
+
*
|
210
|
+
* ```ts
|
211
|
+
* const quote = await Bridge.Sell.prepare({
|
212
|
+
* originChainId: 1,
|
213
|
+
* originTokenAddress: NATIVE_TOKEN_ADDRESS,
|
214
|
+
* destinationChainId: 10,
|
215
|
+
* destinationTokenAddress: NATIVE_TOKEN_ADDRESS,
|
216
|
+
* amount: toWei("0.01"),
|
217
|
+
* purchaseData: {
|
218
|
+
* size: "large",
|
219
|
+
* shippingAddress: "123 Main St, New York, NY 10001",
|
220
|
+
* },
|
221
|
+
* client: thirdwebClient,
|
222
|
+
* });
|
223
|
+
* ```
|
224
|
+
*
|
225
|
+
* To limit quotes to routes that have a certain number of steps involved, use the `maxSteps` option.
|
226
|
+
*
|
227
|
+
* ```ts
|
228
|
+
* const quote = await Bridge.Sell.prepare({
|
229
|
+
* originChainId: 1,
|
230
|
+
* originTokenAddress: NATIVE_TOKEN_ADDRESS,
|
231
|
+
* destinationChainId: 10,
|
232
|
+
* destinationTokenAddress: NATIVE_TOKEN_ADDRESS,
|
233
|
+
* amount: toWei("0.01"),
|
234
|
+
* maxSteps: 2, // Will only return a quote for routes with 2 or fewer steps
|
235
|
+
* client: thirdwebClient,
|
236
|
+
* });
|
237
|
+
* ```
|
238
|
+
*
|
192
239
|
* @param options - The options for the quote.
|
193
240
|
* @param options.originChainId - The chain ID of the origin token.
|
194
241
|
* @param options.originTokenAddress - The address of the origin token.
|
@@ -198,6 +245,7 @@ export declare namespace quote {
|
|
198
245
|
* @param options.sender - The address of the sender.
|
199
246
|
* @param options.receiver - The address of the recipient.
|
200
247
|
* @param options.purchaseData - Arbitrary data to be passed to the purchase function and included with any webhooks or status calls.
|
248
|
+
* @param [options.maxSteps] - Limit the number of total steps in the route.
|
201
249
|
* @param options.client - Your thirdweb client.
|
202
250
|
*
|
203
251
|
* @returns A promise that resolves to a finalized quote and transactions for the requested sell.
|
@@ -218,6 +266,7 @@ export declare namespace prepare {
|
|
218
266
|
receiver: ox__Address.Address;
|
219
267
|
client: ThirdwebClient;
|
220
268
|
purchaseData?: unknown;
|
269
|
+
maxSteps?: number;
|
221
270
|
};
|
222
271
|
type Result = PreparedQuote & {
|
223
272
|
intent: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Sell.d.ts","sourceRoot":"","sources":["../../../src/bridge/Sell.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,IAAI,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
1
|
+
{"version":3,"file":"Sell.d.ts","sourceRoot":"","sources":["../../../src/bridge/Sell.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,IAAI,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AACH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AAM,EAAE,WAAW,CAAC,OAAO,CAAC;QAC5B,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC;QAC9B,MAAM,EAAE,cAAc,CAAC;QACvB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IAEF,KAAK,MAAM,GAAG,aAAa,GAAG;QAC5B,MAAM,EAAE;YACN,aAAa,EAAE,MAAM,CAAC;YACtB,kBAAkB,EAAE,WAAW,CAAC,OAAO,CAAC;YACxC,kBAAkB,EAAE,MAAM,CAAC;YAC3B,uBAAuB,EAAE,WAAW,CAAC,OAAO,CAAC;YAC7C,MAAM,EAAE,MAAM,CAAC;YACf,YAAY,CAAC,EAAE,OAAO,CAAC;SACxB,CAAC;KACH,CAAC;CACH"}
|
@@ -2,7 +2,9 @@ export * as Buy from "./Buy.js";
|
|
2
2
|
export * as Sell from "./Sell.js";
|
3
3
|
export { status } from "./Status.js";
|
4
4
|
export { routes } from "./Routes.js";
|
5
|
+
export { chains } from "./Chains.js";
|
5
6
|
export type { Status } from "./types/Status.js";
|
6
7
|
export type { Route } from "./types/Route.js";
|
7
8
|
export type { Quote, PreparedQuote } from "./types/Quote.js";
|
9
|
+
export type { Chain } from "./types/Chain.js";
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bridge/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,YAAY,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bridge/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,YAAY,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC7D,YAAY,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC"}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
/**
|
2
|
+
* Represents a blockchain chain in the Universal Bridge.
|
3
|
+
* @public
|
4
|
+
*/
|
5
|
+
export interface Chain {
|
6
|
+
/**
|
7
|
+
* The chain ID of the chain.
|
8
|
+
*/
|
9
|
+
chainId: number;
|
10
|
+
/**
|
11
|
+
* The name of the chain.
|
12
|
+
*/
|
13
|
+
name: string;
|
14
|
+
/**
|
15
|
+
* The URL of the chain's icon.
|
16
|
+
*/
|
17
|
+
icon: string;
|
18
|
+
/**
|
19
|
+
* Information about the native currency of the chain.
|
20
|
+
*/
|
21
|
+
nativeCurrency: {
|
22
|
+
/**
|
23
|
+
* The name of the native currency.
|
24
|
+
*/
|
25
|
+
name: string;
|
26
|
+
/**
|
27
|
+
* The symbol of the native currency.
|
28
|
+
*/
|
29
|
+
symbol: string;
|
30
|
+
/**
|
31
|
+
* The number of decimals used by the native currency.
|
32
|
+
*/
|
33
|
+
decimals: number;
|
34
|
+
};
|
35
|
+
}
|
36
|
+
//# sourceMappingURL=Chain.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Chain.d.ts","sourceRoot":"","sources":["../../../../src/bridge/types/Chain.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,cAAc,EAAE;QACd;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH"}
|
@@ -56,6 +56,7 @@ export type BuyWithCryptoHistoryData = {
|
|
56
56
|
* const status = await getBuyWithCryptoHistory(params)
|
57
57
|
* ```
|
58
58
|
* @returns Object of type [`BuyWithCryptoHistoryData`](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoHistoryData)
|
59
|
+
* @deprecated
|
59
60
|
* @buyCrypto
|
60
61
|
*/
|
61
62
|
export declare function getBuyWithCryptoHistory(params: BuyWithCryptoHistoryParams): Promise<BuyWithCryptoHistoryData>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getHistory.d.ts","sourceRoot":"","sources":["../../../../src/pay/buyWithCrypto/getHistory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;;;;OAMG;IACH,MAAM,EAAE,cAAc,CAAC;IACvB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF
|
1
|
+
{"version":3,"file":"getHistory.d.ts","sourceRoot":"","sources":["../../../../src/pay/buyWithCrypto/getHistory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;;;;OAMG;IACH,MAAM,EAAE,cAAc,CAAC;IACvB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,wBAAwB,CAAC,CAyBnC"}
|
@@ -134,6 +134,7 @@ export type BuyWithCryptoQuote = {
|
|
134
134
|
* maxSlippageBPS: 50, // optional: max 0.5% slippage
|
135
135
|
* });
|
136
136
|
* ```
|
137
|
+
* @deprecated
|
137
138
|
* @buyCrypto
|
138
139
|
*/
|
139
140
|
export declare function getBuyWithCryptoQuote(params: GetBuyWithCryptoQuoteParams): Promise<BuyWithCryptoQuote>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getQuote.d.ts","sourceRoot":"","sources":["../../../../src/pay/buyWithCrypto/getQuote.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AA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zC,MAAM,EAAE,2BAA2B,GAClC,OAAO,CAAC,kBAAkB,CAAC,CAgF7B"}
|
@@ -93,6 +93,7 @@ export type ValidBuyWithCryptoStatus = Exclude<BuyWithCryptoStatus, {
|
|
93
93
|
* }});
|
94
94
|
* ```
|
95
95
|
* @returns Object of type [`BuyWithCryptoStatus`](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoStatus)
|
96
|
+
* @deprecated
|
96
97
|
* @buyCrypto
|
97
98
|
*/
|
98
99
|
export declare function getBuyWithCryptoStatus(buyWithCryptoTransaction: BuyWithCryptoTransaction): Promise<BuyWithCryptoStatus>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getStatus.d.ts","sourceRoot":"","sources":["../../../../src/pay/buyWithCrypto/getStatus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,KAAK,EACV,4BAA4B,EAC5B,YAAY,EACb,MAAM,yBAAyB,CAAC;AAKjC;;GAEG;AACH,KAAK,yBAAyB,GAAG;IAC/B,SAAS,EAAE,YAAY,CAAC;IACxB,OAAO,EAAE,YAAY,CAAC;IAEtB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IAEnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IAEjB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IAEvB,SAAS,EAAE;QACT,kBAAkB,EAAE,MAAM,CAAC;QAC3B,mBAAmB,EAAE,MAAM,CAAC;QAC5B,gBAAgB,EAAE,MAAM,CAAC;QACzB,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IAEF,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG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