Reference · SDK
techne.put(records, { wait }?)
methodtechne-sdk/connectIn React, useTechne().put
The one write. Records go to the person's own repo, public or into a space. Nothing refuses a write.
Private records (with a space) are written first, with the platform's batch write. Public ones follow in one applyWrites to the PDS, then a hint so the platform indexes them before the relay does. Keys are derived from the records, so sending the same records again is safe.
Parameters
| Name | Type | What it is |
|---|---|---|
recordsrequired | PutRecord[] | The records to write. |
options.wait | number | Wait up to this many ms for the curated record that names one of these as its source. |
Each record
recordrequired | AnyRecord | The body; its $type is its collection. Place.create makes one. |
space | string | The space it is placed in, at://{authority}/{spaceType}/{skey}. A record with a space is private, and a record of a type with no public home must name one: put throws PutError (InvalidRequest) before writing anything when it does not. |
rkey | string | Its key. Derived when absent. |
Returns PutResult
| Name | Type | What it is |
|---|---|---|
writes | Written[] | Every record written, private ones first. Each has uri, cid, and on a public one its status. |
status | { decision: 'pending' | 'invalid', … } | The status of the put as a whole. It is invalid when the platform refused a public record, else pending. It is never valid. To get the curated version, pass wait. |
curated | { uri, cid, record } | The curated record, if it came in time. Only with wait. |
curation | Curation[] | Each public record's curation. It is pending, curated or notCurated with why. |
Throws PutError when the batch write refuses a private record. Then nothing public was written; send the same records again.
A public place, then a private post for one circle
In React
Calls permissioned.putRecords, com.atproto.repo.applyWrites and sync.indexRecord →