@stacks/cli 7.2.0-beta.0 → 7.4.1-beta.0
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/argparse.d.ts +5 -5
- package/dist/argparse.js +30 -20
- package/dist/argparse.js.map +1 -1
- package/dist/auth.d.ts +2 -2
- package/dist/cli.js +25 -12
- package/dist/cli.js.map +1 -1
- package/dist/common.js +5 -5
- package/dist/common.js.map +1 -1
- package/dist/data.js +24 -15
- package/dist/data.js.map +1 -1
- package/dist/encrypt.js +19 -10
- package/dist/encrypt.js.map +1 -1
- package/dist/keys.js +24 -14
- package/dist/keys.js.map +1 -1
- package/dist/network.js +21 -11
- package/dist/network.js.map +1 -1
- package/dist/utils.d.ts +1 -2
- package/dist/utils.js +47 -37
- package/dist/utils.js.map +1 -1
- package/package.json +14 -15
- package/src/auth.ts +1 -2
- package/src/cli.ts +8 -6
- package/src/data.ts +0 -1
- package/src/encrypt.ts +0 -1
- package/src/keys.ts +0 -1
- package/src/network.ts +1 -1
- package/src/utils.ts +5 -7
- package/LICENSE +0 -20
package/src/utils.ts
CHANGED
|
@@ -29,7 +29,6 @@ import {
|
|
|
29
29
|
|
|
30
30
|
import { StacksNetwork, TransactionVersion } from '@stacks/network';
|
|
31
31
|
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
33
32
|
const ZoneFile = require('zone-file');
|
|
34
33
|
|
|
35
34
|
import {
|
|
@@ -313,25 +312,25 @@ export function parseSegwitP2SHKeys(serializedPrivateKeys: string): SegwitP2SHKe
|
|
|
313
312
|
*/
|
|
314
313
|
export function decodePrivateKey(serializedPrivateKey: string): string | CLITransactionSigner {
|
|
315
314
|
const nosignMatches = serializedPrivateKey.match(PRIVATE_KEY_NOSIGN_PATTERN);
|
|
316
|
-
if (
|
|
315
|
+
if (nosignMatches) {
|
|
317
316
|
// no private key
|
|
318
317
|
return parseNullSigner(serializedPrivateKey);
|
|
319
318
|
}
|
|
320
319
|
|
|
321
320
|
const singleKeyMatches = serializedPrivateKey.match(PRIVATE_KEY_PATTERN);
|
|
322
|
-
if (
|
|
321
|
+
if (singleKeyMatches) {
|
|
323
322
|
// one private key
|
|
324
323
|
return serializedPrivateKey;
|
|
325
324
|
}
|
|
326
325
|
|
|
327
326
|
const multiKeyMatches = serializedPrivateKey.match(PRIVATE_KEY_MULTISIG_PATTERN);
|
|
328
|
-
if (
|
|
327
|
+
if (multiKeyMatches) {
|
|
329
328
|
// multisig bundle
|
|
330
329
|
return parseMultiSigKeys(serializedPrivateKey);
|
|
331
330
|
}
|
|
332
331
|
|
|
333
332
|
const segwitP2SHMatches = serializedPrivateKey.match(PRIVATE_KEY_SEGWIT_P2SH_PATTERN);
|
|
334
|
-
if (
|
|
333
|
+
if (segwitP2SHMatches) {
|
|
335
334
|
// segwit p2sh bundle
|
|
336
335
|
return parseSegwitP2SHKeys(serializedPrivateKey);
|
|
337
336
|
}
|
|
@@ -383,8 +382,7 @@ export function hash160(buff: Buffer): Buffer {
|
|
|
383
382
|
/*
|
|
384
383
|
* Sign a profile into a JWT
|
|
385
384
|
*/
|
|
386
|
-
|
|
387
|
-
export function makeProfileJWT(profileData: Object, privateKey: string): string {
|
|
385
|
+
export function makeProfileJWT(profileData: object, privateKey: string): string {
|
|
388
386
|
const signedToken = blockstack.signProfileToken(profileData, privateKey);
|
|
389
387
|
const wrappedToken = blockstack.wrapProfileToken(signedToken);
|
|
390
388
|
const tokenRecords = [wrappedToken];
|
package/LICENSE
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2017 Blockstack Inc.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
-
the Software without restriction, including without limitation the rights to
|
|
8
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
-
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, FITNESS
|
|
17
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|