Skip to main content

JavaScript SDK API Reference / Records

Records

Record reads, key derivation, validation, and content codecs.

Enumerations

EnumerationDescription
RecordSupported SNS record identifiers.
RecordVersionSupported SNS record account layouts.
ValidationOn-chain record validation scheme identifiers.

Interfaces

InterfaceDescription
GetMultipleRecordsOptionsOptions controlling content decoding for getMultipleRecords.
GetRecordOptionsOptions controlling content decoding for getRecord.
RecordResultResult returned by getRecord and by defined entries from getMultipleRecords.
RetrievedRecordRaw SNS record account data returned by the records program.

Variables

VariableDescription
ETH_ROA_RECORDSRecord types that use secp256k1 verification.
EVM_RECORDSRecord types whose values use EVM address encoding.
GUARDIANSMaps record types to their guardian public keys.
RECORD_V1_SIZEFixed byte lengths for V1 record payloads.
SELF_SIGNEDRecord types self-signed by the public key in their content.
UTF8_ENCODEDRecord types encoded as UTF-8 strings.

Functions

FunctionDescription
deserializeRecordContentDeserializes record content according to SNS-IP 1.
getMultipleRecordsRetrieves multiple records for a domain, verifies the staleness and right of association of each, and optionally deserializes their content.
getRecordRetrieves a record for a domain, verifies its staleness and right of association, and optionally deserializes the record content.
getRecordV1KeyDerives the legacy V1 record account key.
getRecordV2KeyDerives the V2 record account key.
serializeRecordContentSerializes record content according to SNS-IP 1.
verifyRightOfAssociationVerifies a record's Right of Association validation.
verifyStalenessVerifies a record's staleness validation.