@breeztech/breez-sdk-spark-react-native 0.15.1 → 0.16.1-dev1
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/cpp/generated/breez_sdk_spark.cpp +4947 -2629
- package/cpp/generated/breez_sdk_spark.hpp +257 -110
- package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/commonjs/generated/breez_sdk_spark.js +1304 -580
- package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -1
- package/lib/commonjs/passkey-prf-provider.js +300 -0
- package/lib/commonjs/passkey-prf-provider.js.map +1 -0
- package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -1
- package/lib/module/generated/breez_sdk_spark.js +1304 -580
- package/lib/module/generated/breez_sdk_spark.js.map +1 -1
- package/lib/module/passkey-prf-provider.js +293 -0
- package/lib/module/passkey-prf-provider.js.map +1 -0
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts +199 -140
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts +6149 -3695
- package/lib/typescript/commonjs/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/passkey-prf-provider.d.ts +135 -0
- package/lib/typescript/commonjs/src/passkey-prf-provider.d.ts.map +1 -0
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts +199 -140
- package/lib/typescript/module/src/generated/breez_sdk_spark-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts +6149 -3695
- package/lib/typescript/module/src/generated/breez_sdk_spark.d.ts.map +1 -1
- package/lib/typescript/module/src/passkey-prf-provider.d.ts +135 -0
- package/lib/typescript/module/src/passkey-prf-provider.d.ts.map +1 -0
- package/package.json +17 -5
- package/scripts/post-ubrn.js +227 -0
- package/src/generated/breez_sdk_spark-ffi.ts +366 -198
- package/src/generated/breez_sdk_spark.ts +12343 -7056
- package/src/passkey-prf-provider.ts +372 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PasskeyProvider = exports.PasskeyPrfException = exports.PasskeyClientBuilder = exports.PasskeyClient = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _breez_sdk_spark = require("./generated/breez_sdk_spark.js");
|
|
9
|
+
const {
|
|
10
|
+
BreezSdkSparkPasskey
|
|
11
|
+
} = _reactNative.NativeModules;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Diagnostic error for when the native passkey module isn't reachable. The
|
|
15
|
+
* common iOS cause is running below iOS 18, where the `@available(iOS 18.0, *)`
|
|
16
|
+
* Swift class cannot load; on Android a missing module means broken linking.
|
|
17
|
+
*/
|
|
18
|
+
function passkeyModuleUnavailableError(operation) {
|
|
19
|
+
if (_reactNative.Platform.OS === 'ios') {
|
|
20
|
+
const version = parseFloat(String(_reactNative.Platform.Version));
|
|
21
|
+
if (!Number.isNaN(version) && version < 18) {
|
|
22
|
+
return new Error(`Passkey PRF requires iOS 18.0 or later. ` + `This device is running iOS ${_reactNative.Platform.Version}, where ` + `ASAuthorizationPlatformPublicKeyCredentialPRFAssertionInput is not available. ` + `${operation} is unsupported on this device.`);
|
|
23
|
+
}
|
|
24
|
+
return new Error(`Passkey PRF native module (BreezSdkSparkPasskey) failed to load on iOS. ` + `This normally means the iOS deployment target is lower than 18.0 or ` + `the pod was not linked. ${operation} is unavailable.`);
|
|
25
|
+
}
|
|
26
|
+
if (_reactNative.Platform.OS === 'android') {
|
|
27
|
+
return new Error(`Passkey PRF native module (BreezSdkSparkPasskey) is not registered. ` + `Check that @breeztech/breez-sdk-spark-react-native is autolinked and ` + `that BreezSdkSparkPasskeyModule appears in BreezSdkSparkReactNativePackage. ` + `${operation} is unavailable.`);
|
|
28
|
+
}
|
|
29
|
+
return new Error(`Passkey PRF is only supported on iOS 18+ and Android 9+. ` + `${operation} is not available on ${_reactNative.Platform.OS}.`);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A passkey credential from a register or sign-in ceremony. `credentialId`
|
|
34
|
+
* is always set; the attestation fields are populated on registration and
|
|
35
|
+
* absent on sign-in (an assertion carries no attestation). Persist
|
|
36
|
+
* `credentialId` to drive `excludeCredentials` / `allowCredentials` on later
|
|
37
|
+
* calls. Treat `aaguid` as an unverified display hint, never a trust decision.
|
|
38
|
+
* `userId` is the user handle minted by the native plugin (never host-supplied).
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Result of {@link PasskeyProvider.checkDomainAssociation}. Switch on `kind`
|
|
43
|
+
* to handle each outcome.
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Error thrown when a passkey operation fails, with a structured `code` for
|
|
48
|
+
* programmatic handling: `userCancelled`, `userTimedOut`, `prfNotSupported`,
|
|
49
|
+
* `noCredential`, `configuration`, `credentialAlreadyExists`, `unknown`.
|
|
50
|
+
* `userTimedOut` is the OS biometric inactivity timeout (distinct from the
|
|
51
|
+
* user dismissing the prompt), so hosts may safely auto-retry it.
|
|
52
|
+
*/
|
|
53
|
+
class PasskeyPrfException extends Error {
|
|
54
|
+
constructor(code, message) {
|
|
55
|
+
super(message);
|
|
56
|
+
this.name = 'PasskeyPrfException';
|
|
57
|
+
this.code = code;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Map a native bridge rejection (RN passes `{ code, message }` on the
|
|
63
|
+
* thrown error) into a typed [PasskeyPrfException].
|
|
64
|
+
*/
|
|
65
|
+
exports.PasskeyPrfException = PasskeyPrfException;
|
|
66
|
+
function mapNativeError(err) {
|
|
67
|
+
const anyErr = err;
|
|
68
|
+
const message = anyErr?.message ?? 'Unknown passkey error';
|
|
69
|
+
switch (anyErr?.code) {
|
|
70
|
+
case 'ERR_USER_CANCELLED':
|
|
71
|
+
return new PasskeyPrfException('userCancelled', message);
|
|
72
|
+
case 'ERR_USER_TIMED_OUT':
|
|
73
|
+
return new PasskeyPrfException('userTimedOut', message);
|
|
74
|
+
case 'ERR_PRF_NOT_SUPPORTED':
|
|
75
|
+
return new PasskeyPrfException('prfNotSupported', message);
|
|
76
|
+
case 'ERR_NO_CREDENTIAL':
|
|
77
|
+
return new PasskeyPrfException('noCredential', message);
|
|
78
|
+
case 'ERR_CONFIGURATION':
|
|
79
|
+
return new PasskeyPrfException('configuration', message);
|
|
80
|
+
case 'ERR_CREDENTIAL_ALREADY_EXISTS':
|
|
81
|
+
return new PasskeyPrfException('credentialAlreadyExists', message);
|
|
82
|
+
case 'ERR_AUTHENTICATION_FAILED':
|
|
83
|
+
return new PasskeyPrfException('authenticationFailed', message);
|
|
84
|
+
case 'ERR_PRF_EVALUATION_FAILED':
|
|
85
|
+
return new PasskeyPrfException('prfEvaluationFailed', message);
|
|
86
|
+
default:
|
|
87
|
+
return new PasskeyPrfException('unknown', message);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Built-in React Native passkey PRF provider, backed by AuthenticationServices
|
|
93
|
+
* on iOS and Credential Manager on Android. The default {@link PrfProvider};
|
|
94
|
+
* inject a configured instance through {@link PasskeyClientBuilder}. Requires
|
|
95
|
+
* iOS 18+ or Android 14+ (API 34) plus the Associated Domains entitlement
|
|
96
|
+
* (iOS) or assetlinks.json (Android) for the RP domain.
|
|
97
|
+
*/
|
|
98
|
+
class PasskeyProvider {
|
|
99
|
+
/**
|
|
100
|
+
* Breez's shared `keys.breez.technology` RP. Pass as `rpId` to opt in
|
|
101
|
+
* (only valid for apps registered with Breez); apps with their own RP
|
|
102
|
+
* domain pass their own string.
|
|
103
|
+
*/
|
|
104
|
+
static BREEZ_RP_ID = 'keys.breez.technology';
|
|
105
|
+
|
|
106
|
+
/** Default `rpName` for the zero-config client when none is supplied. */
|
|
107
|
+
static DEFAULT_RP_NAME = 'Breez';
|
|
108
|
+
constructor(options) {
|
|
109
|
+
this.rpId = options.rpId ?? PasskeyProvider.BREEZ_RP_ID;
|
|
110
|
+
this.rpName = options.rpName ?? PasskeyProvider.DEFAULT_RP_NAME;
|
|
111
|
+
this.userName = options.userName ?? this.rpName;
|
|
112
|
+
this.userDisplayName = options.userDisplayName ?? this.userName;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Derive one 32-byte seed per salt from passkey PRF, in as few OS prompts
|
|
117
|
+
* as the platform supports. `allowCredentials` restricts the assertion to
|
|
118
|
+
* specific credential IDs (mainly for reauthentication) when non-empty;
|
|
119
|
+
* `preferImmediatelyAvailableCredentials` overrides the platform default
|
|
120
|
+
* when set. Returns the seeds plus the asserted credential ID.
|
|
121
|
+
*/
|
|
122
|
+
async deriveSeeds(request) {
|
|
123
|
+
if (!BreezSdkSparkPasskey) {
|
|
124
|
+
throw passkeyModuleUnavailableError('deriveSeeds');
|
|
125
|
+
}
|
|
126
|
+
const allowBase64 = (request.allowCredentials ?? []).map(id => uint8ArrayToBase64(id));
|
|
127
|
+
const preferImmediate = request.preferImmediatelyAvailableCredentials ?? null;
|
|
128
|
+
let result;
|
|
129
|
+
try {
|
|
130
|
+
result = await BreezSdkSparkPasskey.deriveSeeds(request.salts, this.rpId, this.rpName, this.userName, this.userDisplayName, false, allowBase64, preferImmediate);
|
|
131
|
+
if (!result || !Array.isArray(result.seeds)) {
|
|
132
|
+
throw new PasskeyPrfException('unknown', 'deriveSeeds returned an unexpected shape');
|
|
133
|
+
}
|
|
134
|
+
} catch (err) {
|
|
135
|
+
if (err instanceof PasskeyPrfException) {
|
|
136
|
+
throw err;
|
|
137
|
+
}
|
|
138
|
+
throw mapNativeError(err);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// The native module returns the asserted credential ID alongside the
|
|
142
|
+
// seeds; surface it so the SDK can pin the next derive to this exact
|
|
143
|
+
// credential.
|
|
144
|
+
return {
|
|
145
|
+
seeds: result.seeds.map(b64 => base64ToUint8Array(b64)),
|
|
146
|
+
credentialId: result.credentialId ? base64ToUint8Array(result.credentialId) : undefined
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Register a new PRF-capable passkey (one prompt, no seed derivation): use
|
|
152
|
+
* it to split credential creation from derivation in multi-step onboarding.
|
|
153
|
+
* `excludeCredentials` blocks re-registering a device that already holds a
|
|
154
|
+
* credential, surfaced as a `credentialAlreadyExists` failure. The returned
|
|
155
|
+
* user handle is minted fresh per call (never host-supplied).
|
|
156
|
+
*/
|
|
157
|
+
async createPasskey(excludeCredentials = []) {
|
|
158
|
+
if (!BreezSdkSparkPasskey) {
|
|
159
|
+
throw passkeyModuleUnavailableError('createPasskey');
|
|
160
|
+
}
|
|
161
|
+
const excludeBase64 = excludeCredentials.map(id => uint8ArrayToBase64(id));
|
|
162
|
+
try {
|
|
163
|
+
const result = await BreezSdkSparkPasskey.createPasskey(this.rpId, this.rpName, this.userName, this.userDisplayName, excludeBase64);
|
|
164
|
+
return {
|
|
165
|
+
credentialId: base64ToUint8Array(result.credentialId),
|
|
166
|
+
userId: base64ToUint8Array(result.userId),
|
|
167
|
+
aaguid: result.aaguid ? base64ToUint8Array(result.aaguid) : null,
|
|
168
|
+
backupEligible: result.backupEligible
|
|
169
|
+
};
|
|
170
|
+
} catch (err) {
|
|
171
|
+
throw mapNativeError(err);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** Whether this device supports passkeys with the PRF extension. */
|
|
176
|
+
async isSupported() {
|
|
177
|
+
if (!BreezSdkSparkPasskey) {
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
180
|
+
return await BreezSdkSparkPasskey.isSupported();
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Verify the app is associated with the configured `rpId` for WebAuthn.
|
|
185
|
+
* Android always returns `Skipped` rather than `NotAssociated`: Credential
|
|
186
|
+
* Manager runs its own check internally against fresher data.
|
|
187
|
+
*/
|
|
188
|
+
async checkDomainAssociation() {
|
|
189
|
+
if (!BreezSdkSparkPasskey) {
|
|
190
|
+
return {
|
|
191
|
+
kind: 'Skipped',
|
|
192
|
+
reason: 'Native passkey module unavailable on this platform'
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
try {
|
|
196
|
+
const result = await BreezSdkSparkPasskey.checkDomainAssociation(this.rpId);
|
|
197
|
+
const kind = result?.kind;
|
|
198
|
+
if (kind === 'Associated') {
|
|
199
|
+
return {
|
|
200
|
+
kind: 'Associated'
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
if (kind === 'NotAssociated') {
|
|
204
|
+
return {
|
|
205
|
+
kind: 'NotAssociated',
|
|
206
|
+
source: result?.source ?? 'unknown',
|
|
207
|
+
reason: result?.reason ?? ''
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
return {
|
|
211
|
+
kind: 'Skipped',
|
|
212
|
+
reason: result?.reason ?? ''
|
|
213
|
+
};
|
|
214
|
+
} catch (err) {
|
|
215
|
+
const anyErr = err;
|
|
216
|
+
return {
|
|
217
|
+
kind: 'Skipped',
|
|
218
|
+
reason: anyErr?.message ?? 'Domain association probe failed'
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/** Decode a base64 string to Uint8Array. */
|
|
225
|
+
exports.PasskeyProvider = PasskeyProvider;
|
|
226
|
+
function base64ToUint8Array(base64) {
|
|
227
|
+
const binaryString = atob(base64);
|
|
228
|
+
const bytes = new Uint8Array(binaryString.length);
|
|
229
|
+
for (let i = 0; i < binaryString.length; i++) {
|
|
230
|
+
bytes[i] = binaryString.charCodeAt(i);
|
|
231
|
+
}
|
|
232
|
+
return bytes;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/** Encode a Uint8Array to base64 string. */
|
|
236
|
+
function uint8ArrayToBase64(bytes) {
|
|
237
|
+
let binary = '';
|
|
238
|
+
for (const byte of bytes) {
|
|
239
|
+
binary += String.fromCharCode(byte);
|
|
240
|
+
}
|
|
241
|
+
return btoa(binary);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Builds a `PasskeyClient` backed by a caller-supplied provider. Use this
|
|
246
|
+
* for a custom PRF backend; omit the provider for the zero-config Breez-RP
|
|
247
|
+
* default and set `providerOptions` on the config to use your own RP.
|
|
248
|
+
*/
|
|
249
|
+
class PasskeyClientBuilder {
|
|
250
|
+
/**
|
|
251
|
+
* @param breezApiKey Breez relay key for authenticated (NIP-42) label
|
|
252
|
+
* storage. Omit for public relays only.
|
|
253
|
+
* @param config Passkey client config. `providerOptions` configures the
|
|
254
|
+
* default provider (ignored when a provider is injected via
|
|
255
|
+
* {@link withPrfProvider}, which owns its RP); `defaultLabel` is the
|
|
256
|
+
* label-store default.
|
|
257
|
+
*/
|
|
258
|
+
constructor(breezApiKey, config) {
|
|
259
|
+
this.breezApiKey = breezApiKey;
|
|
260
|
+
this.config = config;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Inject the provider the client derives seeds through: the built-in
|
|
265
|
+
* {@link PasskeyProvider} or any custom `PrfProvider` implementation.
|
|
266
|
+
* Supersedes the config's `providerOptions` (the injected provider owns
|
|
267
|
+
* its RP).
|
|
268
|
+
*/
|
|
269
|
+
withPrfProvider(provider) {
|
|
270
|
+
this.provider = provider;
|
|
271
|
+
return this;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Construct the client. Falls back to a default {@link PasskeyProvider}
|
|
276
|
+
* on the config's `providerOptions` (default: the Breez RP) when no
|
|
277
|
+
* provider was injected.
|
|
278
|
+
*/
|
|
279
|
+
build() {
|
|
280
|
+
// The hand-written PasskeyProvider conforms structurally to the
|
|
281
|
+
// generated PrfProvider foreign interface.
|
|
282
|
+
const provider = this.provider ?? new PasskeyProvider(this.config?.providerOptions ?? _breez_sdk_spark.PasskeyProviderOptions.create({}));
|
|
283
|
+
return new _breez_sdk_spark.PasskeyClient(provider, this.breezApiKey, this.config);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/** @internal Builds the zero-config client; exposed via {@link PasskeyClient}. */
|
|
288
|
+
exports.PasskeyClientBuilder = PasskeyClientBuilder;
|
|
289
|
+
function buildPasskeyClient(breezApiKey, config) {
|
|
290
|
+
return new PasskeyClientBuilder(breezApiKey, config).build();
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Zero-config passkey client on the Breez shared RP (`keys.breez.technology`),
|
|
295
|
+
* so a Breez-registered app needs only its relay key; set `providerOptions` on
|
|
296
|
+
* the config to use your own RP. For a custom PRF backend, build the provider
|
|
297
|
+
* and inject it via {@link PasskeyClientBuilder}.
|
|
298
|
+
*/
|
|
299
|
+
const PasskeyClient = exports.PasskeyClient = buildPasskeyClient;
|
|
300
|
+
//# sourceMappingURL=passkey-prf-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_breez_sdk_spark","BreezSdkSparkPasskey","NativeModules","passkeyModuleUnavailableError","operation","Platform","OS","version","parseFloat","String","Version","Number","isNaN","Error","PasskeyPrfException","constructor","code","message","name","exports","mapNativeError","err","anyErr","PasskeyProvider","BREEZ_RP_ID","DEFAULT_RP_NAME","options","rpId","rpName","userName","userDisplayName","deriveSeeds","request","allowBase64","allowCredentials","map","id","uint8ArrayToBase64","preferImmediate","preferImmediatelyAvailableCredentials","result","salts","Array","isArray","seeds","b64","base64ToUint8Array","credentialId","undefined","createPasskey","excludeCredentials","excludeBase64","userId","aaguid","backupEligible","isSupported","checkDomainAssociation","kind","reason","source","base64","binaryString","atob","bytes","Uint8Array","length","i","charCodeAt","binary","byte","fromCharCode","btoa","PasskeyClientBuilder","breezApiKey","config","withPrfProvider","provider","build","providerOptions","PasskeyProviderOptions","create","SdkPasskeyClient","buildPasskeyClient","PasskeyClient"],"sourceRoot":"../../src","sources":["passkey-prf-provider.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAOA,MAAM;EAAEE;AAAqB,CAAC,GAAGC,0BAAa;;AAE9C;AACA;AACA;AACA;AACA;AACA,SAASC,6BAA6BA,CAACC,SAAiB,EAAS;EAC/D,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;IACzB,MAAMC,OAAO,GAAGC,UAAU,CAACC,MAAM,CAACJ,qBAAQ,CAACK,OAAO,CAAC,CAAC;IACpD,IAAI,CAACC,MAAM,CAACC,KAAK,CAACL,OAAO,CAAC,IAAIA,OAAO,GAAG,EAAE,EAAE;MAC1C,OAAO,IAAIM,KAAK,CACd,0CAA0C,GACxC,8BAA8BR,qBAAQ,CAACK,OAAO,UAAU,GACxD,gFAAgF,GAChF,GAAGN,SAAS,iCAChB,CAAC;IACH;IACA,OAAO,IAAIS,KAAK,CACd,0EAA0E,GACxE,sEAAsE,GACtE,2BAA2BT,SAAS,kBACxC,CAAC;EACH;EACA,IAAIC,qBAAQ,CAACC,EAAE,KAAK,SAAS,EAAE;IAC7B,OAAO,IAAIO,KAAK,CACd,sEAAsE,GACpE,uEAAuE,GACvE,8EAA8E,GAC9E,GAAGT,SAAS,kBAChB,CAAC;EACH;EACA,OAAO,IAAIS,KAAK,CACd,2DAA2D,GACzD,GAAGT,SAAS,wBAAwBC,qBAAQ,CAACC,EAAE,GACnD,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMQ,mBAAmB,SAASD,KAAK,CAAC;EAG7CE,WAAWA,CAACC,I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A,CAAAgE,aAAA,GAAGD,kBAEH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getter","globalThis","NativeBreezSdkSpark","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/breez_sdk_spark-ffi.ts"],"mappings":";;AAAA;AACA;;
|
|
1
|
+
{"version":3,"names":["getter","globalThis","NativeBreezSdkSpark","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/breez_sdk_spark-ffi.ts"],"mappings":";;AAAA;AACA;;AAspCA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,mBAAmB;AACzC,eAAeF,MAAM;;AAErB;;AA4oBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,8CAGL,GAAG,IAAI;AACR,MAAMC,mCAGL,GAAG,IAAI","ignoreList":[]}
|