@stacks/cli 7.2.0-beta.0 → 7.4.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/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 (!!nosignMatches) {
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 (!!singleKeyMatches) {
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 (!!multiKeyMatches) {
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 (!!segwitP2SHMatches) {
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
- // eslint-disable-next-line @typescript-eslint/ban-types
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.