@sonarwatch/portfolio-plugins 0.14.133 → 0.14.135

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
@@ -2,6 +2,14 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.14.135](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.134...plugins-0.14.135) (2025-02-28)
6
+
7
+
8
+
9
+ ## [0.14.134](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.133...plugins-0.14.134) (2025-02-28)
10
+
11
+
12
+
5
13
  ## [0.14.133](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.132...plugins-0.14.133) (2025-02-27)
6
14
 
7
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.14.133",
3
+ "version": "0.14.135",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
@@ -28,6 +28,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
28
28
  label: 'DCA',
29
29
  ref: account.pubkey.toString(),
30
30
  link: 'https://jup.ag/recurring/',
31
+ contract: constants_1.dcaProgramId.toString(),
31
32
  });
32
33
  element.setTrade({
33
34
  inputAsset: {
@@ -1 +1 @@
1
- {"version":3,"file":"dcaFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/dcaFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,oDAAyD;AACzD,kDAAiE;AACjE,2CAAuD;AACvD,uCAAsC;AACtC,uCAAuC;AACvC,mFAAgF;AAEhF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG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AAC,MAAM,CAAC;aAClD;YACD,WAAW,EAAE;gBACX,OAAO,EAAE,OAAO,CAAC,UAAU;gBAC3B,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;aACxD;YACD,kBAAkB,EAAE,OAAO,CAAC,WAAW;YACvC,qBAAqB,EAAE,OAAO,CAAC,YAAY;YAC3C,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,GAAG,IAAI;SAC/C,CAAC,CAAC;IACL,CAAC;IAED,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,MAAM;IACvB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -37,6 +37,9 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
37
37
  ref: account.pubkey.toString(),
38
38
  link: 'https://jup.ag/trigger/',
39
39
  label: 'LimitOrder',
40
+ contract: isV1
41
+ ? constants_1.limitV1ProgramId.toString()
42
+ : constants_1.limitV2ProgramId.toString(),
40
43
  });
41
44
  element.setTrade({
42
45
  inputAsset: {
@@ -1 +1 @@
1
- {"version":3,"file":"limitFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/limitFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,oDAAyD;AACzD,kDAAiE;AACjE,2CAA6E;AAC7E,uCAAyC;AACzC,mFAAgF;AAChF,uCAAiE;AAEjE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACpC,KAAK;QACL,I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CAAC,YAAY,CAAC;aAC5D;YACD,kBAAkB,EAAE,OAAO,CAAC,eAAe;YAC3C,oBAAoB,EAAE,OAAO,CAAC,eAAe;YAC7C,qBAAqB,EAAE,CAAC;SACzB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"limitFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/limitFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,oDAAyD;AACzD,kDAAiE;AACjE,2CAA6E;AAC7E,uCAAyC;AACzC,mFAAgF;AAChF,uCAAiE;AAEjE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACpC,KAAK;QACL,IAAA,iCAAwB,EACtB,MAAM,EACN,0BAAgB,EAChB,4BAAgB,EAChB,IAAA,sBAAY,EAAC,KAAK,CAAC,CACpB;QACD,KAAK;QACL,IAAA,iCAAwB,EACtB,MAAM,EACN,4BAAkB,EAClB,4BAAgB,EAChB,IAAA,sBAAY,EAAC,KAAK,CAAC,CACpB;KACF,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACvC,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;IACpC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,eAAe,GA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E,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -152,6 +152,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
152
152
  value,
153
153
  },
154
154
  value,
155
+ contract: constants_1.perpsProgramId.toString(),
155
156
  },
156
157
  label: 'Leverage',
157
158
  networkId: portfolio_core_1.NetworkId.solana,
@@ -1 +1 @@
1
- {"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AACrC,6CAA4C;AAC5C,iCAA2B;AAG3B,oDAAyD;AACzD,kDAAgF;AAChF,wCAA+E;AAE/E,2CAKqB;AACrB,uCAAwE;AACxE,iDAOwB;AAExB,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC,CAAC;AACzC,MAAM,QAAQ,GAAoB,CAChC,KAAa,EACb,KAAY,EACyB,EAAE;;IACvC,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,gBAAgB,GAAG,MAAM,IAAA,iCAAwB,EACrD,MAAM,EACN,wBAAc,EACd,0BAAc,EACd,IAAA,mCAAyB,EAAC,KAAK,CAAC,CACjC,CAAC;IACF,IACE,gBAAgB,CAAC,MAAM,KAAK,CAAC;QAC7B,gBAAgB,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;QAErE,OAAO,EAAE,CAAC;IAEZ,MAAM,CAAC,iBAAiB,EAAE,YAAY,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACtE,KAAK,CAAC,OAAO,CAAgB,wBAAY,EAAE;YACzC,MAAM,EAAE,sBAAU;YAClB,SAAS,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AC3B,UAAU,EAAV,sBAAU;YACV,KAAK;SACN;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AACrC,6CAA4C;AAC5C,iCAA2B;AAG3B,oDAAyD;AACzD,kDAAgF;AAChF,wCAA+E;AAE/E,2CAKqB;AACrB,uCAAwE;AACxE,iDAOwB;AAExB,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC,CAAC;AACzC,MAAM,QAAQ,GAAoB,CAChC,KAAa,EACb,KAAY,EACyB,EAAE;;IACvC,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,gBAAgB,GAAG,MAAM,IAAA,iCAAwB,EACrD,MAAM,EACN,wBAAc,EACd,0BAAc,EACd,IAAA,mCAAyB,EAAC,KAAK,CAAC,CACjC,CAAC;IACF,IACE,gBAAgB,CAAC,MAAM,KAAK,CAAC;QAC7B,gBAAgB,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;QAErE,OAAO,EAAE,CAAC;IAEZ,MAAM,CAAC,iBAAiB,EAAE,YAAY,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACtE,KAAK,CAAC,OAAO,CAAgB,wBAAY,EAAE;YACzC,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC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C,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK;SACN;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -68,6 +68,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
68
68
  .div(Math.pow(10, outputTokenPrice.decimals))
69
69
  .toNumber(),
70
70
  ref: account.pubkey.toString(),
71
+ contract: constants_1.valueAverageProgramId.toString(),
71
72
  link: 'https://jup.ag/recurring/',
72
73
  },
73
74
  value: (0, portfolio_core_1.getUsdValueSum)([inputAsset.value, (outputAsset === null || outputAsset === void 0 ? void 0 : outputAsset.value) || 0]),
@@ -1 +1 @@
1
- {"version":3,"file":"valueAverageFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/valueAverageFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAGpC,2CAAgE;AAChE,oDAAyD;AACzD,kDAAiE;AACjE,wGAAgF;AAChF,uCAA+C;AAC/C,uCAAgD;AAEhD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,4BAAkB,EAClB,iCAAqB,EACrB,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACjD,QAAQ;SACL,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS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}
1
+ {"version":3,"file":"valueAverageFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/valueAverageFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAGpC,2CAAgE;AAChE,oDAAyD;AACzD,kDAAiE;AACjE,wGAAgF;AAChF,uCAA+C;AAC/C,uCAAgD;AAEhD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,4BAAkB,EAClB,iCAAqB,EACrB,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACjD,QAAQ;SACL,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;SAC7D,IAAI,EAAE,EACT,0BAAS,CAAC,MAAM,CACjB,CAAC;IAEF,MAAM,QAAQ,GAA4B,EAAE,CAAC;IAC7C,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,YAAY,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QAClD,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QACpD,MAAM,eAAe,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACtD,MAAM,gBAAgB,GAAG,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACxD,IAAI,CAAC,eAAe,IAAI,CAAC,gBAAgB;YAAE,SAAS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AS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;gBACnD,qBAAqB,EAAE,OAAO,CAAC,YAAY;qBACxC,GAAG,CAAC,SAAA,EAAE,EAAI,gBAAgB,CAAC,QAAQ,CAAA,CAAC;qBACpC,QAAQ,EAAE;gBACb,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE;gBAC9B,QAAQ,EAAE,iCAAqB,CAAC,QAAQ,EAAE;gBAC1C,IAAI,EAAE,2BAA2B;aAClC;YACD,KAAK,EAAE,IAAA,+BAAc,EAAC,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,KAAI,CAAC,CAAC,CAAC;SACnE,CAAC;QACF,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,gBAAgB;IACjC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -17,27 +17,34 @@ class ElementTradeBuilder extends ElementBuilder_1.ElementBuilder {
17
17
  this.params = params;
18
18
  }
19
19
  tokenAddresses() {
20
- var _a, _b;
20
+ if (!this.params)
21
+ return [];
21
22
  const mints = [];
22
- if ((_a = this.params) === null || _a === void 0 ? void 0 : _a.inputAsset)
23
- mints.push(...new AssetTokenBuilder_1.AssetTokenBuilder(this.params.inputAsset).tokenAddresses());
24
- if ((_b = this.params) === null || _b === void 0 ? void 0 : _b.outputAsset)
23
+ if (this.params.inputAsset)
24
+ mints.push(this.params.inputAsset.address.toString());
25
+ if (this.params.outputAsset)
25
26
  mints.push(this.params.outputAsset.address.toString());
26
27
  return mints;
27
28
  }
28
29
  get(networkId, platformId, tokenPrices) {
29
- var _a, _b, _c;
30
+ var _a, _b, _c, _d, _e, _f, _g;
30
31
  if (!this.params)
31
32
  return null;
32
- const inputAsset = new AssetTokenBuilder_1.AssetTokenBuilder(this.params.inputAsset).get(networkId, tokenPrices);
33
- if (!(inputAsset === null || inputAsset === void 0 ? void 0 : inputAsset.data.amount))
33
+ if ((!this.params.inputAsset.amount ||
34
+ ((_a = this.params.inputAsset.amount) === null || _a === void 0 ? void 0 : _a.toString()) === '0') &&
35
+ (!this.params.outputAsset.amount ||
36
+ ((_b = this.params.outputAsset.amount) === null || _b === void 0 ? void 0 : _b.toString()) === '0'))
34
37
  return null;
35
- const outputAsset = new bignumber_js_1.default(this.params.outputAsset.amount || 0).gt(0)
36
- ? new AssetTokenBuilder_1.AssetTokenBuilder({
37
- address: this.params.outputAsset.address.toString(),
38
- amount: new bignumber_js_1.default(this.params.outputAsset.amount || 0).toNumber(),
39
- }).get(networkId, tokenPrices)
40
- : null;
38
+ const inputAmount = new bignumber_js_1.default(((_c = this.params.inputAsset) === null || _c === void 0 ? void 0 : _c.amount) || 0);
39
+ const outputAmount = new bignumber_js_1.default(((_d = this.params.outputAsset) === null || _d === void 0 ? void 0 : _d.amount) || 0);
40
+ const inputAsset = new AssetTokenBuilder_1.AssetTokenBuilder({
41
+ address: this.params.inputAsset.address.toString(),
42
+ amount: inputAmount.toNumber(),
43
+ }).get(networkId, tokenPrices);
44
+ const outputAsset = new AssetTokenBuilder_1.AssetTokenBuilder({
45
+ address: this.params.outputAsset.address.toString(),
46
+ amount: outputAmount.toNumber(),
47
+ }).get(networkId, tokenPrices);
41
48
  const inputPrice = tokenPrices.get(this.params.inputAsset.address.toString());
42
49
  const outputPrice = tokenPrices.get(this.params.outputAsset.address.toString());
43
50
  if (!inputPrice)
@@ -69,17 +76,17 @@ class ElementTradeBuilder extends ElementBuilder_1.ElementBuilder {
69
76
  .toNumber()
70
77
  : undefined,
71
78
  filledPercentage: new bignumber_js_1.default(1)
72
- .minus(new bignumber_js_1.default(inputAsset.data.amount).dividedBy(initialInputAmount))
79
+ .minus(new bignumber_js_1.default((inputAsset === null || inputAsset === void 0 ? void 0 : inputAsset.data.amount) || 0).dividedBy(initialInputAmount))
73
80
  .toNumber(),
74
81
  inputPrice: inputPrice.price,
75
82
  outputPrice: (outputPrice === null || outputPrice === void 0 ? void 0 : outputPrice.price) || null,
76
- createdAt: (_a = this.params) === null || _a === void 0 ? void 0 : _a.createdAt,
77
- expireAt: (_b = this.params) === null || _b === void 0 ? void 0 : _b.expireAt,
78
- ref: (_c = this.ref) === null || _c === void 0 ? void 0 : _c.toString(),
83
+ createdAt: (_e = this.params) === null || _e === void 0 ? void 0 : _e.createdAt,
84
+ expireAt: (_f = this.params) === null || _f === void 0 ? void 0 : _f.expireAt,
85
+ ref: (_g = this.ref) === null || _g === void 0 ? void 0 : _g.toString(),
79
86
  sourceRefs: this.sourceRefs,
80
87
  link: this.link,
81
88
  },
82
- value: (0, portfolio_core_1.getUsdValueSum)([inputAsset.value, (outputAsset === null || outputAsset === void 0 ? void 0 : outputAsset.value) || 0]),
89
+ value: (0, portfolio_core_1.getUsdValueSum)([(inputAsset === null || inputAsset === void 0 ? void 0 : inputAsset.value) || 0, (outputAsset === null || outputAsset === void 0 ? void 0 : outputAsset.value) || 0]),
83
90
  };
84
91
  }
85
92
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ElementTradeBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementTradeBuilder.ts"],"names":[],"mappings":";;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AACrC,qDAAkD;AAGlD,2DAAwD;AAExD,MAAa,mBAAoB,SAAQ,+BAAc;IAGrD,qEAAqE;IACrE,YAAY,MAAc;QACxB,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAED,QAAQ,CAAC,MAAmB;QAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,cAAc;;QACZ,MAAM,KAAK,GAAG,EAAE,CAAC;QACjB,IAAI,MAAA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CAAC,oBAAoB,CAAC;yBAC5C,SAAS,CAAC,SAAA,EAAE,EAAI,WAAW,CAAC,QAAQ,CAAA,CAAC;yBACrC,QAAQ,EAAE;oBACf,CAAC,CAAC,SAAS;gBACf,gBAAgB,EAAE,IAAI,sBAAS,CAAC,CAAC,CAAC;qBAC/B,KAAK,CACJ,IAAI,sBAAS,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CACpE;qBACA,QAAQ,EAAE;gBACb,UAAU,EAAE,UAAU,CAAC,KAAK;gBAC5B,WAAW,EAAE,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,KAAI,IAAI;gBACvC,SAAS,EAAE,MAAA,IAAI,CAAC,MAAM,0CAAE,SAAS;gBACjC,QAAQ,EAAE,MAAA,IAAI,CAAC,MAAM,0CAAE,QAAQ;gBAC/B,GAAG,EAAE,MAAA,IAAI,CAAC,GAAG,0CAAE,QAAQ,EAAE;gBACzB,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB;YACD,KAAK,EAAE,IAAA,+BAAc,EAAC,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,KAAI,CAAC,CAAC,CAAC;SACnE,CAAC;IACJ,CAAC;CACF;AAnGD,kDAmGC"}
1
+ {"version":3,"file":"ElementTradeBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementTradeBuilder.ts"],"names":[],"mappings":";;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AACrC,qDAAkD;AAGlD,2DAAwD;AAExD,MAAa,mBAAoB,SAAQ,+BAAc;IAGrD,qEAAqE;IACrE,YAAY,MAAc;QACxB,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAED,QAAQ,CAAC,MAAmB;QAC1B,IAAI,CAAC,MAAM,GAA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,EAAE,IAAA,+BAAc,EAAC,CAAC,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,KAAI,CAAC,EAAE,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,KAAI,CAAC,CAAC,CAAC;SACzE,CAAC;IACJ,CAAC;CACF;AA7GD,kDA6GC"}
@@ -9,6 +9,7 @@ export type Params = {
9
9
  name?: string;
10
10
  tags?: string[];
11
11
  platformId?: string;
12
+ contract?: string;
12
13
  sourceRefs?: SourceRef[];
13
14
  ref?: string | PublicKey;
14
15
  link?: string;
@@ -71,9 +72,10 @@ export type PortfolioAssetTokenParams = {
71
72
  link?: string;
72
73
  };
73
74
  export type TradeParams = {
74
- inputAsset: PortfolioAssetTokenParams;
75
- outputAsset: {
76
- address: string | PublicKey;
75
+ inputAsset: Omit<PortfolioAssetTokenParams, 'amount'> & {
76
+ amount?: number | BigNumber | string;
77
+ };
78
+ outputAsset: Omit<PortfolioAssetTokenParams, 'amount'> & {
77
79
  amount?: number | BigNumber | string;
78
80
  };
79
81
  initialInputAmount: number | BigNumber | string;