convertNip19
Transform NIP-19 entities like npub, nsec, note, nprofile, nevent, and naddr into desired formats, including hex, for Nostr network operations.
Instructions
Convert any NIP-19 entity (npub, nsec, note, nprofile, nevent, naddr) to another format
Input Schema
Name | Required | Description | Default |
---|---|---|---|
author | No | Optional author pubkey (hex format) for nevent/naddr | |
identifier | No | Required identifier for naddr conversion | |
input | Yes | The NIP-19 entity or hex string to convert | |
kind | No | Optional event kind for nevent/naddr | |
relays | No | Optional relay URLs for complex entities (nprofile, nevent, naddr) | |
targetType | Yes | The target format to convert to |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"author": {
"description": "Optional author pubkey (hex format) for nevent/naddr",
"type": "string"
},
"identifier": {
"description": "Required identifier for naddr conversion",
"type": "string"
},
"input": {
"description": "The NIP-19 entity or hex string to convert",
"type": "string"
},
"kind": {
"description": "Optional event kind for nevent/naddr",
"type": "number"
},
"relays": {
"description": "Optional relay URLs for complex entities (nprofile, nevent, naddr)",
"items": {
"type": "string"
},
"type": "array"
},
"targetType": {
"description": "The target format to convert to",
"enum": [
"npub",
"nsec",
"note",
"hex",
"nprofile",
"nevent",
"naddr"
],
"type": "string"
}
},
"required": [
"input",
"targetType"
],
"type": "object"
}