UNPKG

@etherna/sdk-js

Version:

Etherna SDKs for operations on the network

29 lines 1.88 kB
import { MantarayNode } from "../handlers/mantaray"; import type { BeeClient, Reference } from "../clients"; import type { Bytes, BytesReference } from "../handlers/mantaray/types"; import type { Message } from "js-sha3"; export declare const ZeroHashReference: BytesReference; export declare const RootPath = "/"; export declare const WebsiteIndexDocumentSuffixKey = "website-index-document"; export declare const WebsiteErrorDocumentPathKey = "website-error-document"; export declare const EntryMetadataContentTypeKey = "Content-Type"; export declare const EntryMetadataFilenameKey = "Filename"; export declare const EntryMetadataFeedOwnerKey = "swarm-feed-owner"; export declare const EntryMetadataFeedTopicKey = "swarm-feed-topic"; export declare const EntryMetadataFeedTypeKey = "swarm-feed-type"; export declare function getReferenceFromData(data: Uint8Array): Reference; export declare function referenceToBytesReference(ref: Reference): BytesReference; export declare function bytesReferenceToReference(ref: BytesReference): Reference; export declare function jsonToReference(content: object): BytesReference; export declare function textToReference(content: string): BytesReference; export declare function keccak256Hash(...messages: Message[]): Bytes<32>; export declare function encodePath(path: string): Uint8Array; export declare function decodePath(path: Uint8Array): string; export declare const isZeroBytesReference: (ref: BytesReference | Reference) => boolean; export declare function getBzzNodeInfo(reference: Reference, beeClient: BeeClient, signal?: AbortSignal): Promise<{ entry: BytesReference; contentType?: string; } | null>; export declare const getAllPaths: (node: MantarayNode) => Record<string, MantarayNode>; export declare const getNodesWithPrefix: (node: MantarayNode, prefix: string) => MantarayNode[]; //# sourceMappingURL=mantaray.d.ts.map