@lifi/sdk 0.0.0-preview-6fd9ec48 → 0.0.0-preview-c996a5fb

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/CHANGELOG.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # @lifi/sdk
2
2
 
3
- ## 0.0.0-preview-6fd9ec48
3
+ ## 0.0.0-preview-c996a5fb
4
4
 
5
5
  ### Minor Changes
6
6
 
7
- - [#548](https://github.com/lifinance/sdk/pull/548) [`de384d3`](https://github.com/lifinance/sdk/commit/de384d3fffbe0f87f73f268529b8f528cf2c4a8b) Thanks [@chybisov](https://github.com/chybisov)! - Support the new LI.FI gasless flow and remove the legacy gasless service.
7
+ - [#548](https://github.com/lifinance/sdk/pull/548) [`de384d3`](https://github.com/lifinance/sdk/commit/de384d3fffbe0f87f73f268529b8f528cf2c4a8b) Thanks [@chybisov](https://github.com/chybisov)! - Support the new LI.FI gasless flow, and stop calling the legacy gasless service.
8
8
 
9
- A gasless route is requested with `options.gasless: true`. Its step is marked by the `LIFI Gasless Relay Fee` entry in `estimate.feeCosts`. The new `isGaslessStep(step)` in `@lifi/sdk` checks for this marker, and `GASLESS_RELAY_FEE_NAME` holds its name.
9
+ Request a gasless route with `options.gasless: true`. The `LIFI Gasless Relay Fee` entry in `estimate.feeCosts` marks its step. The new `isGaslessStep(step)` in `@lifi/sdk` checks for this marker, and `GASLESS_RELAY_FEE_NAME` holds its name.
10
10
 
11
11
  For a gasless step, the EVM provider now does the following:
12
12
 
@@ -14,9 +14,11 @@
14
14
  - It does not check native gas, does not approve, and does not sign its own permit. The relayer pays the gas, and the backend handles the allowance.
15
15
  - It re-quotes through `/advanced/stepTransaction` without the old typed data.
16
16
  - It relays every typed-data step through `/advanced/relay`, including `PermitWitnessTransferFrom`.
17
- - It tracks the relay on `/v1/status?taskId=`. Other relayed steps keep `getRelayedTransactionStatus`.
17
+ - It tracks the relay on `/v1/status?taskId=`, with the same wait as other relayed steps. Other relayed steps keep `getRelayedTransactionStatus`. On a bridge route, the wait ends when the relayed source transaction has landed. A later bridge failure then does not cause a second signature. After a `FAILED` answer, the SDK reads the source receipt to find out if the source landed.
18
18
  - It fails before signing when `disableMessageSigning` is set, or when the step needs an EIP-7702 authorization.
19
19
 
20
+ For all relayed steps, the wait now ends after five status errors in a row, not after three errors in total. A status answer resets the count. A failed request, `NOT_FOUND` and 422/1004 count as errors. The error is not final, so a resume waits for the same task and asks for no new signature.
21
+
20
22
  Deprecated (still exported, so that published consumers keep building):
21
23
 
22
24
  - `getRelayerQuote` in `@lifi/sdk` and in the client actions. The legacy relayer endpoint is shut down. Use `getRoutes` with `options.gasless: true`.
@@ -5,7 +5,7 @@ const checkPackageUpdates = async (packageName, packageVersion) => {
5
5
  try {
6
6
  const pkgName = packageName ?? "@lifi/sdk";
7
7
  const latestVersion = (await (await fetch(`https://registry.npmjs.org/${pkgName}/latest`)).json()).version;
8
- const currentVersion = packageVersion ?? "0.0.0-preview-6fd9ec48";
8
+ const currentVersion = packageVersion ?? "0.0.0-preview-c996a5fb";
9
9
  if (latestVersion > currentVersion) console.warn(`${pkgName}: new package version is available. Please update as soon as possible to enjoy the newest features. Current version: ${currentVersion}. Latest version: ${latestVersion}.`);
10
10
  } catch (_error) {}
11
11
  };
@@ -1,2 +1,2 @@
1
1
  export declare const name = "@lifi/sdk";
2
- export declare const version = "0.0.0-preview-6fd9ec48";
2
+ export declare const version = "0.0.0-preview-c996a5fb";
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  // src/version.ts
3
3
  const name = "@lifi/sdk";
4
- const version = "0.0.0-preview-6fd9ec48";
4
+ const version = "0.0.0-preview-c996a5fb";
5
5
  exports.name = name;
6
6
  exports.version = version;
7
7
 
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","names":[],"sources":["../../src/version.ts"],"sourcesContent":["export const name = '@lifi/sdk'\nexport const version = '0.0.0-preview-6fd9ec48'\n"],"mappings":";;AAAA,MAAa,OAAO;AACpB,MAAa,UAAU"}
1
+ {"version":3,"file":"version.js","names":[],"sources":["../../src/version.ts"],"sourcesContent":["export const name = '@lifi/sdk'\nexport const version = '0.0.0-preview-c996a5fb'\n"],"mappings":";;AAAA,MAAa,OAAO;AACpB,MAAa,UAAU"}
@@ -4,7 +4,7 @@ const checkPackageUpdates = async (packageName, packageVersion) => {
4
4
  try {
5
5
  const pkgName = packageName ?? "@lifi/sdk";
6
6
  const latestVersion = (await (await fetch(`https://registry.npmjs.org/${pkgName}/latest`)).json()).version;
7
- const currentVersion = packageVersion ?? "0.0.0-preview-6fd9ec48";
7
+ const currentVersion = packageVersion ?? "0.0.0-preview-c996a5fb";
8
8
  if (latestVersion > currentVersion) console.warn(`${pkgName}: new package version is available. Please update as soon as possible to enjoy the newest features. Current version: ${currentVersion}. Latest version: ${latestVersion}.`);
9
9
  } catch (_error) {}
10
10
  };
@@ -1,3 +1,3 @@
1
1
  export declare const name = "@lifi/sdk";
2
- export declare const version = "0.0.0-preview-6fd9ec48";
2
+ export declare const version = "0.0.0-preview-c996a5fb";
3
3
  //# sourceMappingURL=version.d.ts.map
@@ -1,6 +1,6 @@
1
1
  // src/version.ts
2
2
  const name = "@lifi/sdk";
3
- const version = "0.0.0-preview-6fd9ec48";
3
+ const version = "0.0.0-preview-c996a5fb";
4
4
  export { name, version };
5
5
 
6
6
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","names":[],"sources":["../../src/version.ts"],"sourcesContent":["export const name = '@lifi/sdk'\nexport const version = '0.0.0-preview-6fd9ec48'\n"],"mappings":";AAAA,MAAa,OAAO;AACpB,MAAa,UAAU"}
1
+ {"version":3,"file":"version.js","names":[],"sources":["../../src/version.ts"],"sourcesContent":["export const name = '@lifi/sdk'\nexport const version = '0.0.0-preview-c996a5fb'\n"],"mappings":";AAAA,MAAa,OAAO;AACpB,MAAa,UAAU"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/sdk",
3
- "version": "0.0.0-preview-6fd9ec48",
3
+ "version": "0.0.0-preview-c996a5fb",
4
4
  "description": "LI.FI SDK for Any-to-Any Cross-Chain-Swap",
5
5
  "homepage": "https://github.com/lifinance/sdk",
6
6
  "bugs": {
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export const name = '@lifi/sdk'
2
- export const version = '0.0.0-preview-6fd9ec48'
2
+ export const version = '0.0.0-preview-c996a5fb'