Using the Wholesale Central Bank Digital Currency Application Wrapper APIs

Oracle Blockchain Platform Enterprise Edition includes a wrapper API package that extends the REST API to support operations specific to the confidential mode version of the wholesale CBDC scenario.

See: Wholesale Central Bank Digital Currency Application

Authentication

Secured endpoints require a bearer token in the authorization header:
Authorization: Bearer <access_token>
The proxy validates the token in accordance with the deployment configuration (for example, following command to generate a bearer token by using the access token endpoint that is available in the Blockchain Platform Manager.
curl -sS -X POST \
  "<Access Token Endpoint – fetched from Blockchain Platform Manager>" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=password" \
  -d "client_id=<CLIENT_ID>" \
  -d "client_secret=<CLIENT_SECRET>" \
  -d "username=<USERNAME>" \
  -d "password=<PASSWORD>"
The following text shows an example response. You then use the value of access_token as the bearer token for subsequent calls.
{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9....",
  "expires_in": 300,
  "token_type": "Bearer"
    ...
}

Authorization

WCBDC uses role-based access control. See:

Table - Roles Required for each Wrapper API

Path Method Required Role Description
/v1/register POST OBP_INSTANCE_ADMIN Registering contract specification with endpoint details to the wrapper API service
/v1/register GET

OBP_INSTANCE_API_CLIENT

or

OBP_INSTANCE_ADMIN

Fetch contract specification with endpoints
/v1/register PATCH OBP_INSTANCE_ADMIN Update contract specification with endpoints
/v1/uwaas/wallets/provision POST

OBP_WALLET_SUPER_ADMIN

or

OBP_WALLET_ORG_ADMIN

API to register user with UWaaS and provision a new wallet to the user
/v1/uwaas/wallets GET

OBP_WALLET_SUPER_ADMIN

or

OBP_WALLET_ORG_ADMIN

or

OBP_WALLET_ORG_USER

Fetch wallets
/v1/uwaas/orgs POST

OBP_WALLET_SUPER_ADMIN

or

OBP_WALLET_ORG_ADMIN

Create new organization in UWaaS
/v1/uwaas/orgs GET

OBP_WALLET_SUPER_ADMIN

or

OBP_WALLET_ORG_ADMIN

Fetch organization from UWaaS
/v1/uwaas/orgs PUT

OBP_WALLET_SUPER_ADMIN

or

OBP_WALLET_ORG_ADMIN

Update an organization in UWaaS
v1/uwaas/orgs/{orgId}/organization-networks POST

OBP_WALLET_SUPER_ADMIN

or

OBP_WALLET_ORG_ADMIN

Map organization with an instance in UWaaS
/v1/{contractAddress}/* POST OBP_INSTANCE_API_CLIENT Call contract method as a write operation
/v1/{contractAddress}/* GET OBP_INSTANCE_API_CLIENT Call contract method as a read operation
/v1/{contractAddress}/ords/* GET NA  

Quick Start

Execute your first cURL call and validate your configuration by using the following example which retrieves readiness of the application.


curl -X GET \
  "<Wrapper_API_URL>/V1/ready" \
  -H "Accept: application/json"