quantumcoin 7.0.10 → 7.0.12

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.
Files changed (171) hide show
  1. package/README-SDK.md +16 -5
  2. package/README.md +14 -3
  3. package/config.js +10 -2
  4. package/examples/example.js +0 -5
  5. package/examples/example.ts +0 -5
  6. package/examples/node_modules/.bin/esbuild +16 -0
  7. package/examples/node_modules/.bin/esbuild.cmd +17 -0
  8. package/examples/node_modules/.bin/esbuild.ps1 +28 -0
  9. package/examples/node_modules/.bin/sdkgen +16 -0
  10. package/examples/node_modules/.bin/sdkgen.cmd +17 -0
  11. package/examples/node_modules/.bin/sdkgen.ps1 +28 -0
  12. package/examples/node_modules/.bin/tsx +16 -0
  13. package/examples/node_modules/.bin/tsx.cmd +17 -0
  14. package/examples/node_modules/.bin/tsx.ps1 +28 -0
  15. package/examples/node_modules/.package-lock.json +144 -0
  16. package/examples/node_modules/@esbuild/win32-x64/README.md +3 -0
  17. package/examples/node_modules/@esbuild/win32-x64/esbuild.exe +0 -0
  18. package/examples/node_modules/@esbuild/win32-x64/package.json +20 -0
  19. package/examples/node_modules/esbuild/LICENSE.md +21 -0
  20. package/examples/node_modules/esbuild/README.md +3 -0
  21. package/examples/node_modules/esbuild/bin/esbuild +223 -0
  22. package/examples/node_modules/esbuild/install.js +289 -0
  23. package/examples/node_modules/esbuild/lib/main.d.ts +716 -0
  24. package/examples/node_modules/esbuild/lib/main.js +2532 -0
  25. package/examples/node_modules/esbuild/package.json +49 -0
  26. package/examples/node_modules/get-tsconfig/LICENSE +21 -0
  27. package/examples/node_modules/get-tsconfig/README.md +235 -0
  28. package/examples/node_modules/get-tsconfig/dist/index.cjs +7 -0
  29. package/examples/node_modules/get-tsconfig/dist/index.d.cts +2088 -0
  30. package/examples/node_modules/get-tsconfig/dist/index.d.mts +2088 -0
  31. package/examples/node_modules/get-tsconfig/dist/index.mjs +7 -0
  32. package/examples/node_modules/get-tsconfig/package.json +46 -0
  33. package/examples/node_modules/quantum-coin-js-sdk/LICENSE +21 -0
  34. package/examples/node_modules/quantum-coin-js-sdk/LICENSE-wasm_exec.js.txt +30 -0
  35. package/examples/node_modules/quantum-coin-js-sdk/README.md +1675 -0
  36. package/examples/node_modules/quantum-coin-js-sdk/example/README.md +14 -0
  37. package/examples/node_modules/quantum-coin-js-sdk/example/conversion-example.js +19 -0
  38. package/examples/node_modules/quantum-coin-js-sdk/example/example-create-contract.js +396 -0
  39. package/examples/node_modules/quantum-coin-js-sdk/example/example-encode-decode-rlp.js +225 -0
  40. package/examples/node_modules/quantum-coin-js-sdk/example/example-event-pack-unpack.js +391 -0
  41. package/examples/node_modules/quantum-coin-js-sdk/example/example-misc.js +101 -0
  42. package/examples/node_modules/quantum-coin-js-sdk/example/example-rpc-send-signRawTransaction.js +318 -0
  43. package/examples/node_modules/quantum-coin-js-sdk/example/example-rpc-send.js +116 -0
  44. package/examples/node_modules/quantum-coin-js-sdk/example/example-send.js +70 -0
  45. package/examples/node_modules/quantum-coin-js-sdk/example/example-token-pack-unpack.js +961 -0
  46. package/examples/node_modules/quantum-coin-js-sdk/example/example-wallet-version4.js +35 -0
  47. package/examples/node_modules/quantum-coin-js-sdk/example/example-wallet.js +43 -0
  48. package/examples/node_modules/quantum-coin-js-sdk/example/example.js +405 -0
  49. package/examples/node_modules/quantum-coin-js-sdk/example/package-lock.json +134 -0
  50. package/examples/node_modules/quantum-coin-js-sdk/example/package.json +15 -0
  51. package/examples/node_modules/quantum-coin-js-sdk/index.d.ts +1031 -0
  52. package/examples/node_modules/quantum-coin-js-sdk/index.js +3144 -0
  53. package/examples/node_modules/quantum-coin-js-sdk/package.json +34 -0
  54. package/examples/node_modules/quantum-coin-js-sdk/tests/encrypted-32.json +1 -0
  55. package/examples/node_modules/quantum-coin-js-sdk/tests/encrypted-36.json +1 -0
  56. package/examples/node_modules/quantum-coin-js-sdk/tests/encrypted-48.json +1 -0
  57. package/examples/node_modules/quantum-coin-js-sdk/tests/generate-verify-vectors.js +91 -0
  58. package/examples/node_modules/quantum-coin-js-sdk/tests/non-transactional.preinit.test.js +41 -0
  59. package/examples/node_modules/quantum-coin-js-sdk/tests/non-transactional.test.js +1389 -0
  60. package/examples/node_modules/quantum-coin-js-sdk/tests/sign-raw-keytype5-context-null.test.js +107 -0
  61. package/examples/node_modules/quantum-coin-js-sdk/tests/sign-raw-transaction.test.js +196 -0
  62. package/examples/node_modules/quantum-coin-js-sdk/tests/sign-verify.test.js +311 -0
  63. package/examples/node_modules/quantum-coin-js-sdk/tests/transactional.relay.test.js +131 -0
  64. package/examples/node_modules/quantum-coin-js-sdk/tests/transactional.rpc.test.js +103 -0
  65. package/examples/node_modules/quantum-coin-js-sdk/tests/verify-vectors.json +95035 -0
  66. package/examples/node_modules/quantum-coin-js-sdk/wasmBase64.d.ts +9 -0
  67. package/examples/node_modules/quantum-coin-js-sdk/wasmBase64.js +16 -0
  68. package/examples/node_modules/quantum-coin-js-sdk/wasm_exec.d.ts +0 -0
  69. package/examples/node_modules/quantum-coin-js-sdk/wasm_exec.js +587 -0
  70. package/examples/node_modules/resolve-pkg-maps/LICENSE +21 -0
  71. package/examples/node_modules/resolve-pkg-maps/README.md +216 -0
  72. package/examples/node_modules/resolve-pkg-maps/dist/index.cjs +1 -0
  73. package/examples/node_modules/resolve-pkg-maps/dist/index.d.cts +11 -0
  74. package/examples/node_modules/resolve-pkg-maps/dist/index.d.mts +11 -0
  75. package/examples/node_modules/resolve-pkg-maps/dist/index.mjs +1 -0
  76. package/examples/node_modules/resolve-pkg-maps/package.json +42 -0
  77. package/examples/node_modules/seed-words/.github/workflows/publish-npmjs.yaml +22 -0
  78. package/examples/node_modules/seed-words/BUILD.md +7 -0
  79. package/examples/node_modules/seed-words/LICENSE +121 -0
  80. package/examples/node_modules/seed-words/README.md +67 -0
  81. package/examples/node_modules/seed-words/dist/seedwords.d.ts +39 -0
  82. package/examples/node_modules/seed-words/package.json +27 -0
  83. package/examples/node_modules/seed-words/seedwords.js +315 -0
  84. package/examples/node_modules/seed-words/seedwords.txt +65536 -0
  85. package/examples/node_modules/seed-words/tsconfig.json +21 -0
  86. package/examples/node_modules/tsx/LICENSE +21 -0
  87. package/examples/node_modules/tsx/README.md +32 -0
  88. package/examples/node_modules/tsx/dist/cjs/api/index.cjs +1 -0
  89. package/examples/node_modules/tsx/dist/cjs/api/index.d.cts +35 -0
  90. package/examples/node_modules/tsx/dist/cjs/api/index.d.mts +35 -0
  91. package/examples/node_modules/tsx/dist/cjs/api/index.mjs +1 -0
  92. package/examples/node_modules/tsx/dist/cjs/index.cjs +1 -0
  93. package/examples/node_modules/tsx/dist/cjs/index.mjs +1 -0
  94. package/examples/node_modules/tsx/dist/cli.cjs +54 -0
  95. package/examples/node_modules/tsx/dist/cli.mjs +55 -0
  96. package/examples/node_modules/tsx/dist/client-BQVF1NaW.mjs +1 -0
  97. package/examples/node_modules/tsx/dist/client-D6NvIMSC.cjs +1 -0
  98. package/examples/node_modules/tsx/dist/esm/api/index.cjs +1 -0
  99. package/examples/node_modules/tsx/dist/esm/api/index.d.cts +35 -0
  100. package/examples/node_modules/tsx/dist/esm/api/index.d.mts +35 -0
  101. package/examples/node_modules/tsx/dist/esm/api/index.mjs +1 -0
  102. package/examples/node_modules/tsx/dist/esm/index.cjs +2 -0
  103. package/examples/node_modules/tsx/dist/esm/index.mjs +2 -0
  104. package/examples/node_modules/tsx/dist/get-pipe-path-BHW2eJdv.mjs +1 -0
  105. package/examples/node_modules/tsx/dist/get-pipe-path-BoR10qr8.cjs +1 -0
  106. package/examples/node_modules/tsx/dist/index-7AaEi15b.mjs +14 -0
  107. package/examples/node_modules/tsx/dist/index-BWFBUo6r.cjs +1 -0
  108. package/examples/node_modules/tsx/dist/index-gbaejti9.mjs +1 -0
  109. package/examples/node_modules/tsx/dist/index-gckBtVBf.cjs +14 -0
  110. package/examples/node_modules/tsx/dist/lexer-DQCqS3nf.mjs +3 -0
  111. package/examples/node_modules/tsx/dist/lexer-DgIbo0BU.cjs +3 -0
  112. package/examples/node_modules/tsx/dist/loader.cjs +1 -0
  113. package/examples/node_modules/tsx/dist/loader.mjs +1 -0
  114. package/examples/node_modules/tsx/dist/node-features-_8ZFwP_x.mjs +1 -0
  115. package/examples/node_modules/tsx/dist/node-features-roYmp9jK.cjs +1 -0
  116. package/examples/node_modules/tsx/dist/package-CeBgXWuR.mjs +1 -0
  117. package/examples/node_modules/tsx/dist/package-Dxt5kIHw.cjs +1 -0
  118. package/examples/node_modules/tsx/dist/patch-repl.cjs +1 -0
  119. package/examples/node_modules/tsx/dist/patch-repl.mjs +1 -0
  120. package/examples/node_modules/tsx/dist/preflight.cjs +1 -0
  121. package/examples/node_modules/tsx/dist/preflight.mjs +1 -0
  122. package/examples/node_modules/tsx/dist/register-2sWVXuRQ.cjs +1 -0
  123. package/examples/node_modules/tsx/dist/register-B7jrtLTO.mjs +1 -0
  124. package/examples/node_modules/tsx/dist/register-CFH5oNdT.mjs +4 -0
  125. package/examples/node_modules/tsx/dist/register-D46fvsV_.cjs +4 -0
  126. package/examples/node_modules/tsx/dist/repl.cjs +3 -0
  127. package/examples/node_modules/tsx/dist/repl.mjs +3 -0
  128. package/examples/node_modules/tsx/dist/require-D4F1Lv60.cjs +1 -0
  129. package/examples/node_modules/tsx/dist/require-DQxpCAr4.mjs +1 -0
  130. package/examples/node_modules/tsx/dist/suppress-warnings.cjs +1 -0
  131. package/examples/node_modules/tsx/dist/suppress-warnings.mjs +1 -0
  132. package/examples/node_modules/tsx/dist/temporary-directory-B83uKxJF.cjs +1 -0
  133. package/examples/node_modules/tsx/dist/temporary-directory-CwHp0_NW.mjs +1 -0
  134. package/examples/node_modules/tsx/dist/types-Cxp8y2TL.d.ts +5 -0
  135. package/examples/node_modules/tsx/package.json +68 -0
  136. package/examples/offline-signing.js +0 -2
  137. package/examples/offline-signing.ts +0 -1
  138. package/examples/package-lock.json +422 -73
  139. package/examples/package.json +1 -1
  140. package/examples/wallet-offline.js +1 -9
  141. package/examples/wallet-offline.ts +1 -9
  142. package/generate-sdk.js +5 -7
  143. package/package.json +2 -2
  144. package/src/abi/interface.js +13 -7
  145. package/src/abi/js-abi-coder.js +23 -18
  146. package/src/constants.d.ts +0 -5
  147. package/src/constants.js +0 -7
  148. package/src/contract/contract-factory.js +9 -3
  149. package/src/contract/contract.js +9 -3
  150. package/src/errors/index.js +12 -0
  151. package/src/index.d.ts +0 -3
  152. package/src/providers/extra-providers.js +20 -6
  153. package/src/providers/json-rpc-provider.js +15 -5
  154. package/src/providers/provider.d.ts +0 -2
  155. package/src/providers/provider.js +1 -3
  156. package/src/utils/address.d.ts +0 -14
  157. package/src/utils/address.js +12 -49
  158. package/src/utils/hashing.d.ts +0 -6
  159. package/src/utils/hashing.js +8 -23
  160. package/src/utils/index.d.ts +0 -3
  161. package/src/utils/rlp.js +7 -4
  162. package/src/wallet/wallet.d.ts +7 -13
  163. package/src/wallet/wallet.js +136 -97
  164. package/test/security/malformed-input.test.js +295 -1
  165. package/test/unit/address-wallet.test.js +329 -129
  166. package/test/unit/address-wallet.test.ts +328 -128
  167. package/test/unit/hashing.test.js +0 -11
  168. package/test/unit/hashing.test.ts +0 -11
  169. package/test/unit/providers.test.js +3 -1
  170. package/test/unit/providers.test.ts +3 -1
  171. package/SPEC.md +0 -3845
