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-reserves
As a library
npm install ember-proof-of-reserves
# or
yarn add ember-proof-of-reserves
Usage
CLI Usage
- Create a
.envfile:
BLOCKVISION_API_KEY=your_blockvision_key_here
DEBANK_API_KEY=your_debank_key_here
SERIALIZED_API_KEY=your_serialized_key_here
SUI_GRPC_URL=https://fullnode.mainnet.sui.io:443
SUI_GRPC_TOKEN=
LOG_LEVEL=info
- Run the CLI:
ember-por
Reports 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',
suiGrpcUrl: '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) |
SERIALIZED_API_KEY | Yes | - | API key for Serialized (Solana positions and balances) |
SUI_GRPC_URL | No | https://fullnode.mainnet.sui.io:443 | Sui gRPC endpoint |
SUI_GRPC_TOKEN | No | - | Sui gRPC auth token, sent as an x-token header |
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
Releasing
This package lives in ember-mono at
typescript/library/ember-proof-of-reserves. Bump version in package.json, merge,
then run ./scripts/release.sh ember-proof-of-reserves from the repo root (see
RELEASE.md). It publishes tag release-ember-proof-of-reserves-<N>, where N is the
next mono release number; the npm version comes from package.json.
.github/workflows/ember_proof_of_reserves_publish.yaml publishes it via npm OIDC trusted
publishing; npm authorises that file by exact name, so it must not be renamed.
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-mono/issues
- Email: [email protected]
Changelog
See CHANGELOG.md for a list of changes.