import { U as ClusterDataView, a as SporeVersion, i as SporeScriptInfoLike, n as SPORE_VERSION_DEFAULT, r as SporeScriptInfo, s as SporeDataView, t as DEFAULT_COBUILD_INFO_HASH } from "./types-C8S0Peca.mjs"; import { ccc } from "@ckb-ccc/core"; //#region src/predefined/utils.d.ts declare function getSporeScriptInfos(client: ccc.Client): Record; declare function getClusterScriptInfos(client: ccc.Client): Record; declare function getSporeScriptInfo(client: ccc.Client, version?: SporeVersion): SporeScriptInfo; declare function getClusterScriptInfo(client: ccc.Client, version?: SporeVersion): SporeScriptInfo; //#endregion //#region src/cluster/index.d.ts declare function findCluster(client: ccc.Client, id: ccc.HexLike, scripts?: SporeScriptInfoLike[]): Promise<{ cell: ccc.Cell; cluster: ccc.Cell; clusterData: ClusterDataView; scriptInfo: SporeScriptInfo; } | undefined>; declare function assertCluster(client: ccc.Client, args: ccc.HexLike, scripts?: SporeScriptInfoLike[]): Promise<{ cell: ccc.Cell; scriptInfo: SporeScriptInfo; }>; /** * Create a new Cluster cell * * @param params.signer who takes the responsibility to balance and sign the transaction * @param params.data specific format of data required by Cluster protocol * @param params.to the owner of the Cluster cell, which will be replaced with signer if not provided * @param params.tx the transaction skeleton, if not provided, a new one will be created * @param params.scriptInfo the script info of new cluster, default spore version if undefined * @param params.scriptInfoHash the script info hash used in cobuild * @returns * - **tx**: a new transaction that contains created Cluster cell * - **id**: the id of the created Cluster cell */ declare function createSporeCluster(params: { signer: ccc.Signer; data: ClusterDataView; to?: ccc.ScriptLike; tx?: ccc.TransactionLike; scriptInfo?: SporeScriptInfoLike; scriptInfoHash?: ccc.HexLike; }): Promise<{ tx: ccc.Transaction; id: ccc.Hex; }>; /** * Transfer a Cluster cell * * @param params.signer who takes the responsibility to balance and sign the transaction * @param params.id the id of the Cluster cell to be transferred * @param params.to the new owner of the Cluster cell * @param params.tx the transaction skeleton, if not provided, a new one will be created * @param params.scriptInfoHash the script info hash used in cobuild * @returns * - **tx**: a new transaction that contains transferred Cluster cell */ declare function transferSporeCluster(params: { signer: ccc.Signer; id: ccc.HexLike; to: ccc.ScriptLike; tx?: ccc.TransactionLike; scripts?: SporeScriptInfoLike[]; scriptInfoHash?: ccc.HexLike; }): Promise<{ tx: ccc.Transaction; }>; /** * Search on-chain clusters under the signer's control * * @param params.signer the owner of clusters * @param params.order the order in creation time of clusters * @param params.scriptInfos the deployed script infos of clusters */ declare function findSporeClustersBySigner(params: { signer: ccc.Signer; order?: "asc" | "desc"; limit?: number; scriptInfos?: SporeScriptInfoLike[]; }): AsyncGenerator<{ cell: ccc.Cell; cluster: ccc.Cell; clusterData: ClusterDataView; scriptInfo: SporeScriptInfo; }>; /** * Search on-chain clusters under the specified lock or not * * @param params.client the client to search clusters * @param params.lock the lock of clusters */ declare function findSporeClusters(params: { client: ccc.Client; lock?: ccc.ScriptLike; order?: "asc" | "desc"; limit?: number; scriptInfos?: SporeScriptInfoLike[]; }): AsyncGenerator<{ cell: ccc.Cell; cluster: ccc.Cell; clusterData: ClusterDataView; scriptInfo: SporeScriptInfo; }>; //#endregion //#region src/dob/helper/object.d.ts type DNA = string | { dna: string; } | string[]; interface Decoder { type: "code_hash" | "type_id" | "type_script"; hash?: string; script?: { code_hash: string; hash_type: string; args: string; }; } interface PatternElementDob0 { traitName: string; dobType: string; dnaOffset: number; dnaLength: number; patternType: "options" | "range" | "rawNumber" | "rawString" | "utf8"; traitArgs?: string[] | number[]; toJSON?: () => unknown; } interface PatternDob0 { ver: 0; decoder: Decoder; pattern: PatternElementDob0[]; } interface Dob0 { description: string; dob: PatternDob0; } type Dob1PatternArgs = string | number[] | ["*"]; interface PatternElementDob1 { imageName: string; svgFields: "attributes" | "elements"; traitName: string; patternType: "options" | "raw"; traitArgs: Dob1PatternArgs[][] | string; toJSON?: () => unknown; } interface PatternDob1 { ver: 1; decoders: { decoder: Decoder; pattern: PatternElementDob0[] | PatternElementDob1[]; }[]; } interface Dob1 { description: string; dob: PatternDob1; } interface DecodeElement { name: string; traits: { type: string; value: number | string; }[]; } type RenderOutput = DecodeElement[]; //#endregion //#region src/dob/api/decode.d.ts declare function extractDobFromDecoderResult(result: string): RenderOutput; declare function decodeDobBySporeId(sporeId: ccc.HexLike, dobServerUrl: string): Promise; declare function decodeDobBySporeCell(sporeOutput: ccc.CellOutputLike, dobServerUrl: string): Promise; declare function decodeDobBySporeOutpoint(client: ccc.Client, sporeOutpoint: ccc.OutPointLike, dobServerUrl: string): Promise; declare function decodeDobByRawData(sporeCellData: ccc.HexLike, clusterCellData: ccc.HexLike, dobServerUrl: string): Promise; //#endregion //#region src/dob/helper/check.d.ts declare function checkDecoder(decoder: Decoder): void; declare function checkPatternDob0(value: PatternElementDob0): void; declare function checkPatternDob1(value: PatternElementDob1): void; //#endregion //#region src/dob/helper/error.d.ts declare function getErrorByCode(code: number): string; //#endregion //#region src/dob/api/encode.d.ts declare function encodeDna(dna: DNA): ArrayBuffer; declare function encodeClusterDescriptionForDob0(dob0: Dob0): string; declare function encodeClusterDescriptionForDob1(dob1: Dob1): string; //#endregion //#region src/dob/config/predefined.d.ts type DobType = "dob0" | "dob1"; type DobScriptInfo = Record; declare const DOB_TESTNET_DECODERS: DobScriptInfo; declare const DOB_MAINNET_DECODERS: DobScriptInfo; declare function getDecoder(client: ccc.Client, dobType: DobType, dobScriptInfo?: DobScriptInfo): Decoder; declare namespace index_d_exports { export { DNA, DOB_MAINNET_DECODERS, DOB_TESTNET_DECODERS, DecodeElement, Decoder, Dob0, Dob1, Dob1PatternArgs, DobScriptInfo, DobType, PatternDob0, PatternDob1, PatternElementDob0, PatternElementDob1, RenderOutput, checkDecoder, checkPatternDob0, checkPatternDob1, decodeDobByRawData, decodeDobBySporeCell, decodeDobBySporeId, decodeDobBySporeOutpoint, encodeClusterDescriptionForDob0, encodeClusterDescriptionForDob1, encodeDna, extractDobFromDecoderResult, getDecoder, getErrorByCode }; } //#endregion //#region src/spore/index.d.ts declare function findSpore(client: ccc.Client, id: ccc.HexLike, scripts?: SporeScriptInfoLike[]): Promise<{ cell: ccc.Cell; spore: ccc.Cell; sporeData: SporeDataView; scriptInfo: SporeScriptInfo; } | undefined>; declare function assertSpore(client: ccc.Client, args: ccc.HexLike, scripts?: SporeScriptInfoLike[]): Promise<{ cell: ccc.Cell; scriptInfo: SporeScriptInfo; }>; /** * Create one Spore cell with the specified Spore data. * * @param params.signer who takes the responsibility to balance and sign the transaction * @param params.data specific format of data required by Spore protocol * @param params.to owner of new spore cell, signer if no provided * @param params.clusterMode how to process cluster cell **(if clusterId is not provided in SporeData, this parameter will be ignored)** * - undefined: error if the spore has a cluster but the clusterMode is not set * - lockProxy: put a cell that uses the same lock from Cluster cell in both Inputs and Outputs * - clusterCell: directly put Cluster cell in Inputs and Outputs * - skip: don't handle the cluster logic * @param params.tx the transaction skeleton, if not provided, a new one will be created * @param params.scriptInfo the script info of Spore cell, if not provided, the default script info will be used * @param params.scriptInfoHash the script info hash used in cobuild * @returns * - **tx**: a new transaction that contains created Spore cells * - **id**: the sporeId of created Spore cell */ declare function createSpore(params: { signer: ccc.Signer; data: SporeDataView; to?: ccc.ScriptLike; clusterMode?: "lockProxy" | "clusterCell" | "skip"; tx?: ccc.TransactionLike; scriptInfo?: SporeScriptInfoLike; scriptInfoHash?: ccc.HexLike; }): Promise<{ tx: ccc.Transaction; id: ccc.Hex; }>; /** * Transfer one Spore cell * * @param params.signer who takes the responsibility to balance and sign the transaction * @param params.id sporeId * @param params.to Spore's new owner * @param params.tx the transaction skeleton, if not provided, a new one will be created * @param params.scriptInfoHash the script info hash used in cobuild * @returns * - **tx**: a new transaction that contains transferred Spore cells */ declare function transferSpore(params: { signer: ccc.Signer; id: ccc.HexLike; to: ccc.ScriptLike; tx?: ccc.TransactionLike; scripts?: SporeScriptInfoLike[]; scriptInfoHash?: ccc.HexLike; }): Promise<{ tx: ccc.Transaction; }>; /** * Melt one Spore cell * * @param params.signer who takes the responsibility to balance and sign the transaction * @param params.id sporeId to be melted * @param params.tx the transaction skeleton, if not provided, a new one will be created * @param params.scriptInfoHash the script info hash used in cobuild * @returns * - **tx**: a new transaction that contains melted Spore cell */ declare function meltSpore(params: { signer: ccc.Signer; id: ccc.HexLike; tx?: ccc.TransactionLike; scripts?: SporeScriptInfoLike[]; scriptInfoHash?: ccc.HexLike; }): Promise<{ tx: ccc.Transaction; }>; /** * Search on-chain spores under the signer's control, if cluster provided, filter spores belonging to this cluster * * @param params.signer the owner of spores * @param params.order the order in creation time of spores * @param params.clusterId the cluster that spores belong to. "" to find public spores * @param params.scriptInfos the deployed script infos of spores * @returns specified spore cells */ declare function findSporesBySigner(params: { signer: ccc.Signer; order?: "asc" | "desc"; limit?: number; clusterId?: ccc.HexLike; scriptInfos?: SporeScriptInfoLike[]; }): AsyncGenerator<{ cell: ccc.Cell; spore: ccc.Cell; sporeData: SporeDataView; scriptInfo: SporeScriptInfo; }>; /** * Search on-chain spores under the specified lock or not, if cluster provided, filter spores belonging to this cluster * * @param params.client the client to search spores * @param params.lock the lock of spores * @param params.clusterId the cluster that spores belong to. "" to find public spores * @param params.scriptInfos the deployed script infos of spores * @param params.limit the limit of spores to search * @param params.order the order in creation time of spores * @returns specified spore cells */ declare function findSpores(params: { client: ccc.Client; lock?: ccc.ScriptLike; clusterId?: ccc.HexLike; scriptInfos?: SporeScriptInfoLike[]; limit?: number; order?: "asc" | "desc"; }): AsyncGenerator<{ cell: ccc.Cell; spore: ccc.Cell; sporeData: SporeDataView; scriptInfo: SporeScriptInfo; }>; declare namespace barrel_d_exports { export { DEFAULT_COBUILD_INFO_HASH, SPORE_VERSION_DEFAULT, SporeScriptInfo, SporeScriptInfoLike, SporeVersion, assertCluster, assertSpore, createSpore, createSporeCluster, index_d_exports as dob, findCluster, findSpore, findSporeClusters, findSporeClustersBySigner, findSpores, findSporesBySigner, getClusterScriptInfo, getClusterScriptInfos, getSporeScriptInfo, getSporeScriptInfos, meltSpore, transferSpore, transferSporeCluster }; } //#endregion export { getClusterScriptInfos as _, findSpores as a, transferSpore as c, createSporeCluster as d, findCluster as f, getClusterScriptInfo as g, transferSporeCluster as h, findSpore as i, index_d_exports as l, findSporeClustersBySigner as m, assertSpore as n, findSporesBySigner as o, findSporeClusters as p, createSpore as r, meltSpore as s, barrel_d_exports as t, assertCluster as u, getSporeScriptInfo as v, getSporeScriptInfos as y }; //# sourceMappingURL=barrel-DPOOJPh3.d.mts.map