lynx-client 0.0.3 → 0.0.4

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.
Files changed (113) hide show
  1. package/dist/cjs/index.js +11 -0
  2. package/dist/cjs/lib/contractsIntegration/ChipsIntentsVerifierService/ChipsIntentsVerifierService.js +91 -0
  3. package/dist/cjs/lib/contractsIntegration/ChipsIntentsVerifierService/IChipsIntentsVerifierService.js +2 -0
  4. package/dist/cjs/lib/contractsIntegration/ChipsIntentsVerifierService/index.js +5 -0
  5. package/dist/cjs/lib/contractsIntegration/LiquidityIntentsVerifierService/ILiquidityIntentsVerifierService.js +2 -0
  6. package/dist/cjs/lib/contractsIntegration/LiquidityIntentsVerifierService/LiquidityIntentsVerifierService.js +70 -0
  7. package/dist/cjs/lib/contractsIntegration/LiquidityIntentsVerifierService/index.js +5 -0
  8. package/dist/cjs/lib/contractsIntegration/TradeIntentsVerifierService/ITradeIntentsVerifierService.js +2 -0
  9. package/dist/cjs/lib/contractsIntegration/TradeIntentsVerifierService/TradeIntentsVerifierService.js +99 -0
  10. package/dist/cjs/lib/contractsIntegration/TradeIntentsVerifierService/index.js +5 -0
  11. package/dist/cjs/lib/contractsIntegration/deployedContractsConnector.js +45 -0
  12. package/dist/cjs/lib/typechain/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1.js +2 -0
  13. package/dist/cjs/lib/typechain/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1.js +2 -0
  14. package/dist/cjs/lib/typechain/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1.js +2 -0
  15. package/dist/cjs/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.js +1129 -0
  16. package/dist/cjs/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.js +870 -0
  17. package/dist/cjs/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.js +1561 -0
  18. package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +1 -1
  19. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +1 -1
  20. package/dist/esm/index.d.ts +9 -0
  21. package/dist/esm/index.d.ts.map +1 -1
  22. package/dist/esm/index.js +11 -0
  23. package/dist/esm/lib/contractsIntegration/ChipsIntentsVerifierService/ChipsIntentsVerifierService.d.ts +29 -0
  24. package/dist/esm/lib/contractsIntegration/ChipsIntentsVerifierService/ChipsIntentsVerifierService.d.ts.map +1 -0
  25. package/dist/esm/lib/contractsIntegration/ChipsIntentsVerifierService/ChipsIntentsVerifierService.js +91 -0
  26. package/dist/esm/lib/contractsIntegration/ChipsIntentsVerifierService/IChipsIntentsVerifierService.d.ts +24 -0
  27. package/dist/esm/lib/contractsIntegration/ChipsIntentsVerifierService/IChipsIntentsVerifierService.d.ts.map +1 -0
  28. package/dist/esm/lib/contractsIntegration/ChipsIntentsVerifierService/IChipsIntentsVerifierService.js +2 -0
  29. package/dist/esm/lib/contractsIntegration/ChipsIntentsVerifierService/index.d.ts +4 -0
  30. package/dist/esm/lib/contractsIntegration/ChipsIntentsVerifierService/index.d.ts.map +1 -0
  31. package/dist/esm/lib/contractsIntegration/ChipsIntentsVerifierService/index.js +5 -0
  32. package/dist/esm/lib/contractsIntegration/LiquidityIntentsVerifierService/ILiquidityIntentsVerifierService.d.ts +17 -0
  33. package/dist/esm/lib/contractsIntegration/LiquidityIntentsVerifierService/ILiquidityIntentsVerifierService.d.ts.map +1 -0
  34. package/dist/esm/lib/contractsIntegration/LiquidityIntentsVerifierService/ILiquidityIntentsVerifierService.js +2 -0
  35. package/dist/esm/lib/contractsIntegration/LiquidityIntentsVerifierService/LiquidityIntentsVerifierService.d.ts +22 -0
  36. package/dist/esm/lib/contractsIntegration/LiquidityIntentsVerifierService/LiquidityIntentsVerifierService.d.ts.map +1 -0
  37. package/dist/esm/lib/contractsIntegration/LiquidityIntentsVerifierService/LiquidityIntentsVerifierService.js +70 -0
  38. package/dist/esm/lib/contractsIntegration/LiquidityIntentsVerifierService/index.d.ts +4 -0
  39. package/dist/esm/lib/contractsIntegration/LiquidityIntentsVerifierService/index.d.ts.map +1 -0
  40. package/dist/esm/lib/contractsIntegration/LiquidityIntentsVerifierService/index.js +5 -0
  41. package/dist/esm/lib/contractsIntegration/TradeIntentsVerifierService/ITradeIntentsVerifierService.d.ts +24 -0
  42. package/dist/esm/lib/contractsIntegration/TradeIntentsVerifierService/ITradeIntentsVerifierService.d.ts.map +1 -0
  43. package/dist/esm/lib/contractsIntegration/TradeIntentsVerifierService/ITradeIntentsVerifierService.js +2 -0
  44. package/dist/esm/lib/contractsIntegration/TradeIntentsVerifierService/TradeIntentsVerifierService.d.ts +29 -0
  45. package/dist/esm/lib/contractsIntegration/TradeIntentsVerifierService/TradeIntentsVerifierService.d.ts.map +1 -0
  46. package/dist/esm/lib/contractsIntegration/TradeIntentsVerifierService/TradeIntentsVerifierService.js +99 -0
  47. package/dist/esm/lib/contractsIntegration/TradeIntentsVerifierService/index.d.ts +4 -0
  48. package/dist/esm/lib/contractsIntegration/TradeIntentsVerifierService/index.d.ts.map +1 -0
  49. package/dist/esm/lib/contractsIntegration/TradeIntentsVerifierService/index.js +5 -0
  50. package/dist/esm/lib/contractsIntegration/deployedContractsConnector.d.ts +15 -0
  51. package/dist/esm/lib/contractsIntegration/deployedContractsConnector.d.ts.map +1 -1
  52. package/dist/esm/lib/contractsIntegration/deployedContractsConnector.js +45 -0
  53. package/dist/esm/lib/typechain/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1.d.ts +643 -0
  54. package/dist/esm/lib/typechain/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1.d.ts.map +1 -0
  55. package/dist/esm/lib/typechain/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1.js +2 -0
  56. package/dist/esm/lib/typechain/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1.d.ts +508 -0
  57. package/dist/esm/lib/typechain/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1.d.ts.map +1 -0
  58. package/dist/esm/lib/typechain/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1.js +2 -0
  59. package/dist/esm/lib/typechain/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1.d.ts +832 -0
  60. package/dist/esm/lib/typechain/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1.d.ts.map +1 -0
  61. package/dist/esm/lib/typechain/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1.js +2 -0
  62. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.d.ts +866 -0
  63. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.d.ts.map +1 -0
  64. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.js +1129 -0
  65. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.d.ts +670 -0
  66. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.d.ts.map +1 -0
  67. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.js +870 -0
  68. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.d.ts +1201 -0
  69. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.d.ts.map +1 -0
  70. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.js +1561 -0
  71. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +1 -1
  72. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -1
  73. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +1 -1
  74. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +1 -1
  75. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +1 -1
  76. package/dist/types/index.d.ts +9 -0
  77. package/dist/types/index.d.ts.map +1 -1
  78. package/dist/types/lib/contractsIntegration/ChipsIntentsVerifierService/ChipsIntentsVerifierService.d.ts +29 -0
  79. package/dist/types/lib/contractsIntegration/ChipsIntentsVerifierService/ChipsIntentsVerifierService.d.ts.map +1 -0
  80. package/dist/types/lib/contractsIntegration/ChipsIntentsVerifierService/IChipsIntentsVerifierService.d.ts +24 -0
  81. package/dist/types/lib/contractsIntegration/ChipsIntentsVerifierService/IChipsIntentsVerifierService.d.ts.map +1 -0
  82. package/dist/types/lib/contractsIntegration/ChipsIntentsVerifierService/index.d.ts +4 -0
  83. package/dist/types/lib/contractsIntegration/ChipsIntentsVerifierService/index.d.ts.map +1 -0
  84. package/dist/types/lib/contractsIntegration/LiquidityIntentsVerifierService/ILiquidityIntentsVerifierService.d.ts +17 -0
  85. package/dist/types/lib/contractsIntegration/LiquidityIntentsVerifierService/ILiquidityIntentsVerifierService.d.ts.map +1 -0
  86. package/dist/types/lib/contractsIntegration/LiquidityIntentsVerifierService/LiquidityIntentsVerifierService.d.ts +22 -0
  87. package/dist/types/lib/contractsIntegration/LiquidityIntentsVerifierService/LiquidityIntentsVerifierService.d.ts.map +1 -0
  88. package/dist/types/lib/contractsIntegration/LiquidityIntentsVerifierService/index.d.ts +4 -0
  89. package/dist/types/lib/contractsIntegration/LiquidityIntentsVerifierService/index.d.ts.map +1 -0
  90. package/dist/types/lib/contractsIntegration/TradeIntentsVerifierService/ITradeIntentsVerifierService.d.ts +24 -0
  91. package/dist/types/lib/contractsIntegration/TradeIntentsVerifierService/ITradeIntentsVerifierService.d.ts.map +1 -0
  92. package/dist/types/lib/contractsIntegration/TradeIntentsVerifierService/TradeIntentsVerifierService.d.ts +29 -0
  93. package/dist/types/lib/contractsIntegration/TradeIntentsVerifierService/TradeIntentsVerifierService.d.ts.map +1 -0
  94. package/dist/types/lib/contractsIntegration/TradeIntentsVerifierService/index.d.ts +4 -0
  95. package/dist/types/lib/contractsIntegration/TradeIntentsVerifierService/index.d.ts.map +1 -0
  96. package/dist/types/lib/contractsIntegration/deployedContractsConnector.d.ts +15 -0
  97. package/dist/types/lib/contractsIntegration/deployedContractsConnector.d.ts.map +1 -1
  98. package/dist/types/lib/typechain/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1.d.ts +643 -0
  99. package/dist/types/lib/typechain/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1.d.ts.map +1 -0
  100. package/dist/types/lib/typechain/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1.d.ts +508 -0
  101. package/dist/types/lib/typechain/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1.d.ts.map +1 -0
  102. package/dist/types/lib/typechain/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1.d.ts +832 -0
  103. package/dist/types/lib/typechain/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1.d.ts.map +1 -0
  104. package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.d.ts +866 -0
  105. package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.d.ts.map +1 -0
  106. package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.d.ts +670 -0
  107. package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.d.ts.map +1 -0
  108. package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.d.ts +1201 -0
  109. package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.d.ts.map +1 -0
  110. package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +1 -1
  111. package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -1
  112. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +1 -1
  113. package/package.json +1 -1
