{
"id": "org.passingreads.book.stashBookKey",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"bookId",
"privateKey"
],
"properties": {
"bookId": {
"type": "string",
"description": "The book's short ID (as encoded in its QR code)."
},
"privateKey": {
"type": "string",
"description": "Multibase-encoded Ed25519 private key for the book. The appview verifies the key derives to the given bookId."
}
}
},
"encoding": "application/json"
},
"errors": [
{
"name": "BookKeyMismatch",
"description": "The supplied privateKey does not derive to the supplied bookId."
},
{
"name": "ProfileNotFound",
"description": "The authenticated DID has no PassingReads profile indexed by the appview."
}
],
"output": {
"schema": {
"type": "object",
"required": [
"stashedAt"
],
"properties": {
"stashedAt": {
"type": "string",
"format": "datetime"
}
}
},
"encoding": "application/json"
},
"description": "Stash a book's private key on the appview so the user can interact with the book (drop it, leave a note) from any device without re-scanning the QR. Stashed keys are wiped automatically when a drop event is ingested for that book."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}