package/README-SDK.md CHANGED
@@ -303,7 +303,6 @@ Wrapper returned by `provider.sendTransaction(...)` and `provider.getTransaction
303
303
  - `data: string`
304
304
  - `value: bigint`
305
305
  - `gasLimit: bigint | null`
306
- - `gasPrice: bigint | null`
307
306
  - `chainId: number | null`
308
307
  - `blockNumber: number | null`
309
308
  - `txType: number | null` — Transaction type (e.g. `1` for a standard transfer)
@@ -371,11 +370,12 @@ Core signing implementation.
371
370
  **Properties**
372
371
  - `address: string`
373
372
  - `privateKey: string` (getter; hex string)
373
+ - `publicKey: string` (getter; hex string)
374
+ - `seed: string | null` (getter; pre-expansion seed as hex, or `null` if the wallet has no seed source)
374
375
  - `provider: AbstractProvider | null`
375
376
 
376
377
  **Methods**
377
378
  - `getAddress(): Promise<string>`
378
- - `signMessageSync(message: string | Uint8Array): string`
379
379
  - `signTransaction(tx: TransactionRequest): Promise<string>`
380
380
  - `sendTransaction(tx: TransactionRequest): Promise<TransactionResponse>`
381
381
 
@@ -387,7 +387,6 @@ User-facing wallet class.
387
387
 
388
388
  **Static methods**
389
389
  - `Wallet.createRandom(provider?: AbstractProvider, keyType?: number | null): Wallet` — `keyType`: `null`/`3` (default, hybrid compact) or `5` (hybrid5)
390
- - `Wallet.createRandomSeed(keyType?: number | null): string[]` — returns seed words (32 for keyType 3, 36 for keyType 5); pass to `fromPhrase` to open
391
390
  - `Wallet.fromSeed(seed: number[], provider?: AbstractProvider): Wallet` — opens wallet from raw seed bytes (64/72/96 length)
392
391
  - `Wallet.fromEncryptedJsonSync(json: string, password: string, provider?: AbstractProvider): Wallet`
393
392
  - `Wallet.fromPhrase(phrase: string | string[], provider?: AbstractProvider): Wallet`
@@ -400,8 +399,22 @@ User-facing wallet class.
400
399
  - `getTransactionCount(blockTag?: string): Promise<number>`
401
400
  - `encryptSync(password: string | Uint8Array): string`
402
401
  - `connect(provider: AbstractProvider): Wallet`
402
+ - `getPhrase(): string[] | null` — returns the seed phrase (list of words) when the wallet has a seed, else `null`. Works for `createRandom`, `fromPhrase`, `fromSeed`, and `fromEncryptedJsonSync` on a version-5 keystore. Returns `null` for `fromKeys` and for v3/v4 keystores.
403
403
  - `getSigningContext(fullSign?: boolean | null): number` — returns the recommended signing context for this wallet (based on public key type). Setting `fullSign` to `true` may incur additional gas cost.
404
404
 
405
+ **Seed & phrase applicability**
406
+
407
+ | Factory | `seed` | `getPhrase()` |
408
+ | --- | --- | --- |
409
+ | `new Wallet(privateKey)` | `null` | `null` |
410
+ | `Wallet.createRandom(provider?, keyType?)` | non-null | 32 or 36 words |
411
+ | `Wallet.fromPhrase(phrase)` | non-null | 32 / 36 / 48 words |
412
+ | `Wallet.fromSeed(seed)` | non-null | 32 / 36 / 48 words |
413
+ | `Wallet.fromKeys(priv, pub)` | `null` | `null` |
414
+ | `Wallet.fromEncryptedJsonSync(json, pw)` — v5 keystore (from `encryptSync` on seed-bearing wallet, or `encryptSeedSync`) | non-null | original words |
415
+ | `Wallet.fromEncryptedJsonSync(json, pw)` — v3 / v4 keystore | `null` | `null` |
416
+ | `wallet.connect(provider)` | same as source | same as source |
417
+
405
418
  **Example(s):**
406
419
  - `examples/wallet-offline.js`
407
420
 
@@ -561,8 +574,6 @@ From `quantumcoin`:
561
574
  - `getCreateAddress({ from, nonce }): string`
562
575
  - `getCreate2Address(from: string, salt: string, initCodeHash: string): string`
563
576
  - `computeAddress(publicKey: string|Uint8Array): string`
564
- - `verifyMessage(message: string|Uint8Array, signature: string): string`
565
- - `recoverAddress(message: string|Uint8Array, signature: string): string`
566
577
 
567
578
  **Example(s):**
568
579
  - `examples/wallet-offline.js`
package/README.md CHANGED
@@ -44,20 +44,31 @@ console.log(await provider.getBlockNumber());
44
44
  ## Wallet (offline + online)
45
45
 
46
46
  ```js
