Skip to main content

JavaScript SDK API Reference / Bindings / createRecord

Function: createRecord()

createRecord(domain, record, content, owner, payer): TransactionInstruction

Defined in: bindings/createRecord.ts:26

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

Parameters

domain

string

Full .sns domain or subdomain name

record

Record

Record type

content

string

Record content

owner

PublicKey

Current owner of the domain

payer

PublicKey

Fee payer for the instruction

Returns

TransactionInstruction

Transaction instruction.

Example

const instruction = createRecord("example.sns", Record.Url, "https://example.com", owner, payer);