@zebec-network/exchange-card-sdk 1.7.0 → 1.7.1

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.
@@ -4,6 +4,7 @@ export declare const NEAR_RPC_URL: Record<"Production" | "Sandbox", string>;
4
4
  export declare const XRPL_RPC_URL: Record<"Production" | "Sandbox", string>;
5
5
  export declare const STELLAR_RPC_URL: Record<"Production" | "Sandbox", string>;
6
6
  export declare const XDB_RPC_URL: Record<"Production" | "Sandbox", string>;
7
+ export declare const ALGORAND_RPC_URL: Record<"Production" | "Sandbox", string>;
7
8
  export declare const XDB_NETWORK: {
8
9
  readonly PUBLIC: "LiveNet Global XDBChain Network ; November 2023";
9
10
  readonly TESTNET: "Futurenet XDBChain Network ; October 2023";
package/dist/constants.js CHANGED
@@ -18,6 +18,10 @@ export const XDB_RPC_URL = {
18
18
  Production: "https://horizon.livenet.xdbchain.com/",
19
19
  Sandbox: "https://horizon.futurenet.xdbchain.com/",
20
20
  };
21
+ export const ALGORAND_RPC_URL = {
22
+ Production: "https://mainnet-api.algonode.cloud",
23
+ Sandbox: "https://testnet-api.algonode.cloud",
24
+ };
21
25
  export const XDB_NETWORK = {
22
26
  PUBLIC: "LiveNet Global XDBChain Network ; November 2023",
23
27
  TESTNET: "Futurenet XDBChain Network ; October 2023",
@@ -1,5 +1,4 @@
1
1
  import algosdk from "algosdk";
2
- import { AlgorandClient } from "@algorandfoundation/algokit-utils";
3
2
  import { APIConfig } from "../helpers/apiHelpers";
4
3
  import { Quote } from "../types";
5
4
  /**
@@ -26,9 +25,7 @@ export declare class AlgorandService {
26
25
  readonly wallet: AlgorandWallet;
27
26
  readonly apiConfig: APIConfig;
28
27
  readonly algodClient: algosdk.Algodv2;
29
- readonly algorandClient: AlgorandClient;
30
28
  private apiService;
31
- private readonly network;
32
29
  constructor(wallet: AlgorandWallet, apiConfig: APIConfig, sdkOptions?: {
33
30
  sandbox?: boolean;
34
31
  });
@@ -1,23 +1,17 @@
1
1
  import algosdk from "algosdk";
2
- import { AlgorandClient } from "@algorandfoundation/algokit-utils";
3
- import { ClientManager } from "@algorandfoundation/algokit-utils/types/client-manager";
2
+ import { ALGORAND_RPC_URL } from "../constants";
4
3
  import { ZebecCardAPIService } from "../helpers/apiHelpers";
5
4
  import { formatAlgo, formatAlgorandAsset, getAssetDecimals, parseAlgo, parseAlgorandAsset, } from "../utils";
6
5
  export class AlgorandService {
7
6
  wallet;
8
7
  apiConfig;
9
8
  algodClient;
10
- algorandClient;
11
9
  apiService;
12
- network;
13
10
  constructor(wallet, apiConfig, sdkOptions) {
14
11
  this.wallet = wallet;
15
12
  this.apiConfig = apiConfig;
16
- this.network = sdkOptions?.sandbox ? "testnet" : "mainnet";
17
- this.algodClient = ClientManager.getAlgodClient(ClientManager.getAlgoNodeConfig(this.network, "algod"));
18
- this.algorandClient = AlgorandClient.fromClients({
19
- algod: this.algodClient,
20
- });
13
+ const rpcUrl = ALGORAND_RPC_URL[sdkOptions?.sandbox ? "Sandbox" : "Production"];
14
+ this.algodClient = new algosdk.Algodv2({}, rpcUrl, 443);
21
15
  this.apiService = new ZebecCardAPIService(apiConfig, sdkOptions?.sandbox || false);
22
16
  }
23
17
  /**
@@ -1,4 +1,3 @@
1
- // export * from "./bitcoinService";
2
1
  export * from "./stellarService";
3
2
  export * from "./xrplService";
4
3
  export * from "./nearService";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zebec-network/exchange-card-sdk",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "An sdk for purchasing silver card in zebec",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,6 +17,7 @@
17
17
  "gen:typechain": "typechain --target ethers-v6 --out-dir \"src/artifacts/typechain-types\" \"src/artifacts/abi/*.json\""
18
18
  },
19
19
  "devDependencies": {
20
+ "@algorandfoundation/algokit-utils": "^9.1.2",
20
21
  "@near-js/accounts": "^2.3.0",
21
22
  "@near-js/keystores": "^2.3.0",
22
23
  "@near-js/signers": "^2.3.0",
@@ -33,7 +34,6 @@
33
34
  "typescript": "^5.9.2"
34
35
  },
35
36
  "dependencies": {
36
- "@algorandfoundation/algokit-utils": "^9.1.2",
37
37
  "@near-js/crypto": "^2.3.0",
38
38
  "@near-js/providers": "^2.3.0",
39
39
  "@near-js/transactions": "^2.3.0",