banV1 Records (Deprecated)

Records V1

V1 records are deprecated.

V1 Record Derivation

Record keys can be derived with the getDomainKey function and the record flag set to true

const record = Record.IPFS + "." + "bonfida"; // With or without the .sol at the end
const { pubkey: recordKey } = await getDomainKey(record, true);

If the record flag is set to false, the getDomainKey function will derive the key of the subdomain

V1 Record Resolution

The methods below can be used to retrieve specific V1 records.

  • getIpfsRecord: This function can be used to retrieve the IPFS record of a domain name

  • getArweaveRecord: This function can be used to retrieve the Arweave record of a domain name

  • getSolRecord: This function can be used to retrieve the SOL record of a domain name

  • getEthRecord: This function can be used to retrieve the ETH record of a domain name

  • getBtcRecord: This function can be used to retrieve the BTC record of a domain name

  • getLtcRecord: This function can be used to retrieve the LTC record of a domain name

  • getDogeRecord: This function can be used to retrieve the DOGE record of a domain name

  • getEmailRecord: This function can be used to retrieve the email record of a domain name

  • getUrlRecord: This function can be used to retrieve the URL record of a domain name

  • getDiscordRecord: This function can be used to retrieve the Discord record of a domain name

  • getGithubRecord: This function can be used to retrieve the Github record of a domain name

  • getRedditRecord: This function can be used to retrieve the Reddit record of a domain name

  • getTwitterRecord: This function can be used to retrieve the Twitter record of a domain name

  • getTelegramRecord: This function can be used to retrieve the Telegram record of a domain name

  • getShdwRecord: This function can be used to retrieve the SHDW record of a domain name

  • getBscRecord: This function can be used to retrieve the BSC record of a domain name

  • getInjectiveRecord: This function can be used to retrieve the Cosmos Injective record of a domain name

  • getBackpackRecord: This function can be used to retrieve the Backpack record of a domain name

All the functions above can be passed a Connection and record to be resolved. An example with the IPFS record is below.

A more generic resolving function getRecord is also exported with the below signature. The final argument to the function is an optional boolean indicating if the response should be deserialized.

Editing V1 Records

Deleting a V1 Record

Records can be deleted using the deleteInstruction function.

The SOL V1 Record

The SOL record can be used to receive funds to a different address than the one owning the domain. This allows people to hold the domain on a cold wallet while being able to receive funds on a hot wallet.

The SOL record data contains a 96-byte array that is the concatenation of a public key (32 bytes) and signature (64 bytes). The first 32 bytes represent the public key (pubkey) to which funds should be sent and the next 64 bytes are the signature of pubkey_as_bytes + record_key_as_bytes by the owner of the domain. If the signature is invalid funds must not be transferred.

The signature is required to prevent funds being sent to a stale SOL record after a domain has been transferred or sold.

Last updated