quantumswap 0.0.5 → 0.0.7

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,46 +1,46 @@
1
- # QuantumSwap SDK Examples
2
-
3
- This folder is a **standalone package** that depends on the QuantumSwap SDK. Examples use `quantumswap` as a dependency instead of the parent repo.
4
-
5
- ## Setup
6
-
7
- From this directory:
8
-
9
- ```bash
10
- cd examples
11
- npm install
12
- ```
13
-
14
- This installs `quantumswap` (from the parent via `file:..`) and `quantumcoin`. You can run any example from the `examples/` folder.
15
-
16
- ## Running examples
17
-
18
- - **Full DEX flow (pre-deployed WQ/Factory/Router, deploy tokens, pair, liquidity, swap):**
19
- `npm run run-dex-flow` or `node run-dex-flow-custom.js` (JS) / `npx ts-node run-dex-flow-custom.ts` (TS).
20
- Set `QC_RPC_URL` (default `http://127.0.0.1:8545`), optionally `QC_CHAIN_ID`, `QC_WALLET_JSON`, `QC_WALLET_PASSPHRASE`.
21
-
22
- - **Contract-specific examples:**
23
- Deploy: `node deploy-WQ.js`, `node deploy-QuantumSwapV2Factory.js`, etc.
24
- Read/events/write/offline-signing: `node read-operations-WQ.js`, `node events-WQ.js`, etc.
25
-
26
- ## Package layout
27
-
28
- - **package.json** — `quantumswap-examples` with dependency `quantumswap` (`file:..`) and `quantumcoin`.
29
- - **\_test-wallet.js** — Default test wallet helper used by examples (requires `quantumcoin`).
30
- - All example scripts `require("quantumswap")` for SDK types and factories.
31
-
32
- ## Using a published SDK
33
-
34
- To use the published npm package instead of the local repo, in `examples/package.json` change:
35
-
36
- ```json
37
- "quantumswap": "file:.."
38
- ```
39
-
40
- to:
41
-
42
- ```json
43
- "quantumswap": "^0.0.1"
44
- ```
45
-
46
- Then run `npm install` in `examples/`.
1
+ # QuantumSwap SDK Examples
2
+
3
+ This folder is a **standalone package** that depends on the QuantumSwap SDK. Examples use `quantumswap` as a dependency instead of the parent repo.
4
+
5
+ ## Setup
6
+
7
+ From this directory:
8
+
9
+ ```bash
10
+ cd examples
11
+ npm install
12
+ ```
13
+
14
+ This installs `quantumswap` (from the parent via `file:..`) and `quantumcoin`. You can run any example from the `examples/` folder.
15
+
16
+ ## Running examples
17
+
18
+ - **Full DEX flow (pre-deployed WQ/Factory/Router, deploy tokens, pair, liquidity, swap):**
19
+ `npm run run-dex-flow` or `node run-dex-flow-custom.js` (JS) / `npx ts-node run-dex-flow-custom.ts` (TS).
20
+ Set `QC_RPC_URL` (default `http://127.0.0.1:8545`), optionally `QC_CHAIN_ID`, `QC_WALLET_JSON`, `QC_WALLET_PASSPHRASE`.
21
+
22
+ - **Contract-specific examples:**
23
+ Deploy: `node deploy-WQ.js`, `node deploy-QuantumSwapV2Factory.js`, etc.
24
+ Read/events/write/offline-signing: `node read-operations-WQ.js`, `node events-WQ.js`, etc.
25
+
26
+ ## Package layout
27
+
28
+ - **package.json** — `quantumswap-examples` with dependency `quantumswap` (`file:..`) and `quantumcoin`.
29
+ - **\_test-wallet.js** — Default test wallet helper used by examples (requires `quantumcoin`).
30
+ - All example scripts `require("quantumswap")` for SDK types and factories.
31
+
32
+ ## Using a published SDK
33
+
34
+ To use the published npm package instead of the local repo, in `examples/package.json` change:
35
+
36
+ ```json
37
+ "quantumswap": "file:.."
38
+ ```
39
+
40
+ to:
41
+
42
+ ```json
43
+ "quantumswap": "^0.0.1"
44
+ ```
45
+
46
+ Then run `npm install` in `examples/`.
@@ -8,40 +8,38 @@
8
8
  "name": "quantumswap-examples",
