simplex-chat 6.5.0-beta.4.1 → 6.5.0-beta.4.3

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 (69) hide show
  1. package/README.md +1 -1
  2. package/binding.gyp +19 -4
  3. package/cpp/simplex.cc +426 -0
  4. package/cpp/simplex.h +46 -0
  5. package/dist/index.d.ts +17 -2
  6. package/dist/index.js +18 -3
  7. package/dist/index.js.map +1 -1
  8. package/docs/Namespace.api.md +32 -0
  9. package/docs/Namespace.bot.md +20 -0
  10. package/docs/Namespace.core.md +48 -0
  11. package/docs/Namespace.util.md +25 -0
  12. package/docs/README.md +12 -0
  13. package/docs/api.Class.ChatApi.md +1602 -0
  14. package/docs/api.Class.ChatCommandError.md +205 -0
  15. package/docs/api.Enumeration.ConnReqType.md +27 -0
  16. package/docs/api.Interface.BotAddressSettings.md +60 -0
  17. package/docs/api.TypeAlias.EventSubscriberFunc.md +27 -0
  18. package/docs/api.TypeAlias.EventSubscribers.md +11 -0
  19. package/docs/api.Variable.defaultBotAddressSettings.md +11 -0
  20. package/docs/bot.Function.run.md +21 -0
  21. package/docs/bot.Interface.BotConfig.md +75 -0
  22. package/docs/bot.Interface.BotDbOpts.md +33 -0
  23. package/docs/bot.Interface.BotOptions.md +81 -0
  24. package/docs/core.Class.ChatAPIError.md +205 -0
  25. package/docs/core.Class.ChatInitError.md +205 -0
  26. package/docs/core.DBMigrationError.Interface.ErrorMigration.md +41 -0
  27. package/docs/core.DBMigrationError.Interface.ErrorNotADatabase.md +33 -0
  28. package/docs/core.DBMigrationError.Interface.ErrorSQL.md +41 -0
  29. package/docs/core.DBMigrationError.Interface.InvalidConfirmation.md +25 -0
  30. package/docs/core.DBMigrationError.TypeAlias.Tag.md +11 -0
  31. package/docs/core.Enumeration.MigrationConfirmation.md +43 -0
  32. package/docs/core.Function.chatCloseStore.md +23 -0
  33. package/docs/core.Function.chatDecryptFile.md +31 -0
  34. package/docs/core.Function.chatEncryptFile.md +31 -0
  35. package/docs/core.Function.chatMigrateInit.md +31 -0
  36. package/docs/core.Function.chatReadFile.md +27 -0
  37. package/docs/core.Function.chatRecvMsgWait.md +27 -0
  38. package/docs/core.Function.chatSendCmd.md +27 -0
  39. package/docs/core.Function.chatWriteFile.md +31 -0
  40. package/docs/core.Interface.APIResult.md +31 -0
  41. package/docs/core.Interface.CryptoArgs.md +27 -0
  42. package/docs/core.Interface.UpMigration.md +25 -0
  43. package/docs/core.MTRError.Interface.MTREDifferent.md +33 -0
  44. package/docs/core.MTRError.Interface.MTRENoDown.md +33 -0
  45. package/docs/core.MTRError.TypeAlias.Tag.md +11 -0
  46. package/docs/core.MigrationError.Interface.MEDowngrade.md +33 -0
  47. package/docs/core.MigrationError.Interface.MEUpgrade.md +33 -0
  48. package/docs/core.MigrationError.Interface.MigrationError.md +33 -0
  49. package/docs/core.MigrationError.TypeAlias.Tag.md +11 -0
  50. package/docs/core.Namespace.DBMigrationError.md +18 -0
  51. package/docs/core.Namespace.MTRError.md +16 -0
  52. package/docs/core.Namespace.MigrationError.md +17 -0
  53. package/docs/core.TypeAlias.DBMigrationError.md +11 -0
  54. package/docs/core.TypeAlias.MTRError.md +11 -0
  55. package/docs/core.TypeAlias.MigrationError.md +11 -0
  56. package/docs/util.Function.botAddressSettings.md +21 -0
  57. package/docs/util.Function.chatInfoName.md +21 -0
  58. package/docs/util.Function.chatInfoRef.md +21 -0
  59. package/docs/util.Function.ciBotCommand.md +21 -0
  60. package/docs/util.Function.ciContentText.md +21 -0
  61. package/docs/util.Function.contactAddressStr.md +21 -0
  62. package/docs/util.Function.fromLocalProfile.md +21 -0
  63. package/docs/util.Function.reactionText.md +21 -0
  64. package/docs/util.Function.senderName.md +25 -0
  65. package/docs/util.Interface.BotCommand.md +25 -0
  66. package/examples/squaring-bot-readme.js +17 -0
  67. package/examples/squaring-bot.ts +42 -0
  68. package/package.json +7 -3
  69. package/tsconfig.json +23 -0
