@keyhive/keyhive 0.0.0-alpha.50 → 0.0.0-alpha.50b
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/package.json +1 -1
- package/pkg/keyhive_wasm.d.ts +10 -0
- package/pkg/keyhive_wasm_bg.js +32 -11
- package/pkg/keyhive_wasm_bg.wasm +0 -0
- package/pkg/keyhive_wasm_bg.wasm.d.ts +98 -96
- package/pkg-node/keyhive_wasm.d.ts +10 -0
- package/pkg-node/keyhive_wasm.js +32 -11
- package/pkg-node/keyhive_wasm_bg.wasm +0 -0
- package/pkg-node/keyhive_wasm_bg.wasm.d.ts +98 -96
- package/pkg-slim/keyhive_wasm.d.ts +108 -96
- package/pkg-slim/keyhive_wasm.js +31 -10
- package/pkg-slim/keyhive_wasm_bg.wasm +0 -0
- package/pkg-slim/keyhive_wasm_bg.wasm.base64.js +1 -1
- package/pkg-slim/keyhive_wasm_bg.wasm.d.ts +98 -96
package/package.json
CHANGED
package/pkg/keyhive_wasm.d.ts
CHANGED
|
@@ -264,6 +264,16 @@ export class Keyhive {
|
|
|
264
264
|
receiveContactCard(contact_card: ContactCard): Promise<Individual>;
|
|
265
265
|
docMemberCapabilities(doc_id: DocumentId): Promise<Membership[]>;
|
|
266
266
|
membershipOpsForAgent(agent: Agent): Promise<Map<any, any>>;
|
|
267
|
+
/**
|
|
268
|
+
* Export prekey secrets as serialized bytes (bincode format).
|
|
269
|
+
* This serializes the prekey_pairs map.
|
|
270
|
+
*/
|
|
271
|
+
exportPrekeySecretsBytes(): Promise<Uint8Array>;
|
|
272
|
+
/**
|
|
273
|
+
* Import prekey secrets from serialized bytes (bincode format).
|
|
274
|
+
* This merges with existing prekey secrets (does not replace).
|
|
275
|
+
*/
|
|
276
|
+
importPrekeySecretsBytes(bytes: Uint8Array): Promise<void>;
|
|
267
277
|
static init(signer: Signer, ciphertext_store: CiphertextStore, event_handler: Function): Promise<Keyhive>;
|
|
268
278
|
stats(): Promise<Stats>;
|
|
269
279
|
trySign(data: Uint8Array): Promise<Signed>;
|
package/pkg/keyhive_wasm_bg.js
CHANGED
|
@@ -1390,7 +1390,7 @@ export class Group {
|
|
|
1390
1390
|
* @returns {Identifier}
|
|
1391
1391
|
*/
|
|
1392
1392
|
get id() {
|
|
1393
|
-
const ret = wasm.
|
|
1393
|
+
const ret = wasm.group_groupId(this.__wbg_ptr);
|
|
1394
1394
|
return Identifier.__wrap(ret);
|
|
1395
1395
|
}
|
|
1396
1396
|
/**
|
|
@@ -1411,7 +1411,7 @@ export class Group {
|
|
|
1411
1411
|
* @returns {GroupId}
|
|
1412
1412
|
*/
|
|
1413
1413
|
get groupId() {
|
|
1414
|
-
const ret = wasm.
|
|
1414
|
+
const ret = wasm.group_groupId(this.__wbg_ptr);
|
|
1415
1415
|
return GroupId.__wrap(ret);
|
|
1416
1416
|
}
|
|
1417
1417
|
/**
|
|
@@ -1584,14 +1584,14 @@ export class Individual {
|
|
|
1584
1584
|
* @returns {IndividualId}
|
|
1585
1585
|
*/
|
|
1586
1586
|
get individualId() {
|
|
1587
|
-
const ret = wasm.
|
|
1587
|
+
const ret = wasm.doccontentrefs_docId(this.__wbg_ptr);
|
|
1588
1588
|
return IndividualId.__wrap(ret);
|
|
1589
1589
|
}
|
|
1590
1590
|
/**
|
|
1591
1591
|
* @returns {Identifier}
|
|
1592
1592
|
*/
|
|
1593
1593
|
get id() {
|
|
1594
|
-
const ret = wasm.
|
|
1594
|
+
const ret = wasm.doccontentrefs_docId(this.__wbg_ptr);
|
|
1595
1595
|
return Identifier.__wrap(ret);
|
|
1596
1596
|
}
|
|
1597
1597
|
/**
|
|
@@ -1917,6 +1917,27 @@ export class Keyhive {
|
|
|
1917
1917
|
const ret = wasm.keyhive_membershipOpsForAgent(this.__wbg_ptr, agent.__wbg_ptr);
|
|
1918
1918
|
return ret;
|
|
1919
1919
|
}
|
|
1920
|
+
/**
|
|
1921
|
+
* Export prekey secrets as serialized bytes (bincode format).
|
|
1922
|
+
* This serializes the prekey_pairs map.
|
|
1923
|
+
* @returns {Promise<Uint8Array>}
|
|
1924
|
+
*/
|
|
1925
|
+
exportPrekeySecretsBytes() {
|
|
1926
|
+
const ret = wasm.keyhive_exportPrekeySecretsBytes(this.__wbg_ptr);
|
|
1927
|
+
return ret;
|
|
1928
|
+
}
|
|
1929
|
+
/**
|
|
1930
|
+
* Import prekey secrets from serialized bytes (bincode format).
|
|
1931
|
+
* This merges with existing prekey secrets (does not replace).
|
|
1932
|
+
* @param {Uint8Array} bytes
|
|
1933
|
+
* @returns {Promise<void>}
|
|
1934
|
+
*/
|
|
1935
|
+
importPrekeySecretsBytes(bytes) {
|
|
1936
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1937
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1938
|
+
const ret = wasm.keyhive_importPrekeySecretsBytes(this.__wbg_ptr, ptr0, len0);
|
|
1939
|
+
return ret;
|
|
1940
|
+
}
|
|
1920
1941
|
/**
|
|
1921
1942
|
* @returns {IndividualId}
|
|
1922
1943
|
*/
|
|
@@ -2111,7 +2132,7 @@ export class Peer {
|
|
|
2111
2132
|
* @returns {Identifier}
|
|
2112
2133
|
*/
|
|
2113
2134
|
get id() {
|
|
2114
|
-
const ret = wasm.
|
|
2135
|
+
const ret = wasm.agent_id(this.__wbg_ptr);
|
|
2115
2136
|
return Identifier.__wrap(ret);
|
|
2116
2137
|
}
|
|
2117
2138
|
/**
|
|
@@ -3361,18 +3382,18 @@ export function __wbindgen_cast_ae91babfc5c19b28(arg0, arg1) {
|
|
|
3361
3382
|
return ret;
|
|
3362
3383
|
};
|
|
3363
3384
|
|
|
3364
|
-
export function __wbindgen_cast_b2e692da0ea8478a(arg0, arg1) {
|
|
3365
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 464, function: Function { arguments: [Externref], shim_idx: 465, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3366
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h56c1987c5374a416, wasm_bindgen__convert__closures_____invoke__hb8b6941fceac7069);
|
|
3367
|
-
return ret;
|
|
3368
|
-
};
|
|
3369
|
-
|
|
3370
3385
|
export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
|
|
3371
3386
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
3372
3387
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
3373
3388
|
return ret;
|
|
3374
3389
|
};
|
|
3375
3390
|
|
|
3391
|
+
export function __wbindgen_cast_f6a59d405c61762b(arg0, arg1) {
|
|
3392
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 474, function: Function { arguments: [Externref], shim_idx: 475, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3393
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h56c1987c5374a416, wasm_bindgen__convert__closures_____invoke__hb8b6941fceac7069);
|
|
3394
|
+
return ret;
|
|
3395
|
+
};
|
|
3396
|
+
|
|
3376
3397
|
export function __wbindgen_init_externref_table() {
|
|
3377
3398
|
const table = wasm.__wbindgen_externrefs;
|
|
3378
3399
|
const offset = table.grow(4);
|
package/pkg/keyhive_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const __wbg_ciphertextstore_free: (a: number, b: number) => void;
|
|
4
5
|
export const __wbg_contactcard_free: (a: number, b: number) => void;
|
|
6
|
+
export const __wbg_encrypted_free: (a: number, b: number) => void;
|
|
5
7
|
export const __wbg_encryptedcontentwithupdate_free: (a: number, b: number) => void;
|
|
6
8
|
export const __wbg_signed_free: (a: number, b: number) => void;
|
|
7
9
|
export const __wbg_signedcgkaoperation_free: (a: number, b: number) => void;
|
|
8
|
-
export const
|
|
10
|
+
export const __wbg_signeddelegation_free: (a: number, b: number) => void;
|
|
11
|
+
export const ciphertextstore_newFromWebStorage: (a: any) => number;
|
|
12
|
+
export const ciphertextstore_newInMemory: () => number;
|
|
9
13
|
export const contactcard_fromJson: (a: number, b: number) => [number, number, number];
|
|
10
14
|
export const contactcard_id: (a: number) => number;
|
|
11
15
|
export const contactcard_shareKey: (a: number) => number;
|
|
12
16
|
export const contactcard_signature: (a: number) => [number, number];
|
|
13
17
|
export const contactcard_toAgent: (a: number) => number;
|
|
14
18
|
export const contactcard_toJson: (a: number) => [number, number, number, number];
|
|
19
|
+
export const encrypted_ciphertext: (a: number) => [number, number];
|
|
20
|
+
export const encrypted_content_ref: (a: number) => [number, number];
|
|
21
|
+
export const encrypted_nonce: (a: number) => [number, number];
|
|
22
|
+
export const encrypted_pcs_key_hash: (a: number) => [number, number];
|
|
23
|
+
export const encrypted_pred_refs: (a: number) => [number, number];
|
|
15
24
|
export const encryptedcontentwithupdate_encrypted_content: (a: number) => number;
|
|
16
25
|
export const encryptedcontentwithupdate_update_op: (a: number) => number;
|
|
17
26
|
export const signed_fromBytes: (a: number, b: number) => [number, number, number];
|
|
@@ -24,43 +33,27 @@ export const signedcgkaoperation_delegation: (a: number) => number;
|
|
|
24
33
|
export const signedcgkaoperation_signature: (a: number) => [number, number];
|
|
25
34
|
export const signedcgkaoperation_verify: (a: number) => number;
|
|
26
35
|
export const signedcgkaoperation_verifyingKey: (a: number) => [number, number];
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
29
|
-
export const
|
|
30
|
-
export const
|
|
36
|
+
export const signeddelegation_delegation: (a: number) => number;
|
|
37
|
+
export const signeddelegation_signature: (a: number) => [number, number];
|
|
38
|
+
export const signeddelegation_verify: (a: number) => number;
|
|
39
|
+
export const signeddelegation_verifyingKey: (a: number) => [number, number];
|
|
40
|
+
export const encrypted_toBytes: (a: number) => [number, number];
|
|
31
41
|
export const contactcard_individualId: (a: number) => number;
|
|
32
|
-
export const __wbg_access_free: (a: number, b: number) => void;
|
|
33
|
-
export const __wbg_archive_free: (a: number, b: number) => void;
|
|
34
|
-
export const __wbg_event_free: (a: number, b: number) => void;
|
|
35
|
-
export const access_toString: (a: number) => [number, number];
|
|
36
|
-
export const access_tryFromString: (a: number, b: number) => number;
|
|
37
|
-
export const archive_toBytes: (a: number) => [number, number, number, number];
|
|
38
|
-
export const archive_tryToKeyhive: (a: number, b: number, c: number, d: any) => any;
|
|
39
|
-
export const archive_try_from_bytes: (a: number, b: number) => [number, number, number];
|
|
40
|
-
export const event_isDelegated: (a: number) => number;
|
|
41
|
-
export const event_isRevoked: (a: number) => number;
|
|
42
|
-
export const event_toBytes: (a: number) => [number, number, number, number];
|
|
43
|
-
export const event_tryIntoSignedDelegation: (a: number) => number;
|
|
44
|
-
export const event_tryIntoSignedRevocation: (a: number) => number;
|
|
45
|
-
export const event_variant: (a: number) => [number, number];
|
|
46
42
|
export const __wbg_cannotparseed25519signingkey_free: (a: number, b: number) => void;
|
|
47
43
|
export const __wbg_cannotparseidentifier_free: (a: number, b: number) => void;
|
|
48
44
|
export const __wbg_cgkaoperation_free: (a: number, b: number) => void;
|
|
49
|
-
export const __wbg_ciphertextstore_free: (a: number, b: number) => void;
|
|
50
45
|
export const __wbg_doccontentrefs_free: (a: number, b: number) => void;
|
|
51
46
|
export const __wbg_documentid_free: (a: number, b: number) => void;
|
|
52
47
|
export const __wbg_generatewebcryptoerror_free: (a: number, b: number) => void;
|
|
53
|
-
export const __wbg_group_free: (a: number, b: number) => void;
|
|
54
48
|
export const __wbg_groupid_free: (a: number, b: number) => void;
|
|
55
49
|
export const __wbg_identifier_free: (a: number, b: number) => void;
|
|
56
|
-
export const
|
|
57
|
-
export const
|
|
58
|
-
export const
|
|
50
|
+
export const __wbg_individual_free: (a: number, b: number) => void;
|
|
51
|
+
export const __wbg_invocation_free: (a: number, b: number) => void;
|
|
52
|
+
export const __wbg_sharekey_free: (a: number, b: number) => void;
|
|
53
|
+
export const __wbg_signedrevocation_free: (a: number, b: number) => void;
|
|
59
54
|
export const __wbg_signer_free: (a: number, b: number) => void;
|
|
60
55
|
export const __wbg_stats_free: (a: number, b: number) => void;
|
|
61
56
|
export const cgkaoperation_variant: (a: number) => [number, number];
|
|
62
|
-
export const ciphertextstore_newFromWebStorage: (a: any) => number;
|
|
63
|
-
export const ciphertextstore_newInMemory: () => number;
|
|
64
57
|
export const doccontentrefs_addChangeId: (a: number, b: number) => any;
|
|
65
58
|
export const doccontentrefs_change_hashes: (a: number) => any;
|
|
66
59
|
export const doccontentrefs_docId: (a: number) => number;
|
|
@@ -70,21 +63,16 @@ export const documentid_toBytes: (a: number) => [number, number];
|
|
|
70
63
|
export const documentid_toJsValue: (a: number) => any;
|
|
71
64
|
export const documentid_toString: (a: number) => [number, number];
|
|
72
65
|
export const generatewebcryptoerror_message: (a: number) => [number, number];
|
|
73
|
-
export const group___wasm_refgen_toGroup: (a: number) => number;
|
|
74
|
-
export const group_members: (a: number) => any;
|
|
75
|
-
export const group_toAgent: (a: number) => number;
|
|
76
|
-
export const group_toMembered: (a: number) => number;
|
|
77
|
-
export const group_toPeer: (a: number) => number;
|
|
78
66
|
export const groupid_toString: (a: number) => [number, number];
|
|
79
67
|
export const identifier_new: (a: number, b: number) => [number, number, number];
|
|
80
68
|
export const identifier_toBytes: (a: number) => [number, number];
|
|
81
|
-
export const
|
|
82
|
-
export const
|
|
83
|
-
export const
|
|
84
|
-
export const
|
|
85
|
-
export const
|
|
86
|
-
export const
|
|
87
|
-
export const
|
|
69
|
+
export const individual_pickPrekey: (a: number, b: number) => any;
|
|
70
|
+
export const individual_toAgent: (a: number) => number;
|
|
71
|
+
export const individual_toPeer: (a: number) => number;
|
|
72
|
+
export const signedrevocation_delegation: (a: number) => number;
|
|
73
|
+
export const signedrevocation_signature: (a: number) => [number, number];
|
|
74
|
+
export const signedrevocation_verify: (a: number) => number;
|
|
75
|
+
export const signedrevocation_verifyingKey: (a: number) => [number, number];
|
|
88
76
|
export const signer_clone: (a: number) => number;
|
|
89
77
|
export const signer_generate: () => any;
|
|
90
78
|
export const signer_generateMemory: () => number;
|
|
@@ -110,34 +98,84 @@ export const stats_pendingPrekeysExpandedByActive: (a: number) => bigint;
|
|
|
110
98
|
export const stats_pendingRevoked: (a: number) => bigint;
|
|
111
99
|
export const stats_pendingRevokedByActive: (a: number) => bigint;
|
|
112
100
|
export const stats_revocations: (a: number) => bigint;
|
|
113
|
-
export const
|
|
114
|
-
export const
|
|
115
|
-
export const
|
|
116
|
-
export const
|
|
117
|
-
export const
|
|
118
|
-
export const
|
|
119
|
-
export const
|
|
120
|
-
export const
|
|
121
|
-
export const
|
|
122
|
-
export const
|
|
123
|
-
export const
|
|
124
|
-
export const
|
|
125
|
-
export const
|
|
126
|
-
export const
|
|
101
|
+
export const individual_id: (a: number) => number;
|
|
102
|
+
export const individual_individualId: (a: number) => number;
|
|
103
|
+
export const __wbg_access_free: (a: number, b: number) => void;
|
|
104
|
+
export const __wbg_archive_free: (a: number, b: number) => void;
|
|
105
|
+
export const __wbg_changeid_free: (a: number, b: number) => void;
|
|
106
|
+
export const __wbg_event_free: (a: number, b: number) => void;
|
|
107
|
+
export const __wbg_history_free: (a: number, b: number) => void;
|
|
108
|
+
export const __wbg_revocation_free: (a: number, b: number) => void;
|
|
109
|
+
export const __wbg_signedinvocation_free: (a: number, b: number) => void;
|
|
110
|
+
export const access_toString: (a: number) => [number, number];
|
|
111
|
+
export const access_tryFromString: (a: number, b: number) => number;
|
|
112
|
+
export const archive_toBytes: (a: number) => [number, number, number, number];
|
|
113
|
+
export const archive_tryToKeyhive: (a: number, b: number, c: number, d: any) => any;
|
|
114
|
+
export const archive_try_from_bytes: (a: number, b: number) => [number, number, number];
|
|
115
|
+
export const changeid___wasm_refgen_toChangeId: (a: number) => number;
|
|
116
|
+
export const changeid_bytes: (a: number) => [number, number];
|
|
117
|
+
export const changeid_new: (a: number, b: number) => number;
|
|
118
|
+
export const event_isDelegated: (a: number) => number;
|
|
119
|
+
export const event_isRevoked: (a: number) => number;
|
|
120
|
+
export const event_toBytes: (a: number) => [number, number, number, number];
|
|
121
|
+
export const event_tryIntoSignedDelegation: (a: number) => number;
|
|
122
|
+
export const event_tryIntoSignedRevocation: (a: number) => number;
|
|
123
|
+
export const event_variant: (a: number) => [number, number];
|
|
124
|
+
export const history_contentRefs: (a: number) => [number, number];
|
|
125
|
+
export const history_delegations: (a: number) => [number, number];
|
|
126
|
+
export const history_revocations: (a: number) => [number, number];
|
|
127
|
+
export const revocation_after: (a: number) => number;
|
|
128
|
+
export const revocation_proof: (a: number) => number;
|
|
129
|
+
export const revocation_revoked: (a: number) => number;
|
|
130
|
+
export const revocation_subject_id: (a: number) => number;
|
|
131
|
+
export const __wbg_capability_free: (a: number, b: number) => void;
|
|
132
|
+
export const __wbg_delegation_free: (a: number, b: number) => void;
|
|
133
|
+
export const __wbg_document_free: (a: number, b: number) => void;
|
|
134
|
+
export const __wbg_membered_free: (a: number, b: number) => void;
|
|
135
|
+
export const __wbg_membership_free: (a: number, b: number) => void;
|
|
136
|
+
export const __wbg_summary_free: (a: number, b: number) => void;
|
|
137
|
+
export const capability_can: (a: number) => number;
|
|
138
|
+
export const capability_proof: (a: number) => number;
|
|
139
|
+
export const capability_who: (a: number) => number;
|
|
140
|
+
export const delegation_after: (a: number) => number;
|
|
141
|
+
export const delegation_can: (a: number) => number;
|
|
142
|
+
export const delegation_delegate: (a: number) => number;
|
|
143
|
+
export const delegation_proof: (a: number) => number;
|
|
144
|
+
export const document___wasm_refgen_toDocument: (a: number) => number;
|
|
145
|
+
export const document_doc_id: (a: number) => number;
|
|
146
|
+
export const document_toAgent: (a: number) => number;
|
|
147
|
+
export const document_toMembered: (a: number) => number;
|
|
148
|
+
export const document_toPeer: (a: number) => number;
|
|
149
|
+
export const membership_can: (a: number) => number;
|
|
150
|
+
export const membership_who: (a: number) => number;
|
|
151
|
+
export const summary_access: (a: number) => number;
|
|
152
|
+
export const summary_doc: (a: number) => number;
|
|
153
|
+
export const document_id: (a: number) => number;
|
|
127
154
|
export const setPanicHook: () => void;
|
|
128
155
|
export const __wbg_agent_free: (a: number, b: number) => void;
|
|
156
|
+
export const __wbg_group_free: (a: number, b: number) => void;
|
|
157
|
+
export const __wbg_individualid_free: (a: number, b: number) => void;
|
|
129
158
|
export const __wbg_keyhive_free: (a: number, b: number) => void;
|
|
159
|
+
export const __wbg_peer_free: (a: number, b: number) => void;
|
|
130
160
|
export const agent_id: (a: number) => number;
|
|
131
161
|
export const agent_isDocument: (a: number) => number;
|
|
132
162
|
export const agent_isGroup: (a: number) => number;
|
|
133
163
|
export const agent_isIndividual: (a: number) => number;
|
|
134
164
|
export const agent_toString: (a: number) => [number, number];
|
|
165
|
+
export const group___wasm_refgen_toGroup: (a: number) => number;
|
|
166
|
+
export const group_groupId: (a: number) => number;
|
|
167
|
+
export const group_members: (a: number) => any;
|
|
168
|
+
export const group_toAgent: (a: number) => number;
|
|
169
|
+
export const group_toMembered: (a: number) => number;
|
|
170
|
+
export const group_toPeer: (a: number) => number;
|
|
171
|
+
export const individualid_bytes: (a: number) => [number, number];
|
|
135
172
|
export const keyhive_accessForDoc: (a: number, b: number, c: number) => any;
|
|
136
173
|
export const keyhive_addMember: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
137
174
|
export const keyhive_contactCard: (a: number) => any;
|
|
138
175
|
export const keyhive_docMemberCapabilities: (a: number, b: number) => any;
|
|
139
176
|
export const keyhive_eventsForAgent: (a: number, b: number) => any;
|
|
140
177
|
export const keyhive_expandPrekeys: (a: number) => any;
|
|
178
|
+
export const keyhive_exportPrekeySecretsBytes: (a: number) => any;
|
|
141
179
|
export const keyhive_forcePcsUpdate: (a: number, b: number) => any;
|
|
142
180
|
export const keyhive_generateDocument: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
143
181
|
export const keyhive_generateGroup: (a: number, b: number, c: number) => any;
|
|
@@ -146,6 +184,7 @@ export const keyhive_getDocument: (a: number, b: number) => any;
|
|
|
146
184
|
export const keyhive_getGroup: (a: number, b: number) => any;
|
|
147
185
|
export const keyhive_id: (a: number) => number;
|
|
148
186
|
export const keyhive_idString: (a: number) => [number, number];
|
|
187
|
+
export const keyhive_importPrekeySecretsBytes: (a: number, b: number, c: number) => any;
|
|
149
188
|
export const keyhive_individual: (a: number) => any;
|
|
150
189
|
export const keyhive_ingestArchive: (a: number, b: number) => any;
|
|
151
190
|
export const keyhive_ingestEventsBytes: (a: number, b: any) => any;
|
|
@@ -163,51 +202,14 @@ export const keyhive_tryDecrypt: (a: number, b: number, c: number) => any;
|
|
|
163
202
|
export const keyhive_tryEncrypt: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
164
203
|
export const keyhive_tryEncryptArchive: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
165
204
|
export const keyhive_trySign: (a: number, b: number, c: number) => any;
|
|
205
|
+
export const peer___wasm_refgen_toPeer: (a: number) => number;
|
|
206
|
+
export const peer_isDocument: (a: number) => number;
|
|
207
|
+
export const peer_isGroup: (a: number) => number;
|
|
208
|
+
export const peer_isIndividual: (a: number) => number;
|
|
209
|
+
export const peer_toString: (a: number) => [number, number];
|
|
210
|
+
export const group_id: (a: number) => number;
|
|
211
|
+
export const peer_id: (a: number) => number;
|
|
166
212
|
export const keyhive_whoami: (a: number) => number;
|
|
167
|
-
export const __wbg_changeid_free: (a: number, b: number) => void;
|
|
168
|
-
export const __wbg_invocation_free: (a: number, b: number) => void;
|
|
169
|
-
export const __wbg_revocation_free: (a: number, b: number) => void;
|
|
170
|
-
export const __wbg_signedinvocation_free: (a: number, b: number) => void;
|
|
171
|
-
export const __wbg_summary_free: (a: number, b: number) => void;
|
|
172
|
-
export const changeid___wasm_refgen_toChangeId: (a: number) => number;
|
|
173
|
-
export const changeid_bytes: (a: number) => [number, number];
|
|
174
|
-
export const changeid_new: (a: number, b: number) => number;
|
|
175
|
-
export const revocation_after: (a: number) => number;
|
|
176
|
-
export const revocation_proof: (a: number) => number;
|
|
177
|
-
export const revocation_revoked: (a: number) => number;
|
|
178
|
-
export const revocation_subject_id: (a: number) => number;
|
|
179
|
-
export const summary_access: (a: number) => number;
|
|
180
|
-
export const summary_doc: (a: number) => number;
|
|
181
|
-
export const __wbg_capability_free: (a: number, b: number) => void;
|
|
182
|
-
export const __wbg_delegation_free: (a: number, b: number) => void;
|
|
183
|
-
export const __wbg_document_free: (a: number, b: number) => void;
|
|
184
|
-
export const __wbg_individual_free: (a: number, b: number) => void;
|
|
185
|
-
export const __wbg_membership_free: (a: number, b: number) => void;
|
|
186
|
-
export const capability_can: (a: number) => number;
|
|
187
|
-
export const capability_proof: (a: number) => number;
|
|
188
|
-
export const capability_who: (a: number) => number;
|
|
189
|
-
export const delegation_after: (a: number) => number;
|
|
190
|
-
export const delegation_can: (a: number) => number;
|
|
191
|
-
export const delegation_delegate: (a: number) => number;
|
|
192
|
-
export const delegation_proof: (a: number) => number;
|
|
193
|
-
export const document___wasm_refgen_toDocument: (a: number) => number;
|
|
194
|
-
export const document_doc_id: (a: number) => number;
|
|
195
|
-
export const document_toAgent: (a: number) => number;
|
|
196
|
-
export const document_toMembered: (a: number) => number;
|
|
197
|
-
export const document_toPeer: (a: number) => number;
|
|
198
|
-
export const individual_pickPrekey: (a: number, b: number) => any;
|
|
199
|
-
export const individual_toAgent: (a: number) => number;
|
|
200
|
-
export const individual_toPeer: (a: number) => number;
|
|
201
|
-
export const membership_can: (a: number) => number;
|
|
202
|
-
export const membership_who: (a: number) => number;
|
|
203
|
-
export const document_id: (a: number) => number;
|
|
204
|
-
export const individual_id: (a: number) => number;
|
|
205
|
-
export const individual_individualId: (a: number) => number;
|
|
206
|
-
export const __wbg_history_free: (a: number, b: number) => void;
|
|
207
|
-
export const __wbg_sharekey_free: (a: number, b: number) => void;
|
|
208
|
-
export const history_contentRefs: (a: number) => [number, number];
|
|
209
|
-
export const history_delegations: (a: number) => [number, number];
|
|
210
|
-
export const history_revocations: (a: number) => [number, number];
|
|
211
213
|
export const wasm_bindgen__convert__closures_____invoke__hb8b6941fceac7069: (a: number, b: number, c: any) => void;
|
|
212
214
|
export const wasm_bindgen__closure__destroy__h56c1987c5374a416: (a: number, b: number) => void;
|
|
213
215
|
export const wasm_bindgen__convert__closures_____invoke__h0e2a667a85375385: (a: number, b: number, c: any, d: any) => void;
|
|
@@ -264,6 +264,16 @@ export class Keyhive {
|
|
|
264
264
|
receiveContactCard(contact_card: ContactCard): Promise<Individual>;
|
|
265
265
|
docMemberCapabilities(doc_id: DocumentId): Promise<Membership[]>;
|
|
266
266
|
membershipOpsForAgent(agent: Agent): Promise<Map<any, any>>;
|
|
267
|
+
/**
|
|
268
|
+
* Export prekey secrets as serialized bytes (bincode format).
|
|
269
|
+
* This serializes the prekey_pairs map.
|
|
270
|
+
*/
|
|
271
|
+
exportPrekeySecretsBytes(): Promise<Uint8Array>;
|
|
272
|
+
/**
|
|
273
|
+
* Import prekey secrets from serialized bytes (bincode format).
|
|
274
|
+
* This merges with existing prekey secrets (does not replace).
|
|
275
|
+
*/
|
|
276
|
+
importPrekeySecretsBytes(bytes: Uint8Array): Promise<void>;
|
|
267
277
|
static init(signer: Signer, ciphertext_store: CiphertextStore, event_handler: Function): Promise<Keyhive>;
|
|
268
278
|
stats(): Promise<Stats>;
|
|
269
279
|
trySign(data: Uint8Array): Promise<Signed>;
|
package/pkg-node/keyhive_wasm.js
CHANGED
|
@@ -1399,7 +1399,7 @@ class Group {
|
|
|
1399
1399
|
* @returns {Identifier}
|
|
1400
1400
|
*/
|
|
1401
1401
|
get id() {
|
|
1402
|
-
const ret = wasm.
|
|
1402
|
+
const ret = wasm.group_groupId(this.__wbg_ptr);
|
|
1403
1403
|
return Identifier.__wrap(ret);
|
|
1404
1404
|
}
|
|
1405
1405
|
/**
|
|
@@ -1420,7 +1420,7 @@ class Group {
|
|
|
1420
1420
|
* @returns {GroupId}
|
|
1421
1421
|
*/
|
|
1422
1422
|
get groupId() {
|
|
1423
|
-
const ret = wasm.
|
|
1423
|
+
const ret = wasm.group_groupId(this.__wbg_ptr);
|
|
1424
1424
|
return GroupId.__wrap(ret);
|
|
1425
1425
|
}
|
|
1426
1426
|
/**
|
|
@@ -1597,14 +1597,14 @@ class Individual {
|
|
|
1597
1597
|
* @returns {IndividualId}
|
|
1598
1598
|
*/
|
|
1599
1599
|
get individualId() {
|
|
1600
|
-
const ret = wasm.
|
|
1600
|
+
const ret = wasm.doccontentrefs_docId(this.__wbg_ptr);
|
|
1601
1601
|
return IndividualId.__wrap(ret);
|
|
1602
1602
|
}
|
|
1603
1603
|
/**
|
|
1604
1604
|
* @returns {Identifier}
|
|
1605
1605
|
*/
|
|
1606
1606
|
get id() {
|
|
1607
|
-
const ret = wasm.
|
|
1607
|
+
const ret = wasm.doccontentrefs_docId(this.__wbg_ptr);
|
|
1608
1608
|
return Identifier.__wrap(ret);
|
|
1609
1609
|
}
|
|
1610
1610
|
/**
|
|
@@ -1933,6 +1933,27 @@ class Keyhive {
|
|
|
1933
1933
|
const ret = wasm.keyhive_membershipOpsForAgent(this.__wbg_ptr, agent.__wbg_ptr);
|
|
1934
1934
|
return ret;
|
|
1935
1935
|
}
|
|
1936
|
+
/**
|
|
1937
|
+
* Export prekey secrets as serialized bytes (bincode format).
|
|
1938
|
+
* This serializes the prekey_pairs map.
|
|
1939
|
+
* @returns {Promise<Uint8Array>}
|
|
1940
|
+
*/
|
|
1941
|
+
exportPrekeySecretsBytes() {
|
|
1942
|
+
const ret = wasm.keyhive_exportPrekeySecretsBytes(this.__wbg_ptr);
|
|
1943
|
+
return ret;
|
|
1944
|
+
}
|
|
1945
|
+
/**
|
|
1946
|
+
* Import prekey secrets from serialized bytes (bincode format).
|
|
1947
|
+
* This merges with existing prekey secrets (does not replace).
|
|
1948
|
+
* @param {Uint8Array} bytes
|
|
1949
|
+
* @returns {Promise<void>}
|
|
1950
|
+
*/
|
|
1951
|
+
importPrekeySecretsBytes(bytes) {
|
|
1952
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1953
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1954
|
+
const ret = wasm.keyhive_importPrekeySecretsBytes(this.__wbg_ptr, ptr0, len0);
|
|
1955
|
+
return ret;
|
|
1956
|
+
}
|
|
1936
1957
|
/**
|
|
1937
1958
|
* @returns {IndividualId}
|
|
1938
1959
|
*/
|
|
@@ -2130,7 +2151,7 @@ class Peer {
|
|
|
2130
2151
|
* @returns {Identifier}
|
|
2131
2152
|
*/
|
|
2132
2153
|
get id() {
|
|
2133
|
-
const ret = wasm.
|
|
2154
|
+
const ret = wasm.agent_id(this.__wbg_ptr);
|
|
2134
2155
|
return Identifier.__wrap(ret);
|
|
2135
2156
|
}
|
|
2136
2157
|
/**
|
|
@@ -3392,18 +3413,18 @@ exports.__wbindgen_cast_ae91babfc5c19b28 = function(arg0, arg1) {
|
|
|
3392
3413
|
return ret;
|
|
3393
3414
|
};
|
|
3394
3415
|
|
|
3395
|
-
exports.__wbindgen_cast_b2e692da0ea8478a = function(arg0, arg1) {
|
|
3396
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 464, function: Function { arguments: [Externref], shim_idx: 465, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3397
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h56c1987c5374a416, wasm_bindgen__convert__closures_____invoke__hb8b6941fceac7069);
|
|
3398
|
-
return ret;
|
|
3399
|
-
};
|
|
3400
|
-
|
|
3401
3416
|
exports.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
3402
3417
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
3403
3418
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
3404
3419
|
return ret;
|
|
3405
3420
|
};
|
|
3406
3421
|
|
|
3422
|
+
exports.__wbindgen_cast_f6a59d405c61762b = function(arg0, arg1) {
|
|
3423
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 474, function: Function { arguments: [Externref], shim_idx: 475, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3424
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h56c1987c5374a416, wasm_bindgen__convert__closures_____invoke__hb8b6941fceac7069);
|
|
3425
|
+
return ret;
|
|
3426
|
+
};
|
|
3427
|
+
|
|
3407
3428
|
exports.__wbindgen_init_externref_table = function() {
|
|
3408
3429
|
const table = wasm.__wbindgen_externrefs;
|
|
3409
3430
|
const offset = table.grow(4);
|
|
Binary file
|