Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
480 changes: 302 additions & 178 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@
}
],
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^2.0.0",
"@typescript-eslint/parser": "^2.0.0",
"eslint": "^6.1.0",
"ts-node": "^8.3.0",
"typescript": "^3.5.3"
"@typescript-eslint/eslint-plugin": "^2.4.0",
"@typescript-eslint/parser": "^2.4.0",
"eslint": "^6.5.1",
"ts-node": "^8.4.1",
"typescript": "^3.6.4"
},
"dependencies": {
"@types/bn.js": "^4.11.5",
Expand All @@ -76,18 +76,20 @@
"@types/node": "^11.13.8",
"@types/node-fetch": "^2.5.0",
"@types/ripemd160": "^2.0.0",
"@types/triplesec": "^3.0.0",
"ajv": "^4.11.5",
"bip32": "^2.0.4",
"bip39": "^3.0.2",
"bitcoinjs-lib": "^5.1.2",
"blockstack": "^19.2.2",
"bitcoinjs-lib": "^5.1.6",
"blockstack": "github:blockstack/blockstack.js#feature/crypto-isolation",
"c32check": "^0.0.6",
"cors": "^2.8.4",
"express": "^4.16.0",
"express-winston": "^3.1.0",
"jsontokens": "^2.0.2",
"node-fetch": "^2.6.0",
"ripemd160": "^2.0.1",
"triplesec": "^3.0.27",
"winston": "^3.2.1",
"zone-file": "^0.2.2"
}
Expand Down
12 changes: 7 additions & 5 deletions src/argparse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2813,14 +2813,16 @@ export function getCommandArgs(command: string, argsList: Array<string>) {
export interface CheckArgsSuccessType {
success: true;
command: string;
args: Array<string>
args: Array<string>;
error?: false;
usage?: false;
};

export interface CheckArgsFailType {
success: false;
error: string;
command: string;
usage: boolean
usage: boolean;
};

export function checkArgs(argList: Array<string>)
Expand Down Expand Up @@ -2876,10 +2878,10 @@ export function checkArgs(argList: Array<string>)
const ajv = Ajv();
const valid = ajv.validate(commandSchema, commandArgs);
if (!valid) {
let errorMsg = "";
let errorMsg = '';
for (let i = 0; i < ajv.errors.length; i++) {
const msg = `Invalid command arguments: Schema "${ajv.errors[0].schemaPath}" failed validation (problem: "${ajv.errors[0].message}", cause: "${JSON.stringify(ajv.errors[0].params)}")\n`;
errorMsg += msg;
const msg = `Invalid command arguments: Schema "${ajv.errors[0].schemaPath}" failed validation (problem: "${ajv.errors[0].message}", cause: "${JSON.stringify(ajv.errors[0].params)}")\n`;
errorMsg += msg;
}
return {
'success': false,
Expand Down
2 changes: 1 addition & 1 deletion src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ async function makeSignInLink(network: CLINetworkAdapter,
const appPrivateKey = await getAppPrivateKey(network, mnemonic, id, appOrigin);

const associationToken = makeAssociationToken(appPrivateKey, id.privateKey);
const authResponseTmp = blockstack.makeAuthResponse(
const authResponseTmp = await blockstack.makeAuthResponse(
id.privateKey,
{},
id.name,
Expand Down
Loading