# pub.techne.draft.identity.defs

- Kind: defs
- Authority: identity.draft.techne.pub
- Lexicon: 1
- Published by [lexicons.techne.town](https://lexicon.garden/identity/did:plc:cbtfheqpi4g6vlrha4tpoh53), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:cbtfheqpi4g6vlrha4tpoh53/pub.techne.draft.identity.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:cbtfheqpi4g6vlrha4tpoh53/pub.techne.draft.identity.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:cbtfheqpi4g6vlrha4tpoh53/pub.techne.draft.identity.defs/analytics)

## #channel (`pub.techne.draft.identity.defs#channel`)

Type: object

A sign-in channel, normalized: a phone is E.164 (`+` and 7 to 15 digits); an email is trimmed and lower-cased.

### Properties

- `type` (string, required)
  - Constraints: knownValues: email | phone
- `value` (string, required)
  - Constraints: maxLength: 320

## #linkGrant (`pub.techne.draft.identity.defs#linkGrant`)

Type: object

A write the platform makes as `actAs` for each account that redeems the link, as identity.holdForPhone's held write.

### Properties

- `actAs` (string · did, required): The account the record is written as; the caller must be able to write as it.
- `write` (ref, required)
  - Reference: `pub.techne.draft.identity.holdForPhone#heldWrite`

## #linkRedemptionView (`pub.techne.draft.identity.defs#linkRedemptionView`)

Type: object

### Properties

- `redeemedAt` (string · datetime, required)
- `redeemer` (string · did, required)

## #linkTokenListed (`pub.techne.draft.identity.defs#linkTokenListed`)

Type: object

A live link token of the caller's, with its token when the identity PDS can derive it again.

### Properties

- `link` (ref, required)
  - Reference: `pub.techne.draft.identity.defs#linkTokenView`
- `token` (string)

## #linkTokenView (`pub.techne.draft.identity.defs#linkTokenView`)

Type: object

A link token as its owner sees it, without the token.

### Properties

- `app` (string, required)
- `createdAt` (string · datetime, required)
- `expiresAt` (string · datetime)
- `id` (string, required)
- `reusable` (boolean, required)
- `revokedAt` (string · datetime)
- `target` (string, required)
- `usedAt` (string · datetime)

## #linkView (`pub.techne.draft.identity.defs#linkView`)

Type: object

Another account of the caller's person: the two are linked (identity.manageMethods moveMethod), every DID of the person naming every other in `alsoKnownAs`. Linked accounts have no primary, and a link is always mutual: identity.listMethods sends `mutual` as true.

### Properties

- `did` (string · did, required): The other account.
- `handle` (string · handle)
- `mutual` (boolean, required): Retired: a link is always mutual, and identity.listMethods sends `true` (it was: both accounts hold a matching pub.techne.draft.accountLink).
- `since` (string · datetime): When the two accounts became one person.

## #methodView (`pub.techne.draft.identity.defs#methodView`)

Type: object

One sign-in method of an account. `masked` is always masked. Only identity.manageMethods `list` (the identity PDS's signed hook, for the signed-in owner's own account page) adds `value`; identity.listMethods never does.

### Properties

- `bid` (string, required): The method's id: the binding id (the credential's record key) of an email or phone, else the platform's id for it. Names the method in unlinkMethod and manageMethods.
  - Constraints: maxLength: 64
- `boundAt` (string · datetime, required)
- `frozenUntil` (string · datetime): Frozen: it signs in nowhere until then, or until a recovery method lifts it.
- `masked` (string, required): The channel with most of it hidden, e.g. `j•••@example.com`, `••• ••• 4567`; a passkey's or Nostr key's label; `Recovery codes (n left)`.
  - Constraints: maxLength: 320
- `programs` (boolean): "Programs can sign in with this key" (identity.manageMethods setPrograms). Present on the types that support it (a Nostr key), off by default. Never on for a recovery method.
- `recovery` (boolean): A recovery method of this account. Private: only the account sees it.
- `type` (string, required)
  - Constraints: knownValues: email | phone | passkey | nostr | recoveryCodes
