add @bsky.app/sdk + @atproto/lex, vendor lexicons, codegen via lex cli

This commit is contained in:
Samuel Newman
2026-07-15 16:06:20 +03:00
parent 17c1ee4869
commit 15e232749a
306 changed files with 22544 additions and 2 deletions
+25
View File
@@ -0,0 +1,25 @@
{
"lexicon": 1,
"id": "com.atproto.identity.defs",
"defs": {
"identityInfo": {
"type": "object",
"required": ["did", "handle", "didDoc"],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"handle": {
"type": "string",
"format": "handle",
"description": "The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document."
},
"didDoc": {
"type": "unknown",
"description": "The complete DID document for the identity."
}
}
}
}
}
@@ -0,0 +1,37 @@
{
"lexicon": 1,
"id": "com.atproto.identity.getRecommendedDidCredentials",
"defs": {
"main": {
"type": "query",
"description": "Describe the credentials that should be included in the DID doc of an account that is migrating to this service.",
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"properties": {
"rotationKeys": {
"description": "Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs.",
"type": "array",
"items": {
"type": "string"
}
},
"alsoKnownAs": {
"type": "array",
"items": {
"type": "string"
}
},
"verificationMethods": {
"type": "unknown"
},
"services": {
"type": "unknown"
}
}
}
}
}
}
}
@@ -0,0 +1,44 @@
{
"lexicon": 1,
"id": "com.atproto.identity.refreshIdentity",
"defs": {
"main": {
"type": "procedure",
"description": "Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["identifier"],
"properties": {
"identifier": {
"type": "string",
"format": "at-identifier"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "ref",
"ref": "com.atproto.identity.defs#identityInfo"
}
},
"errors": [
{
"name": "HandleNotFound",
"description": "The resolution process confirmed that the handle does not resolve to any DID."
},
{
"name": "DidNotFound",
"description": "The DID resolution process confirmed that there is no current DID."
},
{
"name": "DidDeactivated",
"description": "The DID previously existed, but has been deactivated."
}
]
}
}
}
@@ -0,0 +1,10 @@
{
"lexicon": 1,
"id": "com.atproto.identity.requestPlcOperationSignature",
"defs": {
"main": {
"type": "procedure",
"description": "Request an email with a code to in order to request a signed PLC operation. Requires Auth."
}
}
}
@@ -0,0 +1,44 @@
{
"lexicon": 1,
"id": "com.atproto.identity.resolveDid",
"defs": {
"main": {
"type": "query",
"description": "Resolves DID to DID document. Does not bi-directionally verify handle.",
"parameters": {
"type": "params",
"required": ["did"],
"properties": {
"did": {
"type": "string",
"format": "did",
"description": "DID to resolve."
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["didDoc"],
"properties": {
"didDoc": {
"type": "unknown",
"description": "The complete DID document for the identity."
}
}
}
},
"errors": [
{
"name": "DidNotFound",
"description": "The DID resolution process confirmed that there is no current DID."
},
{
"name": "DidDeactivated",
"description": "The DID previously existed, but has been deactivated."
}
]
}
}
}
@@ -0,0 +1,40 @@
{
"lexicon": 1,
"id": "com.atproto.identity.resolveHandle",
"defs": {
"main": {
"type": "query",
"description": "Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document.",
"parameters": {
"type": "params",
"required": ["handle"],
"properties": {
"handle": {
"type": "string",
"format": "handle",
"description": "The handle to resolve."
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["did"],
"properties": {
"did": {
"type": "string",
"format": "did"
}
}
}
},
"errors": [
{
"name": "HandleNotFound",
"description": "The resolution process confirmed that the handle does not resolve to any DID."
}
]
}
}
}
@@ -0,0 +1,42 @@
{
"lexicon": 1,
"id": "com.atproto.identity.resolveIdentity",
"defs": {
"main": {
"type": "query",
"description": "Resolves an identity (DID or Handle) to a full identity (DID document and verified handle).",
"parameters": {
"type": "params",
"required": ["identifier"],
"properties": {
"identifier": {
"type": "string",
"format": "at-identifier",
"description": "Handle or DID to resolve."
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "ref",
"ref": "com.atproto.identity.defs#identityInfo"
}
},
"errors": [
{
"name": "HandleNotFound",
"description": "The resolution process confirmed that the handle does not resolve to any DID."
},
{
"name": "DidNotFound",
"description": "The DID resolution process confirmed that there is no current DID."
},
{
"name": "DidDeactivated",
"description": "The DID previously existed, but has been deactivated."
}
]
}
}
}
@@ -0,0 +1,53 @@
{
"lexicon": 1,
"id": "com.atproto.identity.signPlcOperation",
"defs": {
"main": {
"type": "procedure",
"description": "Signs a PLC operation to update some value(s) in the requesting DID's document.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"properties": {
"token": {
"description": "A token received through com.atproto.identity.requestPlcOperationSignature",
"type": "string"
},
"rotationKeys": {
"type": "array",
"items": {
"type": "string"
}
},
"alsoKnownAs": {
"type": "array",
"items": {
"type": "string"
}
},
"verificationMethods": {
"type": "unknown"
},
"services": {
"type": "unknown"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["operation"],
"properties": {
"operation": {
"type": "unknown",
"description": "A signed DID PLC operation."
}
}
}
}
}
}
}
@@ -0,0 +1,22 @@
{
"lexicon": 1,
"id": "com.atproto.identity.submitPlcOperation",
"defs": {
"main": {
"type": "procedure",
"description": "Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the identity into a bad state, then submits it to the PLC registry",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["operation"],
"properties": {
"operation": {
"type": "unknown"
}
}
}
}
}
}
}
@@ -0,0 +1,24 @@
{
"lexicon": 1,
"id": "com.atproto.identity.updateHandle",
"defs": {
"main": {
"type": "procedure",
"description": "Updates the current account's handle. Verifies handle validity, and updates did:plc document if necessary. Implemented by PDS, and requires auth.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["handle"],
"properties": {
"handle": {
"type": "string",
"format": "handle",
"description": "The new handle."
}
}
}
}
}
}
}