wative 1.1.16 → 1.1.17

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.
Files changed (64) hide show
  1. package/lib/account.d.ts +14 -0
  2. package/lib/account.d.ts.map +1 -0
  3. package/lib/assets.d.ts +11 -0
  4. package/lib/assets.d.ts.map +1 -0
  5. package/lib/chain.d.ts +6 -0
  6. package/lib/chain.d.ts.map +1 -0
  7. package/lib/config.d.ts +23 -0
  8. package/lib/config.d.ts.map +1 -0
  9. package/lib/daemon-watcher.js +181 -0
  10. package/lib/home_page.d.ts +4 -0
  11. package/lib/home_page.d.ts.map +1 -0
  12. package/lib/index.d.ts +2 -0
  13. package/lib/index.d.ts.map +1 -0
  14. package/lib/index.esm.js +1 -1
  15. package/lib/index.umd.js +1 -1
  16. package/lib/network.d.ts +28 -0
  17. package/lib/network.d.ts.map +1 -0
  18. package/lib/ssh/client.d.ts +120 -0
  19. package/lib/ssh/client.d.ts.map +1 -0
  20. package/lib/ssh/client_example.d.ts +19 -0
  21. package/lib/ssh/client_example.d.ts.map +1 -0
  22. package/lib/ssh/client_test.d.ts +27 -0
  23. package/lib/ssh/client_test.d.ts.map +1 -0
  24. package/lib/ssh/config_manager.d.ts +55 -0
  25. package/lib/ssh/config_manager.d.ts.map +1 -0
  26. package/lib/ssh/config_template.d.ts +52 -0
  27. package/lib/ssh/config_template.d.ts.map +1 -0
  28. package/lib/ssh/index.d.ts +7 -0
  29. package/lib/ssh/index.d.ts.map +1 -0
  30. package/lib/ssh/remote_server_example.d.ts +16 -0
  31. package/lib/ssh/remote_server_example.d.ts.map +1 -0
  32. package/lib/ssh/service_manager.d.ts +119 -0
  33. package/lib/ssh/service_manager.d.ts.map +1 -0
  34. package/lib/ssh/types.d.ts +45 -0
  35. package/lib/ssh/types.d.ts.map +1 -0
  36. package/lib/ssh/utils.d.ts +11 -0
  37. package/lib/ssh/utils.d.ts.map +1 -0
  38. package/lib/ssh/wative_server.d.ts +26 -0
  39. package/lib/ssh/wative_server.d.ts.map +1 -0
  40. package/lib/tools.d.ts +6 -0
  41. package/lib/tools.d.ts.map +1 -0
  42. package/lib/tx_gas_utils.d.ts +18 -0
  43. package/lib/tx_gas_utils.d.ts.map +1 -0
  44. package/lib/utils.d.ts +49 -0
  45. package/lib/utils.d.ts.map +1 -0
  46. package/lib/wative.d.ts +2 -0
  47. package/lib/wative.d.ts.map +1 -0
  48. package/lib/wative.esm.js +1 -1
  49. package/lib/wative.umd.js +1 -1
  50. package/lib/web3.d.ts +59 -0
  51. package/lib/web3.d.ts.map +1 -0
  52. package/package.json +9 -5
  53. package/src/daemon-watcher.js +181 -0
  54. package/src/ssh/client.rs +221 -0
  55. package/src/ssh/client.ts +389 -0
  56. package/src/ssh/config_manager.ts +317 -0
  57. package/src/ssh/index.ts +49 -36
  58. package/src/ssh/service_manager.ts +684 -0
  59. package/src/ssh/types.ts +35 -1
  60. package/src/ssh/wative_server.ts +1 -2
  61. package/src/wative.ts +560 -122
  62. package/bin/wative-ssh.sh +0 -44
  63. package/lib/wative-ssh.esm.js +0 -1
  64. package/lib/wative-ssh.umd.js +0 -1
package/src/ssh/types.ts CHANGED
@@ -12,7 +12,41 @@ type SignMessageParams = {
12
12
  rpcUrl: string
13
13
  }
14
14
 
15
+ type SSHServiceConfig = {
16
+ name: string;
17
+ description?: string;
18
+ ssh: {
19
+ listen: string;
20
+ port: number;
21
+ log: {
22
+ size: number;
23
+ backups: number;
24
+ };
25
+ };
26
+ keystore: {
27
+ path: string;
28
+ allowed_keystores: string[];
29
+ };
30
+ clients: {
31
+ name: string;
32
+ public_key_path: string;
33
+ allowed_keystores: string[];
34
+ }[];
35
+ server_keys: {
36
+ private_key_path: string;
37
+ passphrase: string;
38
+ };
39
+ }
40
+
41
+ type ServiceInstance = {
42
+ config: SSHServiceConfig;
43
+ passwords: { [keystoreId: string]: string };
44
+ server: any;
45
+ }
46
+
15
47
  export {
16
48
  SubAccountMessageParams,
17
- SignMessageParams
49
+ SignMessageParams,
50
+ SSHServiceConfig,
51
+ ServiceInstance
18
52
  }
@@ -16,7 +16,7 @@ log4js.configure({
16
16
  appenders: {
17
17
  file: {
18
18
  type: 'file',
19
- filename: '/var/log/wative/wative.log',
19
+ filename: process.env.HOME + '/.wative/logs/wative.log',
20
20
  maxLogSize: 10485760,
21
21
  backups: 3,
22
22
  compress: true,
@@ -323,7 +323,6 @@ export class WativeWielderServer {
323
323
  }];
324
324
  }
325
325
 
326
-
327
326
  private getChainType(chainId: string) {
328
327
  if (chainId === "901" || chainId === "902" || chainId === "903") {
329
328
  return "SOLANA";