Skip to content

Latest commit

 

History

History
 
 

README.md

Drive SDK for web

Use only what is exported by the library. This is the public supported API of the SDK. Anything else is internal implementation that can change without warning.

Start by creating instance of the ProtonDriveClient. That instance has then available many methods to access nodes, devices, upload and download content, or manage sharing.

import { ProtonDriveClient, MemoryCache, OpenPGPCryptoWithCryptoProxy } from '@protontech/drive-sdk';

const sdk = new ProtonDriveClient({
    httpClient,
    entitiesCache: new MemoryCache(),
    cryptoCache: new MemoryCache(),
    account,
    openPGPCryptoModule: new OpenPGPCryptoWithCryptoProxy(cryptoProxy),
});

Polyfills

The library uses some modern JS features that might not be available across Node versions or browsers. The corresponding polyfills are available under src/polyfill, which should be manually imported by library users if needed (NB: polyfills should be loaded only once in a given global JS context, which is why this is left as a manual step).