kettle-core
v1.0.0
Published
### Steps - create mongo database - provision cloud project - add vpc between cloud project and mongo
Downloads
1
Readme
Kettle Core
Model Definitions
Token
interface Token: {
tokenId: String,
address: Address,
schema?: ERC721 | ERC1155,
size?: Integer
}
Price
interface Price {
currency: {
address: Address,
symbol: USDC | WETH,
decimals: Integer
},
amount: {
raw: String,
usd: Float,
native: Float,
decimal: Float
}
}
Fee
interface Fee {
rate: String,
recipient: Address | "0x"
}
Lien
interface Lien {
id: String,
borrower: Address,
lender: Address,
size: Integer,
loanAmount: Price,
repayAmount: Price,
fees: Fee[],
duration: String,
rate: String,
startTime: String,
endTime: String,
isDefaulted: Boolean
}
Listing (Borrow Offer)
interface Listing {
hash: Bytes32,
borrower: Address,
loanAmount: Price,
netLoanAmount: Price,
repayAmount: Price,
rate: String,
duration: String,
expiration: String,
salt: String,
fees: Fee[],
created: Integer
}
Offer
interface Offer {
hash: Bytes32,
lender: Address,
loanAmount: Price,
netLoanAmount: Price,
repayAmount: Price,
rate: String,
duration: String,
expiration: String,
salt: String,
fees: Fee[],
created: Integer
}
API
All Listings
GET allListings
Response
{
token: Token,
listing: Listing
}