← BSV MCPInstall
Wallet

wallet_getPublicKey

Retrieves a public key by protocol/key derivation. Use identityKey:true for the root identity key. protocolID is a JSON array like [2,"1sat"].

Read as Markdown

Result

The BRC-100 getPublicKey result, encoded as JSON text. Wallet failures return an error result.

Permissions

Forwarded to the connected wallet under the configured app origin. Its protocol, certificate or basket permission checks apply to the requested operation.

In role-routed configurations, walletRole selects an assigned wallet. Identity methods default to the identity role; encryption and HMAC use the encryption role. Transaction and basket operations follow their assigned role. An unavailable role fails rather than borrowing another key.

Also available through wallet_read in compact mode.

Definition 1

Full catalog · Legacy local wallet; Legacy local identity; External BRC-100 wallet

FieldType / requiredDescription
identityKeyboolean
Optional
If true, return the identity key (ignores other args)
protocolIDJSONstring
Optional
JSON array [securityLevel, protocolString] e.g. [2,"1sat"]
keyIDstring
Optional
See schema for details.
counterpartystring
Optional
See schema for details.
forSelfboolean
Optional
See schema for details.
privilegedboolean
Optional
See schema for details.
privilegedReasonstring
Optional
See schema for details.
seekPermissionboolean
Optional
See schema for details.

Nested fields are required only when their parent object or array item is supplied.

Full input schema
{
  "type": "object",
  "properties": {
    "identityKey": {
      "description": "If true, return the identity key (ignores other args)",
      "type": "boolean"
    },
    "protocolIDJSON": {
      "description": "JSON array [securityLevel, protocolString] e.g. [2,\"1sat\"]",
      "type": "string"
    },
    "keyID": {
      "type": "string"
    },
    "counterparty": {
      "type": "string"
    },
    "forSelf": {
      "type": "boolean"
    },
    "privileged": {
      "type": "boolean"
    },
    "privilegedReason": {
      "type": "string"
    },
    "seekPermission": {
      "type": "boolean"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

Definition 2

Full catalog · Local Vault · broadcasting disabled; Local Vault · all roles; Local Vault · payment role only; Local Vault + sponsor

FieldType / requiredDescription
identityKeyboolean
Optional
If true, return the identity key (ignores other args)
protocolIDJSONstring
Optional
JSON array [securityLevel, protocolString] e.g. [2,"1sat"]
keyIDstring
Optional
See schema for details.
counterpartystring
Optional
See schema for details.
forSelfboolean
Optional
See schema for details.
privilegedboolean
Optional
See schema for details.
privilegedReasonstring
Optional
See schema for details.
seekPermissionboolean
Optional
See schema for details.
walletRole"payments" | "identity" | "ordinals" | "encryption"
Optional
Select the configured root key for this BRC-100 call. Defaults to the role for the method; action continuations retain their original role.

Nested fields are required only when their parent object or array item is supplied.

Full input schema
{
  "type": "object",
  "properties": {
    "identityKey": {
      "description": "If true, return the identity key (ignores other args)",
      "type": "boolean"
    },
    "protocolIDJSON": {
      "description": "JSON array [securityLevel, protocolString] e.g. [2,\"1sat\"]",
      "type": "string"
    },
    "keyID": {
      "type": "string"
    },
    "counterparty": {
      "type": "string"
    },
    "forSelf": {
      "type": "boolean"
    },
    "privileged": {
      "type": "boolean"
    },
    "privilegedReason": {
      "type": "string"
    },
    "seekPermission": {
      "type": "boolean"
    },
    "walletRole": {
      "description": "Select the configured root key for this BRC-100 call. Defaults to the role for the method; action continuations retain their original role.",
      "type": "string",
      "enum": [
        "payments",
        "identity",
        "ordinals",
        "encryption"
      ]
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}