Skip to main content

Joining USDF Consortium

You will use Governance API endpoints to the DCC Middleware to permission your account to interact with the smart contract.

Joining Sequence

1. Authz Request

Because you are working with restricted marker type coins, you must authorize the smart contract to be able to pull usdf.c before the various USDF functions work.

Grant authz by using the POST /api/v1/grants endpoint.

curl -X POST "http://localhost:8080/digital-currency-consortium/api/v1/grants" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-d "{ \"coins\": [ { \"denom\": \"usdf.local\", \"amount\": 50000000 } ], \"expiration\": \"2032-01-01T12:00:00.000Z\"}"

The human-readable payload is:

{
"coins": [
{
"denom": "usdf.local",
"amount": 50000000
}
],
"expiration": "2032-01-01T12:00:00.000Z"
}
Third Party Setup Note

Ensure the denom specified is the USDF coin denomination in the environment you are running against.

2. Bind KYC Attribute

There is currently no endpoint to bind a name to your key pair. This name is owned by your key pair for other banks to identify the Provenance Blockchain accounts associated with your AML/KYC process.

You can do so manually using the CLI on behalf of bank3.

TBD add an endpoint to support binding name
provenanced tx name bind \
"bank3" \
$(provenanced keys show -a bank3 --home build/node0 --keyring-backend test --testnet) \
"kyc.pb" \
--from bank3 \
--keyring-backend test \
--home build/node0 \
--chain-id chain-local \
--gas auto --gas-prices 1905nhash --gas-adjustment 2 \
--broadcast-mode block \
--yes \
--testnet -o json | jq

3. Join Request

The USDF smart contract administrator will need to add your DCC middleware key pair and KYC attribute as a new Consortium member.

You can do so manually using the CLI on behalf of the node0 admin.

provenanced tx wasm execute \
tp14hj2tavq8fpesdwxxcu44rty3hh90vhuz3ljwv \
'{"join":{"id":"tp1zl388azlallp5rygath0kmpz6w2agpampukfc3","name":"Bank 3","kyc_attrs":["bank3.kyc.pb"]}}' \
--from node0 \
--keyring-backend test \
--home build/node0 \
--chain-id chain-local \
--gas auto --gas-prices 1905nhash --gas-adjustment 2 \
--broadcast-mode block \
--yes \
--testnet -o json | jq

Now you are setup to interact with the USDF smart contract instance.