Reference
Data structures
Structure | Attribute(s) | Description |
Project book | key | Unique identifier |
Project book | status | DRAFT | ACTIVATED | DEACTIVATED | CLOSED |
Project book | organizationId
userId |
Information about who created the project |
Project book | name
description |
Descriptive attributes of the project |
Project book | isPublic | Whether the project is publicly discoverable or not |
Project book | profileUrl
bannerUrl npub |
Publishing attributes of the project |
Project book | startDate | Initial date of lending operations |
Project book | endDate | No new loans are accepted after this date |
Project book | amount
currency |
Total target amount and currency of the loans from the project |
Project book | eligibilityCriteria | List of verifiable credentials and conditions required for loan approval |
Project book | loanType
loanMinDuration loanMaxDuration loanMinAmount loanMaxAmount |
Restrictive parameters for the loans from the project |
Project book | isInviteOnly | Whether the project requires an invitation to become an investor |
Project book > funding [ ] | type | BANK | ONCHAIN |
Project book > funding [ ] | status | ACTIVE | INACTIVE |
Project book > funding [ ] | networkName
tokenName fundingAddress repaymentAddress |
Details of the payment rail and currency |
Project book > funding [ ] | terms
interestRate leverageFactor |
Descriptive attributes of the funding source |
Project book > funding [ ] | fundingMinAmount
fundingMaxAmount |
Restrictive parameters for the project investments |
Funding book | projectKey | Unique identifier of the project |
Funding book | fundingType
fundingNetwork fundingToken |
Details of the payment rail and currency |
Funding book | paymentType | INCOMING | OUTGOING |
Funding book | amount | Amount of the payment |
Funding book | fundingAddress | Project wallet address that received the investment (for incoming events) |
Funding book | repaymentAddress | Project wallet address that initiated the repayment (for outgoing events) |
Funding book | investorAddress | Wallet address of the investor |
Funding book | proof | Proof of the payment (trx id, invoice hash, etc.) |
Loan book | key | Unique identifier of the loan |
Loan book | projectKey | Unique identifier of the project |
Loan book | organizationId | Unique identifier of the originator |
Loan book | userDid | DID of the borrower |
Loan book | verifierDid | DID of the credential verifier service |
Loan book | status | DRAFT | APPROVED | DISBURSED | REPAID | DEFAULTED |
Loan book | type | Type of the loan product |
Loan book | startDate
endDate duration |
Loan duration parameters |
Loan book | interestRate
disbursementFee cashBackRate gracePeriod |
Loan financial parameters |
Loan book | currency | Currency of the loan |
Loan book | contractAmount | Amount to be disbursed to the borrower |
Loan book | interestAmount | Total interest amount |
Loan book | commitmentAmount | Total amount to be repaid (contractAmount + interestAmount) |
Loan book | repaidAmount | Total repaid amount |
Services
Service | Action(s) | Description |
Identity (SSCR) | findByDid | Get mapping between user id and DID |
Identity (SSCR) | createWallet | Create a new SSCR with DID |
Identity (SSCR) | getVC | Claim a new verifiable credential |
Identity (SSCR) | createVCPresentation | Create a presentation of a verifiable credential |
Credential issuing | issueVC | Issue a verifiable credential |
Credential verification | validateVC | Validate a verifiable credential |
Organization | findById
findByUser |
Get organizations by different filters |
Organization | createOrganization | Create a new organization |
Organization | addMember | Add user to an organization |
User | findById
findByOrganization |
Get users by different filters |
User | addUser
registerBorrower registerOriginator registerInvestor |
Add a new user |
User | updateUser | Update details of a given user |
User | getOTP
validateOTP setPIN validatePIN loginByEmail loginBySocial |
Actions required for the different types of user authentication |
Project | findByKey
findByOrganization findByAddress findPublic |
Get projects by different filters |
Project | createProject | Create a new project |
Project | updateProject
modifyProjectParams addProjectFunding |
Update different project attributes |
Project | activateProject
deactivateProject |
Enable or pause the lending activities within a project |
Loan | findByKey
findByProject findByOrganization findByUser |
Get loans by different filters |
Loan | applyForLoan | Request loan approval |
Loan | signLoan | Sign loan application |
Loan | updateLoan | Update loan details upon loan disbursement or repayment |
Project investor | findByProject
findByInvestor |
Get project |
Project investor | requestInvitation
acceptInvitation rejectInvitation |
Actions executed by the investor during the project investment setup |
Project investor | inviteInvestor
approveInvestor rejectInvestor |
Actions executed by the originator during the project investment setup |
Funding | findByKey
findByProject |
Get funding events by different filters |
Funding | fund | Create a new funding event |
Funding | refund
revert |
Create a new repayment event |
Funding | detect | Process detected payment and call a method for the new event |
Payment | findByLoan
findByAddress |
Get loan payments by different filters |
Payment | addDisbursement
confirmDisbursement addRepayment confirmRepayment |
Create and confirm payment events |
Network
(Bitcoin, Lightning, Rootstock) |
createWallet | Create a new private-public key pair |
Network | createListener | Create a new on-chain listener for a given network and address |
Network | getPayments | Get all on-chain payments detected by a given listener |
Nostr | createProfile | Create Nostr profile |
Nostr | createPost
createDM |
Post different kinds of messages |
Nostr | getFeed
getZapRequests getZaps |
Get a list of different events associated with a given profile |