Skip to main content

SDK operation map

Choose an SDK to see its real function names, input types, output types, and the corresponding API reference. The operation model stays shared; the contract stays honest.

Create & export

OperationFunctionInputOutputPurpose
Export private keyexportPrivateKeyinput: PrivateKeyExportInputPromise<string>Encrypt a private key with a password and create a complete document.
Export encrypted stateexportEncryptedStateinput: EncryptedStateInputstringSerialize encrypted state without decrypting the private key.

Read & validate

OperationFunctionInputOutputPurpose
Parse documentparseDocumentinput: string | Uint8ArrayDocumentRead JSON text or bytes and validate the resulting document.
Validate documentvalidateDocumentvalue: unknownDocumentValidate an in-memory value and return the normalized document.
Serialize documentserializeDocumentdocument: DocumentstringWrite a validated document as canonical JSON.

Unlock

OperationFunctionInputOutputPurpose
Unlock documentunlockDocumentdocument: Document, password: stringPromise<UnlockResult>Decrypt the private key and verify that it matches the document public key.

Inspect

OperationFunctionInputOutputPurpose
Read summarysummarydocument: DocumentDocumentSummaryRead format, version, label, and public-key metadata without secrets.

Failure handling

OperationFunctionInputOutputPurpose
Handle errorsisKeyHoldErrorvalue: unknownvalueHandle predictable failures through stable error codes.

Compare SDKs

Keep the same capability model while showing each language’s real contract.

OperationTypeScriptGo
Export private keyexportPrivateKey
Promise<string>
ExportPrivateKey
([]byte, error)
Export encrypted stateexportEncryptedState
string
ExportEncryptedState
([]byte, error)
Parse documentparseDocument
Document
Parse
(Document, error)
Validate documentvalidateDocument
Document
Validate
error
Serialize documentserializeDocument
string
Serialize
([]byte, error)
Unlock documentunlockDocument
Promise<UnlockResult>
Unlock
(*UnlockResult, error)
Read summarysummary
DocumentSummary
Summary
(DocumentSummary, error)
Handle errorsisKeyHoldError
value
ErrorCodeOf
ErrorCode