@hardkas/accounts 0.12.0-rc.26 → 0.12.0-rc.27
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/dist/{authorizers-OAGU7NYR.js → authorizers-JX7RUMUE.js} +1 -1
- package/dist/{chunk-IRNHRG4N.js → chunk-5HHED646.js} +4 -1
- package/dist/{chunk-YBCXJBA5.js → chunk-5NJSLTWR.js} +2 -2
- package/dist/{chunk-G6PYXAIU.js → chunk-QR5JCBXF.js} +2 -2
- package/dist/index.js +3 -3
- package/dist/{kaspa-wasm-signer-RBV2EPB7.js → kaspa-wasm-signer-F23BRVM3.js} +2 -2
- package/dist/{resolve-FPK6KS5J.js → resolve-DKYE4CCI.js} +1 -1
- package/package.json +6 -6
|
@@ -8,7 +8,7 @@ import { CrossWorldAccountCollisionError, AccountNetworkMismatchError, stripBom
|
|
|
8
8
|
import fs from "fs";
|
|
9
9
|
import path from "path";
|
|
10
10
|
import util from "util";
|
|
11
|
-
import { writeFileAtomicSync, stripBom } from "@hardkas/core";
|
|
11
|
+
import { writeFileAtomicSync, stripBom, isWindowsHostileName } from "@hardkas/core";
|
|
12
12
|
import {
|
|
13
13
|
HARDKAS_VERSION,
|
|
14
14
|
ARTIFACT_SCHEMAS,
|
|
@@ -132,6 +132,9 @@ function validateAccountName(name) {
|
|
|
132
132
|
`Invalid account name '${name}'. Only letters, numbers, dashes and underscores are allowed.`
|
|
133
133
|
);
|
|
134
134
|
}
|
|
135
|
+
if (isWindowsHostileName(name)) {
|
|
136
|
+
throw new Error(`Invalid account name '${name}'. It is a reserved device name on Windows; choose another name.`);
|
|
137
|
+
}
|
|
135
138
|
}
|
|
136
139
|
function validateAddressPrefix(address) {
|
|
137
140
|
if (!address) {
|
|
@@ -62,7 +62,7 @@ var LazyAccountAuthorizer = class {
|
|
|
62
62
|
accountName;
|
|
63
63
|
workspaceRoot;
|
|
64
64
|
async authorize(context) {
|
|
65
|
-
const { resolveHardkasAccount } = await import("./resolve-
|
|
65
|
+
const { resolveHardkasAccount } = await import("./resolve-DKYE4CCI.js");
|
|
66
66
|
const account = await resolveHardkasAccount({
|
|
67
67
|
nameOrAddress: this.accountName,
|
|
68
68
|
config: { cwd: this.workspaceRoot }
|
|
@@ -72,7 +72,7 @@ var LazyAccountAuthorizer = class {
|
|
|
72
72
|
pkValue = account.privateKey;
|
|
73
73
|
}
|
|
74
74
|
if (!pkValue && account.keystorePath) {
|
|
75
|
-
const { unlockAccountKeystore } = await import("./kaspa-wasm-signer-
|
|
75
|
+
const { unlockAccountKeystore } = await import("./kaspa-wasm-signer-F23BRVM3.js");
|
|
76
76
|
pkValue = await unlockAccountKeystore(
|
|
77
77
|
{ name: this.accountName, keystorePath: account.keystorePath, keystoreKind: account.keystoreKind },
|
|
78
78
|
void 0
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-BNF566PS.js";
|
|
7
7
|
import {
|
|
8
8
|
resolveHardkasAccount
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5HHED646.js";
|
|
10
10
|
|
|
11
11
|
// src/kaspa-wasm-signer.ts
|
|
12
12
|
import { recomputeDeclaredContentHash } from "@hardkas/artifacts";
|
|
@@ -429,7 +429,7 @@ var KaspaWasmPrivateKeySigner = class {
|
|
|
429
429
|
throw err;
|
|
430
430
|
}
|
|
431
431
|
const expectedAddress = new sdk.PrivateKey(pkValue).toKeypair().toAddress(getNetworkPrefix2(plan.networkId || "simnet")).toString();
|
|
432
|
-
const { PrivateKeyAuthorizer } = await import("./authorizers-
|
|
432
|
+
const { PrivateKeyAuthorizer } = await import("./authorizers-JX7RUMUE.js");
|
|
433
433
|
const sourceInputs = plan.inputs || plan.selectedUtxos || [];
|
|
434
434
|
for (let i = 0; i < numInputs; i++) {
|
|
435
435
|
if (!authorizers[i]) {
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
LazyAccountAuthorizer,
|
|
3
3
|
PrivateKeyAuthorizer,
|
|
4
4
|
StaticSignatureScriptAuthorizer
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5NJSLTWR.js";
|
|
6
6
|
import {
|
|
7
7
|
DEV_ACCOUNTS_PASSWORD,
|
|
8
8
|
KaspaWasmPrivateKeySigner,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
planOutputsWithChange,
|
|
19
19
|
toWasmScriptPublicKey,
|
|
20
20
|
unlockAccountKeystore
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QR5JCBXF.js";
|
|
22
22
|
import {
|
|
23
23
|
parseWasmTxToRpc
|
|
24
24
|
} from "./chunk-GM2BY4VS.js";
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
validateAccountName,
|
|
51
51
|
validateAddressNetwork,
|
|
52
52
|
validateAddressPrefix
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-5HHED646.js";
|
|
54
54
|
|
|
55
55
|
// src/simulated.ts
|
|
56
56
|
var SimulatedSigner = class {
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
KaspaWasmPrivateKeySigner,
|
|
3
3
|
assertSigningNetworkAllowed,
|
|
4
4
|
unlockAccountKeystore
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QR5JCBXF.js";
|
|
6
6
|
import "./chunk-GM2BY4VS.js";
|
|
7
7
|
import "./chunk-BNF566PS.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-5HHED646.js";
|
|
9
9
|
export {
|
|
10
10
|
KaspaWasmPrivateKeySigner,
|
|
11
11
|
assertSigningNetworkAllowed,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hardkas/accounts",
|
|
3
|
-
"version": "0.12.0-rc.
|
|
3
|
+
"version": "0.12.0-rc.27",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"hash-wasm": "^4.12.0",
|
|
26
|
-
"@hardkas/
|
|
27
|
-
"@hardkas/
|
|
28
|
-
"@hardkas/
|
|
29
|
-
"@hardkas/
|
|
30
|
-
"@hardkas/tx-builder": "0.12.0-rc.
|
|
26
|
+
"@hardkas/artifacts": "0.12.0-rc.27",
|
|
27
|
+
"@hardkas/config": "0.12.0-rc.27",
|
|
28
|
+
"@hardkas/core": "0.12.0-rc.27",
|
|
29
|
+
"@hardkas/localnet": "0.12.0-rc.27",
|
|
30
|
+
"@hardkas/tx-builder": "0.12.0-rc.27"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"tsup": "^8.3.5",
|