This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity >=0.5.0 <0.7.0; | |
| // In remix you can import from github | |
| import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.2.0/contracts/GSN/GSNRecipient.sol"; | |
| // I think in other deployments you'll need to import this way | |
| // import "@openzeppelin/contracts-ethereum-package/contracts/GSN/GSNRecipient.sol"; | |
| contract CashPoints is GSNRecipient { | |
| uint public Count; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.5.11; | |
| /* | |
| * Note that Solidity can't return an array of strings :( | |
| * https://solidity.readthedocs.io/en/v0.4.21/frequently-asked-questions.html#is-it-possible-to-return-an-array-of-strings-string-from-a-solidity-function | |
| * So rather than allow arbitrary lengthed strings for DIDs and hashes we use a fixed size bytes32. This is the largest native bype size in solidity | |
| * so if we find that we need more, we will have to come up with another solution. | |
| * Another option if we wanted to support strings would be to use ABIEncoderV2, however if we can guaruntee fixed lengths it will be more performant | |
| */ | |
| contract CreditRegistry { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GET https://api.dev.kivaws.org/v3/partner/123/loans?status=inactive&limit=50 | |
| Authorization header: "xxx_partner_token_xxx" | |
| OR | |
| GET https://api.dev.kivaws.org/v3/partner/123/loans?query=123_MIS_loan_id | |
| Response: | |
| { | |
| "total_records":1, | |
| "data":{ | |
| "12345":{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| POST https://api.dev.kivaws.org/v3/partner/123/journals | |
| { | |
| "partner_token":"xxx", | |
| "journals": [ | |
| { | |
| "internal_loan_id": "loan_123", | |
| "internal_client_id": "client_123(optional)", | |
| "subject":"Journal subject 1", | |
| "body": "Journal body 1 with some interesting content", | |
| "image_url": "https://site.com/image1.jpg" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| POST https://api.dev.kivaws.org/v3/partner/123/loan_draft | |
| { | |
| "partner_token": "xxx", | |
| "description_language_id":1, | |
| "theme_type_id":"227", | |
| "activity_id":"56", | |
| "location":"Dahod: India", | |
| "rep_person_id":"1234", | |
| "internal_client_id":"group_client_123", | |
| "internal_loan_id":"group_loan_123", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| POST https://api.dev.kivaws.org/v3/partner/123/loan_draft | |
| { | |
| "partner_token": "xxxx", | |
| "description_language_id":1, | |
| "activity_id":"56", | |
| "theme_type_id":"227", | |
| "location":"Dahod: India", | |
| "rep_person_id":"1234", | |
| "client_waiver_signed":true, | |
| "loanuse":"Loan Use", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| POST https://api.dev.kivaws.org/v3/partner/123/repayments | |
| { | |
| "partner_token":"xxxx", | |
| "user_id":234, | |
| "repayments":[ | |
| { | |
| "loan_id":"1234", | |
| "client_id":"abc(optional)", | |
| "amount":33.33 | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "client_waiver_signed":true, | |
| "internal_client_id":"group-client-1", | |
| "internal_loan_id":"group-loan-1", | |
| "group_name":"group-name", | |
| "entreps":[ | |
| { | |
| "first_name":"borrower-given-1", | |
| "last_name":"borrower-family-1", | |
| "gender":"male", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "loan_theme_instance_id": 991, | |
| "pfp_min_lenders": 25, | |
| "pfp_expiration_days": 15 | |
| }, | |
| { | |
| "loan_theme_instance_id": 992, | |
| "pfp_min_lenders": 85, | |
| "pfp_expiration_days": 12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "theme_name":"General", | |
| "description_language":"English", | |
| "activity":"Rickshaw", | |
| "location":"Ali Pur Chatta: Pakistan", | |
| "loan_representative":"Jim Jones", | |
| "image_url":"dropbox.come/image/1234.jpg", | |
| "client_waiver_signed":true, | |
| "loanuse":"Some loan use", |
NewerOlder