9
9
  "version": "0.0.1",
10
10
  "dependencies": {
11
- "quantumcoin": "7.0.6",
11
+ "quantumcoin": "7.0.12",
12
12
  "quantumswap": "file:.."
13
13
  }
14
14
  },
15
15
  "..": {
16
16
  "name": "quantumswap",
17
- "version": "0.0.5",
17
+ "version": "0.0.7",
18
18
  "license": "MIT",
19
- "dependencies": {
20
- "quantum-coin-js-sdk": "^1.0.31",
21
- "quantumcoin": "^7.0.6",
22
- "seed-words": "^1.0.2"
23
- },
24
19
  "devDependencies": {
25
20
  "ts-node": "^10.9.2",
26
21
  "typescript": "^5.0.0"
22
+ },
23
+ "peerDependencies": {
24
+ "quantumcoin": "^7.0.12"
27
25
  }
28
26
  },
29
27
  "node_modules/quantum-coin-js-sdk": {
30
- "version": "1.0.31",
31
- "resolved": "https://registry.npmjs.org/quantum-coin-js-sdk/-/quantum-coin-js-sdk-1.0.31.tgz",
32
- "integrity": "sha512-enXV7IrUSi8Rjxd4xkoTMmQ9C49ev75FPzu+UbJuzo7D4og/FpD7Ycu1xkLau9cQl/YJFzN9MV+F0/GIoPEG4Q==",
28
+ "version": "1.0.35",
29
+ "resolved": "https://registry.npmjs.org/quantum-coin-js-sdk/-/quantum-coin-js-sdk-1.0.35.tgz",
30
+ "integrity": "sha512-hJWYxPT5x+us/61hciuW5Ky9b0cRVStBRpKniFiz/usQJkM/Pw/8dNlgdBLU2H8ZvSuBp930Y+eRp9dpYRcYNA==",
33
31
  "license": "MIT",
34
32
  "dependencies": {
35
33
  "seed-words": "1.0.2"
36
34
  }
37
35
  },
38
36
  "node_modules/quantumcoin": {
39
- "version": "7.0.6",
40
- "resolved": "https://registry.npmjs.org/quantumcoin/-/quantumcoin-7.0.6.tgz",
41
- "integrity": "sha512-M52RlmjG6DiDzDBThdOsyW8oQKG3jpXoB90y24y+1TBkipVobaEX4VRH+rC9uG2CTlqQTtK8HTOdWxDU1Ciamw==",
37
+ "version": "7.0.12",
38
+ "resolved": "https://registry.npmjs.org/quantumcoin/-/quantumcoin-7.0.12.tgz",
39
+ "integrity": "sha512-DEjmCv8z8HQpp/ohSHn98swMGz63vZZ7mXXOKAQXrOy83siOg9o5/Q0QmO2+BTUtsoxhHH5pxLTyfn0kvwYtFg==",
42
40
  "license": "MIT",
43
41
  "dependencies": {
44
- "quantum-coin-js-sdk": "1.0.31",
42
+ "quantum-coin-js-sdk": "1.0.35",
45
43
  "seed-words": "^1.0.2"
46
44
  },
47
45
  "bin": {
@@ -9,6 +9,6 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "quantumswap": "file:..",
12
- "quantumcoin": "7.0.6"
12
+ "quantumcoin": "7.0.12"
13
13
  }
14
14
  }
