bigblocks
Version:
Complete Bitcoin UI component library - authentication, social, wallet, market, inscriptions, and blockchain interactions for React
15 lines • 2.07 kB
JSON
{
"name": "bap-identity-types-signing",
"type": "registry:component",
"dependencies": [],
"devDependencies": [],
"registryDependencies": [],
"files": [
{
"path": "components/bap-identity/types/signing.ts",
"type": "registry:component",
"content": "export type SigningMode = \"sign\" | \"verify\" | \"both\";\n\nexport interface SignedFile {\n\tfile: File;\n\tsignature: string;\n\taddress: string;\n\tidentityKey: string;\n\ttimestamp: Date;\n\tstatus: \"pending\" | \"signed\" | \"verified\" | \"invalid\" | \"error\";\n\terror?: string;\n}\n\nexport interface FileSigningResult {\n\tsuccess: boolean;\n\tsignature?: string;\n\taddress?: string;\n\tfileHash?: string;\n\tmetadata?: Record<string, unknown>;\n\terror?: Error;\n}\n\nexport interface FileVerificationResult {\n\tvalid: boolean;\n\taddress?: string;\n\tidentityKey?: string;\n\tfileHash?: string;\n\terror?: string;\n}\n\nexport interface BapFileSignerProps {\n\t/**\n\t * The BAP instance for signing\n\t */\n\n\tbapInstance: import(\"./identity.js\").ExtendedBAP;\n\n\t/**\n\t * Mode of operation\n\t */\n\tmode?: SigningMode;\n\n\t/**\n\t * Callback when files are signed\n\t */\n\tonFilesSigned?: (results: SignedFile[]) => void;\n\n\t/**\n\t * Callback when file is verified\n\t */\n\tonFileVerified?: (result: FileVerificationResult) => void;\n\n\t/**\n\t * Whether to anchor signatures on blockchain\n\t */\n\tblockchainAnchor?: boolean;\n\n\t/**\n\t * Maximum file size in bytes (default: 10MB)\n\t */\n\tmaxFileSize?: number;\n\n\t/**\n\t * Accepted file types\n\t */\n\tacceptedTypes?: string[];\n\n\t/**\n\t * Theme variant\n\t */\n\tvariant?: \"surface\" | \"ghost\" | \"classic\";\n\n\t/**\n\t * Component size\n\t */\n\tsize?: \"1\" | \"2\" | \"3\";\n}\n\n// Hook parameter types\nexport interface SigningOptions {\n\tblockchainAnchor?: boolean;\n\tincludePubKey?: boolean;\n\tprotocol?: \"bap\" | \"raw\";\n}\n\nexport interface UseBapSigningOptions {\n\tautoVerify?: boolean;\n}\n",
"target": "<%- config.aliases.components %>/signing.tsx"
}
]
}