README
Zama API Client
This is a JavaScript library to access Zama's API.
Install
npm i --save @zama-ai/api-client
or
yarn add @zama-ai/api-client
Usage
import { createZamaApiClient } from '@zama-ai/api-client';
const apiClient = createZamaApiClient({ token: 'XXXX' });
const fetchNetworks = async () => {
const list = await apiClient.network.list();
return list.results;
};
fetchNetworks().then((list) => console.log(list));
Browser, node and React Native
This library uses fetch API. If you're using this library in NodeJS environment, you must polyfill fetch through one of these libraries:
Example:
import 'cross-fetch/polyfill';
import { createZamaApiClient } from '@zama-ai/api-client';
Token
You can create your token on Zama app.
TypeScript
This library is fully typed and you can import response types from the package.
Documentation
For more informations, see documentation.