import { BIish } from '@ckb-lumos/bi'; import { Script } from '@ckb-lumos/base'; import { BytesLike } from '@ckb-lumos/codec'; import { BI, Cell, helpers, HexString } from '@ckb-lumos/lumos'; import { EncodableContentType } from '../../../helpers'; import { SporeConfig } from '../../../config'; export interface SporeDataProps { /** * Specify the MIME type of the content. * An example: type/subtype;param1=value1;param2=value2 */ contentType: string; /** * Additional parameters of the contentType. * * For example, if the contentType is "image/jpeg", * and you want to use the "immortal" core extension, * which requires adding an "immortal" parameter at the end of the contentType, * you can then pass the following object to the contentTypeParameters: * { * immortal: true, * } * Later on in the "createSpore" function, * the contentTypeParameters will be merged into the contentType, * so finally the contentType will be: "image/jpeg;immortal=true". */ contentTypeParameters?: EncodableContentType['parameters']; /** * The content of the NFT as bytes. */ content: BytesLike; /** * Cluster ID bind to the spore, optional. * It should be a 32-byte hash. */ clusterId?: HexString; } export declare function injectNewSporeOutput(props: { txSkeleton: helpers.TransactionSkeletonType; data: SporeDataProps; toLock: Script; config?: SporeConfig; updateOutput?(cell: Cell): Cell; capacityMargin?: BIish | ((cell: Cell, margin: BI) => BIish); cluster?: { updateOutput?(cell: Cell): Cell; capacityMargin?: BIish | ((cell: Cell, margin: BI) => BIish); updateWitness?: HexString | ((witness: HexString) => HexString); }; }): Promise<{ txSkeleton: helpers.TransactionSkeletonType; outputIndex: number; hasId: boolean; cluster?: { inputIndex: number; outputIndex: number; }; }>;