package/dist/cjs/index.js CHANGED
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.TradeIntentsVerifierService = exports.LiquidityIntentsVerifierService = exports.ChipsIntentsVerifierService = void 0;
17
18
  __exportStar(require("./lib/chains/chainConstants"), exports);
18
19
  __exportStar(require("./lib/chains/chainTypes"), exports);
19
20
  __exportStar(require("./lib/utils/addresses"), exports);
@@ -40,6 +41,12 @@ __exportStar(require("./lib/addresses/systemAddresses"), exports);
40
41
  __exportStar(require("./lib/contractsIntegration/deployedContractsConnector"), exports);
41
42
  __exportStar(require("./lib/contractsIntegration/TradersPortalService"), exports);
42
43
  __exportStar(require("./lib/contractsIntegration/TradingFloorService"), exports);
44
+ var ChipsIntentsVerifierService_1 = require("./lib/contractsIntegration/ChipsIntentsVerifierService");
45
+ Object.defineProperty(exports, "ChipsIntentsVerifierService", { enumerable: true, get: function () { return ChipsIntentsVerifierService_1.ChipsIntentsVerifierService; } });
46
+ var LiquidityIntentsVerifierService_1 = require("./lib/contractsIntegration/LiquidityIntentsVerifierService");
47
+ Object.defineProperty(exports, "LiquidityIntentsVerifierService", { enumerable: true, get: function () { return LiquidityIntentsVerifierService_1.LiquidityIntentsVerifierService; } });
48
+ var TradeIntentsVerifierService_1 = require("./lib/contractsIntegration/TradeIntentsVerifierService");
49
+ Object.defineProperty(exports, "TradeIntentsVerifierService", { enumerable: true, get: function () { return TradeIntentsVerifierService_1.TradeIntentsVerifierService; } });
43
50
  __exportStar(require("./lib/contractsIntegration/IntentsVerifierLensService"), exports);
