Skip to main content

JS Kit SDK API Reference / Domain / getDomainRecords

Function: getDomainRecords()

getDomainRecords<T, U>(params): Promise<(GetDomainRecordsResult | undefined)[]>

Defined in: domain/getDomainRecords.ts:128

Retrieves V2 records under a domain, verifies them, and optionally decodes their content.

Type Parameters

T

T extends Record[]

U

U extends { [K in string | number | symbol]: ReadonlyUint8Array<ArrayBufferLike> | undefined }

Parameters

params

GetDomainRecordsParams<T, U>

Record retrieval parameters

Returns

Promise<(GetDomainRecordsResult | undefined)[]>

Results aligned with records; missing V2 record accounts produce undefined

Example

const results = await getDomainRecords({ rpc, domain: "example.sns", records: [Record.Url] });