KNS Docs
  • KNS Documentation
  • Introduction
  • How to Use KNS
    • Step by Step Tutorial
    • Search
    • .kas Inscribe Tool
    • Text Inscribe Tool
    • Dashboard
  • OTHERS
    • Supporting Wallet
    • FAQ
  • Fee Model
  • Reserved List
  • KNS Indexer API
  • Ownership
    • Verfied Domains
    • First Come First Served
  • Inscriptions
    • Overview
    • Operations
      • Create
      • Send
      • List
      • Transfer
Powered by GitBook
On this page
  • Rules
  • Typescript example
  1. Inscriptions
  2. Operations

Transfer

Rules

  • Sender has to be the asset owner

  • Asset has to be in the status available for transfer

  • JSON format

    key
    required
    description

    op

    yes

    operation. "transfer"

    p

    no

    protocol. "domain". Skip for asset transfer

    id

    yes

    the asset's inscription id

    to

    yes

    the recipient's address

Typescript example

const data = JSON.stringify(
  {
    op: "transfer",
    p: "domain",
    id: "787...i0",
    to: "kaspa:qyp4nvaq3pdq7609z09fvdgwtc9c7rg07fuw5zgeee7xpr085de59eseqfcmynn",
  },
  null,
  0
);
const buf = Buffer.from(data);
const script = new ScriptBuilder()
  .addData(XOnlyPublicKey.fromAddress(account).toString())
  .addOp(Opcodes.OpCheckSig)
  .addOp(Opcodes.OpFalse)
  .addOp(Opcodes.OpIf)
  .addData(Buffer.from("kns"))
  .addI64(0n)
  .addData(buf)
  .addOp(Opcodes.OpEndIf);
PreviousList

Last updated 1 month ago