package/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./src";
1
+ export * from "./src";
package/index.js CHANGED
@@ -1,45 +1,45 @@
1
- /**
2
- * Auto-generated typed contract package.
3
- *
4
- * This file re-exports the package entry bundle in `src/`.
5
- */
6
-
7
- const entry = require("./src");
8
- Object.assign(exports, entry);
9
-
10
- /**
11
- * IERC20
12
- */
13
- exports.IERC20 = entry.IERC20;
14
- exports.IERC20__factory = entry.IERC20__factory;
15
-
16
- /**
17
- * QuantumSwapV2ERC20
18
- */
19
- exports.QuantumSwapV2ERC20 = entry.QuantumSwapV2ERC20;
20
- exports.QuantumSwapV2ERC20__factory = entry.QuantumSwapV2ERC20__factory;
21
-
22
- /**
23
- * QuantumSwapV2Factory
24
- */
25
- exports.QuantumSwapV2Factory = entry.QuantumSwapV2Factory;
26
- exports.QuantumSwapV2Factory__factory = entry.QuantumSwapV2Factory__factory;
27
-
28
- /**
29
- * QuantumSwapV2Pair
30
- */
31
- exports.QuantumSwapV2Pair = entry.QuantumSwapV2Pair;
32
- exports.QuantumSwapV2Pair__factory = entry.QuantumSwapV2Pair__factory;
33
-
34
- /**
35
- * QuantumSwapV2Router02
36
- */
37
- exports.QuantumSwapV2Router02 = entry.QuantumSwapV2Router02;
38
- exports.QuantumSwapV2Router02__factory = entry.QuantumSwapV2Router02__factory;
39
-
40
- /**
41
- * WQ
42
- */
43
- exports.WQ = entry.WQ;
44
- exports.WQ__factory = entry.WQ__factory;
45
-
1
+ /**
2
+ * Auto-generated typed contract package.
3
+ *
4
+ * This file re-exports the package entry bundle in `src/`.
5
+ */
6
+
7
+ const entry = require("./src");
8
+ Object.assign(exports, entry);
9
+
10
+ /**
11
+ * IERC20
12
+ */
13
+ exports.IERC20 = entry.IERC20;
14
+ exports.IERC20__factory = entry.IERC20__factory;
15
+
16
+ /**
17
+ * QuantumSwapV2ERC20
18
+ */
19
+ exports.QuantumSwapV2ERC20 = entry.QuantumSwapV2ERC20;
20
+ exports.QuantumSwapV2ERC20__factory = entry.QuantumSwapV2ERC20__factory;
21
+
22
+ /**
23
+ * QuantumSwapV2Factory
24
+ */
25
+ exports.QuantumSwapV2Factory = entry.QuantumSwapV2Factory;
26
+ exports.QuantumSwapV2Factory__factory = entry.QuantumSwapV2Factory__factory;
27
+
28
+ /**
29
+ * QuantumSwapV2Pair
30
+ */
31
+ exports.QuantumSwapV2Pair = entry.QuantumSwapV2Pair;
32
+ exports.QuantumSwapV2Pair__factory = entry.QuantumSwapV2Pair__factory;
33
+
34
+ /**
35
+ * QuantumSwapV2Router02
36
+ */
37
+ exports.QuantumSwapV2Router02 = entry.QuantumSwapV2Router02;
38
+ exports.QuantumSwapV2Router02__factory = entry.QuantumSwapV2Router02__factory;
39
+
40
+ /**
41
+ * WQ
42
+ */
43
+ exports.WQ = entry.WQ;
44
+ exports.WQ__factory = entry.WQ__factory;
45
+
package/package.json CHANGED
@@ -1,34 +1,32 @@
1
- {
2
- "name": "quantumswap",
3
- "version": "0.0.5",
4
- "description": "QuantumSwap.js SDK for DEX functionality in QuantumCoin blockchain",
5
- "author": "QuantumSwap Community",
6
- "license": "MIT",
7
- "main": "src/index.js",
8
- "types": "src/index.d.ts",
9
- "scripts": {
10
- "build": "node -e \"console.log('JS package: no build step required')\"",
11
- "build-powershell": "node -e \"console.log('JS package: no build step required')\"",
12
- "test": "node --test --test-concurrency=1 \"test/**/*.test.js\"",
13
- "test:e2e": "node --test --test-concurrency=1 \"test/e2e/**/*.test.js\""
14
- },
15
- "dependencies": {
16
- "quantum-coin-js-sdk": "^1.0.31",
17
- "quantumcoin": "^7.0.6",
18
- "seed-words": "^1.0.2"
19
- },
20
- "devDependencies": {
21
- "ts-node": "^10.9.2",
22
- "typescript": "^5.0.0"
23
- },
24
- "bugs": {
25
- "url": "https://github.com/quantumswapdex/QuantumSwap.js/issues"
26
- },
27
- "homepage": "https://github.com/quantumswapdex/QuantumSwap.js#readme",
28
- "keywords": [
29
- "quantumswap",
30
- "quantum coin",
31
- "quantumcoin",
32
- "dex"
33
- ]
34
- }
1
+ {
2
+ "name": "quantumswap",
3
+ "version": "0.0.7",
4
+ "description": "QuantumSwap.js SDK for DEX functionality in QuantumCoin blockchain",
5
+ "author": "QuantumSwap Community",
6
+ "license": "MIT",
7
+ "main": "src/index.js",
8
+ "types": "src/index.d.ts",
9
+ "scripts": {
10
+ "build": "node -e \"console.log('JS package: no build step required')\"",
11
+ "build-powershell": "node -e \"console.log('JS package: no build step required')\"",
12
+ "test": "node --test --test-concurrency=1 \"test/**/*.test.js\"",
13
+ "test:e2e": "node --test --test-concurrency=1 \"test/e2e/**/*.test.js\""
14
+ },
15
+ "peerDependencies": {
16
+ "quantumcoin": "^7.0.12"
17
+ },
18
+ "devDependencies": {
19
+ "ts-node": "^10.9.2",
20
+ "typescript": "^5.0.0"
21
+ },
22
+ "bugs": {
23
+ "url": "https://github.com/quantumswapdex/QuantumSwap.js/issues"
24
+ },
25
+ "homepage": "https://github.com/quantumswapdex/QuantumSwap.js#readme",
26
+ "keywords": [
27
+ "quantumswap",
28
+ "quantum coin",
29
+ "quantumcoin",
30
+ "dex"
31
+ ]
32
+ }
package/src/IERC20.d.ts CHANGED
@@ -1,24 +1,24 @@
1
- // Auto-generated by sdkgen
2
- import { Contract, ContractRunner, ContractTransactionResponse, TransactionResponse } from "quantumcoin";
3
- import type * as Types from "./types";
4
-
5
- export declare class IERC20 extends Contract {
6
- static readonly abi: readonly any[];
7
- static readonly bytecode: string;
8
- static connect(address: string, runner?: ContractRunner): IERC20;
9
- constructor(address: string, runner?: ContractRunner, _deployTx?: TransactionResponse);
10
- readonly populateTransaction: {
11
- approve(spender: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
12
- transfer(to: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
13
- transferFrom(from: Types.AddressLike, to: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
14
- };
15
- allowance(owner: Types.AddressLike, spender: Types.AddressLike): Promise<Types.Uint256>;
16
- approve(spender: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
17
- balanceOf(owner: Types.AddressLike): Promise<Types.Uint256>;
18
- decimals(): Promise<Types.Uint8>;
19
- name(): Promise<string>;
20
- symbol(): Promise<string>;
21
- totalSupply(): Promise<Types.Uint256>;
22
- transfer(to: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
23
- transferFrom(from: Types.AddressLike, to: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
24
- }
1
+ // Auto-generated by sdkgen
2
+ import { Contract, ContractRunner, ContractTransactionResponse, TransactionResponse } from "quantumcoin";
3
+ import type * as Types from "./types";
4
+
5
+ export declare class IERC20 extends Contract {
6
+ static readonly abi: readonly any[];
7
+ static readonly bytecode: string;
8
+ static connect(address: string, runner?: ContractRunner): IERC20;
9
+ constructor(address: string, runner?: ContractRunner, _deployTx?: TransactionResponse);
10
+ readonly populateTransaction: {
11
+ approve(spender: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
12
+ transfer(to: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
13
+ transferFrom(from: Types.AddressLike, to: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<import("quantumcoin").TransactionRequest>;
14
+ };
15
+ allowance(owner: Types.AddressLike, spender: Types.AddressLike): Promise<Types.Uint256>;
16
+ approve(spender: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
17
+ balanceOf(owner: Types.AddressLike): Promise<Types.Uint256>;
18
+ decimals(): Promise<Types.Uint8>;
19
+ name(): Promise<string>;
20
+ symbol(): Promise<string>;
21
+ totalSupply(): Promise<Types.Uint256>;
22
+ transfer(to: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
23
+ transferFrom(from: Types.AddressLike, to: Types.AddressLike, value: Types.Uint256Like, overrides?: any): Promise<ContractTransactionResponse>;
24
+ }