UNPKG

@zerochain/sdk

Version:

The Züs JS SDK is a JavaScript client library that provides a convenient interface for interacting with the Züs Network. It allows developers to perform various operations such as creating and managing allocations, uploading and downloading files, executi

46 lines (45 loc) 1.59 kB
export declare const md5Hash: (file: File) => Promise<string>; export declare const readChunk: (offset: number, chunkSize: number, file: File) => Promise<{ size: number; buffer: Uint8Array; }>; export type UploadObject = { allocationId: string; remotePath: string; file: File; thumbnailBytes: Uint8Array; encrypt: boolean; isUpdate: boolean; isRepair: boolean; numBlocks: number; callback: (totalBytes: number, completedBytes: number, error: any) => void; /** @deprecated */ webstreaming: boolean; }; /** * Performs a bulk upload of multiple files. * * @param options An array of upload options for each file. * * @deprecated use `multiUplaod` methods instead */ export declare function bulkUpload(options: UploadObject[]): Promise<any>; /** * Sets the wallet information in the bridge and the Go instance. * * @param bls The BLS object from bls-wasm script. * @param clientID The client ID / wallet ID. * @param clientKey The client key. * @param peerPublicKey The peer public key. * @param sk The serialized secret key. * @param pk The serialized public key. * @param mnemonic The mnemonic. * @param isSplit Whether the wallet has split keys enabled or not. */ export declare function setWallet(bls: any, // TODO: check bls clientID: string, clientKey: string, peerPublicKey: string, sk: string, pk: string, mnemonic: string, isSplit: boolean): Promise<void>; export type SdkProxyMethods = { /** @deprecated use `multiUplaod` methods instead */ bulkUpload: typeof bulkUpload; setWallet: typeof setWallet; };