@@ -0,0 +1,205 @@
1
+ [**simplex-chat**](README.md)
2
+
3
+ ***
4
+
5
+ [simplex-chat](README.md) / [core](Namespace.core.md) / ChatAPIError
6
+
7
+ # Class: ChatAPIError
8
+
9
+ Defined in: [src/core.ts:92](../src/core.ts#L92)
10
+
11
+ ## Extends
12
+
13
+ - `Error`
14
+
15
+ ## Constructors
16
+
17
+ ### Constructor
18
+
19
+ > **new ChatAPIError**(`message`, `chatError`): `ChatAPIError`
20
+
21
+ Defined in: [src/core.ts:93](../src/core.ts#L93)
22
+
23
+ #### Parameters
24
+
25
+ ##### message
26
+
27
+ `string`
28
+
29
+ ##### chatError
30
+
31
+ `ChatError` | `undefined`
32
+
33
+ #### Returns
34
+
35
+ `ChatAPIError`
36
+
37
+ #### Overrides
38
+
39
+ `Error.constructor`
40
+
41
+ ## Properties
42
+
43
+ ### chatError
44
+
45
+ > **chatError**: `ChatError` \| `undefined` = `undefined`
46
+
47
+ Defined in: [src/core.ts:93](../src/core.ts#L93)
48
+
49
+ ***
50
+
51
+ ### message
52
+
53
+ > **message**: `string`
54
+
55
+ Defined in: [src/core.ts:93](../src/core.ts#L93)
56
+
57
+ #### Inherited from
58
+
59
+ `Error.message`
60
+
61
+ ***
62
+
63
+ ### name
64
+
65
+ > **name**: `string`
66
+
67
+ Defined in: [node\_modules/typescript/lib/lib.es5.d.ts:1076](../node_modules/typescript/lib/lib.es5.d.ts#L1076)
68
+
69
+ #### Inherited from
70
+
71
+ `Error.name`
72
+
73
+ ***
74
+
75
+ ### stack?
76
+
77
+ > `optional` **stack**: `string`
78
+
79
+ Defined in: [node\_modules/typescript/lib/lib.es5.d.ts:1078](../node_modules/typescript/lib/lib.es5.d.ts#L1078)
80
+
81
+ #### Inherited from
82
+
83
+ `Error.stack`
84
+
85
+ ***
86
+
87
+ ### stackTraceLimit
88
+
89
+ > `static` **stackTraceLimit**: `number`
90
+
91
+ Defined in: [node\_modules/@types/node/globals.d.ts:67](../node_modules/@types/node/globals.d.ts#L67)
92
+
93
+ The `Error.stackTraceLimit` property specifies the number of stack frames
94
+ collected by a stack trace (whether generated by `new Error().stack` or
95
+ `Error.captureStackTrace(obj)`).
96
+
97
+ The default value is `10` but may be set to any valid JavaScript number. Changes
98
+ will affect any stack trace captured _after_ the value has been changed.
99
+
100
+ If set to a non-number value, or set to a negative number, stack traces will
101
+ not capture any frames.
102
+
103
+ #### Inherited from
104
+
105
+ `Error.stackTraceLimit`
106
+
107
+ ## Methods
108
+
109
+ ### captureStackTrace()
110
+
111
+ > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
112
+
113
+ Defined in: [node\_modules/@types/node/globals.d.ts:51](../node_modules/@types/node/globals.d.ts#L51)
114
+
115
+ Creates a `.stack` property on `targetObject`, which when accessed returns
116
+ a string representing the location in the code at which
117
+ `Error.captureStackTrace()` was called.
118
+
119
+ ```js
120
+ const myObject = {};
121
+ Error.captureStackTrace(myObject);
122
+ myObject.stack; // Similar to `new Error().stack`
123
+ ```
124
+
125
+ The first line of the trace will be prefixed with
126
+ `${myObject.name}: ${myObject.message}`.
127
+
128
+ The optional `constructorOpt` argument accepts a function. If given, all frames
129
+ above `constructorOpt`, including `constructorOpt`, will be omitted from the
130
+ generated stack trace.
131
+
132
+ The `constructorOpt` argument is useful for hiding implementation
133
+ details of error generation from the user. For instance:
134
+
135
+ ```js
136
+ function a() {
137
+ b();
138
+ }
139
+
140
+ function b() {
141
+ c();
142
+ }
143
+
144
+ function c() {
145
+ // Create an error without stack trace to avoid calculating the stack trace twice.
146
+ const { stackTraceLimit } = Error;
147
+ Error.stackTraceLimit = 0;
148
+ const error = new Error();
149
+ Error.stackTraceLimit = stackTraceLimit;
150
+
151
+ // Capture the stack trace above function b
152
+ Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
153
+ throw error;
154
+ }
155
+
156
+ a();
157
+ ```
158
+
159
+ #### Parameters
160
+
161
+ ##### targetObject
162
+
163
+ `object`
164
+
165
+ ##### constructorOpt?
166
+
167
+ `Function`
168
+
169
+ #### Returns
170
+
171
+ `void`
172
+
173
+ #### Inherited from
174
+
175
+ `Error.captureStackTrace`
176
+
177
+ ***
178
+
179
+ ### prepareStackTrace()
180
+
181
+ > `static` **prepareStackTrace**(`err`, `stackTraces`): `any`
182
+
183
+ Defined in: [node\_modules/@types/node/globals.d.ts:55](../node_modules/@types/node/globals.d.ts#L55)
184
+
185
+ #### Parameters
186
+
187
+ ##### err
188
+
189
+ `Error`
190
+
191
+ ##### stackTraces
192
+
193
+ `CallSite`[]
194
+
195
+ #### Returns
196
+
197
+ `any`
198
+
199
+ #### See
200
+
201
+ https://v8.dev/docs/stack-trace-api#customizing-stack-traces
202
+
203
+ #### Inherited from
204
+
205
+ `Error.prepareStackTrace`
@@ -0,0 +1,205 @@
1
+ [**simplex-chat**](README.md)
2
+
3
+ ***
4
+
5
+ [simplex-chat](README.md) / [core](Namespace.core.md) / ChatInitError
6
+
7
+ # Class: ChatInitError
8
+
9
+ Defined in: [src/core.ts:116](../src/core.ts#L116)
10
+
11
+ ## Extends
12
+
13
+ - `Error`
14
+
15
+ ## Constructors
16
+
17
+ ### Constructor
18
+
19
+ > **new ChatInitError**(`message`, `dbMigrationError`): `ChatInitError`
20
+
21
+ Defined in: [src/core.ts:117](../src/core.ts#L117)
22
+
23
+ #### Parameters
24
+
25
+ ##### message
26
+
27
+ `string`
28
+
29
+ ##### dbMigrationError
30
+
31
+ [`DBMigrationError`](core.TypeAlias.DBMigrationError.md)
32
+
33
+ #### Returns
34
+
35
+ `ChatInitError`
36
+
37
+ #### Overrides
38
+
39
+ `Error.constructor`
40
+
41
+ ## Properties
42
+
43
+ ### dbMigrationError
44
+
45
+ > **dbMigrationError**: [`DBMigrationError`](core.TypeAlias.DBMigrationError.md)
46
+
47
+ Defined in: [src/core.ts:117](../src/core.ts#L117)
48
+
49
+ ***
50
+
51
+ ### message
52
+
53
+ > **message**: `string`
54
+
55
+ Defined in: [src/core.ts:117](../src/core.ts#L117)
56
+
57
+ #### Inherited from
58
+
59
+ `Error.message`
60
+
61
+ ***
62
+
63
+ ### name
64
+
65
+ > **name**: `string`
66
+
67
+ Defined in: [node\_modules/typescript/lib/lib.es5.d.ts:1076](../node_modules/typescript/lib/lib.es5.d.ts#L1076)
68
+
69
+ #### Inherited from
70
+
71
+ `Error.name`
72
+
73
+ ***
74
+
75
+ ### stack?
76
+
77
+ > `optional` **stack**: `string`
78
+
79
+ Defined in: [node\_modules/typescript/lib/lib.es5.d.ts:1078](../node_modules/typescript/lib/lib.es5.d.ts#L1078)
80
+
81
+ #### Inherited from
82
+
83
+ `Error.stack`
84
+
85
+ ***
86
+
87
+ ### stackTraceLimit
88
+
89
+ > `static` **stackTraceLimit**: `number`
90
+
91
+ Defined in: [node\_modules/@types/node/globals.d.ts:67](../node_modules/@types/node/globals.d.ts#L67)
92
+
93
+ The `Error.stackTraceLimit` property specifies the number of stack frames
94
+ collected by a stack trace (whether generated by `new Error().stack` or
95
+ `Error.captureStackTrace(obj)`).
96
+
97
+ The default value is `10` but may be set to any valid JavaScript number. Changes
98
+ will affect any stack trace captured _after_ the value has been changed.
99
+
100
+ If set to a non-number value, or set to a negative number, stack traces will
101
+ not capture any frames.
102
+
103
+ #### Inherited from
104
+
105
+ `Error.stackTraceLimit`
106
+
107
+ ## Methods
108
+
109
+ ### captureStackTrace()
110
+
111
+ > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
112
+
113
+ Defined in: [node\_modules/@types/node/globals.d.ts:51](../node_modules/@types/node/globals.d.ts#L51)
114
+
115
+ Creates a `.stack` property on `targetObject`, which when accessed returns
116
+ a string representing the location in the code at which
117
+ `Error.captureStackTrace()` was called.
118
+
119
+ ```js
120
+ const myObject = {};
121
+ Error.captureStackTrace(myObject);
122
+ myObject.stack; // Similar to `new Error().stack`
123
+ ```
124
+
125
+ The first line of the trace will be prefixed with
126
+ `${myObject.name}: ${myObject.message}`.
127
+
128
+ The optional `constructorOpt` argument accepts a function. If given, all frames
129
+ above `constructorOpt`, including `constructorOpt`, will be omitted from the
130
+ generated stack trace.
131
+
132
+ The `constructorOpt` argument is useful for hiding implementation
133
+ details of error generation from the user. For instance:
134
+
135
+ ```js
136
+ function a() {
137
+ b();
138
+ }
139
+
140
+ function b() {
141
+ c();
142
+ }
143
+
144
+ function c() {
145
+ // Create an error without stack trace to avoid calculating the stack trace twice.
146
+ const { stackTraceLimit } = Error;
147
+ Error.stackTraceLimit = 0;
148
+ const error = new Error();
149
+ Error.stackTraceLimit = stackTraceLimit;
150
+
151
+ // Capture the stack trace above function b
152
+ Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
153
+ throw error;
154
+ }
155
+
156
+ a();
157
+ ```
158
+
159
+ #### Parameters
160
+
161
+ ##### targetObject
162
+
163
+ `object`
164
+
165
+ ##### constructorOpt?
166
+
167
+ `Function`
168
+
169
+ #### Returns
170
+
171
+ `void`
172
+
173
+ #### Inherited from
174
+
175
+ `Error.captureStackTrace`
176
+
177
+ ***
178
+
179
+ ### prepareStackTrace()
180
+
181
+ > `static` **prepareStackTrace**(`err`, `stackTraces`): `any`
182
+
183
+ Defined in: [node\_modules/@types/node/globals.d.ts:55](../node_modules/@types/node/globals.d.ts#L55)
184
+
185
+ #### Parameters
186
+
187
+ ##### err
188
+
189
+ `Error`
190
+
191
+ ##### stackTraces
192
+
193
+ `CallSite`[]
194
+
195
+ #### Returns
196
+
197
+ `any`
198
+
199
+ #### See
200
+
201
+ https://v8.dev/docs/stack-trace-api#customizing-stack-traces
202
+
203
+ #### Inherited from
204
+
205
+ `Error.prepareStackTrace`
@@ -0,0 +1,41 @@
1
+ [**simplex-chat**](README.md)
2
+
3
+ ***
4
+
5
+ [simplex-chat](README.md) / [core](Namespace.core.md) / [DBMigrationError](core.Namespace.DBMigrationError.md) / ErrorMigration
6
+
7
+ # Interface: ErrorMigration
8
+
9
+ Defined in: [src/core.ts:144](../src/core.ts#L144)
10
+
11
+ ## Extends
12
+
13
+ - `Interface`
14
+
15
+ ## Properties
16
+
17
+ ### dbFile
18
+
19
+ > **dbFile**: `string`
20
+
21
+ Defined in: [src/core.ts:146](../src/core.ts#L146)
22
+
23
+ ***
24
+
25
+ ### migrationError
26
+
27
+ > **migrationError**: [`MigrationError`](core.TypeAlias.MigrationError.md)
28
+
29
+ Defined in: [src/core.ts:147](../src/core.ts#L147)
30
+
31
+ ***
32
+
33
+ ### type
34
+
35
+ > **type**: `"errorMigration"`
36
+
37
+ Defined in: [src/core.ts:145](../src/core.ts#L145)
38
+
39
+ #### Overrides
40
+
41
+ `Interface.type`
@@ -0,0 +1,33 @@
1
+ [**simplex-chat**](README.md)
2
+
3
+ ***
4
+
5
+ [simplex-chat](README.md) / [core](Namespace.core.md) / [DBMigrationError](core.Namespace.DBMigrationError.md) / ErrorNotADatabase
6
+
7
+ # Interface: ErrorNotADatabase
8
+
9
+ Defined in: [src/core.ts:139](../src/core.ts#L139)
10
+
11
+ ## Extends
12
+
13
+ - `Interface`
14
+
15
+ ## Properties
16
+
17
+ ### dbFile
18
+
19
+ > **dbFile**: `string`
20
+
21
+ Defined in: [src/core.ts:141](../src/core.ts#L141)
22
+
23
+ ***
24
+
25
+ ### type
26
+
27
+ > **type**: `"errorNotADatabase"`
28
+
29
+ Defined in: [src/core.ts:140](../src/core.ts#L140)
30
+
31
+ #### Overrides
32
+
33
+ `Interface.type`
@@ -0,0 +1,41 @@
1
+ [**simplex-chat**](README.md)
2
+
3
+ ***
4
+
5
+ [simplex-chat](README.md) / [core](Namespace.core.md) / [DBMigrationError](core.Namespace.DBMigrationError.md) / ErrorSQL
6
+
7
+ # Interface: ErrorSQL
8
+
9
+ Defined in: [src/core.ts:150](../src/core.ts#L150)
10
+
11
+ ## Extends
12
+
13
+ - `Interface`
14
+
15
+ ## Properties
16
+
17
+ ### dbFile
18
+
19
+ > **dbFile**: `string`
20
+
21
+ Defined in: [src/core.ts:152](../src/core.ts#L152)
22
+
23
+ ***
24
+
25
+ ### migrationSQLError
26
+
27
+ > **migrationSQLError**: `string`
28
+
29
+ Defined in: [src/core.ts:153](../src/core.ts#L153)
30
+
31
+ ***
32
+
33
+ ### type
34
+
35
+ > **type**: `"errorSQL"`
36
+
37
+ Defined in: [src/core.ts:151](../src/core.ts#L151)
38
+
39
+ #### Overrides
40
+
41
+ `Interface.type`
@@ -0,0 +1,25 @@
1
+ [**simplex-chat**](README.md)
2
+
3
+ ***
4
+
5
+ [simplex-chat](README.md) / [core](Namespace.core.md) / [DBMigrationError](core.Namespace.DBMigrationError.md) / InvalidConfirmation
6
+
7
+ # Interface: InvalidConfirmation
8
+
9
+ Defined in: [src/core.ts:135](../src/core.ts#L135)
10
+
11
+ ## Extends
12
+
13
+ - `Interface`
14
+
15
+ ## Properties
16
+
17
+ ### type
18
+
19
+ > **type**: `"invalidConfirmation"`
20
+
21
+ Defined in: [src/core.ts:136](../src/core.ts#L136)
22
+
23
+ #### Overrides
24
+
25
+ `Interface.type`
@@ -0,0 +1,11 @@
1
+ [**simplex-chat**](README.md)
2
+
3
+ ***
4
+
5
+ [simplex-chat](README.md) / [core](Namespace.core.md) / [DBMigrationError](core.Namespace.DBMigrationError.md) / Tag
6
+
7
+ # Type Alias: Tag
8
+
9
+ > **Tag** = `"invalidConfirmation"` \| `"errorNotADatabase"` \| `"errorMigration"` \| `"errorSQL"`
10
+
11
+ Defined in: [src/core.ts:129](../src/core.ts#L129)
@@ -0,0 +1,43 @@
1
+ [**simplex-chat**](README.md)
2
+
3
+ ***
4
+
5
+ [simplex-chat](README.md) / [core](Namespace.core.md) / MigrationConfirmation
6
+
7
+ # Enumeration: MigrationConfirmation
8
+
9
+ Defined in: [src/core.ts:101](../src/core.ts#L101)
10
+
11
+ Migration confirmation mode
12
+
13
+ ## Enumeration Members
14
+
15
+ ### Console
16
+
17
+ > **Console**: `"console"`
18
+
19
+ Defined in: [src/core.ts:104](../src/core.ts#L104)
20
+
21
+ ***
22
+
23
+ ### Error
24
+
25
+ > **Error**: `"error"`
26
+
27
+ Defined in: [src/core.ts:105](../src/core.ts#L105)
28
+
29
+ ***
30
+
31
+ ### YesUp
32
+
33
+ > **YesUp**: `"yesUp"`
34
+
35
+ Defined in: [src/core.ts:102](../src/core.ts#L102)
36
+
37
+ ***
38
+
39
+ ### YesUpDown
40
+
41
+ > **YesUpDown**: `"yesUpDown"`
42
+
43
+ Defined in: [src/core.ts:103](../src/core.ts#L103)
@@ -0,0 +1,23 @@
1
+ [**simplex-chat**](README.md)
2
+
3
+ ***
4
+
5
+ [simplex-chat](README.md) / [core](Namespace.core.md) / chatCloseStore
6
+
7
+ # Function: chatCloseStore()
8
+
9
+ > **chatCloseStore**(`ctrl`): `Promise`\<`void`\>
10
+
11
+ Defined in: [src/core.ts:17](../src/core.ts#L17)
12
+
13
+ Close chat store
14
+
15
+ ## Parameters
16
+
17
+ ### ctrl
18
+
19
+ `bigint`
20
+
21
+ ## Returns
22
+
23
+ `Promise`\<`void`\>
@@ -0,0 +1,31 @@
1
+ [**simplex-chat**](README.md)
2
+
3
+ ***
4
+
5
+ [simplex-chat](README.md) / [core](Namespace.core.md) / chatDecryptFile
6
+
7
+ # Function: chatDecryptFile()
8
+
9
+ > **chatDecryptFile**(`fromPath`, `__namedParameters`, `toPath`): `Promise`\<`void`\>
10
+
11
+ Defined in: [src/core.ts:73](../src/core.ts#L73)
12
+
13
+ Decrypt file
14
+
15
+ ## Parameters
16
+
17
+ ### fromPath
18
+
19
+ `string`
20
+
21
+ ### \_\_namedParameters
22
+
23
+ [`CryptoArgs`](core.Interface.CryptoArgs.md)
24
+
25
+ ### toPath
26
+
27
+ `string`
28
+
29
+ ## Returns
30
+
31
+ `Promise`\<`void`\>
@@ -0,0 +1,31 @@
1
+ [**simplex-chat**](README.md)
2
+
3
+ ***
4
+
5
+ [simplex-chat](README.md) / [core](Namespace.core.md) / chatEncryptFile
6
+
7
+ # Function: chatEncryptFile()
8
+
9
+ > **chatEncryptFile**(`ctrl`, `fromPath`, `toPath`): `Promise`\<[`CryptoArgs`](core.Interface.CryptoArgs.md)\>
10
+
11
+ Defined in: [src/core.ts:65](../src/core.ts#L65)
12
+
13
+ Encrypt file
14
+
15
+ ## Parameters
16
+
17
+ ### ctrl
18
+
19
+ `bigint`
20
+
21
+ ### fromPath
22
+
23
+ `string`
24
+
25
+ ### toPath
26
+
27
+ `string`
28
+
29
+ ## Returns
30
+
31
+ `Promise`\<[`CryptoArgs`](core.Interface.CryptoArgs.md)\>