bet-test-sdk 1.0.2 → 1.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.
package/README.md CHANGED
@@ -144,24 +144,20 @@ const main = async () => {
144
144
 
145
145
  await printSOLBalance(connection, testAccount.publicKey, "Test Account keypair");
146
146
 
147
- const globalAccount = await sdk.getGlobalAccount();
148
- console.log(globalAccount);
149
-
150
147
  const currentSolBalance = await connection.getBalance(testAccount.publicKey);
151
148
  if (currentSolBalance === 0) {
152
149
  console.log("Please send some SOL to the test-account:", testAccount.publicKey.toBase58());
153
150
  return;
154
151
  }
155
152
 
156
- console.log(await sdk.getGlobalAccount());
153
+ let curveStateAccount = await sdk.getCurveStateAccount(mint);
157
154
 
158
- let curveCurveAccount = await sdk.getCurveStateAccount(mint);
159
- if (!curveCurveAccount) {
155
+ if (!curveStateAccount) {
160
156
  await createAndBuyToken(sdk, testAccount, mint);
161
- curveCurveAccount = await sdk.getCurveStateAccount(mint);
157
+ curveStateAccount = await sdk.getCurveStateAccount(mint);
162
158
  }
163
159
 
164
- if (curveCurveAccount) {
160
+ if (curveStateAccount) {
165
161
  await buyTokens(sdk, testAccount, mint);
166
162
  await sellTokens(sdk, testAccount, mint);
167
163
  }
@@ -20089,7 +20089,7 @@ var instructions = [
20089
20089
  },
20090
20090
  {
20091
20091
  name: "dynamic_amm_program",
20092
- address: "E3zXK7VRyn39uuyshkQCriRXUAsR1KKQXaJ55KyDW4bp"
20092
+ address: "7MTnCi4Q3LeF2ZnfXykdemNmib5Jv2SXvNoUFQ4PLS77"
20093
20093
  }
20094
20094
  ],
20095
20095
  args: [
@@ -21637,7 +21637,7 @@ var types = [
21637
21637
  kind: "struct",
21638
21638
  fields: [
21639
21639
  {
21640
- name: "initReservedToken",
21640
+ name: "init_reserved_token",
21641
21641
  type: "u64"
21642
21642
  },
21643
21643
  {
@@ -21813,7 +21813,7 @@ class BetSDK {
21813
21813
  async createAndBuy(creator, migrateType, createTokenMetadata, buyAmountSol, slippageBasisPoints = 500n, priorityFees, commitment = DEFAULT_COMMITMENT, finality = DEFAULT_FINALITY) {
21814
21814
  let mintKeyPair;
21815
21815
  try {
21816
- const request = await fetch(`${BET_API}/create-token/mint-pair`, {
21816
+ const request = await fetch(`${BET_API}/token/mint-pair`, {
21817
21817
  method: "GET",
21818
21818
  credentials: 'same-origin'
21819
21819
  });
@@ -22014,7 +22014,7 @@ class BetSDK {
22014
22014
  formData.append("telegram", create.telegram || "");
22015
22015
  formData.append("website", create.website || "");
22016
22016
  try {
22017
- const request = await fetch(`${BET_API}/create-token/ipfs`, {
22017
+ const request = await fetch(`${BET_API}/token/ipfs`, {
22018
22018
  method: "POST",
22019
22019
  headers: {
22020
22020
  'Accept': 'application/json',