-
Notifications
You must be signed in to change notification settings - Fork 37
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
base: main
Are you sure you want to change the base?
Changes from all commits
a66dd24
40b2133
9e7900a
3b16923
d151fbb
24a7e93
e6bd4b3
0500f4b
b520ba7
33518ef
e59789b
0981a63
a089beb
a53d9f8
efa469e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -702,6 +702,7 @@ interface HighestBid { | |
owner: string | ||
} | ||
``` | ||
|
||
## listAuctionHistory | ||
|
||
Returns information about auction history. | ||
|
@@ -728,4 +729,55 @@ 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 ListVaultHistoryPagination { | ||
maxBlockHeight?: number | ||
depth?: number | ||
token?: string | ||
txType?: string | ||
limit?: number | ||
} | ||
|
||
interface ListVaultHistory { | ||
blockHeight: number | ||
blockHash: string | ||
blockTime: number | ||
type: string | ||
txid: string | ||
address?: string, | ||
amounts?: string[], // amount@symbol | ||
loanScheme?: CreateLoanScheme | ||
vaultSnapshot?: VaultHistorySnapshot | ||
} | ||
|
||
interface CreateLoanScheme { | ||
minColRatio: number | ||
interestRate: BigNumber | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. C++ side return this as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
id: string | ||
} | ||
|
||
interface VaultHistorySnapshot { | ||
state: 'inLiquidation' | 'active' | ||
collateralAmounts: string[], // amount@symbol | ||
collateralValue: number, | ||
collateralRatio: number, | ||
batches?: VaultLiquidationBatch[] | ||
} | ||
|
||
interface VaultLiquidationBatch { | ||
index: number | ||
collaterals: string[] | ||
loan: string | ||
highestBid?: HighestBid | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C++ side return this as
ratio
. Need to tell them to useminColRatio
like how other RPC does