JavaScript SDK API Reference / Records / getMultipleRecords
Function: getMultipleRecords()
getMultipleRecords(
connection,domain,records,options?):Promise<(RecordResult|undefined)[]>
Defined in: record/getMultipleRecords.ts:45
Retrieves multiple records for a domain, verifies the staleness and right of association of each, and optionally deserializes their content.
Parameters
connection
Connection
Solana RPC connection
domain
string
Full .sns or .sol domain name
records
Record[]
Record types to retrieve
options?
GetMultipleRecordsOptions = {}
Optional retrieval settings.
Returns
Promise<(RecordResult | undefined)[]>
An array of results in the same order as records. Each entry
contains the record type, the raw SNS record account, staleness and
right-of-association verification results, and optionally the deserialized
content. Entries are undefined for records that do not exist on-chain.
Example
const records = await getMultipleRecords(connection, "example.sns", [Record.Url]);