@truebit/cli 1.120.0-beta.78 → 1.120.0-beta.80

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.
@@ -1 +1 @@
1
- {"version":3,"file":"user.relayer.service.d.mts","sourceRoot":"","sources":["../../src/services/user.relayer.service.mts"],"names":[],"mappings":"AAAA,OAAO,EAIL,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE7C,wBAAsB,wBAAwB,CAC5C,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,OAAO,GACjB,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAmClC;AAED,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,OAAO,GACjB,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CA8BlC;AAED,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,qBAAqB,EAC3B,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAoClC"}
1
+ {"version":3,"file":"user.relayer.service.d.mts","sourceRoot":"","sources":["../../src/services/user.relayer.service.mts"],"names":[],"mappings":"AAAA,OAAO,EAIL,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE7C,wBAAsB,wBAAwB,CAC5C,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,OAAO,GACjB,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAsClC;AAED,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,OAAO,GACjB,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAiClC;AAED,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,qBAAqB,EAC3B,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAuClC"}
@@ -1 +1 @@
1
- {"version":3,"file":"hook.preactions.d.mts","sourceRoot":"","sources":["../../src/utils/hook.preactions.mts"],"names":[],"mappings":"AAKA,wBAAsB,yBAAyB,CAAC,KAAK,GAAE,OAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAgCrF"}
1
+ {"version":3,"file":"hook.preactions.d.mts","sourceRoot":"","sources":["../../src/utils/hook.preactions.mts"],"names":[],"mappings":"AAKA,wBAAsB,yBAAyB,CAAC,KAAK,GAAE,OAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BrF"}
@@ -1,11 +1,13 @@
1
1
  import { AxiosResponse } from 'axios';
2
+ import { SecretConfig } from './secret.mjs';
2
3
  import { IUser, Registration } from '../definitions/registration.mjs';
3
4
  export declare function isValidEmailAddress(emailAddress: string): Promise<boolean>;
4
5
  export declare function isValidYesNoOption(answer: string): boolean;
5
6
  export declare function isInvalidWalletAddress(address: string): boolean;
6
7
  export declare function registerApiKey(): Promise<string>;
7
8
  export declare function registerHexadecimalNamespace(): Promise<string>;
8
- export declare function getUserByDynamicFilters(bodyPost: Partial<IUser>): Promise<IUser | null>;
9
+ export declare function doesUserExist(user: string): Promise<boolean>;
10
+ export declare function getUserByDynamicFilters(user: string, config: SecretConfig): Promise<IUser | null>;
9
11
  export declare function postUserRegister(bodyPost: object): Promise<AxiosResponse<Response>>;
10
12
  export declare function getValidApiKey(): Promise<string>;
