@ember-finance/proof-of-reserves
v0.2.0
Published
Generate and verify proof of reserves reports for Ember Protocol vaults
Maintainers
Readme
ember-proof-of-reserves
A TypeScript library and CLI tool for generating and verifying proof of reserves reports for Ember Protocol vaults.
Installation
As a CLI tool (global)
npm install -g ember-proof-of-reserves
# or
yarn global add ember-proof-of-reservesAs a library
npm install ember-proof-of-reserves
# or
yarn add ember-proof-of-reservesUsage
CLI Usage
- Create a
.envfile:
BLOCKVISION_API_KEY=your_blockvision_key_here
DEBANK_API_KEY=your_debank_key_here
ZERION_API_KEY=your_zerion_key_here
SUI_RPC_URL=https://fullnode.mainnet.sui.io:443
LOG_LEVEL=info- Run the CLI:
ember-porReports will be generated in the reports/ directory.
Library Usage
import { generateProofOfReservesReport, type VaultReport } from 'ember-proof-of-reserves';
async function main() {
// Generate reports programmatically
const reports = await generateProofOfReservesReport({
basePath: 'https://vaults.api.sui-prod.bluefin.io',
suiRpcUrl: 'https://fullnode.mainnet.sui.io:443',
outputDir: './my-reports'
});
console.log(`Generated ${reports.length} vault reports`);
reports.forEach((report: VaultReport) => {
console.log(`Vault: ${report.vaultName}`);
console.log(`Health Ratio: ${report.vaultHealthRatio}`);
console.log(`Total NAV: $${report.systemNavUsd}`);
});
}
main();Environment Variables
| Variable | Required | Default | Description |
| ---------------------------- | -------- | ------------------------------------- | ------------------------------------------------------ |
| BLOCKVISION_API_KEY | Yes | - | API key for BlockVision (Sui chain data) |
| DEBANK_API_KEY | Yes | - | API key for DeBank (EVM chain data) |
| ZERION_API_KEY | Yes | - | API key for Zerion (Solana chain data) |
| SUI_RPC_URL | No | https://fullnode.mainnet.sui.io:443 | Sui RPC endpoint |
| LOG_LEVEL | No | info | Logging level (trace, debug, info, warn, error, fatal) |
| USE_BLUEFIN_PRICE_FEED | No | false | Use Bluefin price feed |
| BLOCKVISION_RATE_LIMIT_RPS | No | 1 | Rate limit for BlockVision API |
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
For issues and questions:
- GitHub Issues: https://github.com/fireflyprotocol/ember-por/issues
- Email: [email protected]
Changelog
See CHANGELOG.md for a list of changes.
