Skip to content

Transfer Tokenized Record

Transfers a tokenized record from one token account to another.

Parameters

ParameterTypeDescription
authoritySignerThe record owner or class authority (for permissioned classes)
mintPublicKey | PdaThe mint account for the tokenized record
tokenAccountPublicKey | PdaThe source token account holding the tokenized record
newTokenAccountPublicKey | PdaThe destination token account that will receive the tokenized record
recordPublicKey | PdaThe record account associated with the tokenized record
token2022?PublicKey | PdaOptional Token2022 Program account
class?PublicKey | PdaOptional class account of the record

Returns

Returns a TransactionBuilder that can be used to build and send the transaction.

Example

import { transferTokenizedRecord } from "srs-lib";
 
const transaction = transferTokenizedRecord(context, {
    authority: authority,
    mint: mintPublicKey,
    tokenAccount: sourceTokenAccountPublicKey,
    newTokenAccount: destinationTokenAccountPublicKey,
    record: recordPublicKey,
    token2022: token2022ProgramPublicKey,
    class: classPublicKey // Optional, but recommended for permissioned classes
});
 
// Send the transaction
await transaction.sendAndConfirm();

Important Notes

  • The authority must be either the record owner or the class authority (for permissioned classes)
  • The tokenized record must not be frozen
  • The source token account must hold exactly one token
  • The destination token account must be owned by the recipient
  • The record's data remains unchanged during transfer
  • For permissioned classes, providing the class account is recommended to ensure proper authority verification
  • The transfer is permanent and cannot be undone
  • The record ownership is automatically transferred to the new token account owner

Related