OpenAgentIDDocumentation
API referencenpm packages@openagentid/arsenal-sdk
OpenAgentIDAPI reference

@openagentid/arsenal-sdk/crypto

API contract shipped by @openagentid/arsenal-sdk 0.1.1. Exact exports, signatures, dependencies and availability.

All packages · Runnable examples · Start an agent

ContractValue
Package@openagentid/arsenal-sdk@0.1.1
Entry point@openagentid/arsenal-sdk/crypto
AvailabilityPublished package
Reference sourcePublished TypeScript declarations
Package enginesnode >=20

This reference is generated from the integrity-verified npm archive for this exact version. Signatures describe the public contract; they are not standalone programs. Complete examples are checked separately.

Import conditions

Use the public entry point above. The package resolves it to these shipped files; do not import its internal files directly.

ConditionPublished file
types./dist/crypto/index.d.ts
import./dist/crypto/index.js
require./dist/crypto/index.cjs

Exports

aesGcmDecrypt

AES-256-GCM decryption. key must be 32 bytes, nonce 12 bytes.

Signature
declare function aesGcmDecrypt(key: Uint8Array, nonce: Uint8Array, ciphertext: Uint8Array, aad?: Uint8Array): Promise<Uint8Array>;

Source: @openagentid/arsenal-sdk@0.1.1, dist/crypto/index.d.ts:37.

aesGcmEncrypt

AES-256-GCM encryption. key must be 32 bytes, nonce 12 bytes.

Signature
declare function aesGcmEncrypt(key: Uint8Array, nonce: Uint8Array, plaintext: Uint8Array, aad?: Uint8Array): Promise<Uint8Array>;

Source: @openagentid/arsenal-sdk@0.1.1, dist/crypto/index.d.ts:35.

blake3Hash

BLAKE3 keyed/unkeyed hash — returns a 32-byte digest.

Signature
declare function blake3Hash(input: Uint8Array): Promise<Uint8Array>;

Source: @openagentid/arsenal-sdk@0.1.1, dist/crypto/index.d.ts:33.

ed25519Generate

Generate a random Ed25519 keypair.

Signature
declare function ed25519Generate(): Promise<{
    publicKey: Uint8Array;
    secretKey: Uint8Array;
}>;

Source: @openagentid/arsenal-sdk@0.1.1, dist/crypto/index.d.ts:26.

ed25519PublicKey

Derive a public key from an Ed25519 secret-key seed.

Signature
declare function ed25519PublicKey(secretKey: Uint8Array): Promise<Uint8Array>;

Source: @openagentid/arsenal-sdk@0.1.1, dist/crypto/index.d.ts:24.

ed25519Sign

Ed25519 signature — sign message with secretKey (32-byte seed).

Signature
declare function ed25519Sign(secretKey: Uint8Array, message: Uint8Array): Promise<Uint8Array>;

Source: @openagentid/arsenal-sdk@0.1.1, dist/crypto/index.d.ts:20.

ed25519Verify

Ed25519 signature verification — returns true if the signature is valid.

Signature
declare function ed25519Verify(publicKey: Uint8Array, message: Uint8Array, signature: Uint8Array): Promise<boolean>;

Source: @openagentid/arsenal-sdk@0.1.1, dist/crypto/index.d.ts:22.

hkdfDerive

HKDF-SHA256 key derivation. length is the number of output bytes.

Signature
declare function hkdfDerive(ikm: Uint8Array, salt: Uint8Array, info: Uint8Array, length: number): Promise<Uint8Array>;

Source: @openagentid/arsenal-sdk@0.1.1, dist/crypto/index.d.ts:31.

randomBytes

Generate cryptographically secure random bytes.

Signature
declare function randomBytes(length: number): Promise<Uint8Array>;

Source: @openagentid/arsenal-sdk@0.1.1, dist/crypto/index.d.ts:39.

Package requirements

Dependencies

PackagePublished range
uuid^11.0.3
zod^3.23.8

Peer dependencies

PackagePublished rangeOptional
@openagentid/crypto-wasm*Yes

Archive verification

Pinned integrity:

SHA-512 integrity
sha512-bqdIp1hFYeffqXDaTpq/JMJune81cNwrj23kaUl1OoXjp97Bf8kX47/EaOjCX7oLAbTk69SgD7q2p8nrMNeIeQ==

Machine-readable API manifest · Coverage

On this page