@varla/polymarket 2.4.1 → 2.5.0

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,5 +1,13 @@
1
1
  # @varla/polymarket
2
2
 
3
+ ## 2.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 1df12f9: Added the neg-risk merge adapter ABI export for unwind operations.
8
+
9
+ - Added the negRiskMergeAdapterAbi definition and export in the ABI index.
10
+
3
11
  ## 2.4.1
4
12
 
5
13
  ### Patch Changes
@@ -5,4 +5,5 @@
5
5
  */
6
6
  export { ctfExchangeAbi } from "./ctf-exchange.js";
7
7
  export { erc20Abi } from "./erc20.js";
8
+ export { negRiskMergeAdapterAbi } from "./neg-risk-merge-adapter.js";
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/abi/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/abi/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Polymarket Neg Risk Merge Adapter ABI.
3
+ *
4
+ * Used for neg-risk market unwind operations where adapter methods unwrap
5
+ * wrapped collateral back into real collateral.
6
+ */
7
+ export declare const negRiskMergeAdapterAbi: readonly [{
8
+ readonly type: "function";
9
+ readonly name: "mergePositions";
10
+ readonly stateMutability: "nonpayable";
11
+ readonly inputs: readonly [{
12
+ readonly name: "_conditionId";
13
+ readonly type: "bytes32";
14
+ }, {
15
+ readonly name: "_amount";
16
+ readonly type: "uint256";
17
+ }];
18
+ readonly outputs: readonly [];
19
+ }, {
20
+ readonly type: "function";
21
+ readonly name: "redeemPositions";
22
+ readonly stateMutability: "nonpayable";
23
+ readonly inputs: readonly [{
24
+ readonly name: "_conditionId";
25
+ readonly type: "bytes32";
26
+ }, {
27
+ readonly name: "_amounts";
28
+ readonly type: "uint256[]";
29
+ }];
30
+ readonly outputs: readonly [];
31
+ }];
32
+ //# sourceMappingURL=neg-risk-merge-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"neg-risk-merge-adapter.d.ts","sourceRoot":"","sources":["../../src/abi/neg-risk-merge-adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;EAqBzB,CAAC"}
package/dist/index.js CHANGED
@@ -524,6 +524,29 @@ var erc20Abi = [
524
524
  type: "event"
525
525
  }
526
526
  ];
527
+ // src/abi/neg-risk-merge-adapter.ts
528
+ var negRiskMergeAdapterAbi = [
529
+ {
530
+ type: "function",
531
+ name: "mergePositions",
532
+ stateMutability: "nonpayable",
533
+ inputs: [
534
+ { name: "_conditionId", type: "bytes32" },
535
+ { name: "_amount", type: "uint256" }
536
+ ],
537
+ outputs: []
538
+ },
539
+ {
540
+ type: "function",
541
+ name: "redeemPositions",
542
+ stateMutability: "nonpayable",
543
+ inputs: [
544
+ { name: "_conditionId", type: "bytes32" },
545
+ { name: "_amounts", type: "uint256[]" }
546
+ ],
547
+ outputs: []
548
+ }
549
+ ];
527
550
  // src/endpoints.ts
528
551
  var POLYMARKET_ENDPOINTS = {
529
552
  gammaBaseUrl: "https://gamma-api.polymarket.com",
@@ -3336,6 +3359,7 @@ export {
3336
3359
  polymarketEventUrl,
3337
3360
  parseRetryAfter,
3338
3361
  parseDecimalToBigint,
3362
+ negRiskMergeAdapterAbi,
3339
3363
  isValidPrice,
3340
3364
  isTickSizeSmaller,
3341
3365
  isTerminalStatus,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varla/polymarket",
3
- "version": "2.4.1",
3
+ "version": "2.5.0",
4
4
  "description": "High-performance Polymarket SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",