@ember-finance/sdk
v1.0.23
Published
Ember Protocol SDK
Readme
Ember Protocol SDK
A comprehensive TypeScript SDK for interacting with the Ember Protocol on the Sui blockchain. This SDK provides a complete set of tools for managing vaults, handling user operations, and administering the protocol.
Overview
The Ember Protocol SDK is a TypeScript library that enables developers to interact with the Ember Protocol's vault system on the Sui blockchain. The protocol allows users to deposit assets into vaults, receive receipt tokens, and participate in yield-generating strategies.
Architecture
The SDK is built around several key classes:
- EmberVaults: Main entry point for vault interactions
- AdminCalls: Administrative functions for protocol management
- UserCalls: User-facing operations for deposits and withdrawals
- OperatorCalls: Operator functions for vault management
- VaultAdminCalls: Vault-specific administrative functions
- TxBuilder: Transaction building utilities
Installation
npm install @ember-finance/sdkor
yarn add @ember-finance/sdkCore Components
EmberVaults
The main entry point for interacting with the Ember Protocol:
class EmberVaults {
suiClient: SuiClient;
signer: Signer;
parser: DeploymentParser;
walletAddress: string;
txBuilder: TxBuilder;
network: string;
admin: AdminCalls;
}User Operations (UserCalls)
Handle user-facing vault operations:
- depositAsset: Deposit assets into a vault
- mintShares: Mint vault shares with specific amount
- redeemShares: Redeem shares for underlying assets
- requestWithdrawal: Request withdrawal with time delay
- cancelWithdrawalRequest: Cancel pending withdrawal requests
Admin Functions (AdminCalls)
Protocol-level administrative functions:
- createVault: Create new vaults
- updateAdmin: Update vault admin addresses
- updateMaxFeePercentage: Update protocol fee limits
- pauseProtocol: Emergency protocol controls
Operator Functions (OperatorCalls)
Vault operator management functions:
- collectPlatformFee: Collect accumulated fees
- chargePlatformFee: Charge fees from vault
- processWithdrawalRequests: Process pending withdrawals
- updateVaultRate: Update vault exchange rates
- withdrawFromVault: Direct vault withdrawals
- depositToVault: Direct vault deposits
Vault Admin Functions (VaultAdminCalls)
Vault-specific administrative controls:
- setMinWithdrawalShares: Configure minimum withdrawal amounts
- setSubAccount: Manage vault sub-accounts
- updateVaultOperator: Change vault operators
- updateVaultPausedStatus: Pause/unpause individual vaults
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Built with ❤️ by the Ember Protocol team
