π¨createInscription
import { createInscription } from 'sats-connect'Payload
Description
Examples
Creating a text/html inscription
import { createInscription } from 'sats-connect'
const contentType = "text/html";
const content = "My inscription text";
const payloadType = "PLAIN_TEXT";
// optional parameters:
const appFeeAddress = "2NEYt8s1QPVmTmFTefMLidtmy66ZoqfSz7n", // the address where the inscription fee should go
const appFee = 1500, // the amount of sats that should be sent to the fee address
const suggestedMinerFeeRate = 10; // suggest a fee rate for the transaction in sats/byte
await createInscription({
payload: {
network: {
type: network,
},
contentType,
content,
payloadType,
appFeeAddress,
appFee,
suggestedMinerFeeRate,
},
onFinish: (response) => {
alert(response.txId);
},
onCancel: () => alert("Canceled"),
});Creating a file or image inscription
Last updated