@lifi/sdk 3.12.0 → 3.12.1
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/package.json +4 -4
- package/src/_cjs/core/EVM/typeguards.js +3 -2
- package/src/_cjs/core/EVM/typeguards.js.map +1 -1
- package/src/_cjs/version.js +1 -1
- package/src/_esm/core/EVM/typeguards.js +3 -2
- package/src/_esm/core/EVM/typeguards.js.map +1 -1
- package/src/_esm/version.js +1 -1
- package/src/_types/core/EVM/typeguards.d.ts +2 -2
- package/src/_types/core/EVM/typeguards.d.ts.map +1 -1
- package/src/_types/version.d.ts +1 -1
- package/src/core/EVM/typeguards.ts +10 -4
- package/src/version.ts +1 -1
package/package.json
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
"@bigmi/core": "^0.5.2",
|
|
7
7
|
"@bitcoinerlab/secp256k1": "^1.2.0",
|
|
8
8
|
"@lifi/types": "^17.36.0",
|
|
9
|
-
"@mysten/sui": "^1.37.
|
|
10
|
-
"@mysten/wallet-standard": "^0.16.
|
|
9
|
+
"@mysten/sui": "^1.37.6",
|
|
10
|
+
"@mysten/wallet-standard": "^0.16.14",
|
|
11
11
|
"@noble/curves": "^1.9.7",
|
|
12
12
|
"@solana/wallet-adapter-base": "^0.9.27",
|
|
13
13
|
"@solana/web3.js": "^1.98.4",
|
|
14
14
|
"bech32": "^2.0.0",
|
|
15
15
|
"bitcoinjs-lib": "^7.0.0-rc.0",
|
|
16
16
|
"bs58": "^6.0.0",
|
|
17
|
-
"viem": "^2.37.
|
|
17
|
+
"viem": "^2.37.2"
|
|
18
18
|
},
|
|
19
19
|
"description": "LI.FI Any-to-Any Cross-Chain-Swap SDK",
|
|
20
20
|
"exports": {
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"sideEffects": false,
|
|
71
71
|
"types": "./src/_types/index.d.ts",
|
|
72
72
|
"typings": "./src/_types/index.d.ts",
|
|
73
|
-
"version": "3.12.
|
|
73
|
+
"version": "3.12.1"
|
|
74
74
|
}
|
|
@@ -5,7 +5,8 @@ exports.isGaslessStep = isGaslessStep;
|
|
|
5
5
|
function isRelayerStep(step) {
|
|
6
6
|
return !!step.typedData && step.typedData.length > 0;
|
|
7
7
|
}
|
|
8
|
-
function isGaslessStep(step) {
|
|
9
|
-
return !!step.typedData?.
|
|
8
|
+
function isGaslessStep(step, chain) {
|
|
9
|
+
return (!!step.typedData?.some((p) => p.primaryType === 'PermitWitnessTransferFrom') ||
|
|
10
|
+
!!(chain && step.typedData?.some((p) => p.message.spender === chain?.permit2)));
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=typeguards.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeguards.js","sourceRoot":"","sources":["../../../core/EVM/typeguards.ts"],"names":[],"mappings":";;AAOA,sCAIC;AAED,
|
|
1
|
+
{"version":3,"file":"typeguards.js","sourceRoot":"","sources":["../../../core/EVM/typeguards.ts"],"names":[],"mappings":";;AAOA,sCAIC;AAED,sCAYC;AAlBD,SAAgB,aAAa,CAC3B,IAAiC;IAEjC,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAA;AACtD,CAAC;AAED,SAAgB,aAAa,CAC3B,IAAiC,EACjC,KAAqB;IAErB,OAAO,CACL,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CACpB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,KAAK,2BAA2B,CACrD;QACD,CAAC,CAAC,CACA,KAAK,IAAI,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,KAAK,KAAK,EAAE,OAAO,CAAC,CAC3E,CACF,CAAA;AACH,CAAC"}
|
package/src/_cjs/version.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export function isRelayerStep(step) {
|
|
2
2
|
return !!step.typedData && step.typedData.length > 0;
|
|
3
3
|
}
|
|
4
|
-
export function isGaslessStep(step) {
|
|
5
|
-
return !!step.typedData?.
|
|
4
|
+
export function isGaslessStep(step, chain) {
|
|
5
|
+
return (!!step.typedData?.some((p) => p.primaryType === 'PermitWitnessTransferFrom') ||
|
|
6
|
+
!!(chain && step.typedData?.some((p) => p.message.spender === chain?.permit2)));
|
|
6
7
|
}
|
|
7
8
|
//# sourceMappingURL=typeguards.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeguards.js","sourceRoot":"","sources":["../../../core/EVM/typeguards.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,aAAa,CAC3B,IAAiC;IAEjC,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAA;AACtD,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,IAAiC;
|
|
1
|
+
{"version":3,"file":"typeguards.js","sourceRoot":"","sources":["../../../core/EVM/typeguards.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,aAAa,CAC3B,IAAiC;IAEjC,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAA;AACtD,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,IAAiC,EACjC,KAAqB;IAErB,OAAO,CACL,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CACpB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,KAAK,2BAA2B,CACrD;QACD,CAAC,CAAC,CACA,KAAK,IAAI,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,KAAK,KAAK,EAAE,OAAO,CAAC,CAC3E,CACF,CAAA;AACH,CAAC"}
|
package/src/_esm/version.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { LiFiStep } from '@lifi/types';
|
|
1
|
+
import type { ExtendedChain, LiFiStep } from '@lifi/types';
|
|
2
2
|
import type { LiFiStepExtended } from '../types.js';
|
|
3
3
|
type RelayerStep = (LiFiStepExtended | LiFiStep) & {
|
|
4
4
|
typedData: NonNullable<(LiFiStepExtended | LiFiStep)['typedData']>;
|
|
5
5
|
};
|
|
6
6
|
export declare function isRelayerStep(step: LiFiStepExtended | LiFiStep): step is RelayerStep;
|
|
7
|
-
export declare function isGaslessStep(step: LiFiStepExtended | LiFiStep): step is RelayerStep;
|
|
7
|
+
export declare function isGaslessStep(step: LiFiStepExtended | LiFiStep, chain?: ExtendedChain): step is RelayerStep;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=typeguards.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeguards.d.ts","sourceRoot":"","sources":["../../../core/EVM/typeguards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"typeguards.d.ts","sourceRoot":"","sources":["../../../core/EVM/typeguards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEnD,KAAK,WAAW,GAAG,CAAC,gBAAgB,GAAG,QAAQ,CAAC,GAAG;IACjD,SAAS,EAAE,WAAW,CAAC,CAAC,gBAAgB,GAAG,QAAQ,CAAC,CAAC,WAAW,CAAC,CAAC,CAAA;CACnE,CAAA;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,gBAAgB,GAAG,QAAQ,GAChC,IAAI,IAAI,WAAW,CAErB;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,gBAAgB,GAAG,QAAQ,EACjC,KAAK,CAAC,EAAE,aAAa,GACpB,IAAI,IAAI,WAAW,CASrB"}
|
package/src/_types/version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LiFiStep } from '@lifi/types'
|
|
1
|
+
import type { ExtendedChain, LiFiStep } from '@lifi/types'
|
|
2
2
|
import type { LiFiStepExtended } from '../types.js'
|
|
3
3
|
|
|
4
4
|
type RelayerStep = (LiFiStepExtended | LiFiStep) & {
|
|
@@ -12,9 +12,15 @@ export function isRelayerStep(
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export function isGaslessStep(
|
|
15
|
-
step: LiFiStepExtended | LiFiStep
|
|
15
|
+
step: LiFiStepExtended | LiFiStep,
|
|
16
|
+
chain?: ExtendedChain
|
|
16
17
|
): step is RelayerStep {
|
|
17
|
-
return
|
|
18
|
-
(
|
|
18
|
+
return (
|
|
19
|
+
!!step.typedData?.some(
|
|
20
|
+
(p) => p.primaryType === 'PermitWitnessTransferFrom'
|
|
21
|
+
) ||
|
|
22
|
+
!!(
|
|
23
|
+
chain && step.typedData?.some((p) => p.message.spender === chain?.permit2)
|
|
24
|
+
)
|
|
19
25
|
)
|
|
20
26
|
}
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = '@lifi/sdk'
|
|
2
|
-
export const version = '3.12.
|
|
2
|
+
export const version = '3.12.1'
|