@gmsol-labs/gmsol-sdk 0.5.0-beta.0 → 0.5.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
@@ -1,5 +1,9 @@
1
1
  # GMX-Solana
2
2
 
3
+ [![Crates.io](https://img.shields.io/crates/v/gmsol-sdk.svg)](https://crates.io/crates/gmsol-sdk)
4
+ [![Docs.rs](https://docs.rs/gmsol-sdk/badge.svg)](https://docs.rs/gmsol-sdk)
5
+ [![npm](https://img.shields.io/npm/v/@gmsol-labs/gmsol-sdk.svg)](https://www.npmjs.com/package/@gmsol-labs/gmsol-sdk)
6
+
3
7
  ## Audits
4
8
 
5
9
  | Program | Last Audit Date | Version |
@@ -16,7 +20,50 @@
16
20
 
17
21
  ## Integration
18
22
 
19
- ### Method 1: Using `declare_program!`
23
+ ### Method 1: Using the Rust SDK
24
+
25
+ Add the following to your `Cargo.toml`:
26
+
27
+ ```toml
28
+ [dependencies]
29
+ gmsol-sdk = { version = "0.5.0", features = ["client"] }
30
+ ```
31
+
32
+ Create a `Client` and start using the core APIs:
33
+
34
+ ```rust
35
+ use gmsol_sdk::{
36
+ Client,
37
+ ops::ExchangeOps,
38
+ solana_utils::{
39
+ cluster::Cluster,
40
+ solana_sdk::{pubkey::Pubkey, signature::read_keypair_file},
41
+ },
42
+ };
43
+
44
+ let keypair =
45
+ read_keypair_file(std::env::var("KEYPAIR")?)?;
46
+ let market_token: Pubkey = std::env::var("MARKET_TOKEN")?.parse()?;
47
+
48
+ let client = Client::new(Cluster::Mainnet, &keypair)?;
49
+ let store = client.find_store_address("");
50
+
51
+ let (txn, order) = client
52
+ .market_increase(
53
+ &store,
54
+ &market_token,
55
+ true,
56
+ 5_000_000,
57
+ true,
58
+ 500_000_000_000_000_000_000,
59
+ )
60
+ .build_with_address()
61
+ .await?;
62
+
63
+ let signature = txn.send().await?;
64
+ ```
65
+
66
+ ### Method 2: Using `declare_program!`
20
67
 
21
68
  #### 1. Initialize a new Rust project and add dependencies
22
69
 
package/index_bg.js CHANGED
@@ -1749,6 +1749,10 @@ export function __wbg_crypto_038798f665f985e2(arg0) {
1749
1749
  return ret;
1750
1750
  };
1751
1751
 
1752
+ export function __wbg_debug_3cb59063b29f58c1(arg0) {
1753
+ console.debug(arg0);
1754
+ };
1755
+
1752
1756
  export function __wbg_done_769e5ede4b31c67b(arg0) {
1753
1757
  const ret = arg0.done;
1754
1758
  return ret;
@@ -1759,6 +1763,10 @@ export function __wbg_entries_3265d4158b33e5dc(arg0) {
1759
1763
  return ret;
1760
1764
  };
1761
1765
 
1766
+ export function __wbg_error_524f506f44df1645(arg0) {
1767
+ console.error(arg0);
1768
+ };
1769
+
1762
1770
  export function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
1763
1771
  let deferred0_0;
1764
1772
  let deferred0_1;
@@ -1800,6 +1808,10 @@ export function __wbg_getwithrefkey_1dc361bd10053bfe(arg0, arg1) {
1800
1808
  return ret;
1801
1809
  };
1802
1810
 
1811
+ export function __wbg_info_3daf2e093e091b66(arg0) {
1812
+ console.info(arg0);
1813
+ };
1814
+
1803
1815
  export function __wbg_instanceof_ArrayBuffer_e14585432e3737fc(arg0) {
1804
1816
  let result;
1805
1817
  try {
@@ -1852,6 +1864,10 @@ export function __wbg_length_e2d2a49132c1b256(arg0) {
1852
1864
  return ret;
1853
1865
  };
1854
1866
 
1867
+ export function __wbg_log_c222819a41e063d3(arg0) {
1868
+ console.log(arg0);
1869
+ };
1870
+
1855
1871
  export function __wbg_msCrypto_ff35fce085fab2a3(arg0) {
1856
1872
  const ret = arg0.msCrypto;
1857
1873
  return ret;
@@ -1966,6 +1982,10 @@ export function __wbg_values_99f7a68c7f313d66(arg0) {
1966
1982
  return ret;
1967
1983
  };
1968
1984
 
1985
+ export function __wbg_warn_4ca3906c248c47c4(arg0) {
1986
+ console.warn(arg0);
1987
+ };
1988
+
1969
1989
  export function __wbindgen_as_number(arg0) {
1970
1990
  const ret = +arg0;
1971
1991
  return ret;
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.5.0-beta.0",
5
+ "version": "0.5.0-beta.4",
6
6
  "license": "SEE LICENSE IN ../../LICENSE",
7
7
  "repository": {
8
8
  "type": "git",