@anywalletkit/protocol-swap2-0x 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/dist/{chunk-SAI3RXOP.js → chunk-ABT2WYBK.js} +2 -2
- package/dist/{chunk-VPQZVV5O.js → chunk-KYVRMBZG.js} +2 -2
- package/dist/{chunk-PLQSYP6W.js → chunk-S2RUUV3X.js} +8 -1
- package/dist/chunk-S2RUUV3X.js.map +1 -0
- package/dist/index.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -3
- package/dist/protocol.cjs +6 -0
- package/dist/protocol.cjs.map +1 -1
- package/dist/protocol.js +2 -2
- package/dist/provider.cjs +7 -0
- package/dist/provider.cjs.map +1 -1
- package/dist/provider.d.cts +8 -1
- package/dist/provider.d.ts +8 -1
- package/dist/provider.js +3 -1
- package/dist/remote.cjs.map +1 -1
- package/dist/remote.js +2 -2
- package/package.json +4 -4
- package/dist/chunk-PLQSYP6W.js.map +0 -1
- /package/dist/{chunk-SAI3RXOP.js.map → chunk-ABT2WYBK.js.map} +0 -0
- /package/dist/{chunk-VPQZVV5O.js.map → chunk-KYVRMBZG.js.map} +0 -0
package/dist/provider.d.cts
CHANGED
|
@@ -63,6 +63,13 @@ declare function zeroExFees(response: Record<string, unknown>, gas: {
|
|
|
63
63
|
fees: Fee[];
|
|
64
64
|
networkFeeKnown: boolean;
|
|
65
65
|
} | string;
|
|
66
|
+
/**
|
|
67
|
+
* A quote's `gasEstimate`: 0x's own gas figure for the call — `transaction.gas` on a live quote, `gas` on an indicative
|
|
68
|
+
* price — as canonical digits, read the way the gas limit and the network fee read it (decimal digits only). Undefined
|
|
69
|
+
* when 0x states none, zero, a figure in another notation, or one past the contract's ten digits: no figure is made up.
|
|
70
|
+
* 0x calls it the gas limit to send with; measured against the gas the call used, it runs high (see the README).
|
|
71
|
+
*/
|
|
72
|
+
declare function zeroExGasEstimate(gas: unknown): string | undefined;
|
|
66
73
|
/** What {@link zeroExProvider} returns: a swap2 provider, plus the Settler resolver it reads through (for signing policies, `zeroExKnownSpenders`). */
|
|
67
74
|
type ZeroExProvider = CrossChainProvider & {
|
|
68
75
|
readonly ownGasEstimate: true;
|
|
@@ -81,4 +88,4 @@ declare function zeroExPreflightDeposit(quote: Quote, tx: UnsignedTx, ctx: {
|
|
|
81
88
|
resolver: SettlerResolver;
|
|
82
89
|
}): Promise<void>;
|
|
83
90
|
|
|
84
|
-
export { ZEROEX_DEFAULT_BASE_URL, ZEROEX_PROVIDER, type ZeroExProvider, type ZeroExProviderConfig, zeroExFees, zeroExPreflightDeposit, zeroExProvider };
|
|
91
|
+
export { ZEROEX_DEFAULT_BASE_URL, ZEROEX_PROVIDER, type ZeroExProvider, type ZeroExProviderConfig, zeroExFees, zeroExGasEstimate, zeroExPreflightDeposit, zeroExProvider };
|
package/dist/provider.d.ts
CHANGED
|
@@ -63,6 +63,13 @@ declare function zeroExFees(response: Record<string, unknown>, gas: {
|
|
|
63
63
|
fees: Fee[];
|
|
64
64
|
networkFeeKnown: boolean;
|
|
65
65
|
} | string;
|
|
66
|
+
/**
|
|
67
|
+
* A quote's `gasEstimate`: 0x's own gas figure for the call — `transaction.gas` on a live quote, `gas` on an indicative
|
|
68
|
+
* price — as canonical digits, read the way the gas limit and the network fee read it (decimal digits only). Undefined
|
|
69
|
+
* when 0x states none, zero, a figure in another notation, or one past the contract's ten digits: no figure is made up.
|
|
70
|
+
* 0x calls it the gas limit to send with; measured against the gas the call used, it runs high (see the README).
|
|
71
|
+
*/
|
|
72
|
+
declare function zeroExGasEstimate(gas: unknown): string | undefined;
|
|
66
73
|
/** What {@link zeroExProvider} returns: a swap2 provider, plus the Settler resolver it reads through (for signing policies, `zeroExKnownSpenders`). */
|
|
67
74
|
type ZeroExProvider = CrossChainProvider & {
|
|
68
75
|
readonly ownGasEstimate: true;
|
|
@@ -81,4 +88,4 @@ declare function zeroExPreflightDeposit(quote: Quote, tx: UnsignedTx, ctx: {
|
|
|
81
88
|
resolver: SettlerResolver;
|
|
82
89
|
}): Promise<void>;
|
|
83
90
|
|
|
84
|
-
export { ZEROEX_DEFAULT_BASE_URL, ZEROEX_PROVIDER, type ZeroExProvider, type ZeroExProviderConfig, zeroExFees, zeroExPreflightDeposit, zeroExProvider };
|
|
91
|
+
export { ZEROEX_DEFAULT_BASE_URL, ZEROEX_PROVIDER, type ZeroExProvider, type ZeroExProviderConfig, zeroExFees, zeroExGasEstimate, zeroExPreflightDeposit, zeroExProvider };
|
package/dist/provider.js
CHANGED
|
@@ -2,9 +2,10 @@ import {
|
|
|
2
2
|
ZEROEX_DEFAULT_BASE_URL,
|
|
3
3
|
ZEROEX_PROVIDER,
|
|
4
4
|
zeroExFees,
|
|
5
|
+
zeroExGasEstimate,
|
|
5
6
|
zeroExPreflightDeposit,
|
|
6
7
|
zeroExProvider
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-S2RUUV3X.js";
|
|
8
9
|
import "./chunk-V4HUFBY2.js";
|
|
9
10
|
import "./chunk-YHRPT6BS.js";
|
|
10
11
|
import "./chunk-AMZ5DXN2.js";
|
|
@@ -12,6 +13,7 @@ export {
|
|
|
12
13
|
ZEROEX_DEFAULT_BASE_URL,
|
|
13
14
|
ZEROEX_PROVIDER,
|
|
14
15
|
zeroExFees,
|
|
16
|
+
zeroExGasEstimate,
|
|
15
17
|
zeroExPreflightDeposit,
|
|
16
18
|
zeroExProvider
|
|
17
19
|
};
|