Skip to main content

JavaScript SDK API Reference / Records / getRecord

Function: getRecord()

getRecord(connection, domain, record, options?): Promise<RecordResult>

Defined in: record/getRecord.ts:120

Retrieves a record for a domain, verifies its staleness and right of association, and optionally deserializes the record content.

Parameters

connection

Connection

Solana RPC connection

domain

string

Full .sns or .sol domain name

record

Record

Record type to retrieve

options?

GetRecordOptions = {}

Optional retrieval settings

Returns

Promise<RecordResult>

The requested record, verification results, and optional decoded content

Example

const record = await getRecord(connection, "name.sns", Record.Url, {
deserialize: true,
});