Skip to main content

JS Kit SDK API Reference / Bindings / createRecord

Function: createRecord()

createRecord(params): Promise<Instruction<string, readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[]>>

Defined in: bindings/createRecord.ts:67

Builds an instruction to create a V2 record for a .sns domain or subdomain.

Record content is serialized according to SNS-IP 1.

Parameters

params

CreateRecordParams

Record creation parameters

Returns

Promise<Instruction<string, readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[]>>

Transaction instruction.

Example

const instruction = await createRecord({
domain: "example.sns",
record: Record.Url,
content: "https://example.com",
owner,
payer,
});