Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve sanitaze function #55

Merged
merged 11 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ To run you will use the "shares" command
- multi-shares (ms) = Keystore path will accept multiple keystores from a folder path, all files must have the same password
```bash
# single file
yarn cli shares --keystore=keystore.json --password=test --operator-ids=1,2,3,4 --operator-keys=LS..,LS..,LS..,LS.. --output-folder=./ --owner-address=... --owner-nonce=..
yarn cli shares --keystore-path=keystore.json --password=test --operator-ids=1,2,3,4 --operator-keys=LS..,LS..,LS..,LS.. --output-folder=./ --owner-address=... --owner-nonce=..

# folder with multiple keystore files
yarn cli shares --keystore=./keystore-files --password=test --operator-ids=1,2,3,4 --operator-keys=LS..,LS..,LS..,LS.. --output-folder=./ --owner-address=... --owner-nonce=.. --multi-shares
yarn cli shares --keystore-path=./keystore-files --password=test --operator-ids=1,2,3,4 --operator-keys=LS..,LS..,LS..,LS.. --output-folder=./ --owner-address=... --owner-nonce=.. --multi-shares
```

**Output:** Name will start with keyshares-timestamp.json
Expand Down
4 changes: 2 additions & 2 deletions dist/esbuild/main.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/esbuild/main.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/tsc/src/commands/actions/arguments/keystore-path.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ declare const _default: {
interactive: {
options: {
type: string;
message: string;
validateSingle: (filePath: string) => any;
};
};
Expand Down
3 changes: 2 additions & 1 deletion dist/tsc/src/commands/actions/arguments/keystore-path.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ declare const _default: {
options: {
type: string;
message: string;
validate: (value: string) => string | boolean;
validate: (value: string) => any;
};
};
};
Expand Down
10 changes: 6 additions & 4 deletions dist/tsc/src/commands/actions/arguments/operator-public-keys.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/tsc/src/commands/actions/arguments/password.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ declare const _default: {
interactive: {
options: {
type: string;
message: string;
};
};
};
Expand Down
3 changes: 2 additions & 1 deletion dist/tsc/src/commands/actions/arguments/password.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/tsc/src/commands/actions/arguments/password.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/tsc/src/commands/actions/validators/file.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export declare const jsonFileValidator: (filePath: string, message?: string) =>
* @param path
* @param regex
*/
export declare const sanitizePath: (path: string, regex?: RegExp) => string;
export declare const sanitizePath: (inputPath: string) => string;
27 changes: 25 additions & 2 deletions dist/tsc/src/commands/actions/validators/file.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/tsc/src/commands/actions/validators/file.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/tsc/src/commands/actions/validators/operator.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const operatorPublicKeyValidator: (publicKey: string) => string | boolean;
export declare const operatorPublicKeyValidator: (publicKey: string) => boolean;
58 changes: 40 additions & 18 deletions dist/tsc/src/commands/actions/validators/operator.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/tsc/src/commands/actions/validators/operator.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions dist/tsc/src/lib/Encryption/Encryption.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import { IShares } from '../Threshold';
export declare class InvalidOperatorKeyException extends Error {
operator: any;
constructor(operator: {
rsa: string;
base64: string;
}, message: string);
}
export interface EncryptShare {
operatorPublicKey: string;
privateKey: string;
Expand Down
Loading