@lightninglabs/wavelength-react-native 0.1.1-rc3 → 0.1.2-rc4
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.
- package/android/src/main/java/engineering/lightning/wavelength/reactnative/WavelengthModule.kt +2 -0
- package/dist/client.d.ts +4 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +4 -4
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/ios/WavelengthModule.mm +2 -0
- package/package.json +2 -2
- package/src/client.test.ts +67 -1
- package/src/client.ts +2 -2
- package/src/index.ts +6 -5
- package/src/native-dispatch.test.ts +17 -0
package/android/src/main/java/engineering/lightning/wavelength/reactnative/WavelengthModule.kt
CHANGED
|
@@ -157,6 +157,8 @@ class WavelengthModule(reactContext: ReactApplicationContext) :
|
|
|
157
157
|
val params = paramsJson.toByteArray(Charsets.UTF_8)
|
|
158
158
|
return when (method) {
|
|
159
159
|
"start" -> { Mobile.start(paramsJson); "" }
|
|
160
|
+
"startExternalSeedWallet" ->
|
|
161
|
+
Mobile.startExternalSeedWallet(params).toString(Charsets.UTF_8)
|
|
160
162
|
"stop" -> { Mobile.stop(); "" }
|
|
161
163
|
"getInfo" -> Mobile.getInfo().toString(Charsets.UTF_8)
|
|
162
164
|
"status" -> Mobile.status().toString(Charsets.UTF_8)
|
package/dist/client.d.ts
CHANGED
|
@@ -32,10 +32,10 @@ export type NativeActivityEvent = {
|
|
|
32
32
|
*/
|
|
33
33
|
export type SubscribeToNativeEvents = (listener: (event: NativeActivityEvent) => void) => () => void;
|
|
34
34
|
/**
|
|
35
|
-
* The React Native transport: implements {@link BaseWavelengthClient}'s pipe
|
|
36
|
-
* over the gomobile Turbo Module. JSON strings cross the RN bridge, then the
|
|
37
|
-
* shared base client normalizes responses and streamed entries in TS.
|
|
38
|
-
*/
|
|
35
|
+
* The React Native transport: implements {@link BaseWavelengthClient}'s pipe
|
|
36
|
+
* over the gomobile Turbo Module. JSON strings cross the RN bridge, then the
|
|
37
|
+
* shared base client normalizes responses and streamed entries in TS.
|
|
38
|
+
*/
|
|
39
39
|
export declare class NativeWavelengthClient extends BaseWavelengthClient {
|
|
40
40
|
protected readonly serverTransport: "grpc";
|
|
41
41
|
private removeNativeListener;
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAGrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACV,qBAAqB,EAErB,YAAY,EACZ,aAAa,EACb,UAAU,EACX,MAAM,gCAAgC,CAAC;AAExC;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,yEAAyE;IACzE,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1D,8CAA8C;IAC9C,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,+CAA+C;IAC/C,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,2DAA2D;IAC3D,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CACtC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,oCAAoC;IACpC,IAAI,EAAE,OAAO,GAAG,KAAK,GAAG,OAAO,CAAC;IAChC,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,CACpC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,KAC3C,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAGrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACV,qBAAqB,EAErB,YAAY,EACZ,aAAa,EACb,UAAU,EACX,MAAM,gCAAgC,CAAC;AAExC;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,yEAAyE;IACzE,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1D,8CAA8C;IAC9C,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,+CAA+C;IAC/C,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,2DAA2D;IAC3D,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CACtC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,oCAAoC;IACpC,IAAI,EAAE,OAAO,GAAG,KAAK,GAAG,OAAO,CAAC;IAChC,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,CACpC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,KAC3C,MAAM,IAAI,CAAC;AAEhB;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,oBAAoB;IAE9D,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAG,MAAM,CAAU;IAErD,OAAO,CAAC,oBAAoB,CAA6B;IAGzD,OAAO,CAAC,OAAO,CAAoC;IAGnD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,MAAM,CAAyB;IACvC,OAAO,CAAC,uBAAuB,CAA0B;gBAGvD,MAAM,EAAE,sBAAsB,EAC9B,uBAAuB,EAAE,uBAAuB;IASlD,OAAO,CAAC,OAAO;IAQf,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAMP,KAAK,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC;cAOhD,YAAY,CAAC,CAAC,GAAG,OAAO,EACtC,MAAM,EAAE,YAAY,EACpB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,CAAC,CAAC;cAkBG,kBAAkB,CAChC,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,IAAI,CAAC;IAmBhB,YAAY,IAAI,IAAI;IAwBpB,OAAO,CAAC,aAAa;IAgDrB,OAAO,IAAI,IAAI;CAOhB"}
|
package/dist/client.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWavelengthClient, WavelengthError, errorMessage, } from '@lightninglabs/wavelength-core';
|
|
2
2
|
/**
|
|
3
|
-
* The React Native transport: implements {@link BaseWavelengthClient}'s pipe
|
|
4
|
-
* over the gomobile Turbo Module. JSON strings cross the RN bridge, then the
|
|
5
|
-
* shared base client normalizes responses and streamed entries in TS.
|
|
6
|
-
*/
|
|
3
|
+
* The React Native transport: implements {@link BaseWavelengthClient}'s pipe
|
|
4
|
+
* over the gomobile Turbo Module. JSON strings cross the RN bridge, then the
|
|
5
|
+
* shared base client normalizes responses and streamed entries in TS.
|
|
6
|
+
*/
|
|
7
7
|
export class NativeWavelengthClient extends BaseWavelengthClient {
|
|
8
8
|
// The embedded daemon runs natively, so it dials the servers over gRPC.
|
|
9
9
|
serverTransport = 'grpc';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ExternalSeedWalletClient, type PasskeyCeremony, type DistributiveOmit, type WalletEngine, type WalletEngineOptions } from '@lightninglabs/wavelength-core';
|
|
2
2
|
import { type NativePasskeyCeremonyOptions } from './passkey.ts';
|
|
3
3
|
/**
|
|
4
|
-
* Creates
|
|
5
|
-
* daemon compiled into the app via the gomobile bindings. Takes
|
|
6
|
-
* today; an options parameter can be added later without a breaking
|
|
4
|
+
* Creates an {@link ExternalSeedWalletClient} backed by the React Native
|
|
5
|
+
* transport: the daemon compiled into the app via the gomobile bindings. Takes
|
|
6
|
+
* no options today; an options parameter can be added later without a breaking
|
|
7
|
+
* change.
|
|
7
8
|
*/
|
|
8
|
-
export declare function createNativeClient():
|
|
9
|
+
export declare function createNativeClient(): ExternalSeedWalletClient;
|
|
9
10
|
/**
|
|
10
11
|
* Options for {@link createNativeWalletEngine}. See {@link WalletEngineOptions}
|
|
11
12
|
* for the config/autoStart field docs; the type requires config when
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACzB,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,cAAc,CAAC;AAEtB;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,wBAAwB,CAW7D;AAED;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,gBAAgB,CACtD,mBAAmB,EACnB,QAAQ,CACT,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,GAAE,yBAA8B,GACtC,YAAY,CAKd;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,4BAA4B,GACpC,eAAe,CAEjB;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAEnD;AAED,YAAY,EACV,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,YAAY,EACV,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,aAAa,CAAC;AAIrB,cAAc,gCAAgC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,9 +4,10 @@ import NativeWavelength from "./NativeWavelength.js";
|
|
|
4
4
|
import { NativeWavelengthClient } from "./client.js";
|
|
5
5
|
import { nativePasskeyCeremony, } from "./passkey.js";
|
|
6
6
|
/**
|
|
7
|
-
* Creates
|
|
8
|
-
* daemon compiled into the app via the gomobile bindings. Takes
|
|
9
|
-
* today; an options parameter can be added later without a breaking
|
|
7
|
+
* Creates an {@link ExternalSeedWalletClient} backed by the React Native
|
|
8
|
+
* transport: the daemon compiled into the app via the gomobile bindings. Takes
|
|
9
|
+
* no options today; an options parameter can be added later without a breaking
|
|
10
|
+
* change.
|
|
10
11
|
*/
|
|
11
12
|
export function createNativeClient() {
|
|
12
13
|
// NativeModules.Wavelength is the interop view of the Turbo Module; the
|
package/ios/WavelengthModule.mm
CHANGED
|
@@ -106,6 +106,8 @@ RCT_EXPORT_MODULE(Wavelength)
|
|
|
106
106
|
|
|
107
107
|
if ([method isEqualToString:@"start"]) {
|
|
108
108
|
MobileStart(paramsJson, &error);
|
|
109
|
+
} else if ([method isEqualToString:@"startExternalSeedWallet"]) {
|
|
110
|
+
result = MobileStartExternalSeedWallet(params, &error);
|
|
109
111
|
} else if ([method isEqualToString:@"stop"]) {
|
|
110
112
|
MobileStop(&error);
|
|
111
113
|
} else if ([method isEqualToString:@"getInfo"]) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightninglabs/wavelength-react-native",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2-rc4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "React Native transport for the Wavelength self-custodial Lightning wallet SDK.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@lightninglabs/wavelength-core": "0.1.
|
|
44
|
+
"@lightninglabs/wavelength-core": "0.1.2-rc4"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"react": ">=18.0.0",
|
package/src/client.test.ts
CHANGED
|
@@ -7,6 +7,8 @@ import {
|
|
|
7
7
|
} from './client.ts';
|
|
8
8
|
import type { WavelengthEvent } from '@lightninglabs/wavelength-core';
|
|
9
9
|
|
|
10
|
+
const FINAL_PROFILE_DATA_DIR = '/data/wavelength/wdk/regtest/account-7';
|
|
11
|
+
|
|
10
12
|
// A scriptable fake of the native module: records calls, replays canned JSON,
|
|
11
13
|
// and hands the test the event listener so it can inject activity events.
|
|
12
14
|
function makeFake() {
|
|
@@ -16,6 +18,7 @@ function makeFake() {
|
|
|
16
18
|
let startActivityCount = 0;
|
|
17
19
|
let stopActivityCount = 0;
|
|
18
20
|
let stopActivityRejects = false;
|
|
21
|
+
let defaultDataDirCount = 0;
|
|
19
22
|
let deferredStop: { promise: Promise<void>; resolve: () => void } | null = null;
|
|
20
23
|
let listener: ((event: NativeActivityEvent) => void) | null = null;
|
|
21
24
|
let unsubscribed = 0;
|
|
@@ -44,6 +47,7 @@ function makeFake() {
|
|
|
44
47
|
: Promise.resolve();
|
|
45
48
|
},
|
|
46
49
|
getDefaultDataDir() {
|
|
50
|
+
defaultDataDirCount += 1;
|
|
47
51
|
return Promise.resolve('/data/wavelength');
|
|
48
52
|
},
|
|
49
53
|
};
|
|
@@ -74,7 +78,12 @@ function makeFake() {
|
|
|
74
78
|
return () => deferredStop!.resolve();
|
|
75
79
|
},
|
|
76
80
|
emit: (e: NativeActivityEvent) => listener?.(e),
|
|
77
|
-
counts: () => ({
|
|
81
|
+
counts: () => ({
|
|
82
|
+
startActivityCount,
|
|
83
|
+
stopActivityCount,
|
|
84
|
+
defaultDataDirCount,
|
|
85
|
+
unsubscribed,
|
|
86
|
+
}),
|
|
78
87
|
};
|
|
79
88
|
}
|
|
80
89
|
|
|
@@ -131,6 +140,63 @@ describe('NativeWavelengthClient', () => {
|
|
|
131
140
|
assert.equal(cfg.data_dir, '/custom');
|
|
132
141
|
});
|
|
133
142
|
|
|
143
|
+
it('startExternalSeedWallet preserves the final profile config', async () => {
|
|
144
|
+
const fake = makeFake();
|
|
145
|
+
const client = new NativeWavelengthClient(fake.native, fake.subscribe);
|
|
146
|
+
fake.responses.set('startExternalSeedWallet', JSON.stringify({
|
|
147
|
+
Imported: true,
|
|
148
|
+
IdentityPubKey: 'identity',
|
|
149
|
+
RecoveryRan: true,
|
|
150
|
+
RecoveredBoardingAddresses: 1,
|
|
151
|
+
RecoveredBoardingUTXOs: 2,
|
|
152
|
+
RecoveredVTXOs: 3,
|
|
153
|
+
RecoveredOORReceiveScripts: 4,
|
|
154
|
+
RecoveredOORRecipientEvents: 5,
|
|
155
|
+
}));
|
|
156
|
+
|
|
157
|
+
const result = await client.startExternalSeedWallet(
|
|
158
|
+
{
|
|
159
|
+
network: 'regtest',
|
|
160
|
+
dataDir: FINAL_PROFILE_DATA_DIR,
|
|
161
|
+
arkServerAddress: 'h:7070',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
seedEntropy: Uint8Array.from({ length: 16 }, (_, index) => index),
|
|
165
|
+
expectedIdentityPubKey: 'identity',
|
|
166
|
+
recoverState: true,
|
|
167
|
+
recoveryWindow: 37,
|
|
168
|
+
},
|
|
169
|
+
);
|
|
170
|
+
|
|
171
|
+
assert.equal(fake.calls.length, 1);
|
|
172
|
+
assert.equal(fake.calls[0].method, 'startExternalSeedWallet');
|
|
173
|
+
assert.deepEqual(JSON.parse(fake.calls[0].paramsJson), {
|
|
174
|
+
config: {
|
|
175
|
+
data_dir: FINAL_PROFILE_DATA_DIR,
|
|
176
|
+
network: 'regtest',
|
|
177
|
+
server_address: 'h:7070',
|
|
178
|
+
server_transport: 'grpc',
|
|
179
|
+
swap_server_transport: 'grpc',
|
|
180
|
+
wallet_type: 'lwwallet',
|
|
181
|
+
},
|
|
182
|
+
seed_entropy: 'AAECAwQFBgcICQoLDA0ODw==',
|
|
183
|
+
expected_identity_pubkey: 'identity',
|
|
184
|
+
recover_state: true,
|
|
185
|
+
recovery_window: 37,
|
|
186
|
+
});
|
|
187
|
+
assert.equal(fake.counts().defaultDataDirCount, 0);
|
|
188
|
+
assert.deepEqual(result, {
|
|
189
|
+
imported: true,
|
|
190
|
+
identityPubKey: 'identity',
|
|
191
|
+
recoveryRan: true,
|
|
192
|
+
recoveredBoardingAddresses: 1,
|
|
193
|
+
recoveredBoardingUTXOs: 2,
|
|
194
|
+
recoveredVTXOs: 3,
|
|
195
|
+
recoveredOORReceiveScripts: 4,
|
|
196
|
+
recoveredOORRecipientEvents: 5,
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
|
|
134
200
|
it('wraps native rejections in WavelengthError', async () => {
|
|
135
201
|
const fake = makeFake();
|
|
136
202
|
const client = new NativeWavelengthClient(fake.native, fake.subscribe);
|
package/src/client.ts
CHANGED
|
@@ -47,11 +47,11 @@ export type SubscribeToNativeEvents = (
|
|
|
47
47
|
listener: (event: NativeActivityEvent) => void,
|
|
48
48
|
) => () => void;
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
/**
|
|
51
51
|
* The React Native transport: implements {@link BaseWavelengthClient}'s pipe
|
|
52
52
|
* over the gomobile Turbo Module. JSON strings cross the RN bridge, then the
|
|
53
53
|
* shared base client normalizes responses and streamed entries in TS.
|
|
54
|
-
|
|
54
|
+
*/
|
|
55
55
|
export class NativeWavelengthClient extends BaseWavelengthClient {
|
|
56
56
|
// The embedded daemon runs natively, so it dials the servers over gRPC.
|
|
57
57
|
protected readonly serverTransport = 'grpc' as const;
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NativeEventEmitter, NativeModules } from 'react-native';
|
|
2
2
|
import {
|
|
3
3
|
createWalletEngine,
|
|
4
|
-
type
|
|
4
|
+
type ExternalSeedWalletClient,
|
|
5
5
|
type PasskeyCeremony,
|
|
6
6
|
type DistributiveOmit,
|
|
7
7
|
type WalletEngine,
|
|
@@ -15,11 +15,12 @@ import {
|
|
|
15
15
|
} from './passkey.ts';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Creates
|
|
19
|
-
* daemon compiled into the app via the gomobile bindings. Takes
|
|
20
|
-
* today; an options parameter can be added later without a breaking
|
|
18
|
+
* Creates an {@link ExternalSeedWalletClient} backed by the React Native
|
|
19
|
+
* transport: the daemon compiled into the app via the gomobile bindings. Takes
|
|
20
|
+
* no options today; an options parameter can be added later without a breaking
|
|
21
|
+
* change.
|
|
21
22
|
*/
|
|
22
|
-
export function createNativeClient():
|
|
23
|
+
export function createNativeClient(): ExternalSeedWalletClient {
|
|
23
24
|
// NativeModules.Wavelength is the interop view of the Turbo Module; the
|
|
24
25
|
// emitter needs it (or any module carrying addListener/removeListeners) to
|
|
25
26
|
// route 'wavelengthActivity' device events on both platforms.
|
|
@@ -11,6 +11,10 @@ const ios = new URL('../ios/WavelengthModule.mm', import.meta.url);
|
|
|
11
11
|
|
|
12
12
|
const nativeMethods = {
|
|
13
13
|
start: ['Mobile.start', 'MobileStart'],
|
|
14
|
+
startExternalSeedWallet: [
|
|
15
|
+
'Mobile.startExternalSeedWallet',
|
|
16
|
+
'MobileStartExternalSeedWallet',
|
|
17
|
+
],
|
|
14
18
|
stop: ['Mobile.stop', 'MobileStop'],
|
|
15
19
|
getInfo: ['Mobile.getInfo', 'MobileGetInfo'],
|
|
16
20
|
status: ['Mobile.status', 'MobileStatus'],
|
|
@@ -96,6 +100,19 @@ describe('native facade dispatch', () => {
|
|
|
96
100
|
assert.deepEqual(iosDispatch(mm), expectedIos);
|
|
97
101
|
});
|
|
98
102
|
|
|
103
|
+
it('forwards external-seed starts as byte request and result values', async () => {
|
|
104
|
+
const { kt, mm } = await readNativeSources();
|
|
105
|
+
|
|
106
|
+
assert.match(
|
|
107
|
+
kt,
|
|
108
|
+
/"startExternalSeedWallet"\s*->\s*Mobile\.startExternalSeedWallet\(params\)\.toString\(Charsets\.UTF_8\)/,
|
|
109
|
+
);
|
|
110
|
+
assert.match(
|
|
111
|
+
mm,
|
|
112
|
+
/\[method isEqualToString:@"startExternalSeedWallet"\]\)\s*\{\s*result = MobileStartExternalSeedWallet\(params, &error\);/,
|
|
113
|
+
);
|
|
114
|
+
});
|
|
115
|
+
|
|
99
116
|
for (const [method, kind] of Object.entries(scalarMethods)) {
|
|
100
117
|
it(`serializes the ${method} ${kind} as JSON text`, async () => {
|
|
101
118
|
const { kt, mm } = await readNativeSources();
|