import { type Slice } from 'ton-core'; import { type BuilderWriter } from './writer'; export type OnChainContent = { hashes: Map; }; export declare const ON_CHAIN_FIRST_BYTE = 0; /** * @see https://github.com/ton-blockchain/TEPs/blob/master/text/0064-token-data-standard.md#nft-metadata-attributes */ export declare const NFT_METADATA_ATTRIBUTES: string[]; export declare function storeOnChainContent(source: OnChainContent): BuilderWriter; export declare function storeOnChainDictionary(source: Map): BuilderWriter; /** * Convert string attributes keys to SHA256 bigint keys * @param attributes Example: * Map(1) { 'uri' => 'abc' } * @return Example: * Map(1) { 51065135818459385347574250312853146822620586594996463797054414300406918686668n => 'abc' } */ export declare function attributesToHashes(attributes: Map): Map; /** * Convert string to SHA256 bigint * @param string Any string e.g. `name` * @return SHA256 hash of string e.g. `59089242681608890680090686026688704441792375738894456860693970539822503415433n` */ export declare function stringToHash(string: string): bigint; export declare function loadOnChainContent(slice: Slice): OnChainContent; export declare function loadOnChainDictionary(slice: Slice): Map; /** * Read first prefix byte. If prefix is `0x00` load snake string. If prefix is `0x01` load chunked string * snake#00 data:(SnakeData ~n) = ContentData; * chunks#01 data:ChunkedData = ContentData; */ export declare function loadContentData(slice: Slice): string; /** * Convert replace SHA256 bigint keys to string attributes * @param hashes Example: * Map(1) { 51065135818459385347574250312853146822620586594996463797054414300406918686668n => 'abc' } * @param attributes Example: * [ 'uri' ] * @return Example: * Map(1) { 'uri' => 'abc' } */ export declare function hashesToAttributes(hashes: Map, attributes?: string[]): Map; //# sourceMappingURL=onChain.d.ts.map