11
13
  export declare function getValidNamespace(): Promise<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"registration.d.mts","sourceRoot":"","sources":["../../src/utils/registration.mts"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAW7C,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAItE,wBAAsB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAwBhF;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE/D;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAgBtD;AAED,wBAAsB,4BAA4B,IAAI,OAAO,CAAC,MAAM,CAAC,CAqBpE;AAED,wBAAsB,uBAAuB,CAAC,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAmC7F;AAED,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CA2BzF;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CA4BtD;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CA2BzD;AAED,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAOtE"}
1
+ {"version":3,"file":"registration.d.mts","sourceRoot":"","sources":["../../src/utils/registration.mts"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAQ7C,OAAO,EAAqB,YAAY,EAAE,MAAM,cAAc,CAAC;AAG/D,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAKtE,wBAAsB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAwBhF;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE/D;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAgBtD;AAED,wBAAsB,4BAA4B,IAAI,OAAO,CAAC,MAAM,CAAC,CAqBpE;AACD,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAiBlE;AACD,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAiDvG;AAED,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CA2BzF;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CA4BtD;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CA2BzD;AAED,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAOtE"}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@truebit/cli",
3
- "version": "1.120.0-beta.78",
3
+ "version": "1.120.0-beta.80",
4
+ "private": false,
4
5
  "description": "truebit-cli is a basic command line that allows interaction between users and truebit nextgen node.",
5
6
  "author": {
6
7
  "name": "Truebit Co.",
@@ -32,7 +33,7 @@
32
33
  "@rollup/plugin-terser": "0.4.4",
33
34
  "@rollup/plugin-typescript": "^12.1.2",
34
35
  "aws4": "^1.13.2",
35
- "axios": "1.8.2",
36
+ "axios": "1.8.3",
36
37
  "chalk": "5.4.1",
37
38
  "colors": "^1.4.0",
38
39
  "commander": "^13.1.0",
@@ -42,7 +43,7 @@
42
43
  "json2toml": "^6.1.1",
43
44
  "openapi-enforcer": "^1.23.0",
44
45
  "ora": "^8.2.0",
45
- "rollup": "^4.35.0",
46
+ "rollup": "^4.36.0",
46
47
  "run-script-os": "^1.1.6",
47
48
  "ts-retry": "^6.0.0",
48
49
  "uuid": "^11.1.0"
@@ -56,11 +57,11 @@
56
57
  "devDependencies": {
57
58
  "@types/aws4": "^1.11.6",
58
59
  "@types/figlet": "^1.7.0",
59
- "@vitest/coverage-v8": "3.0.8",
60
- "vitest": "3.0.8"
60
+ "@vitest/coverage-v8": "3.0.9",
61
+ "vitest": "3.0.9"
61
62
  },
62
63
  "engines": {
63
64
  "node": ">=22.13.0"
64
65
  },
65
- "gitHead": "9b39aa11af9518bf3b8e07f17efb1a21f4030c80"
66
+ "gitHead": "73a13f4ff7d13b800050e3a91a942d9639036e58"
66
67
  }
package/README.md DELETED
@@ -1,82 +0,0 @@
1
- # Truebit CLI
2
-
3
- `truebit-cli` is a command line that allows interaction between users and the Truebit NextGen Node.
4
-
5
- ## Prerequisites
6
-
7
- - Rust 1.78
8
- - wasm32-wasip1 compile target
9
- - environment variables setted
10
-
11
- ## Set Environment variables
12
-
13
- To set environment variables you should first create a new env file with the following command:
14
-
15
- ```
16
- cp truebit.verify.env.example truebit.verify.env
17
- ```
18
-
19
- and fill in the values.
20
-
21
- ## To build:
22
-
23
- ```
24
- npm run build
25
- ```
26
-
27
- ## To run:
28
-
29
- `npx truebit`
30
-
31
- ## To install it globally:
32
-
33
- ## Rollup for publish:
34
-
35
- **npm run build:production**
36
-
37
- ## check generate pack
38
-
39
- npm pack --dry-run --no-workspaces
40
-
41
- ## build
42
-
43
- node index.mjs build ../../../../examples/rs/fibonacci/
44
-
45
- ## deploy
46
-
47
- node index.mjs deploy rs_7205f893cf4bc86a70694a8622fda88ce01088b3fbec68695a3771472d77a312/1.0.0
48
-
49
- ## Documentation
50
-
51
- [JIRA CARD](https://fortegroup.atlassian.net/browse/TRUEB-3960)
52
- -On task registration and namespace registration we add a security layer through the Relayer User Service. Since now, the ledger-adapter it will be called by the Relayer User Service with the signature sent from the Truebit-CLI. Before the registration, it will check the address (with the checkAddress() method), that verifies that the wallet address exist. If not, the registration won't occur.
53
- Flow diagram: https://drive.google.com/file/d/13-fV4MMukW6ElX1ypi5MS9Kg_2VIfQZY/view?usp=sharing
54
-
55
- [JIRA CARD](https://fortegroup.atlassian.net/browse/TRUEB-3967)
56
- -On deploying a task, we merge the functionality with the task registration command, to ensure that every task deployed is automatically registered with a proper taskName in a specific namespace. Also appoints to minimize the effort of two operations in one execution being more user friendly.
57
- Refinement template: https://fortegroup.atlassian.net/wiki/spaces/T/pages/4669603842/TRUEB-3967+Refactor+the+deploy+process+for+a+smoother+and+faster+task+deployment
58
-
59
- [JIRA CARD](https://fortegroup.atlassian.net/browse/TRUEB-3977)
60
- -On the setup command we add validations to the information that is asked to the user to ensure a smooth onboarding experience. The scenarios that are being covered are: empty full name, empty email address, invalid email address, email address already registered, random default namespace already registered, not enough funds to pay on behalf of the user. The expected behavior remains without changes for the proper registration of the user if the validations are correctly accomplished.
61
- Refinement template: https://fortegroup.atlassian.net/wiki/spaces/T/pages/4603379713/TRUEB-3977+New+Truebit+user+-+Implement+unhappy+scenarios+for+the+Setup+command
62
-
63
- [JIRA CARD](https://fortegroup.atlassian.net/browse/TRUEB-4157)
64
- -The setup command ask for confirmation after the user enter the information required. "Are you sure the previous information is correct? [Y|N] ". If the user enter "Y", the registration continues as normal. If the user enter "N", the CLI will ask for reenter the setup information again.
65
-
66
- [JIRA CARD](https://fortegroup.atlassian.net/browse/TRUEB-4174)
67
- -On the deploy and start command, we added a signing process to adding to the message built for the hosted node the wallet address and a valid signature, to be evaluated by the node and verify the user's registration and its permissions to execute the commands. The current functionality of the commands were not modified.
68
- Flow diagram: https://miro.com/app/board/uXjVOhQWO1w=/?moveToWidget=3458764608418938794&cot=14
69
-
70
- [JIRA CARD](https://fortegroup.atlassian.net/browse/TRUEB-4354)
71
- -On the CLI we add a once time validation in the first execution of a command for the mandatory EULA acceptance to use Truebit Verify; also we change the EULA's terms acceptance information saved in the registration process, in which now we save as acceptation the IP, date and a valid signature.
72
- Refinement template: https://fortegroup.atlassian.net/wiki/spaces/T/pages/4673241089/TRUEB-4354+Add+missing+messages+behaviours+within+the+CLI
73
-
74
- [JIRA CARD](https://fortegroup.atlassian.net/browse/TRUEB-4369)
75
- -On the CLI we update the onboarding text with new wording discussed and approved; this made tailored to align with the user that will be addressing from the public beta.
76
- New wording definitions: https://docs.google.com/spreadsheets/d/1ICwAnnkpPsjQ8BtGb32A-xRP6uNZetS-BYalyultxU8/edit?gid=0#gid=0
77
-
78
- [JIRA CARD](https://fortegroup.atlassian.net/browse/TRUEB-4444)
79
- -On the CLI we added a new step in the setup process as a introduction of the protocol in the onboarding process. This will help the user to have a preview of the application and setting up the account to start.
80
-
81
- [JIRA CARD](https://fortegroup.atlassian.net/browse/TRUEB-4501)
82
- -As a consequence of the new functionality implemented with the feature "TRUEB-3967", the register subcommand from the task command is considered deprecated and it was removed from the CLI to ensure that every task will be registered and deployed with the expected command (truebit deploy).