@frequencyadvisors/freeq-sdk
v1.0.5
Published
A TypeScript SDK for managing user authentication and wallet operations.
Readme
FreeqSdk
FreeqSdk is a TypeScript SDK for interacting with the Freeq API, providing a rich object model for wallets, organisations, projects, inventory, transactions, and more. It supports user authentication, entity management, and soft-deletion features for robust business logic.
Features
- User authentication and wallet management
- Organisation and project collections
- Inventory and transaction tracking
- Soft-deletion and restoration for entities
- Rich TypeScript types and documentation
- Easy integration with modern TypeScript projects
Installation
To install FreeqSdk, use npm:
npm installUsage
import FreeqSdk from "./src/FreeqSDK";
const sdk = new FreeqSdk({
baseUrl: "https://api.freeq.io",
apiKey: "your-api-key",
});
async function main() {
const wallet = await sdk.signIn("user-token");
const organisations = await sdk.getOrganisations();
const projects = await organisations[0].getProjects();
const inventory = await wallet.getInventory();
const transactions = await inventory[0].getTransactions();
console.log(
wallet.address,
wallet.name,
organisations,
projects,
inventory,
transactions
);
}
main();Contributing
Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.
License
This project is licensed under the MIT License. See the LICENSE file for details.
