Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(jellyfish-api-core): listVaultHistory RPC #834

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
39 changes: 39 additions & 0 deletions docs/node/CATEGORIES/16-loan.md
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,7 @@ interface HighestBid {
owner: string
}
```

## listAuctionHistory

Returns information about auction history.
Expand All @@ -728,4 +729,42 @@ interface ListAuctionHistoryDetail {
auctionBid: string
auctionWon: string[]
}
```

## listVaultHistory

Returns the history of the specified vault.

```ts title="client.loan.listVaultHistory()"
interface loan {
listVaultHistory (vaultId: string, pagination?: ListVaultHistoryPagination): Promise<ListVaultHistory[]>
}

interface ListVaultHistory {
blockHeight: number
blockHash: string
blockTime: number
type: string
txid: string
address?: string,
amounts?: string[], // amount@symbol
loanScheme?: CreateLoanScheme
vaultSnapshot?: VaultHistorySnapshot
}

interface VaultHistorySnapshot {
state: 'inLiquidation' | 'active'
collateralAmounts: string[], // amount@symbol
collateralValue: number,
collateralRatio: number,
batches?: VaultLiquidationBatch[]
}

interface ListVaultHistoryPagination {
maxBlockHeight?: number
depth?: number
token: string
txType: string
limit?: number
}
```
Loading