Skip to content

SDK capability map

@keymaster/connect exposes seven capability groups through one KeymasterConnectClient. This page is the complete operation index: select an SDK method to read its call contract, or select a Params/Result type to inspect every field.

Shared call model

Every named operation delegates to the same type-safe protocol transport:

ts
const result = await keymaster.identityGet(params, options);
  • params is specific to the operation.
  • KeymasterRequestOptions optionally supplies a request id, timeout, or AbortSignal.
  • The returned promise resolves to the operation's Result type.
  • Except for connect.login and connect.launch, capability requests belong to an existing connectSessionId.

Connect

Create and manage the persistent session that binds the caller origin to a Keymaster owner identity.

OperationType contractPurpose
connect.login
login()
ConnectLoginParamsConnectLoginResultCreate a session after the user selects an owner identity.
connect.resume
resume()
ConnectResumeParamsConnectResumeResultRestore the unlock runtime for an existing session.
connect.logout
logout()
ConnectLogoutParamsConnectLogoutResultRevoke a persistent session.
connect.launch
launch()
ConnectLaunchParamsConnectLaunchResultConsume an appView launch token and establish its session.

Identity

Read signed claims or sign caller-provided content as an explicit, human-readable intent.

OperationType contractPurpose
identity.get
identityGet()
IdentityGetParamsIdentityGetResultReturn a signed identity envelope and requested claims.
intent.sign
intentSign()
IntentSignParamsIntentSignResultSign application bytes inside a human-readable intent.

Identity requests include aud, iat, and exp. aud must equal the caller's exact browser origin.

Cipher

Encrypt data for the session owner and exact caller origin, then decrypt it in the same trust context.

OperationType contractPurpose
cipher.encrypt
cipherEncrypt()
CipherEncryptParamsCipherEncryptResultEncrypt typed binary content.
cipher.decrypt
cipherDecrypt()
CipherDecryptParamsCipherDecryptResultRecover the content type and original bytes.

Use binary(), binaryText(), binaryBytes(), and binaryToText() with the protocol's explicit BinaryField representation.

Transfer

Request a controlled P2PKH transfer or negotiate a persistent fee-pool draft. Confirmation text and spending policy remain under Keymaster control.

OperationType contractPurpose
p2pkh.transfer
p2pkhTransfer()
P2pkhTransferParamsP2pkhTransferResultBuild, sign, and broadcast a controlled mainnet BSV transfer.
feepool.prepare
feepoolPrepare()
FeepoolPrepareParamsFeepoolPrepareResultPrepare the next fee-pool draft operation.
feepool.commit
feepoolCommit()
FeepoolCommitParamsFeepoolCommitResultVerify counterparty signatures and commit the prepared draft.

AppMsg

Send end-to-end sealed application messages and query the session-visible message history.

OperationType contractPurpose
appmsg.send
appmsgSend()
AppMsgSendParamsAppMsgSendResultSend a sealed message to an owner and exact recipient endpoint.
appmsg.list
appmsgList()
AppMsgListParamsAppMsgListResultIncrementally list visible messages.
appmsg.get
appmsgGet()
AppMsgGetParamsAppMsgGetResultFetch one visible message.

AppMsg event

EventPayloadDelivery
appmsg.message_receivedAppMsgMessageReceivedEventDataKeymasterConnectOptions.onEvent

The event contains the complete message and does not occupy a request slot or produce a Result message.

Broadcast

Publish owner-signed broadcasts and manage the exact channel set contributed by the current caller.

OperationType contractPurpose
broadcast.publish
broadcastPublish()
BroadcastPublishParamsBroadcastPublishResultPublish a message signed by the session owner.
broadcast.subscription_set
broadcastSubscriptionSet()
BroadcastSubscriptionSetParamsBroadcastSubscriptionSetResultReplace the caller's exact channel set.
broadcast.subscription_list
broadcastSubscriptionList()
BroadcastSubscriptionListParamsBroadcastSubscriptionListResultRead the caller's channel set.

Broadcast event

EventPayloadDelivery
broadcast.message_receivedBroadcastMessageReceivedEventDataKeymasterConnectOptions.onEvent

The event contains the complete verified broadcast body. It does not require a follow-up request.

Storage

Manage directories and objects inside the verified application's namespace. Provider credentials, buckets, and physical object keys are never exposed to the caller.

OperationType contractPurpose
storage.list
storageList()
StorageListParamsStorageListResultList app-scoped directories and objects.
storage.directory.create
storageDirectoryCreate()
StorageDirectoryParamsStorageDirectoryResultCreate a directory marker.
storage.directory.delete
storageDirectoryDelete()
StorageDirectoryParamsStorageDirectoryResultDelete a directory marker.
storage.put
storagePut()
StoragePutParamsStoragePutResultWrite an object within the direct payload limit.
storage.get
storageGet()
StorageGetParamsStorageGetResultRead a complete object or byte range.
storage.delete
storageDelete()
StorageDeleteParamsStorageDeleteResultDelete an object.
storage.upload.begin
storageUploadBegin()
StorageUploadBeginParamsStorageUploadBeginResultStart a multipart upload.
storage.upload.part
storageUploadPart()
StorageUploadPartParamsStorageUploadPartResultUpload one numbered part.
storage.upload.complete
storageUploadComplete()
StorageUploadCompleteParamsStoragePutResultAssemble uploaded parts into the final object.
storage.upload.abort
storageUploadAbort()
StorageUploadAbortParamsStorageUploadAbortResultDiscard an unfinished multipart upload.

Storage requires a verified app identity whose requirements include storage. The size and part limits are exported as SDK constants in the API reference.

Lower-level request API

request(method, params) accepts every ProtocolMethod. Its generic MethodParams and MethodResult types provide the same compile-time inference as the named methods.

All server-pushed events use the shared ProtocolEventMessage envelope.

Capability access without key custody.