- `value` (string): An email's full address or a phone's full number (E.164). Sent only by identity.manageMethods `list`, to the identity PDS, for the owner's own account page; never in identity.listMethods, signInMethods or a notice. Absent on a passkey, Nostr key or recovery codes.
  - Constraints: maxLength: 320

## #pendingChange (`pub.techne.draft.identity.defs#pendingChange`)

Type: object

A change that waits for its time (a method's removal, the account's deletion, or a method's move onto another account (identity.manageMethods moveMethod), 7 days, or none for a move a recovery method proved; the account's first recovery mark, 24 hours). A move is completed by the platform once due, tried again after a failed write, and may be dropped instead (identity.manageMethods moveMethod says when). Any of the account's methods, a frozen one too, can cancel it until then; a wait during which one of the account's methods was frozen (even if a recovery method lifted the freeze early) is dropped when it runs out, not completed.

### Properties

- `createdAt` (string · datetime, required)
- `dueAt` (string · datetime, required)
- `id` (string, required)
  - Constraints: maxLength: 64
- `kind` (string, required)
  - Constraints: knownValues: removeMethod | deleteAccount | markRecovery | moveMethod
- `method` (string): The method it removes, marks or moves (for an incoming move, the other account's method).
  - Constraints: maxLength: 64
- `other` (string · did): moveMethod: the other account. On the account the method leaves, where it goes; on the account it joins (identity.manageMethods `list` shows the move there too, and either account can cancel it), where it comes from.

## #personMember (`pub.techne.draft.identity.defs#personMember`)

Type: object

Another account of an account's person (identity.manageMethods `list` and moveMethod).

### Properties

- `did` (string · did, required)
- `handle` (string · handle): Its handle, when the platform knows one. Sent in addChannel's `otherPerson`.
- `since` (string · datetime): When it joined the person. Sent by `list`.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "channel": {
      "description": "A sign-in channel, normalized: a phone is E.164 (`+` and 7 to 15 digits); an email is trimmed and lower-cased.",
      "properties": {
        "type": {
          "knownValues": [
            "email",
            "phone"
          ],
          "type": "string"
        },
        "value": {
          "maxLength": 320,
          "type": "string"
        }
      },
      "required": [
        "type",
        "value"
      ],
      "type": "object"
    },
    "linkGrant": {
      "description": "A write the platform makes as `actAs` for each account that redeems the link, as identity.holdForPhone's held write.",
      "properties": {
        "actAs": {
          "description": "The account the record is written as; the caller must be able to write as it.",
          "format": "did",
          "type": "string"
        },
        "write": {
          "ref": "pub.techne.draft.identity.holdForPhone#heldWrite",
          "type": "ref"
        }
      },
      "required": [
        "actAs",
        "write"
      ],
      "type": "object"
    },
    "linkRedemptionView": {
      "properties": {
        "redeemedAt": {
          "format": "datetime",
          "type": "string"
        },
        "redeemer": {
          "format": "did",
          "type": "string"
        }
      },
      "required": [
        "redeemer",
        "redeemedAt"
      ],
      "type": "object"
    },
    "linkTokenListed": {
      "description": "A live link token of the caller's, with its token when the identity PDS can derive it again.",
      "properties": {
        "link": {
          "ref": "pub.techne.draft.identity.defs#linkTokenView",
          "type": "ref"
        },
        "token": {
          "type": "string"
        }
      },
      "required": [
        "link"
      ],
      "type": "object"
    },
    "linkTokenView": {
      "description": "A link token as its owner sees it, without the token.",
      "properties": {
        "app": {
          "type": "string"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "expiresAt": {
          "format": "datetime",
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "reusable": {
          "type": "boolean"
        },
        "revokedAt": {
          "format": "datetime",
          "type": "string"
        },
        "target": {
          "type": "string"
        },
        "usedAt": {
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "id",
        "app",
        "target",
        "reusable",
        "createdAt"
      ],
      "type": "object"
    },
    "linkView": {
      "description": "Another account of the caller's person: the two are linked (identity.manageMethods moveMethod), every DID of the person naming every other in `alsoKnownAs`. Linked accounts have no primary, and a link is always mutual: identity.listMethods sends `mutual` as true.",
      "properties": {
        "did": {
          "description": "The other account.",
          "format": "did",
          "type": "string"
        },
        "handle": {
          "format": "handle",
          "type": "string"
        },
        "mutual": {
          "description": "Retired: a link is always mutual, and identity.listMethods sends `true` (it was: both accounts hold a matching pub.techne.draft.accountLink).",
          "type": "boolean"
        },
        "since": {
          "description": "When the two accounts became one person.",
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "did",
        "mutual"
      ],
      "type": "object"
    },
    "methodView": {
      "description": "One sign-in method of an account. `masked` is always masked. Only identity.manageMethods `list` (the identity PDS's signed hook, for the signed-in owner's own account page) adds `value`; identity.listMethods never does.",
      "properties": {
        "bid": {
          "description": "The method's id: the binding id (the credential's record key) of an email or phone, else the platform's id for it. Names the method in unlinkMethod and manageMethods.",
          "maxLength": 64,
          "type": "string"
        },
        "boundAt": {
          "format": "datetime",
          "type": "string"
        },
        "frozenUntil": {
          "description": "Frozen: it signs in nowhere until then, or until a recovery method lifts it.",
          "format": "datetime",
          "type": "string"
        },
        "masked": {
          "description": "The channel with most of it hidden, e.g. `j•••@example.com`, `••• ••• 4567`; a passkey's or Nostr key's label; `Recovery codes (n left)`.",
          "maxLength": 320,
          "type": "string"
        },
        "programs": {
          "description": "\"Programs can sign in with this key\" (identity.manageMethods setPrograms). Present on the types that support it (a Nostr key), off by default. Never on for a recovery method.",
          "type": "boolean"
        },
        "recovery": {
          "description": "A recovery method of this account. Private: only the account sees it.",
          "type": "boolean"
        },
        "type": {
          "knownValues": [
            "email",
            "phone",
            "passkey",
            "nostr",
            "recoveryCodes"
          ],
          "type": "string"
        },
        "value": {
          "description": "An email's full address or a phone's full number (E.164). Sent only by identity.manageMethods `list`, to the identity PDS, for the owner's own account page; never in identity.listMethods, signInMethods or a notice. Absent on a passkey, Nostr key or recovery codes.",
          "maxLength": 320,
          "type": "string"
        }
      },
      "required": [
        "bid",
        "type",
        "masked",
        "boundAt"
      ],
      "type": "object"
    },
    "pendingChange": {
      "description": "A change that waits for its time (a method's removal, the account's deletion, or a method's move onto another account (identity.manageMethods moveMethod), 7 days, or none for a move a recovery method proved; the account's first recovery mark, 24 hours). A move is completed by the platform once due, tried again after a failed write, and may be dropped instead (identity.manageMethods moveMethod says when). Any of the account's methods, a frozen one too, can cancel it until then; a wait during which one of the account's methods was frozen (even if a recovery method lifted the freeze early) is dropped when it runs out, not completed.",
      "properties": {
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "dueAt": {
          "format": "datetime",
          "type": "string"
        },
        "id": {
          "maxLength": 64,
          "type": "string"
        },
        "kind": {
          "knownValues": [
            "removeMethod",
            "deleteAccount",
            "markRecovery",
            "moveMethod"
          ],
          "type": "string"
        },
        "method": {
          "description": "The method it removes, marks or moves (for an incoming move, the other account's method).",
          "maxLength": 64,
          "type": "string"
        },
        "other": {
          "description": "moveMethod: the other account. On the account the method leaves, where it goes; on the account it joins (identity.manageMethods `list` shows the move there too, and either account can cancel it), where it comes from.",
          "format": "did",
          "type": "string"
        }
      },
      "required": [
        "id",
        "kind",
        "createdAt",
        "dueAt"
      ],
      "type": "object"
    },
    "personMember": {
      "description": "Another account of an account's person (identity.manageMethods `list` and moveMethod).",
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        },
        "handle": {
          "description": "Its handle, when the platform knows one. Sent in addChannel's `otherPerson`.",
          "format": "handle",
          "type": "string"
        },
        "since": {
          "description": "When it joined the person. Sent by `list`.",
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "did"
      ],
      "type": "object"
    }
  },
  "id": "pub.techne.draft.identity.defs",
  "lexicon": 1
}
```