44
51
  __exportStar(require("./lib/contractsIntegration/TriggersAndPortalLensService"), exports);
45
52
  __exportStar(require("./lib/contractsIntegration/TradingFloorLensService"), exports);
@@ -48,9 +55,13 @@ __exportStar(require("./lib/typechain/contracts/Peripheral/Lens/IntentsVerifierL
48
55
  __exportStar(require("./lib/typechain/contracts/Peripheral/Lens/TriggersAndPortalLens"), exports);
49
56
  __exportStar(require("./lib/typechain/contracts/Peripheral/Lens/LexLens"), exports);
50
57
  __exportStar(require("./lib/typechain/contracts/Peripheral/Lens/TradingFloorLens"), exports);
58
+ // Intents Verifier types are exported through their respective services to avoid conflicts
51
59
  __exportStar(require("./lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory"), exports);
52
60
  __exportStar(require("./lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory"), exports);
53
61
  __exportStar(require("./lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory"), exports);
54
62
  __exportStar(require("./lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory"), exports);
63
+ __exportStar(require("./lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory"), exports);
64
+ __exportStar(require("./lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory"), exports);
65
+ __exportStar(require("./lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory"), exports);
55
66
  // Developer Experience utilities
56
67
  __exportStar(require("./lib/devex"), exports);
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChipsIntentsVerifierService = void 0;
4
+ const ChipsIntentsVerifierV1__factory_1 = require("../../typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory");
5
+ class ChipsIntentsVerifierService {
6
+ constructor(signerOrProvider, address) {
7
+ this.contract = ChipsIntentsVerifierV1__factory_1.ChipsIntentsVerifierV1__factory.connect(address, signerOrProvider);
8
+ this.isSigner = 'sendTransaction' in signerOrProvider;
9
+ }
10
+ async domainSeparatorForAsset(chip) {
11
+ return await this.contract.domainSeparatorForAsset(chip);
12
+ }
13
+ async domainSeparatorForChain(chainId) {
14
+ return await this.contract.domainSeparatorForChain(chainId);
15
+ }
16
+ async chipOutFeeForChip(chip) {
17
+ return await this.contract.chipOutFeeForChip(chip);
18
+ }
19
+ async feesReceiver() {
20
+ return await this.contract.feesReceiver();
21
+ }
22
+ async intentsPermissions(user) {
23
+ return await this.contract.intentsPermissions(user);
24
+ }
25
+ async setIntentsPermissions(oftChip, dynAddressSuffix) {
26
+ if (!this.isSigner) {
27
+ throw new Error("ChipsIntentsVerifierService: Write operations require a signer");
28
+ }
29
+ const tx = await this.contract.setIntentsPermissions(oftChip, dynAddressSuffix);
30
+ await tx.wait();
31
+ }
32
+ async forceChipOut(chip, holder, amount, value) {
33
+ if (!this.isSigner) {
34
+ throw new Error("ChipsIntentsVerifierService: Write operations require a signer");
35
+ }
36
+ const tx = await this.contract.forceChipOut(chip, holder, amount, { value: value || 0n });
37
+ await tx.wait();
38
+ }
39
+ async interactOnBehalf_chipOut(chip, holder, amount, value) {
40
+ if (!this.isSigner) {
41
+ throw new Error("ChipsIntentsVerifierService: Write operations require a signer");
42
+ }
43
+ const tx = await this.contract.interactOnBehalf_chipOut(chip, holder, amount, { value: value || 0n });
44
+ await tx.wait();
45
+ }
46
+ async verifyIntent_chipOut(payload, v, r, s, value) {
47
+ if (!this.isSigner) {
48
+ throw new Error("ChipsIntentsVerifierService: Write operations require a signer");
49
+ }
50
+ const tx = await this.contract.verifyIntent_chipOut(payload, v, r, s, { value: value || 0n });
51
+ await tx.wait();
52
+ }
53
+ async verifyIntent_chipOutAndUnwrap(payload, v, r, s, value) {
54
+ if (!this.isSigner) {
55
+ throw new Error("ChipsIntentsVerifierService: Write operations require a signer");
56
+ }
57
+ const tx = await this.contract.verifyIntent_chipOutAndUnwrap(payload, v, r, s, { value: value || 0n });
58
+ await tx.wait();
59
+ }
60
+ async getLZDstChainIdFromChip(chip) {
61
+ return await this.contract.getLZDstChainIdFromChip(chip);
62
+ }
63
+ async getLZDstChainIdFromEvmChainId(evmChainId) {
64
+ return await this.contract.getLZDstChainIdFromEvmChainId(evmChainId);
65
+ }
66
+ async evmIdToLzEid(evmChainId) {
67
+ return await this.contract.evmIdToLzEid(evmChainId);
68
+ }
69
+ async getWrapNativeChipInOutHelper(oftChip) {
70
+ return await this.contract.getWrapNativeChipInOutHelper(oftChip);
71
+ }
72
+ async sourceChainIdForAsset(asset) {
73
+ return await this.contract.sourceChainIdForAsset(asset);
74
+ }
75
+ async processedSignatures(signature) {
76
+ return await this.contract.processedSignatures(signature);
77
+ }
78
+ async admin() {
79
+ return await this.contract.admin();
80
+ }
81
+ async pendingAdmin() {
82
+ return await this.contract.pendingAdmin();
83
+ }
84
+ async registry() {
85
+ return await this.contract.registry();
86
+ }
87
+ async wrapNativeChipInOutHelpers(oftChip) {
88
+ return await this.contract.wrapNativeChipInOutHelpers(oftChip);
89
+ }
90
+ }
91
+ exports.ChipsIntentsVerifierService = ChipsIntentsVerifierService;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChipsIntentsVerifierService = void 0;
4
+ var ChipsIntentsVerifierService_1 = require("./ChipsIntentsVerifierService");
5
+ Object.defineProperty(exports, "ChipsIntentsVerifierService", { enumerable: true, get: function () { return ChipsIntentsVerifierService_1.ChipsIntentsVerifierService; } });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LiquidityIntentsVerifierService = void 0;
4
+ const LiquidityIntentsVerifierV1__factory_1 = require("../../typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory");
5
+ class LiquidityIntentsVerifierService {
6
+ constructor(signerOrProvider, address) {
7
+ this.contract = LiquidityIntentsVerifierV1__factory_1.LiquidityIntentsVerifierV1__factory.connect(address, signerOrProvider);
8
+ this.isSigner = 'sendTransaction' in signerOrProvider;
9
+ }
10
+ async domainSeparatorForAsset(pool) {
11
+ return await this.contract.domainSeparatorForAsset(pool);
12
+ }
13
+ async domainSeparatorForChain(chainId) {
14
+ return await this.contract.domainSeparatorForChain(chainId);
15
+ }
16
+ async intentsPermissions(user) {
17
+ return await this.contract.intentsPermissions(user);
18
+ }
19
+ async setIntentsPermissions(oftChip, dynAddressSuffix) {
20
+ if (!this.isSigner) {
21
+ throw new Error("LiquidityIntentsVerifierService: Write operations require a signer");
22
+ }
23
+ const tx = await this.contract.setIntentsPermissions(oftChip, dynAddressSuffix);
24
+ await tx.wait();
25
+ }
26
+ async interactOnBehalf_epochDeposit(pool, liquidityProvider, amount, minAmountOut, domain, referralCode, value) {
27
+ if (!this.isSigner) {
28
+ throw new Error("LiquidityIntentsVerifierService: Write operations require a signer");
29
+ }
30
+ const tx = await this.contract.interactOnBehalf_epochDeposit(pool, liquidityProvider, amount, minAmountOut, domain, referralCode, { value: value || 0n });
31
+ await tx.wait();
32
+ }
33
+ async interactOnBehalf_epochRedeem(pool, liquidityProvider, amount, minAmountOut, value) {
34
+ if (!this.isSigner) {
35
+ throw new Error("LiquidityIntentsVerifierService: Write operations require a signer");
36
+ }
37
+ const tx = await this.contract.interactOnBehalf_epochRedeem(pool, liquidityProvider, amount, minAmountOut, { value: value || 0n });
38
+ await tx.wait();
39
+ }
40
+ async verifyIntent_epochDeposit(payload, v, r, s, domain, referralCode, value) {
41
+ if (!this.isSigner) {
42
+ throw new Error("LiquidityIntentsVerifierService: Write operations require a signer");
43
+ }
44
+ const tx = await this.contract.verifyIntent_epochDeposit(payload, v, r, s, domain, referralCode, { value: value || 0n });
45
+ await tx.wait();
46
+ }
47
+ async verifyIntent_epochRedeem(payload, v, r, s, value) {
48
+ if (!this.isSigner) {
49
+ throw new Error("LiquidityIntentsVerifierService: Write operations require a signer");
50
+ }
51
+ const tx = await this.contract.verifyIntent_epochRedeem(payload, v, r, s, { value: value || 0n });
52
+ await tx.wait();
53
+ }
54
+ async admin() {
55
+ return await this.contract.admin();
56
+ }
57
+ async pendingAdmin() {
58
+ return await this.contract.pendingAdmin();
59
+ }
60
+ async registry() {
61
+ return await this.contract.registry();
62
+ }
63
+ async sourceChainIdForAsset(asset) {
64
+ return await this.contract.sourceChainIdForAsset(asset);
65
+ }
66
+ async processedSignatures(signature) {
67
+ return await this.contract.processedSignatures(signature);
68
+ }
69
+ }
70
+ exports.LiquidityIntentsVerifierService = LiquidityIntentsVerifierService;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LiquidityIntentsVerifierService = void 0;
4
+ var LiquidityIntentsVerifierService_1 = require("./LiquidityIntentsVerifierService");
5
+ Object.defineProperty(exports, "LiquidityIntentsVerifierService", { enumerable: true, get: function () { return LiquidityIntentsVerifierService_1.LiquidityIntentsVerifierService; } });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TradeIntentsVerifierService = void 0;
4
+ const TradeIntentsVerifierV1__factory_1 = require("../../typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory");
5
+ class TradeIntentsVerifierService {
6
+ constructor(signerOrProvider, address) {
7
+ this.contract = TradeIntentsVerifierV1__factory_1.TradeIntentsVerifierV1__factory.connect(address, signerOrProvider);
8
+ this.isSigner = 'sendTransaction' in signerOrProvider;
9
+ }
10
+ async domainSeparatorForAsset(settlementAsset) {
11
+ return await this.contract.domainSeparatorForAsset(settlementAsset);
12
+ }
13
+ async domainSeparatorForChain(chainId) {
14
+ return await this.contract.domainSeparatorForChain(chainId);
15
+ }
16
+ async intentsPermissions(user) {
17
+ return await this.contract.intentsPermissions(user);
18
+ }
19
+ async setIntentsPermissions(oftChip, dynAddressSuffix) {
20
+ if (!this.isSigner) {
21
+ throw new Error("TradeIntentsVerifierService: Write operations require a signer");
22
+ }
23
+ const tx = await this.contract.setIntentsPermissions(oftChip, dynAddressSuffix);
24
+ await tx.wait();
25
+ }
26
+ async verifyIntent_traderRequest_openNewPosition(payload, v, r, s, domain, referralCode, runCapTests, value) {
27
+ if (!this.isSigner) {
28
+ throw new Error("TradeIntentsVerifierService: Write operations require a signer");
29
+ }
30
+ const tx = await this.contract.verifyIntent_traderRequest_openNewPosition(payload, v, r, s, domain, referralCode, runCapTests, { value: value || 0n });
31
+ await tx.wait();
32
+ }
33
+ async verifyIntent_traderRequest_marketClosePosition(payload, v, r, s, value) {
34
+ if (!this.isSigner) {
35
+ throw new Error("TradeIntentsVerifierService: Write operations require a signer");
36
+ }
37
+ const tx = await this.contract.verifyIntent_traderRequest_marketClosePosition(payload, v, r, s, { value: value || 0n });
38
+ await tx.wait();
39
+ }
40
+ async verifyIntent_traderAction_updatePendingLimitPosition(payload, v, r, s, value) {
41
+ if (!this.isSigner) {
42
+ throw new Error("TradeIntentsVerifierService: Write operations require a signer");
43
+ }
44
+ const tx = await this.contract.verifyIntent_traderAction_updatePendingLimitPosition(payload, v, r, s, { value: value || 0n });
45
+ await tx.wait();
46
+ }
47
+ async verifyIntent_traderAction_cancelPendingLimitPosition(payload, v, r, s, value) {
48
+ if (!this.isSigner) {
49
+ throw new Error("TradeIntentsVerifierService: Write operations require a signer");
50
+ }
51
+ const tx = await this.contract.verifyIntent_traderAction_cancelPendingLimitPosition(payload, v, r, s, { value: value || 0n });
52
+ await tx.wait();
53
+ }
54
+ async verifyIntent_traderRequest_updatePositionSingleField(payload, v, r, s, value) {
55
+ if (!this.isSigner) {
56
+ throw new Error("TradeIntentsVerifierService: Write operations require a signer");
57
+ }
58
+ const tx = await this.contract.verifyIntent_traderRequest_updatePositionSingleField(payload, v, r, s, { value: value || 0n });
59
+ await tx.wait();
60
+ }
61
+ async verifyIntent_traderRequest_updatePositionDoubleField(payload, v, r, s, value) {
62
+ if (!this.isSigner) {
63
+ throw new Error("TradeIntentsVerifierService: Write operations require a signer");
64
+ }
65
+ const tx = await this.contract.verifyIntent_traderRequest_updatePositionDoubleField(payload, v, r, s, { value: value || 0n });
66
+ await tx.wait();
67
+ }
68
+ async admin() {
69
+ return await this.contract.admin();
70
+ }
71
+ async pendingAdmin() {
72
+ return await this.contract.pendingAdmin();
73
+ }
74
+ async registry() {
75
+ return await this.contract.registry();
76
+ }
77
+ async sourceChainIdForAsset(asset) {
78
+ return await this.contract.sourceChainIdForAsset(asset);
79
+ }
80
+ async processedSignatures(signature) {
81
+ return await this.contract.processedSignatures(signature);
82
+ }
83
+ async domainSeparatorsForPosition(positionId) {
84
+ return await this.contract.domainSeparatorsForPosition(positionId);
85
+ }
86
+ async tradersForPosition(positionId) {
87
+ return await this.contract.tradersForPosition(positionId);
88
+ }
89
+ async settlementAssetsForPosition(positionId) {
90
+ return await this.contract.settlementAssetsForPosition(positionId);
91
+ }
92
+ async getTradingFloor() {
93
+ return await this.contract.getTradingFloor();
94
+ }
95
+ async getTradersPortal() {
96
+ return await this.contract.getTradersPortal();
97
+ }
98
+ }
99
+ exports.TradeIntentsVerifierService = TradeIntentsVerifierService;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TradeIntentsVerifierService = void 0;
4
+ var TradeIntentsVerifierService_1 = require("./TradeIntentsVerifierService");
5
+ Object.defineProperty(exports, "TradeIntentsVerifierService", { enumerable: true, get: function () { return TradeIntentsVerifierService_1.TradeIntentsVerifierService; } });
@@ -17,10 +17,19 @@ exports.connectToLatestTriggersForSigner = connectToLatestTriggersForSigner;
17
17
  exports.connectToLatestTriggers = connectToLatestTriggers;
18
18
  exports.connectToTradingFloorLens = connectToTradingFloorLens;
19
19
  exports.connectToLeXLens = connectToLeXLens;
20
+ exports.connectToChipsIntentsVerifierForSigner = connectToChipsIntentsVerifierForSigner;
21
+ exports.connectToChipsIntentsVerifier = connectToChipsIntentsVerifier;
22
+ exports.connectToLiquidityIntentsVerifierForSigner = connectToLiquidityIntentsVerifierForSigner;
23
+ exports.connectToLiquidityIntentsVerifier = connectToLiquidityIntentsVerifier;
24
+ exports.connectToTradeIntentsVerifierForSigner = connectToTradeIntentsVerifierForSigner;
25
+ exports.connectToTradeIntentsVerifier = connectToTradeIntentsVerifier;
20
26
  exports.createIntentsVerifierLensService = createIntentsVerifierLensService;
21
27
  exports.createTriggersAndPortalLensService = createTriggersAndPortalLensService;
22
28
  exports.createTradingFloorLensService = createTradingFloorLensService;
23
29
  exports.createLexLensService = createLexLensService;
30
+ exports.createChipsIntentsVerifierService = createChipsIntentsVerifierService;
31
+ exports.createLiquidityIntentsVerifierService = createLiquidityIntentsVerifierService;
32
+ exports.createTradeIntentsVerifierService = createTradeIntentsVerifierService;
24
33
  const TradingFloorLens__factory_1 = require("../typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory");
25
34
  const LexLens__factory_1 = require("../typechain/factories/contracts/Peripheral/Lens/LexLens__factory");
26
35
  const RegistryProxy__factory_1 = require("../typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory");
@@ -35,6 +44,12 @@ const IntentsVerifierLensService_1 = require("./IntentsVerifierLensService");
35
44
  const TriggersAndPortalLensService_1 = require("./TriggersAndPortalLensService");
36
45
  const TradingFloorLensService_1 = require("./TradingFloorLensService");
37
46
  const LexLensService_1 = require("./LexLensService");
47
+ const ChipsIntentsVerifierV1__factory_1 = require("../typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory");
48
+ const LiquidityIntentsVerifierV1__factory_1 = require("../typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory");
49
+ const TradeIntentsVerifierV1__factory_1 = require("../typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory");
50
+ const ChipsIntentsVerifierService_1 = require("./ChipsIntentsVerifierService");
51
+ const LiquidityIntentsVerifierService_1 = require("./LiquidityIntentsVerifierService");
52
+ const TradeIntentsVerifierService_1 = require("./TradeIntentsVerifierService");
38
53
  //
39
54
  // ***** Registry & Proxy *****
40
55
  //
@@ -117,6 +132,27 @@ function connectToLeXLens(provider, address) {
117
132
  return LexLens__factory_1.LexLens__factory.connect(address, provider);
118
133
  }
119
134
  //
135
+ // ***** Intents Verifiers *****
136
+ //
137
+ function connectToChipsIntentsVerifierForSigner(signer, address) {
138
+ return ChipsIntentsVerifierV1__factory_1.ChipsIntentsVerifierV1__factory.connect(address, signer);
139
+ }
140
+ function connectToChipsIntentsVerifier(provider, address) {
141
+ return ChipsIntentsVerifierV1__factory_1.ChipsIntentsVerifierV1__factory.connect(address, provider);
142
+ }
143
+ function connectToLiquidityIntentsVerifierForSigner(signer, address) {
144
+ return LiquidityIntentsVerifierV1__factory_1.LiquidityIntentsVerifierV1__factory.connect(address, signer);
145
+ }
146
+ function connectToLiquidityIntentsVerifier(provider, address) {
147
+ return LiquidityIntentsVerifierV1__factory_1.LiquidityIntentsVerifierV1__factory.connect(address, provider);
148
+ }
149
+ function connectToTradeIntentsVerifierForSigner(signer, address) {
150
+ return TradeIntentsVerifierV1__factory_1.TradeIntentsVerifierV1__factory.connect(address, signer);
151
+ }
152
+ function connectToTradeIntentsVerifier(provider, address) {
153
+ return TradeIntentsVerifierV1__factory_1.TradeIntentsVerifierV1__factory.connect(address, provider);
154
+ }
155
+ //
120
156
  // ***** Lens Services *****
121
157
  //
122
158
  function createIntentsVerifierLensService(signerOrProvider, address) {
@@ -131,3 +167,12 @@ function createTradingFloorLensService(signerOrProvider, address) {
131
167
  function createLexLensService(signerOrProvider, address) {
132
168
  return new LexLensService_1.LexLensService(signerOrProvider, address);
133
169
  }
170
+ function createChipsIntentsVerifierService(signerOrProvider, address) {
171
+ return new ChipsIntentsVerifierService_1.ChipsIntentsVerifierService(signerOrProvider, address);
172
+ }
173
+ function createLiquidityIntentsVerifierService(signerOrProvider, address) {
174
+ return new LiquidityIntentsVerifierService_1.LiquidityIntentsVerifierService(signerOrProvider, address);
175
+ }
176
+ function createTradeIntentsVerifierService(signerOrProvider, address) {
177
+ return new TradeIntentsVerifierService_1.TradeIntentsVerifierService(signerOrProvider, address);
178
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });