@gmsol-labs/gmsol-sdk 0.8.0-beta.2 → 0.8.0-beta.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.
package/README.md CHANGED
@@ -12,19 +12,21 @@
12
12
 
13
13
  ## Audits
14
14
 
15
- | Program | Last Audit Date | Version |
16
- | ------------------- | --------------- | --------- |
17
- | [gmsol-store] | [2025-08-08] | [cd0dfc8] |
18
- | [gmsol-treasury] | [2025-08-08] | [cd0dfc8] |
19
- | [gmsol-timelock] | [2025-08-08] | [cd0dfc8] |
20
- | [gmsol-competition] | [2025-08-08] | [cd0dfc8] |
15
+ | Program | Last Audit Date | Version |
16
+ | -------------------------- | --------------- | --------- |
17
+ | [gmsol-store] | [2025-09-23] | [7618169] |
18
+ | [gmsol-treasury] | [2025-09-23] | [7618169] |
19
+ | [gmsol-timelock] | [2025-09-23] | [7618169] |
20
+ | [gmsol-competition] | [2025-09-23] | [7618169] |
21
+ | [gmsol-liquidity-provider] | [2025-09-23] | [7618169] |
21
22
 
22
23
  [gmsol-store]: https://github.com/gmsol-labs/gmx-solana/tree/main/programs/store
23
24
  [gmsol-treasury]: https://github.com/gmsol-labs/gmx-solana/tree/main/programs/treasury
24
25
  [gmsol-timelock]: https://github.com/gmsol-labs/gmx-solana/tree/main/programs/timelock
25
26
  [gmsol-competition]: https://github.com/gmsol-labs/gmx-solana/tree/main/programs/competition
26
- [2025-08-08]: https://github.com/gmsol-labs/gmx-solana-audits/blob/main/GMX_Solana_Audit_Report_August_8_2025_Zenith.pdf
27
- [cd0dfc8]: https://github.com/gmsol-labs/gmx-solana/commit/cd0dfc84b5e2b1857f54c6cdbe25459fb6e43145
27
+ [gmsol-liquidity-provider]: https://github.com/gmsol-labs/gmx-solana/tree/main/programs/liquidity-provider
28
+ [2025-09-23]: https://github.com/gmsol-labs/gmx-solana-audits/blob/main/GMX_Solana_Audit_Report_September_23_2025_Zenith.pdf
29
+ [7618169]: https://github.com/gmsol-labs/gmx-solana/commit/7618169dfda4858ec87890bb66a1caafc8dca08c
28
30
 
29
31
  ## Integration
30
32
 
@@ -34,7 +36,7 @@ Add the following to your `Cargo.toml`:
34
36
 
35
37
  ```toml
36
38
  [dependencies]
37
- gmsol-sdk = { version = "0.7", features = ["client"] }
39
+ gmsol-sdk = { version = "0.8", features = ["client"] }
38
40
  ```
39
41
 
40
42
  Create a `Client` and start using the core APIs:
package/index.d.ts CHANGED
@@ -514,6 +514,28 @@ export interface PoolTokenHint {
514
514
  short_token: StringPubkey;
515
515
  }
516
516
 
517
+ /**
518
+ * Builder for `mint_gt_reward` instruction.
519
+ */
520
+ export interface MintGtReward {
521
+ /**
522
+ * Payer (a.k.a. authority).
523
+ */
524
+ payer: StringPubkey;
525
+ /**
526
+ * Store program.
527
+ */
528
+ store_program?: StoreProgram;
529
+ /**
530
+ * The owner for whom the GT reward will be minted.
531
+ */
532
+ owner: StringPubkey;
533
+ /**
534
+ * The amount to mint.
535
+ */
536
+ amount: number;
537
+ }
538
+
517
539
  /**
518
540
  * Hint for [`CreateGlvWithdrawal`].
519
541
  */
@@ -1529,6 +1551,10 @@ export class Market {
1529
1551
  * Get short token address.
1530
1552
  */
1531
1553
  short_token_address(): string;
1554
+ /**
1555
+ * Create a clone of this market.
1556
+ */
1557
+ clone(): Market;
1532
1558
  }
1533
1559
  /**
1534
1560
  * A JS binding for [`MarketGraph`].
@@ -1587,6 +1613,10 @@ export class MarketGraph {
1587
1613
  * Update with simulator.
1588
1614
  */
1589
1615
  update_with_simulator(simulator: Simulator, options?: UpdateGraphWithSimulatorOptions | null): void;
1616
+ /**
1617
+ * Create a clone of this graph.
1618
+ */
1619
+ clone(): MarketGraph;
1590
1620
  }
1591
1621
  /**
1592
1622
  * Wrapper of [`MarketModel`].
@@ -1606,6 +1636,10 @@ export class MarketModel {
1606
1636
  * Create an empty position model.
1607
1637
  */
1608
1638
  create_empty_position(args: CreateEmptyPositionArgs): PositionModel;
1639
+ /**
1640
+ * Create a clone of this market model.
1641
+ */
1642
+ clone(): MarketModel;
1609
1643
  }
1610
1644
  /**
1611
1645
  * wasm-bindgen version of the Message struct.
@@ -1691,6 +1725,10 @@ export class Position {
1691
1725
  * Convert to a [`JsPositionModel`].
1692
1726
  */
1693
1727
  to_model(market: MarketModel): PositionModel;
1728
+ /**
1729
+ * Create a clone of this position.
1730
+ */
1731
+ clone(): Position;
1694
1732
  }
1695
1733
  /**
1696
1734
  * JS version of [`PositionModel`].
@@ -1722,6 +1760,10 @@ export class PositionModel {
1722
1760
  * Update with trade event.
1723
1761
  */
1724
1762
  update_with_trade_event(event: TradeEvent, force_update?: boolean | null): boolean;
1763
+ /**
1764
+ * Create a clone of this position model.
1765
+ */
1766
+ clone(): PositionModel;
1725
1767
  }
1726
1768
  /**
1727
1769
  * The address of a [Solana account][acc].
@@ -1798,6 +1840,10 @@ export class Simulator {
1798
1840
  */
1799
1841
  insert_price(token: string, price: Value): void;
1800
1842
  simulate_order(args: SimulateOrderArgs, position?: Position | null): OrderSimulationOutput;
1843
+ /**
1844
+ * Create a clone of this simulator.
1845
+ */
1846
+ clone(): Simulator;
1801
1847
  }
1802
1848
  /**
1803
1849
  * JS version of [`TradeEvent`].
package/index_bg.js CHANGED
@@ -799,6 +799,14 @@ export class Market {
799
799
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
800
800
  }
801
801
  }
802
+ /**
803
+ * Create a clone of this market.
804
+ * @returns {Market}
805
+ */
806
+ clone() {
807
+ const ret = wasm.market_clone(this.__wbg_ptr);
808
+ return Market.__wrap(ret);
809
+ }
802
810
  }
803
811
 
804
812
  const MarketGraphFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -809,6 +817,14 @@ const MarketGraphFinalization = (typeof FinalizationRegistry === 'undefined')
809
817
  */
810
818
  export class MarketGraph {
811
819
 
820
+ static __wrap(ptr) {
821
+ ptr = ptr >>> 0;
822
+ const obj = Object.create(MarketGraph.prototype);
823
+ obj.__wbg_ptr = ptr;
824
+ MarketGraphFinalization.register(obj, obj.__wbg_ptr, obj);
825
+ return obj;
826
+ }
827
+
812
828
  __destroy_into_raw() {
813
829
  const ptr = this.__wbg_ptr;
814
830
  this.__wbg_ptr = 0;
@@ -970,6 +986,14 @@ export class MarketGraph {
970
986
  throw takeFromExternrefTable0(ret[0]);
971
987
  }
972
988
  }
989
+ /**
990
+ * Create a clone of this graph.
991
+ * @returns {MarketGraph}
992
+ */
993
+ clone() {
994
+ const ret = wasm.marketgraph_clone(this.__wbg_ptr);
995
+ return MarketGraph.__wrap(ret);
996
+ }
973
997
  }
974
998
 
975
999
  const MarketModelFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -1035,6 +1059,14 @@ export class MarketModel {
1035
1059
  }
1036
1060
  return PositionModel.__wrap(ret[0]);
1037
1061
  }
1062
+ /**
1063
+ * Create a clone of this market model.
1064
+ * @returns {MarketModel}
1065
+ */
1066
+ clone() {
1067
+ const ret = wasm.marketmodel_clone(this.__wbg_ptr);
1068
+ return MarketModel.__wrap(ret);
1069
+ }
1038
1070
  }
1039
1071
 
1040
1072
  const MessageFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -1339,6 +1371,14 @@ export class Position {
1339
1371
  }
1340
1372
  return PositionModel.__wrap(ret[0]);
1341
1373
  }
1374
+ /**
1375
+ * Create a clone of this position.
1376
+ * @returns {Position}
1377
+ */
1378
+ clone() {
1379
+ const ret = wasm.position_clone(this.__wbg_ptr);
1380
+ return Position.__wrap(ret);
1381
+ }
1342
1382
  }
1343
1383
 
1344
1384
  const PositionModelFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -1426,6 +1466,14 @@ export class PositionModel {
1426
1466
  }
1427
1467
  return ret[0] !== 0;
1428
1468
  }
1469
+ /**
1470
+ * Create a clone of this position model.
1471
+ * @returns {PositionModel}
1472
+ */
1473
+ clone() {
1474
+ const ret = wasm.positionmodel_clone(this.__wbg_ptr);
1475
+ return PositionModel.__wrap(ret);
1476
+ }
1429
1477
  }
1430
1478
 
1431
1479
  const PubkeyFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -1667,6 +1715,14 @@ export class Simulator {
1667
1715
  }
1668
1716
  return OrderSimulationOutput.__wrap(ret[0]);
1669
1717
  }
1718
+ /**
1719
+ * Create a clone of this simulator.
1720
+ * @returns {Simulator}
1721
+ */
1722
+ clone() {
1723
+ const ret = wasm.simulator_clone(this.__wbg_ptr);
1724
+ return Simulator.__wrap(ret);
1725
+ }
1670
1726
  }
1671
1727
 
1672
1728
  const SystemInstructionFinalization = (typeof FinalizationRegistry === 'undefined')
package/index_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@gmsol-labs/gmsol-sdk",
3
3
  "type": "module",
4
4
  "description": "GMX-Solana is an extension of GMX on the Solana blockchain.",
5
- "version": "0.8.0-beta.2",
5
+ "version": "0.8.0-beta.4",
6
6
  "license": "SEE LICENSE IN ../../LICENSE",
7
7
  "repository": {
8
8
  "type": "git",