The Unlockd SDK is a tool that enables developers to integrate blockchain-based RWA-backed lending and borrowing functionalities into their applications. With the Unlockd SDK, you can easily interact with the Unlockd protocol, which allows users to collateralize their tokenized assets and obtain instant, open-ended loans.
Website • App • SDK Docs• Protocol Docs • Dev Docs • Risk Docs • Socials • Docs
Unlockd is a permissionless RWA liquidity protocol powered by advanced AI, enabling users to participate as depositors or borrowers. It provides a secure and cost-effective way to borrow against tokenized Real-World Assets and financial assets with instant loans and auto-compounding yield for lenders. Built on Ethereum and Polygon with plans for expansion to multiple Layer 2 networks, Unlockd offers a Peer-to-Pool model that ensures efficient and fair lending and borrowing.
The Unlockd SDK allows developers to integrate these RWA-backed borrowing functionalities into their applications. It is particularly useful for Unlockd partners with supported and whitelisted assets, enabling them to offer borrowing against assets or portfolios directly within their interfaces and provide financing options at the point of purchase.
- Create signatures for:
- Borrow
- Repay
- Bid
- Redeem
- Sell now
- Market calls
- Calculate:
- Minimum amount to repay a loan
- Liquidation price of a loan
- Health factor of a loan
- Available amount to action
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|---|---|---|---|---|---|
| Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
Using npm:
$ npm install @verislabs/unlockd-sdkUsing bower:
$ bower install @verislabs/unlockd-sdkUsing yarn:
$ yarn add @verislabs/unlockd-sdkUsing pnpm:
$ pnpm add @verislabs/unlockd-sdk
import { UnlockdApi} from "@verislabs/unlockd-sdk";
const api= new UnlockdApi()
const params = {
"nfts":
[
{
"collection": "0x1750d2e6f2fb7fdd6a751833f55007cf76fbb358",
"tokenId": "10"
}
],
"underlyingAsset": "0x7b79995e5f793a07bc00c21412e50ecae098e7f9"
}
const response = await api.prices(params.nfts, params.underlyingAsset)import { UnlockdApi} from "@verislabs/unlockd-sdk";
const api= new UnlockdApi()
const address='0x0000000000000000000000000000000000000000'
const message = await api.signatureMessage(address)
//Sign message from your wallet or with Pk
//...
const signedMessage='...'
const authToken = await api.validateMessage(signedMessage)//At least one of the props
import {ActionRequest, UnlockdApi} from "@verislabs/unlockd-sdk";
const api= new UnlockdApi()
const params: ActionRequest = {
loanId: '0x123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0',//Optional
nfts: [{collection: '0x1234567890abcdefABCDEF1234567890abcdefAB', tokenId: 'testTokenId'}]//Optional
}
const authToken = await api.borrowSignature(authToken, params)import {minimumToRepay} from "@verislabs/unlockd-sdk";
const params = {
initialLoans: [
{
valuation: 10000000n,
ltv: 5000n,
},
{
valuation: 10000000n,
ltv: 5000n,
},
],
indicesToDelete: [1],
totalDebt: 2n,
}
const result = minimumToRepay(params)import {liquidationPrice} from "@verislabs/unlockd-sdk";
const oneEth = BigInt(1e18)
const params = {
debt: (BigInt(50) * oneEth),
liquidationThreshold: BigInt(8500)
}
const result = liquidationPrice(params)import {healthFactor} from "@verislabs/unlockd-sdk";
const oneEth = BigInt(1e18)
const params = {
collateral: (BigInt(100) * oneEth),
debt: (BigInt(50) * oneEth),
liquidationThreshold: BigInt(8500)
}
const result = healthFactor(params)import {availableToBorrow} from "@verislabs/unlockd-sdk";
const nfts = [
{
valuation: (BigInt(100) * oneEth).toString(),
ltv: '5000'
},
{
valuation: (BigInt(50) * oneEth).toString(),
ltv: '3000'
}
]
const result = availableToBorrow(nfts)- RWA
- Real World Assets
- Tokenization
- NFT lending
- Liquidity pool
- Blockchain
- Decentralized Finance
- DeFi
- Crypto
- Permissionless
- Loans
- Click on releases
- Write the changes
- Create new Tag
- Publish
- Typescript
- Love
We use SemVer for versioning. For the versions available, see the tags on this repository.
See also the list of contributors who participated in this project.





