superid_agent_core 0.1.0
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 +13 -0
- package/superid_agent_core.d.ts +96 -0
- package/superid_agent_core.js +1383 -0
- package/superid_agent_core_bg.wasm +0 -0
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "superid_agent_core",
|
|
3
|
+
"description": "SuperID Agent core: crypto, DID, DIDComm, VC/JWT, PoA, vault, and IPFS helpers with WASM + C-ABI (Android) bindings.",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"files": [
|
|
7
|
+
"superid_agent_core_bg.wasm",
|
|
8
|
+
"superid_agent_core.js",
|
|
9
|
+
"superid_agent_core.d.ts"
|
|
10
|
+
],
|
|
11
|
+
"main": "superid_agent_core.js",
|
|
12
|
+
"types": "superid_agent_core.d.ts"
|
|
13
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* WASM wrapper: accepts opts JSON, returns `DidCreateResult` JSON
|
|
5
|
+
*/
|
|
6
|
+
export function create_did_superid_wasm(opts_json: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* ---------- Utilities ----------
|
|
9
|
+
*/
|
|
10
|
+
export function hash_sha256_json(data_b64u: string): string;
|
|
11
|
+
export function rng_bytes_json(len_u32: number): string;
|
|
12
|
+
export function json_canonicalize_json(json: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* ---------- DID create ----------
|
|
15
|
+
*/
|
|
16
|
+
export function did_create_superid_json(opts_json: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* ---------- X25519 ----------
|
|
19
|
+
*/
|
|
20
|
+
export function agent_gen_x25519_json(): string;
|
|
21
|
+
export function agent_import_x25519_json(secret: string): string;
|
|
22
|
+
export function agent_export_x25519_json(handle: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* ---------- Ed25519 ----------
|
|
25
|
+
*/
|
|
26
|
+
export function ed25519_keygen_json(): string;
|
|
27
|
+
export function ed25519_import_json(secret: string): string;
|
|
28
|
+
export function ed25519_export_json(handle: string): string;
|
|
29
|
+
export function ed25519_sign_json(key_or_handle: string, msg_b64u: string): string;
|
|
30
|
+
export function ed25519_verify_json(pub_b64u: string, msg_b64u: string, sig_b64u: string): string;
|
|
31
|
+
/**
|
|
32
|
+
* ---------- DID & DIDDoc ----------
|
|
33
|
+
*/
|
|
34
|
+
export function did_superid_from_ed25519_pub_json(ed_b64u_or_mb: string): string;
|
|
35
|
+
export function did_superid_build_doc_json(params_json: string): string;
|
|
36
|
+
export function diddoc_sign_json(ed25519_handle: string, diddoc_json: string): string;
|
|
37
|
+
export function diddoc_verify_json(diddoc_with_proof_json: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* ---------- Anoncrypt / Authcrypt ----------
|
|
40
|
+
*/
|
|
41
|
+
export function anoncrypt_pack_json(recipient_pub_b64u: string, plaintext_utf8: string): string;
|
|
42
|
+
export function anoncrypt_unpack_json(handle: string, jwm_json: string): string;
|
|
43
|
+
export function authcrypt_pack_json(sender_handle: string, recip_pub_b64u: string, plaintext_utf8: string, headers_json?: string | null): string;
|
|
44
|
+
export function authcrypt_unpack_json(handle: string, jwm_json: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* ---------- AEAD / DEK ----------
|
|
47
|
+
*/
|
|
48
|
+
export function dek_generate_json(): string;
|
|
49
|
+
export function aead_encrypt_xc20p_json(key_b64u: string, plaintext_b64u: string, aad_b64u?: string | null, nonce_b64u?: string | null): string;
|
|
50
|
+
export function aead_decrypt_xc20p_json(key_b64u: string, nonce_b64u: string, ciphertext_b64u: string, aad_b64u?: string | null): string;
|
|
51
|
+
export function dek_wrap_x25519_json(recip_pub_b64u: string, dek_b64u: string): string;
|
|
52
|
+
export function dek_unwrap_x25519_json(handle: string, edek_b64u: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* ---------- VC / Status List ----------
|
|
55
|
+
*/
|
|
56
|
+
export function vc_build_json(params_json: string): string;
|
|
57
|
+
export function vc_sign_jwt_json(handle: string, vc_json: string, opts_json: string): string;
|
|
58
|
+
export function vc_verify_jwt_json(jwt_str: string, opts_json: string): string;
|
|
59
|
+
export function status_list_create_json(params_json: string): string;
|
|
60
|
+
export function status_list_set_json(list_json: string, index: number, value: boolean): string;
|
|
61
|
+
export function status_list_encode_json(list_json: string): string;
|
|
62
|
+
export function status_list_vc_sign_jwt_json(handle: string, list_json: string, opts_json: string): string;
|
|
63
|
+
export function status_list_vc_verify_jwt_json(jwt_str: string, opts_json: string): string;
|
|
64
|
+
/**
|
|
65
|
+
* ---------- DIDComm message helpers ----------
|
|
66
|
+
*/
|
|
67
|
+
export function didcomm_build_message_json(typ: string, body_json: string, thid?: string | null, attachments_json?: string | null): string;
|
|
68
|
+
export function didcomm_validate_message_json(msg_json: string): string;
|
|
69
|
+
/**
|
|
70
|
+
* ---------- PoA ----------
|
|
71
|
+
*/
|
|
72
|
+
export function tx_hash_json(tx_json: string): string;
|
|
73
|
+
export function block_build_json(prev_hash_b64u: string, number: bigint, proposer_did: string, txs_json: string): string;
|
|
74
|
+
export function block_sign_json(ed25519_handle: string, header_json: string, opts_json: string): string;
|
|
75
|
+
export function block_verify_json(block_json: string, opts_json: string): string;
|
|
76
|
+
/**
|
|
77
|
+
* ---------- Manifest ----------
|
|
78
|
+
*/
|
|
79
|
+
export function doc_manifest_build_json(params_json: string): string;
|
|
80
|
+
export function doc_manifest_sign_json(handle: string, manifest_json: string, opts_json: string): string;
|
|
81
|
+
export function doc_manifest_verify_json(manifest_json: string, opts_json: string): string;
|
|
82
|
+
/**
|
|
83
|
+
* ---------- IPFS / CID ----------
|
|
84
|
+
*/
|
|
85
|
+
export function ipfs_cid_v1_from_bytes_json(data_b64u: string, codec_hint?: string | null): string;
|
|
86
|
+
export function ipfs_cid_v1_from_hash_json(multihash_b64u: string): string;
|
|
87
|
+
/**
|
|
88
|
+
* ---------- Vault ----------
|
|
89
|
+
*/
|
|
90
|
+
export function vmk_from_passphrase_json(passphrase: string, salt_b64u: string, params_json: string): string;
|
|
91
|
+
export function vmk_random_json(): string;
|
|
92
|
+
export function vault_create_json(vmk_json: string): string;
|
|
93
|
+
export function vault_add_key_json(state_json: string, vmk_json: string, label: string, ktype: string, secret_b64u: string): string;
|
|
94
|
+
export function vault_get_key_json(state_json: string, vmk_json: string, label: string): string;
|
|
95
|
+
export function vault_export_json(state_json: string, vmk_json: string): string;
|
|
96
|
+
export function vault_import_json(armored: string, vmk_json: string): string;
|