Governance API
The Governance API provides queries to retrieve membership details. It also permissions your key pair for interacting with USDF and the smart contract.
Get Members
GET /api/v1/members
Get the member details of the USDF Consortium.
Request
Ensure a header value of Accept: application/json
is set.
Response
Returns an array of Member API response objects.
Sample Response
[
{
"id": "tp1fcfsfs847rneyaq93hz73m0wvudhktu9njtkfa",
"name": "Bank 1",
"joined": "2021-01-02T00:00:00.0000000",
"kycAttributes": ["bank1.kyc.pb"]
},
{
"id": "tp145r6nt64rw2rr58r80chp70ejdyqenszpg4d47",
"name": "Bank 2",
"joined": "2021-01-02T00:00:00.0000000",
"kycAttributes": ["bank2.kyc.pb"]
}
]
Member
Attribute | Type | Requirement | Notes |
---|---|---|---|
id | string | Required | A member bank address and identifier |
name | string | Required | A member bank name |
joined | string | Required | Timestamp member bank joined consortium |
kycAttributes | string | Required | AML/KYC attributes that belong to the member bank |
Error Codes
500 - Internal Server Error
Some server error occurred.
Authorize Restricted Transfers
POST /api/v1/grants
Since the smart contract is working with a restricted marker type
coin, an explicit authorization has to be made between the DCC middleware instance and the smart contract to permission it to
transfer
coin between the DCC middleware key pair and the smart contract, referred to as authz grants
.
Expect to specify usdf.c
coin. You can also authorize additional coins but that is not required.
Request
Sample Request
{
"coins": [
{
"denom": "usdf.c",
"amount": 50000000
}
],
"expiration": "2032-01-01T12:00:00.000Z"
}
Parameters
Attribute | Type | Requirement | Notes |
---|---|---|---|
coins | array of Coin | Required | The coin denominations and amount to be authorized |
expiration | string/timestamp | Optional | THe duration for which this authorization is valid |
Coin
Attribute | Type | Requirement | Notes |
---|---|---|---|
denom | string | Required | The coin denom to associate with the grant authz |
amount | number | Required | The amount of coin to associate with the grant authz |
Since usage of this transfer authorization is reduced by usage over time, refreshing this authorization from time-to-time is needed.
TBD mechanism to determine value of current grant authz
coins and amounts remaining.
Response
Returns a string value of "Granted Authz Set".
Error Codes
400 - Bad Request
The body in the request is not valid.
500 - Internal Server Error
Some server error occurred.