@zebec-network/exchange-card-sdk 1.9.0-dev.9 → 1.9.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.
@@ -1,7 +1,43 @@
1
- import { type TransactionOptions } from "@provablehq/aleo-types";
2
1
  import { AleoNetworkClient } from "@provablehq/sdk/mainnet.js";
3
2
  import { AleoNetworkClient as TestnetAleoNetworkClient } from "@provablehq/sdk/testnet.js";
4
3
  import { ZebecCardAPIService } from "../helpers/apiHelpers";
4
+ /**
5
+ * Supported Aleo networks
6
+ */
7
+ export declare enum Network {
8
+ MAINNET = "mainnet",
9
+ TESTNET = "testnet",
10
+ CANARY = "canary"
11
+ }
12
+ /**
13
+ * Transaction creation options
14
+ */
15
+ export interface TransactionOptions {
16
+ /**
17
+ * The program to execute
18
+ */
19
+ program: string;
20
+ /**
21
+ * The function to call
22
+ */
23
+ function: string;
24
+ /**
25
+ * The function inputs
26
+ */
27
+ inputs: string[];
28
+ /**
29
+ * The transaction fee to pay
30
+ */
31
+ fee?: number;
32
+ /**
33
+ * Record indices to use
34
+ */
35
+ recordIndices?: number[];
36
+ /**
37
+ * Whether the fee is private
38
+ */
39
+ privateFee?: boolean;
40
+ }
5
41
  export interface AleoWallet {
6
42
  address: string;
7
43
  decrypt: (cipherText: string) => Promise<string>;
@@ -1,9 +1,17 @@
1
- import { Network } from "@provablehq/aleo-types";
2
1
  import { AleoNetworkClient, SealanceMerkleTree } from "@provablehq/sdk/mainnet.js";
3
2
  import { AleoNetworkClient as TestnetAleoNetworkClient, SealanceMerkleTree as TestnetSealanceMerkleTree, } from "@provablehq/sdk/testnet.js";
4
3
  import { ALEO_NETWORK_CLIENT_URL } from "../constants";
5
4
  import { ZebecCardAPIService } from "../helpers/apiHelpers";
6
5
  import { fromMicroUnits, getTokenBySymbol, toMicroUnits } from "../utils";
6
+ /**
7
+ * Supported Aleo networks
8
+ */
9
+ export var Network;
10
+ (function (Network) {
11
+ Network["MAINNET"] = "mainnet";
12
+ Network["TESTNET"] = "testnet";
13
+ Network["CANARY"] = "canary";
14
+ })(Network || (Network = {}));
7
15
  export const NETWORK_CONFIG = {
8
16
  [Network.MAINNET]: {
9
17
  explorer: "https://explorer.provable.com/transaction",
@@ -122,7 +130,7 @@ export class AleoService {
122
130
  let inputs;
123
131
  switch (functionName) {
124
132
  case "transfer_public":
125
- inputs = [recipient, `${amountInMicroCredits}u64`];
133
+ inputs = [recipient, amountInMicroCredits];
126
134
  break;
127
135
  case "transfer_private": {
128
136
  const record = await this._getRecord(PROGRAM_NAME);
package/package.json CHANGED
@@ -6,8 +6,7 @@
6
6
  "@near-js/transactions": "^2.5.1",
7
7
  "@near-js/types": "^2.5.1",
8
8
  "@near-js/utils": "^2.5.1",
9
- "@provablehq/aleo-types": "^0.3.0-alpha.3",
10
- "@provablehq/sdk": "^0.9.15",
9
+ "@provablehq/sdk": "^0.9.16",
11
10
  "@stellar/stellar-sdk": "^14.4.3",
12
11
  "algosdk": "^3.4.0",
13
12
  "axios": "^1.11.0",
@@ -64,5 +63,5 @@
64
63
  },
65
64
  "type": "module",
66
65
  "types": "dist/index.d.ts",
67
- "version": "1.9.0-dev.9"
66
+ "version": "1.9.1"
68
67
  }