// Import our SDK
import { TephraSDK } from '@tephranet/tephra-sdk'
// Authenticate
const tephra = new TephraSDK(KEY, SECRET)
// Create an asset
const tokenId = await tephra.create({
name: 'My First Asset',
description: 'This asset will exist forever.',
image: {
type: 'ipfs',
address: someIpfsAddress,
},
// Attributes can be used to store any structured
// information about the asset.
attributes: [{
label: 'Created By',
value: 'Me.',
}]
})
// Grant the asset
await tephra.grant(tokenId, USER_ONE)
// Transfer the asset
await tephra.transfer(tokenId, USER_ONE, USER_TWO)