@breeztech/breez-sdk-spark 0.11.0-dev3 → 0.11.0-dev4
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/breez-sdk-spark.tgz +0 -0
- package/bundler/breez_sdk_spark_wasm.d.ts +17 -17
- package/bundler/breez_sdk_spark_wasm_bg.js +23 -23
- package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +2 -2
- package/deno/breez_sdk_spark_wasm.d.ts +17 -17
- package/deno/breez_sdk_spark_wasm.js +23 -23
- package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +2 -2
- package/nodejs/breez_sdk_spark_wasm.d.ts +17 -17
- package/nodejs/breez_sdk_spark_wasm.js +23 -23
- package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +2 -2
- package/package.json +1 -1
- package/web/breez_sdk_spark_wasm.d.ts +19 -19
- package/web/breez_sdk_spark_wasm.js +23 -23
- package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +2 -2
package/breez-sdk-spark.tgz
CHANGED
|
Binary file
|
|
@@ -1189,15 +1189,15 @@ export interface Wallet {
|
|
|
1189
1189
|
*/
|
|
1190
1190
|
seed: Seed;
|
|
1191
1191
|
/**
|
|
1192
|
-
* The
|
|
1192
|
+
* The label used for derivation.
|
|
1193
1193
|
*/
|
|
1194
|
-
|
|
1194
|
+
label: string;
|
|
1195
1195
|
}
|
|
1196
1196
|
|
|
1197
1197
|
/**
|
|
1198
|
-
* Nostr relay configuration for passkey
|
|
1198
|
+
* Nostr relay configuration for passkey label operations.
|
|
1199
1199
|
*
|
|
1200
|
-
* Used by `Passkey.
|
|
1200
|
+
* Used by `Passkey.listLabels` and `Passkey.storeLabel`.
|
|
1201
1201
|
*/
|
|
1202
1202
|
export interface NostrRelayConfig {
|
|
1203
1203
|
/**
|
|
@@ -1345,30 +1345,30 @@ export class IntoUnderlyingSource {
|
|
|
1345
1345
|
export class Passkey {
|
|
1346
1346
|
free(): void;
|
|
1347
1347
|
/**
|
|
1348
|
-
* Derive a wallet for a given
|
|
1348
|
+
* Derive a wallet for a given label.
|
|
1349
1349
|
*
|
|
1350
|
-
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved
|
|
1350
|
+
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved label.
|
|
1351
1351
|
*
|
|
1352
|
-
* @param
|
|
1352
|
+
* @param label - Optional label string (defaults to "Default")
|
|
1353
1353
|
*/
|
|
1354
|
-
getWallet(
|
|
1355
|
-
/**
|
|
1356
|
-
* Check if passkey PRF is available on this device.
|
|
1357
|
-
*/
|
|
1358
|
-
isAvailable(): Promise<boolean>;
|
|
1354
|
+
getWallet(label?: string | null): Promise<Wallet>;
|
|
1359
1355
|
/**
|
|
1360
|
-
* List all
|
|
1356
|
+
* List all labels published to Nostr for this passkey's identity.
|
|
1361
1357
|
*
|
|
1362
1358
|
* Requires 1 PRF call (for Nostr identity derivation).
|
|
1363
1359
|
*/
|
|
1364
|
-
|
|
1360
|
+
listLabels(): Promise<string[]>;
|
|
1365
1361
|
/**
|
|
1366
|
-
* Publish a
|
|
1362
|
+
* Publish a label to Nostr relays for this passkey's identity.
|
|
1367
1363
|
*
|
|
1368
|
-
* Idempotent: if the
|
|
1364
|
+
* Idempotent: if the label already exists, it is not published again.
|
|
1369
1365
|
* Requires 1 PRF call.
|
|
1370
1366
|
*/
|
|
1371
|
-
|
|
1367
|
+
storeLabel(label: string): Promise<void>;
|
|
1368
|
+
/**
|
|
1369
|
+
* Check if passkey PRF is available on this device.
|
|
1370
|
+
*/
|
|
1371
|
+
isAvailable(): Promise<boolean>;
|
|
1372
1372
|
/**
|
|
1373
1373
|
* Create a new `Passkey` instance.
|
|
1374
1374
|
*
|
|
@@ -1076,50 +1076,50 @@ export class Passkey {
|
|
|
1076
1076
|
wasm.__wbg_passkey_free(ptr, 0);
|
|
1077
1077
|
}
|
|
1078
1078
|
/**
|
|
1079
|
-
* Derive a wallet for a given
|
|
1079
|
+
* Derive a wallet for a given label.
|
|
1080
1080
|
*
|
|
1081
|
-
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved
|
|
1081
|
+
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved label.
|
|
1082
1082
|
*
|
|
1083
|
-
* @param
|
|
1084
|
-
* @param {string | null} [
|
|
1083
|
+
* @param label - Optional label string (defaults to "Default")
|
|
1084
|
+
* @param {string | null} [label]
|
|
1085
1085
|
* @returns {Promise<Wallet>}
|
|
1086
1086
|
*/
|
|
1087
|
-
getWallet(
|
|
1088
|
-
var ptr0 = isLikeNone(
|
|
1087
|
+
getWallet(label) {
|
|
1088
|
+
var ptr0 = isLikeNone(label) ? 0 : passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1089
1089
|
var len0 = WASM_VECTOR_LEN;
|
|
1090
1090
|
const ret = wasm.passkey_getWallet(this.__wbg_ptr, ptr0, len0);
|
|
1091
1091
|
return ret;
|
|
1092
1092
|
}
|
|
1093
1093
|
/**
|
|
1094
|
-
*
|
|
1095
|
-
* @returns {Promise<boolean>}
|
|
1096
|
-
*/
|
|
1097
|
-
isAvailable() {
|
|
1098
|
-
const ret = wasm.passkey_isAvailable(this.__wbg_ptr);
|
|
1099
|
-
return ret;
|
|
1100
|
-
}
|
|
1101
|
-
/**
|
|
1102
|
-
* List all wallet names published to Nostr for this passkey's identity.
|
|
1094
|
+
* List all labels published to Nostr for this passkey's identity.
|
|
1103
1095
|
*
|
|
1104
1096
|
* Requires 1 PRF call (for Nostr identity derivation).
|
|
1105
1097
|
* @returns {Promise<string[]>}
|
|
1106
1098
|
*/
|
|
1107
|
-
|
|
1108
|
-
const ret = wasm.
|
|
1099
|
+
listLabels() {
|
|
1100
|
+
const ret = wasm.passkey_listLabels(this.__wbg_ptr);
|
|
1109
1101
|
return ret;
|
|
1110
1102
|
}
|
|
1111
1103
|
/**
|
|
1112
|
-
* Publish a
|
|
1104
|
+
* Publish a label to Nostr relays for this passkey's identity.
|
|
1113
1105
|
*
|
|
1114
|
-
* Idempotent: if the
|
|
1106
|
+
* Idempotent: if the label already exists, it is not published again.
|
|
1115
1107
|
* Requires 1 PRF call.
|
|
1116
|
-
* @param {string}
|
|
1108
|
+
* @param {string} label
|
|
1117
1109
|
* @returns {Promise<void>}
|
|
1118
1110
|
*/
|
|
1119
|
-
|
|
1120
|
-
const ptr0 = passStringToWasm0(
|
|
1111
|
+
storeLabel(label) {
|
|
1112
|
+
const ptr0 = passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1121
1113
|
const len0 = WASM_VECTOR_LEN;
|
|
1122
|
-
const ret = wasm.
|
|
1114
|
+
const ret = wasm.passkey_storeLabel(this.__wbg_ptr, ptr0, len0);
|
|
1115
|
+
return ret;
|
|
1116
|
+
}
|
|
1117
|
+
/**
|
|
1118
|
+
* Check if passkey PRF is available on this device.
|
|
1119
|
+
* @returns {Promise<boolean>}
|
|
1120
|
+
*/
|
|
1121
|
+
isAvailable() {
|
|
1122
|
+
const ret = wasm.passkey_isAvailable(this.__wbg_ptr);
|
|
1123
1123
|
return ret;
|
|
1124
1124
|
}
|
|
1125
1125
|
/**
|
|
Binary file
|
|
@@ -76,9 +76,9 @@ export const getSparkStatus: () => any;
|
|
|
76
76
|
export const initLogging: (a: any, b: number, c: number) => any;
|
|
77
77
|
export const passkey_getWallet: (a: number, b: number, c: number) => any;
|
|
78
78
|
export const passkey_isAvailable: (a: number) => any;
|
|
79
|
-
export const
|
|
79
|
+
export const passkey_listLabels: (a: number) => any;
|
|
80
80
|
export const passkey_new: (a: any, b: number) => number;
|
|
81
|
-
export const
|
|
81
|
+
export const passkey_storeLabel: (a: number, b: number, c: number) => any;
|
|
82
82
|
export const sdkbuilder_build: (a: number) => any;
|
|
83
83
|
export const sdkbuilder_new: (a: any, b: any) => number;
|
|
84
84
|
export const sdkbuilder_newWithSigner: (a: any, b: any) => number;
|
|
@@ -1189,15 +1189,15 @@ export interface Wallet {
|
|
|
1189
1189
|
*/
|
|
1190
1190
|
seed: Seed;
|
|
1191
1191
|
/**
|
|
1192
|
-
* The
|
|
1192
|
+
* The label used for derivation.
|
|
1193
1193
|
*/
|
|
1194
|
-
|
|
1194
|
+
label: string;
|
|
1195
1195
|
}
|
|
1196
1196
|
|
|
1197
1197
|
/**
|
|
1198
|
-
* Nostr relay configuration for passkey
|
|
1198
|
+
* Nostr relay configuration for passkey label operations.
|
|
1199
1199
|
*
|
|
1200
|
-
* Used by `Passkey.
|
|
1200
|
+
* Used by `Passkey.listLabels` and `Passkey.storeLabel`.
|
|
1201
1201
|
*/
|
|
1202
1202
|
export interface NostrRelayConfig {
|
|
1203
1203
|
/**
|
|
@@ -1345,30 +1345,30 @@ export class IntoUnderlyingSource {
|
|
|
1345
1345
|
export class Passkey {
|
|
1346
1346
|
free(): void;
|
|
1347
1347
|
/**
|
|
1348
|
-
* Derive a wallet for a given
|
|
1348
|
+
* Derive a wallet for a given label.
|
|
1349
1349
|
*
|
|
1350
|
-
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved
|
|
1350
|
+
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved label.
|
|
1351
1351
|
*
|
|
1352
|
-
* @param
|
|
1352
|
+
* @param label - Optional label string (defaults to "Default")
|
|
1353
1353
|
*/
|
|
1354
|
-
getWallet(
|
|
1355
|
-
/**
|
|
1356
|
-
* Check if passkey PRF is available on this device.
|
|
1357
|
-
*/
|
|
1358
|
-
isAvailable(): Promise<boolean>;
|
|
1354
|
+
getWallet(label?: string | null): Promise<Wallet>;
|
|
1359
1355
|
/**
|
|
1360
|
-
* List all
|
|
1356
|
+
* List all labels published to Nostr for this passkey's identity.
|
|
1361
1357
|
*
|
|
1362
1358
|
* Requires 1 PRF call (for Nostr identity derivation).
|
|
1363
1359
|
*/
|
|
1364
|
-
|
|
1360
|
+
listLabels(): Promise<string[]>;
|
|
1365
1361
|
/**
|
|
1366
|
-
* Publish a
|
|
1362
|
+
* Publish a label to Nostr relays for this passkey's identity.
|
|
1367
1363
|
*
|
|
1368
|
-
* Idempotent: if the
|
|
1364
|
+
* Idempotent: if the label already exists, it is not published again.
|
|
1369
1365
|
* Requires 1 PRF call.
|
|
1370
1366
|
*/
|
|
1371
|
-
|
|
1367
|
+
storeLabel(label: string): Promise<void>;
|
|
1368
|
+
/**
|
|
1369
|
+
* Check if passkey PRF is available on this device.
|
|
1370
|
+
*/
|
|
1371
|
+
isAvailable(): Promise<boolean>;
|
|
1372
1372
|
/**
|
|
1373
1373
|
* Create a new `Passkey` instance.
|
|
1374
1374
|
*
|
|
@@ -1059,50 +1059,50 @@ export class Passkey {
|
|
|
1059
1059
|
wasm.__wbg_passkey_free(ptr, 0);
|
|
1060
1060
|
}
|
|
1061
1061
|
/**
|
|
1062
|
-
* Derive a wallet for a given
|
|
1062
|
+
* Derive a wallet for a given label.
|
|
1063
1063
|
*
|
|
1064
|
-
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved
|
|
1064
|
+
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved label.
|
|
1065
1065
|
*
|
|
1066
|
-
* @param
|
|
1067
|
-
* @param {string | null} [
|
|
1066
|
+
* @param label - Optional label string (defaults to "Default")
|
|
1067
|
+
* @param {string | null} [label]
|
|
1068
1068
|
* @returns {Promise<Wallet>}
|
|
1069
1069
|
*/
|
|
1070
|
-
getWallet(
|
|
1071
|
-
var ptr0 = isLikeNone(
|
|
1070
|
+
getWallet(label) {
|
|
1071
|
+
var ptr0 = isLikeNone(label) ? 0 : passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1072
1072
|
var len0 = WASM_VECTOR_LEN;
|
|
1073
1073
|
const ret = wasm.passkey_getWallet(this.__wbg_ptr, ptr0, len0);
|
|
1074
1074
|
return ret;
|
|
1075
1075
|
}
|
|
1076
1076
|
/**
|
|
1077
|
-
*
|
|
1078
|
-
* @returns {Promise<boolean>}
|
|
1079
|
-
*/
|
|
1080
|
-
isAvailable() {
|
|
1081
|
-
const ret = wasm.passkey_isAvailable(this.__wbg_ptr);
|
|
1082
|
-
return ret;
|
|
1083
|
-
}
|
|
1084
|
-
/**
|
|
1085
|
-
* List all wallet names published to Nostr for this passkey's identity.
|
|
1077
|
+
* List all labels published to Nostr for this passkey's identity.
|
|
1086
1078
|
*
|
|
1087
1079
|
* Requires 1 PRF call (for Nostr identity derivation).
|
|
1088
1080
|
* @returns {Promise<string[]>}
|
|
1089
1081
|
*/
|
|
1090
|
-
|
|
1091
|
-
const ret = wasm.
|
|
1082
|
+
listLabels() {
|
|
1083
|
+
const ret = wasm.passkey_listLabels(this.__wbg_ptr);
|
|
1092
1084
|
return ret;
|
|
1093
1085
|
}
|
|
1094
1086
|
/**
|
|
1095
|
-
* Publish a
|
|
1087
|
+
* Publish a label to Nostr relays for this passkey's identity.
|
|
1096
1088
|
*
|
|
1097
|
-
* Idempotent: if the
|
|
1089
|
+
* Idempotent: if the label already exists, it is not published again.
|
|
1098
1090
|
* Requires 1 PRF call.
|
|
1099
|
-
* @param {string}
|
|
1091
|
+
* @param {string} label
|
|
1100
1092
|
* @returns {Promise<void>}
|
|
1101
1093
|
*/
|
|
1102
|
-
|
|
1103
|
-
const ptr0 = passStringToWasm0(
|
|
1094
|
+
storeLabel(label) {
|
|
1095
|
+
const ptr0 = passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1104
1096
|
const len0 = WASM_VECTOR_LEN;
|
|
1105
|
-
const ret = wasm.
|
|
1097
|
+
const ret = wasm.passkey_storeLabel(this.__wbg_ptr, ptr0, len0);
|
|
1098
|
+
return ret;
|
|
1099
|
+
}
|
|
1100
|
+
/**
|
|
1101
|
+
* Check if passkey PRF is available on this device.
|
|
1102
|
+
* @returns {Promise<boolean>}
|
|
1103
|
+
*/
|
|
1104
|
+
isAvailable() {
|
|
1105
|
+
const ret = wasm.passkey_isAvailable(this.__wbg_ptr);
|
|
1106
1106
|
return ret;
|
|
1107
1107
|
}
|
|
1108
1108
|
/**
|
|
Binary file
|
|
@@ -76,9 +76,9 @@ export const getSparkStatus: () => any;
|
|
|
76
76
|
export const initLogging: (a: any, b: number, c: number) => any;
|
|
77
77
|
export const passkey_getWallet: (a: number, b: number, c: number) => any;
|
|
78
78
|
export const passkey_isAvailable: (a: number) => any;
|
|
79
|
-
export const
|
|
79
|
+
export const passkey_listLabels: (a: number) => any;
|
|
80
80
|
export const passkey_new: (a: any, b: number) => number;
|
|
81
|
-
export const
|
|
81
|
+
export const passkey_storeLabel: (a: number, b: number, c: number) => any;
|
|
82
82
|
export const sdkbuilder_build: (a: number) => any;
|
|
83
83
|
export const sdkbuilder_new: (a: any, b: any) => number;
|
|
84
84
|
export const sdkbuilder_newWithSigner: (a: any, b: any) => number;
|
|
@@ -1189,15 +1189,15 @@ export interface Wallet {
|
|
|
1189
1189
|
*/
|
|
1190
1190
|
seed: Seed;
|
|
1191
1191
|
/**
|
|
1192
|
-
* The
|
|
1192
|
+
* The label used for derivation.
|
|
1193
1193
|
*/
|
|
1194
|
-
|
|
1194
|
+
label: string;
|
|
1195
1195
|
}
|
|
1196
1196
|
|
|
1197
1197
|
/**
|
|
1198
|
-
* Nostr relay configuration for passkey
|
|
1198
|
+
* Nostr relay configuration for passkey label operations.
|
|
1199
1199
|
*
|
|
1200
|
-
* Used by `Passkey.
|
|
1200
|
+
* Used by `Passkey.listLabels` and `Passkey.storeLabel`.
|
|
1201
1201
|
*/
|
|
1202
1202
|
export interface NostrRelayConfig {
|
|
1203
1203
|
/**
|
|
@@ -1345,30 +1345,30 @@ export class IntoUnderlyingSource {
|
|
|
1345
1345
|
export class Passkey {
|
|
1346
1346
|
free(): void;
|
|
1347
1347
|
/**
|
|
1348
|
-
* Derive a wallet for a given
|
|
1348
|
+
* Derive a wallet for a given label.
|
|
1349
1349
|
*
|
|
1350
|
-
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved
|
|
1350
|
+
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved label.
|
|
1351
1351
|
*
|
|
1352
|
-
* @param
|
|
1352
|
+
* @param label - Optional label string (defaults to "Default")
|
|
1353
1353
|
*/
|
|
1354
|
-
getWallet(
|
|
1355
|
-
/**
|
|
1356
|
-
* Check if passkey PRF is available on this device.
|
|
1357
|
-
*/
|
|
1358
|
-
isAvailable(): Promise<boolean>;
|
|
1354
|
+
getWallet(label?: string | null): Promise<Wallet>;
|
|
1359
1355
|
/**
|
|
1360
|
-
* List all
|
|
1356
|
+
* List all labels published to Nostr for this passkey's identity.
|
|
1361
1357
|
*
|
|
1362
1358
|
* Requires 1 PRF call (for Nostr identity derivation).
|
|
1363
1359
|
*/
|
|
1364
|
-
|
|
1360
|
+
listLabels(): Promise<string[]>;
|
|
1365
1361
|
/**
|
|
1366
|
-
* Publish a
|
|
1362
|
+
* Publish a label to Nostr relays for this passkey's identity.
|
|
1367
1363
|
*
|
|
1368
|
-
* Idempotent: if the
|
|
1364
|
+
* Idempotent: if the label already exists, it is not published again.
|
|
1369
1365
|
* Requires 1 PRF call.
|
|
1370
1366
|
*/
|
|
1371
|
-
|
|
1367
|
+
storeLabel(label: string): Promise<void>;
|
|
1368
|
+
/**
|
|
1369
|
+
* Check if passkey PRF is available on this device.
|
|
1370
|
+
*/
|
|
1371
|
+
isAvailable(): Promise<boolean>;
|
|
1372
1372
|
/**
|
|
1373
1373
|
* Create a new `Passkey` instance.
|
|
1374
1374
|
*
|
|
@@ -1077,50 +1077,50 @@ class Passkey {
|
|
|
1077
1077
|
wasm.__wbg_passkey_free(ptr, 0);
|
|
1078
1078
|
}
|
|
1079
1079
|
/**
|
|
1080
|
-
* Derive a wallet for a given
|
|
1080
|
+
* Derive a wallet for a given label.
|
|
1081
1081
|
*
|
|
1082
|
-
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved
|
|
1082
|
+
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved label.
|
|
1083
1083
|
*
|
|
1084
|
-
* @param
|
|
1085
|
-
* @param {string | null} [
|
|
1084
|
+
* @param label - Optional label string (defaults to "Default")
|
|
1085
|
+
* @param {string | null} [label]
|
|
1086
1086
|
* @returns {Promise<Wallet>}
|
|
1087
1087
|
*/
|
|
1088
|
-
getWallet(
|
|
1089
|
-
var ptr0 = isLikeNone(
|
|
1088
|
+
getWallet(label) {
|
|
1089
|
+
var ptr0 = isLikeNone(label) ? 0 : passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1090
1090
|
var len0 = WASM_VECTOR_LEN;
|
|
1091
1091
|
const ret = wasm.passkey_getWallet(this.__wbg_ptr, ptr0, len0);
|
|
1092
1092
|
return ret;
|
|
1093
1093
|
}
|
|
1094
1094
|
/**
|
|
1095
|
-
*
|
|
1096
|
-
* @returns {Promise<boolean>}
|
|
1097
|
-
*/
|
|
1098
|
-
isAvailable() {
|
|
1099
|
-
const ret = wasm.passkey_isAvailable(this.__wbg_ptr);
|
|
1100
|
-
return ret;
|
|
1101
|
-
}
|
|
1102
|
-
/**
|
|
1103
|
-
* List all wallet names published to Nostr for this passkey's identity.
|
|
1095
|
+
* List all labels published to Nostr for this passkey's identity.
|
|
1104
1096
|
*
|
|
1105
1097
|
* Requires 1 PRF call (for Nostr identity derivation).
|
|
1106
1098
|
* @returns {Promise<string[]>}
|
|
1107
1099
|
*/
|
|
1108
|
-
|
|
1109
|
-
const ret = wasm.
|
|
1100
|
+
listLabels() {
|
|
1101
|
+
const ret = wasm.passkey_listLabels(this.__wbg_ptr);
|
|
1110
1102
|
return ret;
|
|
1111
1103
|
}
|
|
1112
1104
|
/**
|
|
1113
|
-
* Publish a
|
|
1105
|
+
* Publish a label to Nostr relays for this passkey's identity.
|
|
1114
1106
|
*
|
|
1115
|
-
* Idempotent: if the
|
|
1107
|
+
* Idempotent: if the label already exists, it is not published again.
|
|
1116
1108
|
* Requires 1 PRF call.
|
|
1117
|
-
* @param {string}
|
|
1109
|
+
* @param {string} label
|
|
1118
1110
|
* @returns {Promise<void>}
|
|
1119
1111
|
*/
|
|
1120
|
-
|
|
1121
|
-
const ptr0 = passStringToWasm0(
|
|
1112
|
+
storeLabel(label) {
|
|
1113
|
+
const ptr0 = passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1122
1114
|
const len0 = WASM_VECTOR_LEN;
|
|
1123
|
-
const ret = wasm.
|
|
1115
|
+
const ret = wasm.passkey_storeLabel(this.__wbg_ptr, ptr0, len0);
|
|
1116
|
+
return ret;
|
|
1117
|
+
}
|
|
1118
|
+
/**
|
|
1119
|
+
* Check if passkey PRF is available on this device.
|
|
1120
|
+
* @returns {Promise<boolean>}
|
|
1121
|
+
*/
|
|
1122
|
+
isAvailable() {
|
|
1123
|
+
const ret = wasm.passkey_isAvailable(this.__wbg_ptr);
|
|
1124
1124
|
return ret;
|
|
1125
1125
|
}
|
|
1126
1126
|
/**
|
|
Binary file
|
|
@@ -76,9 +76,9 @@ export const getSparkStatus: () => any;
|
|
|
76
76
|
export const initLogging: (a: any, b: number, c: number) => any;
|
|
77
77
|
export const passkey_getWallet: (a: number, b: number, c: number) => any;
|
|
78
78
|
export const passkey_isAvailable: (a: number) => any;
|
|
79
|
-
export const
|
|
79
|
+
export const passkey_listLabels: (a: number) => any;
|
|
80
80
|
export const passkey_new: (a: any, b: number) => number;
|
|
81
|
-
export const
|
|
81
|
+
export const passkey_storeLabel: (a: number, b: number, c: number) => any;
|
|
82
82
|
export const sdkbuilder_build: (a: number) => any;
|
|
83
83
|
export const sdkbuilder_new: (a: any, b: any) => number;
|
|
84
84
|
export const sdkbuilder_newWithSigner: (a: any, b: any) => number;
|
package/package.json
CHANGED
|
@@ -1189,15 +1189,15 @@ export interface Wallet {
|
|
|
1189
1189
|
*/
|
|
1190
1190
|
seed: Seed;
|
|
1191
1191
|
/**
|
|
1192
|
-
* The
|
|
1192
|
+
* The label used for derivation.
|
|
1193
1193
|
*/
|
|
1194
|
-
|
|
1194
|
+
label: string;
|
|
1195
1195
|
}
|
|
1196
1196
|
|
|
1197
1197
|
/**
|
|
1198
|
-
* Nostr relay configuration for passkey
|
|
1198
|
+
* Nostr relay configuration for passkey label operations.
|
|
1199
1199
|
*
|
|
1200
|
-
* Used by `Passkey.
|
|
1200
|
+
* Used by `Passkey.listLabels` and `Passkey.storeLabel`.
|
|
1201
1201
|
*/
|
|
1202
1202
|
export interface NostrRelayConfig {
|
|
1203
1203
|
/**
|
|
@@ -1345,30 +1345,30 @@ export class IntoUnderlyingSource {
|
|
|
1345
1345
|
export class Passkey {
|
|
1346
1346
|
free(): void;
|
|
1347
1347
|
/**
|
|
1348
|
-
* Derive a wallet for a given
|
|
1348
|
+
* Derive a wallet for a given label.
|
|
1349
1349
|
*
|
|
1350
|
-
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved
|
|
1350
|
+
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved label.
|
|
1351
1351
|
*
|
|
1352
|
-
* @param
|
|
1352
|
+
* @param label - Optional label string (defaults to "Default")
|
|
1353
1353
|
*/
|
|
1354
|
-
getWallet(
|
|
1355
|
-
/**
|
|
1356
|
-
* Check if passkey PRF is available on this device.
|
|
1357
|
-
*/
|
|
1358
|
-
isAvailable(): Promise<boolean>;
|
|
1354
|
+
getWallet(label?: string | null): Promise<Wallet>;
|
|
1359
1355
|
/**
|
|
1360
|
-
* List all
|
|
1356
|
+
* List all labels published to Nostr for this passkey's identity.
|
|
1361
1357
|
*
|
|
1362
1358
|
* Requires 1 PRF call (for Nostr identity derivation).
|
|
1363
1359
|
*/
|
|
1364
|
-
|
|
1360
|
+
listLabels(): Promise<string[]>;
|
|
1365
1361
|
/**
|
|
1366
|
-
* Publish a
|
|
1362
|
+
* Publish a label to Nostr relays for this passkey's identity.
|
|
1367
1363
|
*
|
|
1368
|
-
* Idempotent: if the
|
|
1364
|
+
* Idempotent: if the label already exists, it is not published again.
|
|
1369
1365
|
* Requires 1 PRF call.
|
|
1370
1366
|
*/
|
|
1371
|
-
|
|
1367
|
+
storeLabel(label: string): Promise<void>;
|
|
1368
|
+
/**
|
|
1369
|
+
* Check if passkey PRF is available on this device.
|
|
1370
|
+
*/
|
|
1371
|
+
isAvailable(): Promise<boolean>;
|
|
1372
1372
|
/**
|
|
1373
1373
|
* Create a new `Passkey` instance.
|
|
1374
1374
|
*
|
|
@@ -1485,9 +1485,9 @@ export interface InitOutput {
|
|
|
1485
1485
|
readonly initLogging: (a: any, b: number, c: number) => any;
|
|
1486
1486
|
readonly passkey_getWallet: (a: number, b: number, c: number) => any;
|
|
1487
1487
|
readonly passkey_isAvailable: (a: number) => any;
|
|
1488
|
-
readonly
|
|
1488
|
+
readonly passkey_listLabels: (a: number) => any;
|
|
1489
1489
|
readonly passkey_new: (a: any, b: number) => number;
|
|
1490
|
-
readonly
|
|
1490
|
+
readonly passkey_storeLabel: (a: number, b: number, c: number) => any;
|
|
1491
1491
|
readonly sdkbuilder_build: (a: number) => any;
|
|
1492
1492
|
readonly sdkbuilder_new: (a: any, b: any) => number;
|
|
1493
1493
|
readonly sdkbuilder_newWithSigner: (a: any, b: any) => number;
|
|
@@ -1068,50 +1068,50 @@ export class Passkey {
|
|
|
1068
1068
|
wasm.__wbg_passkey_free(ptr, 0);
|
|
1069
1069
|
}
|
|
1070
1070
|
/**
|
|
1071
|
-
* Derive a wallet for a given
|
|
1071
|
+
* Derive a wallet for a given label.
|
|
1072
1072
|
*
|
|
1073
|
-
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved
|
|
1073
|
+
* Uses the passkey PRF to derive a `Wallet` containing the seed and resolved label.
|
|
1074
1074
|
*
|
|
1075
|
-
* @param
|
|
1076
|
-
* @param {string | null} [
|
|
1075
|
+
* @param label - Optional label string (defaults to "Default")
|
|
1076
|
+
* @param {string | null} [label]
|
|
1077
1077
|
* @returns {Promise<Wallet>}
|
|
1078
1078
|
*/
|
|
1079
|
-
getWallet(
|
|
1080
|
-
var ptr0 = isLikeNone(
|
|
1079
|
+
getWallet(label) {
|
|
1080
|
+
var ptr0 = isLikeNone(label) ? 0 : passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1081
1081
|
var len0 = WASM_VECTOR_LEN;
|
|
1082
1082
|
const ret = wasm.passkey_getWallet(this.__wbg_ptr, ptr0, len0);
|
|
1083
1083
|
return ret;
|
|
1084
1084
|
}
|
|
1085
1085
|
/**
|
|
1086
|
-
*
|
|
1087
|
-
* @returns {Promise<boolean>}
|
|
1088
|
-
*/
|
|
1089
|
-
isAvailable() {
|
|
1090
|
-
const ret = wasm.passkey_isAvailable(this.__wbg_ptr);
|
|
1091
|
-
return ret;
|
|
1092
|
-
}
|
|
1093
|
-
/**
|
|
1094
|
-
* List all wallet names published to Nostr for this passkey's identity.
|
|
1086
|
+
* List all labels published to Nostr for this passkey's identity.
|
|
1095
1087
|
*
|
|
1096
1088
|
* Requires 1 PRF call (for Nostr identity derivation).
|
|
1097
1089
|
* @returns {Promise<string[]>}
|
|
1098
1090
|
*/
|
|
1099
|
-
|
|
1100
|
-
const ret = wasm.
|
|
1091
|
+
listLabels() {
|
|
1092
|
+
const ret = wasm.passkey_listLabels(this.__wbg_ptr);
|
|
1101
1093
|
return ret;
|
|
1102
1094
|
}
|
|
1103
1095
|
/**
|
|
1104
|
-
* Publish a
|
|
1096
|
+
* Publish a label to Nostr relays for this passkey's identity.
|
|
1105
1097
|
*
|
|
1106
|
-
* Idempotent: if the
|
|
1098
|
+
* Idempotent: if the label already exists, it is not published again.
|
|
1107
1099
|
* Requires 1 PRF call.
|
|
1108
|
-
* @param {string}
|
|
1100
|
+
* @param {string} label
|
|
1109
1101
|
* @returns {Promise<void>}
|
|
1110
1102
|
*/
|
|
1111
|
-
|
|
1112
|
-
const ptr0 = passStringToWasm0(
|
|
1103
|
+
storeLabel(label) {
|
|
1104
|
+
const ptr0 = passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1113
1105
|
const len0 = WASM_VECTOR_LEN;
|
|
1114
|
-
const ret = wasm.
|
|
1106
|
+
const ret = wasm.passkey_storeLabel(this.__wbg_ptr, ptr0, len0);
|
|
1107
|
+
return ret;
|
|
1108
|
+
}
|
|
1109
|
+
/**
|
|
1110
|
+
* Check if passkey PRF is available on this device.
|
|
1111
|
+
* @returns {Promise<boolean>}
|
|
1112
|
+
*/
|
|
1113
|
+
isAvailable() {
|
|
1114
|
+
const ret = wasm.passkey_isAvailable(this.__wbg_ptr);
|
|
1115
1115
|
return ret;
|
|
1116
1116
|
}
|
|
1117
1117
|
/**
|
|
Binary file
|
|
@@ -76,9 +76,9 @@ export const getSparkStatus: () => any;
|
|
|
76
76
|
export const initLogging: (a: any, b: number, c: number) => any;
|
|
77
77
|
export const passkey_getWallet: (a: number, b: number, c: number) => any;
|
|
78
78
|
export const passkey_isAvailable: (a: number) => any;
|
|
79
|
-
export const
|
|
79
|
+
export const passkey_listLabels: (a: number) => any;
|
|
80
80
|
export const passkey_new: (a: any, b: number) => number;
|
|
81
|
-
export const
|
|
81
|
+
export const passkey_storeLabel: (a: number, b: number, c: number) => any;
|
|
82
82
|
export const sdkbuilder_build: (a: number) => any;
|
|
83
83
|
export const sdkbuilder_new: (a: any, b: any) => number;
|
|
84
84
|
export const sdkbuilder_newWithSigner: (a: any, b: any) => number;
|