@atomiqlabs/lp-lib 14.0.0-dev.7 → 14.0.0-dev.8

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.
@@ -11,6 +11,9 @@ export type FromBtcLnAutoConfig = FromBtcBaseConfig & {
11
11
  invoiceTimeoutSeconds?: number;
12
12
  minCltv: bigint;
13
13
  gracePeriod: bigint;
14
+ gasTokenMax: {
15
+ [chainId: string]: bigint;
16
+ };
14
17
  };
15
18
  export type FromBtcLnAutoRequestType = {
16
19
  address: string;
@@ -612,9 +612,17 @@ class FromBtcLnAuto extends FromBtcBaseSwapHandler_1.FromBtcBaseSwapHandler {
612
612
  await PluginManager_1.PluginManager.serviceInitialize(this);
613
613
  }
614
614
  getInfoData() {
615
+ const mappedDict = {};
616
+ for (let chainId in this.config.gasTokenMax) {
617
+ mappedDict[chainId] = {
618
+ gasToken: this.getChain(chainId).chainInterface.getNativeCurrencyAddress(),
619
+ max: this.config.gasTokenMax[chainId].toString(10)
620
+ };
621
+ }
615
622
  return {
616
623
  minCltv: Number(this.config.minCltv),
617
- invoiceTimeoutSeconds: this.config.invoiceTimeoutSeconds
624
+ invoiceTimeoutSeconds: this.config.invoiceTimeoutSeconds,
625
+ gasTokens: mappedDict
618
626
  };
619
627
  }
620
628
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomiqlabs/lp-lib",
3
- "version": "14.0.0-dev.7",
3
+ "version": "14.0.0-dev.8",
4
4
  "description": "Main functionality implementation for atomiq LP node",
5
5
  "main": "./dist/index.js",
6
6
  "types:": "./dist/index.d.ts",
@@ -23,7 +23,8 @@ import {LightningAssertions} from "../../assertions/LightningAssertions";
23
23
  export type FromBtcLnAutoConfig = FromBtcBaseConfig & {
24
24
  invoiceTimeoutSeconds?: number,
25
25
  minCltv: bigint,
26
- gracePeriod: bigint
26
+ gracePeriod: bigint,
27
+ gasTokenMax: {[chainId: string]: bigint}
27
28
  }
28
29
 
29
30
  export type FromBtcLnAutoRequestType = {
@@ -770,9 +771,17 @@ export class FromBtcLnAuto extends FromBtcBaseSwapHandler<FromBtcLnAutoSwap, Fro
770
771
  }
771
772
 
772
773
  getInfoData(): any {
774
+ const mappedDict = {};
775
+ for(let chainId in this.config.gasTokenMax) {
776
+ mappedDict[chainId] = {
777
+ gasToken: this.getChain(chainId).chainInterface.getNativeCurrencyAddress(),
778
+ max: this.config.gasTokenMax[chainId].toString(10)
779
+ };
780
+ }
773
781
  return {
774
782
  minCltv: Number(this.config.minCltv),
775
- invoiceTimeoutSeconds: this.config.invoiceTimeoutSeconds
783
+ invoiceTimeoutSeconds: this.config.invoiceTimeoutSeconds,
784
+ gasTokens: mappedDict
776
785
  };
777
786
  }
778
787