Evolution SDK
Assets

Asset Metadata

Attach metadata to transactions using CIP standards

Asset Metadata

Transaction metadata lets you attach arbitrary data to transactions without affecting their execution. Evolution SDK supports attaching metadata through the attachMetadata operation, following Cardano CIP standards.

Common Metadata Labels

LabelCIPPurpose
674nCIP-20Transaction messages/comments
721nCIP-25NFT metadata
777nCIP-27Royalty information

Attach a Message (CIP-20)

import { , , ,  } from "@evolution-sdk/evolution"

const  = ({
  : "preprod",
  : { : "blockfrost", : "https://cardano-preprod.blockfrost.io/api/v0", : ..! },
  : { : "seed", : ..!, : 0 }
})

declare const : .

const  = await 
  .()
  .({
    : .("addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63"),
    : .(2_000_000n)
  })
  .({
    : 674n,
    : 
  })
  .()

const  = await .()
await .()

Multiple Metadata Entries

Chain multiple attachMetadata calls for different labels:

import { , , ,  } from "@evolution-sdk/evolution"

const  = ({
  : "preprod",
  : { : "blockfrost", : "https://cardano-preprod.blockfrost.io/api/v0", : ..! },
  : { : "seed", : ..!, : 0 }
})

declare const : .
declare const : .

const  = await 
  .()
  .({
    : .("addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63"),
    : .(2_000_000n)
  })
  .({ : 674n, :  })
  .({ : 721n, :  })
  .()

Next Steps