In order to begin using NotVault within your TypeScript projects, you will need to initialise the library correctly. This initialisation process sets up the necessary connections and providers for the library's operations, particularly for interacting with IPFS and the Ethereum blockchain via JSON-RPC.
Environment Variables
Prior to initializing NotVault, you'll need to ensure the following environment variables are set:
PUBLIC_URL
PINATA_API_KEY
PINATA_SECRET_API_KEY
These are critical for the functioning of IPFS file operations and the connectivity with Pinata.
Initialization Steps
To initialise NotVault in a TypeScript environment, follow the steps below:
Initialise the vault object: Now, using the .init function of the vault instance, pass in your Chain ID and the signer instance created in the previous step.
vault.init('... Chain ID ...',signer);
After successfully following these steps, your NotVault instance is set up and ready for file operations on IPFS and transactions on an EVM compatible blockchain.