47
- const { Wallet, verifyMessage } = require("quantumcoin");
47
+ const { Wallet } = require("quantumcoin");
48
48
  const { Initialize } = require("quantumcoin/config");
49
49
 
50
50
  await Initialize(null);
51
51
 
52
52
  const wallet = Wallet.createRandom();
53
- const sig = wallet.signMessageSync("Hello, QuantumCoin!");
54
- console.log(verifyMessage("Hello, QuantumCoin!", sig));
55
53
 
56
54
  const encrypted = wallet.encryptSync("mySecurePassword123");
57
55
  const restored = Wallet.fromEncryptedJsonSync(encrypted, "mySecurePassword123");
58
56
  console.log(restored.address);
59
57
  ```
60
58
 
59
+ ### Seed phrase (`getPhrase()`)
60
+
61
+ Any wallet that was constructed from a seed exposes its seed words via `getPhrase()`:
62
+
63
+ ```js
64
+ const wallet = Wallet.createRandom();
65
+ const phrase = wallet.getPhrase(); // string[] of seed words, or null
66
+ const restored = Wallet.fromPhrase(phrase);
67
+ console.log(restored.address === wallet.address); // true
68
+ ```
69
+
70
+ `getPhrase()` returns the seed words whenever `wallet.seed` is non-null — i.e. wallets produced by `createRandom`, `fromPhrase`, `fromSeed`, or `fromEncryptedJsonSync` on a version-5 keystore (produced by `encryptSync` on a seed-bearing wallet or by `encryptSeedSync`). It returns `null` for wallets constructed via `fromKeys` or from v3/v4 keystores.
71
+
61
72
  ### Encrypt a raw seed
62
73
 
63
74
  You can encrypt raw seed bytes (pre-expansion) into a portable wallet JSON (version 5 format) without first opening the wallet:
package/config.js CHANGED
@@ -106,10 +106,18 @@ function getConfig() {
106
106
  return _config;
107
107
  }
108
108
 
109
- // Export Config class and Initialize function
109
+ /**
110
+ * Returns the pending initialization promise, or null if Initialize() has not been called.
111
+ * @return {Promise<boolean>|null}
112
+ */
113
+ function getInitializationPromise() {
114
+ return _initializationPromise;
115
+ }
116
+
110
117
  module.exports = {
111
118
  Config,
112
119
  Initialize,
113
120
  isInitialized,
114
- getConfig
121
+ getConfig,
122
+ getInitializationPromise
115
123
  };
@@ -47,11 +47,6 @@ async function main() {
47
47
  const wallet = qc.Wallet.createRandom();
48
48
  console.log("Random wallet address:", wallet.address);
49
49
  logAddress("random_wallet", wallet.address);
50
- const sig = wallet.signMessageSync("Hello, QuantumCoin!");
51
- console.log("Signed message signature:", sig.slice(0, 18) + "...");
52
- const recovered = qc.verifyMessage("Hello, QuantumCoin!", sig);
53
- console.log("Recovered address:", recovered);
54
- logAddress("recovered", recovered);
55
50
 
56
51
  const encrypted = wallet.encryptSync("mySecurePassword123");
57
52
  console.log("Encrypted wallet JSON length:", encrypted.length);
@@ -38,11 +38,6 @@ async function main(): Promise<void> {
38
38
  const wallet = qc.Wallet.createRandom();
39
39
  console.log("Random wallet address:", wallet.address);
40
40
  logAddress("random_wallet", wallet.address);
41
- const sig = wallet.signMessageSync("Hello, QuantumCoin!");
42
- console.log("Signed message signature:", sig.slice(0, 18) + "...");
43
- const recovered = qc.verifyMessage("Hello, QuantumCoin!", sig);
44
- console.log("Recovered address:", recovered);
45
- logAddress("recovered", recovered);
46
41
 
47
42
  const encrypted = wallet.encryptSync("mySecurePassword123");
48
43
  console.log("Encrypted wallet JSON length:", encrypted.length);
@@ -0,0 +1,16 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -x "$basedir/node" ]; then
13
+ exec "$basedir/node" "$basedir/../esbuild/bin/esbuild" "$@"
14
+ else
15
+ exec node "$basedir/../esbuild/bin/esbuild" "$@"
16
+ fi
@@ -0,0 +1,17 @@
1
+ @ECHO off
2
+ GOTO start
3
+ :find_dp0
4
+ SET dp0=%~dp0
5
+ EXIT /b
6
+ :start
7
+ SETLOCAL
8
+ CALL :find_dp0
9
+
10
+ IF EXIST "%dp0%\node.exe" (
11
+ SET "_prog=%dp0%\node.exe"
12
+ ) ELSE (
13
+ SET "_prog=node"
14
+ SET PATHEXT=%PATHEXT:;.JS;=;%
15
+ )
16
+
17
+ endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\esbuild\bin\esbuild" %*
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env pwsh
2
+ $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
+
4
+ $exe=""
5
+ if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
+ # Fix case when both the Windows and Linux builds of Node
7
+ # are installed in the same directory
8
+ $exe=".exe"
9
+ }
10
+ $ret=0
11
+ if (Test-Path "$basedir/node$exe") {
12
+ # Support pipeline input
13
+ if ($MyInvocation.ExpectingInput) {
14
+ $input | & "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args
15
+ } else {
16
+ & "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args
17
+ }
18
+ $ret=$LASTEXITCODE
19
+ } else {
20
+ # Support pipeline input
21
+ if ($MyInvocation.ExpectingInput) {
22
+ $input | & "node$exe" "$basedir/../esbuild/bin/esbuild" $args
23
+ } else {
24
+ & "node$exe" "$basedir/../esbuild/bin/esbuild" $args
25
+ }
26
+ $ret=$LASTEXITCODE
27
+ }
28
+ exit $ret
@@ -0,0 +1,16 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -x "$basedir/node" ]; then
13
+ exec "$basedir/node" "$basedir/../quantumcoin/generate-sdk.js" "$@"
14
+ else
15
+ exec node "$basedir/../quantumcoin/generate-sdk.js" "$@"
16
+ fi
@@ -0,0 +1,17 @@
1
+ @ECHO off
2
+ GOTO start
3
+ :find_dp0
4
+ SET dp0=%~dp0
5
+ EXIT /b
6
+ :start
7
+ SETLOCAL
8
+ CALL :find_dp0
9
+
10
+ IF EXIST "%dp0%\node.exe" (
11
+ SET "_prog=%dp0%\node.exe"
12
+ ) ELSE (
13
+ SET "_prog=node"
14
+ SET PATHEXT=%PATHEXT:;.JS;=;%
15
+ )
16
+
17
+ endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\quantumcoin\generate-sdk.js" %*
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env pwsh
2
+ $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
+
4
+ $exe=""
5
+ if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
+ # Fix case when both the Windows and Linux builds of Node
7
+ # are installed in the same directory
8
+ $exe=".exe"
9
+ }
10
+ $ret=0
11
+ if (Test-Path "$basedir/node$exe") {
12
+ # Support pipeline input
13
+ if ($MyInvocation.ExpectingInput) {
14
+ $input | & "$basedir/node$exe" "$basedir/../quantumcoin/generate-sdk.js" $args
15
+ } else {
16
+ & "$basedir/node$exe" "$basedir/../quantumcoin/generate-sdk.js" $args
17
+ }
18
+ $ret=$LASTEXITCODE
19
+ } else {
20
+ # Support pipeline input
21
+ if ($MyInvocation.ExpectingInput) {
22
+ $input | & "node$exe" "$basedir/../quantumcoin/generate-sdk.js" $args
23
+ } else {
24
+ & "node$exe" "$basedir/../quantumcoin/generate-sdk.js" $args
25
+ }
26
+ $ret=$LASTEXITCODE
27
+ }
28
+ exit $ret
@@ -0,0 +1,16 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -x "$basedir/node" ]; then
13
+ exec "$basedir/node" "$basedir/../tsx/dist/cli.mjs" "$@"
14
+ else
15
+ exec node "$basedir/../tsx/dist/cli.mjs" "$@"
16
+ fi
@@ -0,0 +1,17 @@
1
+ @ECHO off
2
+ GOTO start
3
+ :find_dp0
4
+ SET dp0=%~dp0
5
+ EXIT /b
6
+ :start
7
+ SETLOCAL
8
+ CALL :find_dp0
9
+
10
+ IF EXIST "%dp0%\node.exe" (
11
+ SET "_prog=%dp0%\node.exe"
12
+ ) ELSE (
13
+ SET "_prog=node"
14
+ SET PATHEXT=%PATHEXT:;.JS;=;%
15
+ )
16
+
17
+ endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\tsx\dist\cli.mjs" %*
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env pwsh
2
+ $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
+
4
+ $exe=""
5
+ if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
+ # Fix case when both the Windows and Linux builds of Node
7
+ # are installed in the same directory
8
+ $exe=".exe"
9
+ }
10
+ $ret=0
11
+ if (Test-Path "$basedir/node$exe") {
12
+ # Support pipeline input
13
+ if ($MyInvocation.ExpectingInput) {
14
+ $input | & "$basedir/node$exe" "$basedir/../tsx/dist/cli.mjs" $args
15
+ } else {
16
+ & "$basedir/node$exe" "$basedir/../tsx/dist/cli.mjs" $args
17
+ }
18
+ $ret=$LASTEXITCODE
19
+ } else {
20
+ # Support pipeline input
21
+ if ($MyInvocation.ExpectingInput) {
22
+ $input | & "node$exe" "$basedir/../tsx/dist/cli.mjs" $args
23
+ } else {
24
+ & "node$exe" "$basedir/../tsx/dist/cli.mjs" $args
25
+ }
26
+ $ret=$LASTEXITCODE
27
+ }
28
+ exit $ret
@@ -0,0 +1,144 @@
1
+ {
2
+ "name": "quantumcoinjs-sdk-examples",
3
+ "version": "1.0.1",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "..": {
8
+ "name": "quantumcoin",
9
+ "version": "7.0.12",
10
+ "license": "MIT",
11
+ "dependencies": {
12
+ "quantum-coin-js-sdk": "1.0.35",
13
+ "seed-words": "^1.0.2"
14
+ },
15
+ "bin": {
16
+ "sdkgen": "generate-sdk.js"
17
+ },
18
+ "devDependencies": {
19
+ "tsx": "^4.19.0"
20
+ }
21
+ },
22
+ "node_modules/@esbuild/win32-x64": {
23
+ "version": "0.27.7",
24
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz",
25
+ "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==",
26
+ "cpu": [
27
+ "x64"
28
+ ],
29
+ "dev": true,
30
+ "license": "MIT",
31
+ "optional": true,
32
+ "os": [
33
+ "win32"
34
+ ],
35
+ "engines": {
36
+ "node": ">=18"
37
+ }
38
+ },
39
+ "node_modules/esbuild": {
40
+ "version": "0.27.7",
41
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz",
42
+ "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==",
43
+ "dev": true,
44
+ "hasInstallScript": true,
45
+ "license": "MIT",
46
+ "bin": {
47
+ "esbuild": "bin/esbuild"
48
+ },
49
+ "engines": {
50
+ "node": ">=18"
51
+ },
52
+ "optionalDependencies": {
53
+ "@esbuild/aix-ppc64": "0.27.7",
54
+ "@esbuild/android-arm": "0.27.7",
55
+ "@esbuild/android-arm64": "0.27.7",
56
+ "@esbuild/android-x64": "0.27.7",
57
+ "@esbuild/darwin-arm64": "0.27.7",
58
+ "@esbuild/darwin-x64": "0.27.7",
59
+ "@esbuild/freebsd-arm64": "0.27.7",
60
+ "@esbuild/freebsd-x64": "0.27.7",
61
+ "@esbuild/linux-arm": "0.27.7",
62
+ "@esbuild/linux-arm64": "0.27.7",
63
+ "@esbuild/linux-ia32": "0.27.7",
64
+ "@esbuild/linux-loong64": "0.27.7",
65
+ "@esbuild/linux-mips64el": "0.27.7",
66
+ "@esbuild/linux-ppc64": "0.27.7",
67
+ "@esbuild/linux-riscv64": "0.27.7",
68
+ "@esbuild/linux-s390x": "0.27.7",
69
+ "@esbuild/linux-x64": "0.27.7",
70
+ "@esbuild/netbsd-arm64": "0.27.7",
71
+ "@esbuild/netbsd-x64": "0.27.7",
72
+ "@esbuild/openbsd-arm64": "0.27.7",
73
+ "@esbuild/openbsd-x64": "0.27.7",
74
+ "@esbuild/openharmony-arm64": "0.27.7",
75
+ "@esbuild/sunos-x64": "0.27.7",
76
+ "@esbuild/win32-arm64": "0.27.7",
77
+ "@esbuild/win32-ia32": "0.27.7",
78
+ "@esbuild/win32-x64": "0.27.7"
79
+ }
80
+ },
81
+ "node_modules/get-tsconfig": {
82
+ "version": "4.13.8",
83
+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.8.tgz",
84
+ "integrity": "sha512-J87BxkLXykmisLQ+KA4x2+O6rVf+PJrtFUO8lGyiRg4lyxJLJ8/v0sRAKdVZQOy6tR6lMRAF1NqzCf9BQijm0w==",
85
+ "dev": true,
86
+ "license": "MIT",
87
+ "dependencies": {
88
+ "resolve-pkg-maps": "^1.0.0"
89
+ },
90
+ "funding": {
91
+ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
92
+ }
93
+ },
94
+ "node_modules/quantum-coin-js-sdk": {
95
+ "version": "1.0.35",
96
+ "resolved": "https://registry.npmjs.org/quantum-coin-js-sdk/-/quantum-coin-js-sdk-1.0.35.tgz",
97
+ "integrity": "sha512-hJWYxPT5x+us/61hciuW5Ky9b0cRVStBRpKniFiz/usQJkM/Pw/8dNlgdBLU2H8ZvSuBp930Y+eRp9dpYRcYNA==",
98
+ "license": "MIT",
99
+ "dependencies": {
100
+ "seed-words": "1.0.2"
101
+ }
102
+ },
103
+ "node_modules/quantumcoin": {
104
+ "resolved": "..",
105
+ "link": true
106
+ },
107
+ "node_modules/resolve-pkg-maps": {
108
+ "version": "1.0.0",
109
+ "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
110
+ "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
111
+ "dev": true,
112
+ "license": "MIT",
113
+ "funding": {
114
+ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
115
+ }
116
+ },
117
+ "node_modules/seed-words": {
118
+ "version": "1.0.2",
119
+ "resolved": "https://registry.npmjs.org/seed-words/-/seed-words-1.0.2.tgz",
120
+ "integrity": "sha512-ia58deuPjcR8DpJ8uIgZ7gqDnIWD8vnjb4jX/sEsIDcuQaH/AJj9J8L3DXkUHfUGqAq9Y6pVMuG90t3XUJH90g==",
121
+ "license": "MIT"
122
+ },
123
+ "node_modules/tsx": {
124
+ "version": "4.21.0",
125
+ "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz",
126
+ "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==",
127
+ "dev": true,
128
+ "license": "MIT",
129
+ "dependencies": {
130
+ "esbuild": "~0.27.0",
131
+ "get-tsconfig": "^4.7.5"
132
+ },
133
+ "bin": {
134
+ "tsx": "dist/cli.mjs"
135
+ },
136
+ "engines": {
137
+ "node": ">=18.0.0"
138
+ },
139
+ "optionalDependencies": {
140
+ "fsevents": "~2.3.3"
141
+ }
142
+ }
143
+ }
144
+ }
@@ -0,0 +1,3 @@
1
+ # esbuild
2
+
3
+ This is the Windows 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@esbuild/win32-x64",
3
+ "version": "0.27.7",
4
+ "description": "The Windows 64-bit binary for esbuild, a JavaScript bundler.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/evanw/esbuild.git"
8
+ },
9
+ "license": "MIT",
10
+ "preferUnplugged": true,
11
+ "engines": {
12
+ "node": ">=18"
13
+ },
14
+ "os": [
15
+ "win32"
16
+ ],
17
+ "cpu": [
18
+ "x64"
19
+ ]
20
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Evan Wallace
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ # esbuild
2
+
3
+ This is a JavaScript bundler and minifier. See https://github.com/evanw/esbuild and the [JavaScript API documentation](https://esbuild.github.io/api/) for details.