Step 2 - Discovery Layer

VASPs on the network can register themselves for discovery by other VASPs. This discovery layer enables VASPs to lookup VASPs details for off chain data sharing such as domain names and IPv4 addresses. The full list of recommended information to be stored in the discovery layer has been developed by the Governance Team.

Recommendations include:

KEYVALUE
ENTITYACME INC.
DOMAINacme.com
API URLacme.com/fatf-api
COMPLIANCE CONTACTcompliance@acme.com
TECHNOLOGY CONTACTtechnology@acme.com
SUPPORT CONTACTsupport@acme.com
JURISDICTIONSingapore
REGULATEDYES
REGULATION BODYhttps://www.mas.gov.sg/
PUBLIC REGISTRATIONN/A
VA/VAYES
VA/FIATNO
FATF POLICYacme.com/fatf
EXCHANGE/OTC/CUSTODIANEXCHANGE
INCORPORATION DATE01-01-2019

Discovery Layer

Let's begin with registering a TA account with the Discover Layer.

Step 1: Register with the Discovery Layer

// node -e 'require("./vs-sdk").trustAnchorSetUniqueAddress(account)'
module.exports.trustAnchorSetUniqueAddress = function (account) {
trustAnchorSetUniqueAddress(account);
};

The above function call of trustAnchorSetUniqueAddress executes the following code:

function trustAnchorSetUniqueAddress(account) {
(async () => {
var tam = await TrustAnchorManager.deployed();
var taed_unique = await TrustAnchorExtraData_Unique.deployed();
result = await tam.setUniqueTrustAnchorExtraDataAddress.call(taed_unique.address, {from: account})
console.log('setUniqueTrustAnchorExtraDataAddress result');
console.log(result);
hash = await tam.setUniqueTrustAnchorExtraDataAddress(taed_unique.address, {from: account})
console.log('setUniqueTrustAnchorExtraDataAddress hash');
console.log(hash);
})();
}

Step 2: Set the key value pair for your TA Account

For example to set the ENTITY name as ACME Inc. use the following:

// node -e 'require("./vs-sdk").trustAnchorSetKeyValuePair(account, "ENTITY", "ACME Inc.")'
module.exports.trustAnchorSetKeyValuePair = function (account, key_name, key_value) {
trustAnchorSetKeyValuePair(account, key_name, key_value);
};

The above function call of trustAnchorSetKeyValuePair executes the following code:

function trustAnchorSetKeyValuePair(account, key_name, key_value) {
(async () => {
taed_unique = await TrustAnchorExtraData_Unique.deployed();
result = await taed_unique.setTrustAnchorKeyValuePair.call(key_name, key_value, {from: account})
console.log('setTrustAnchorKeyValuePair result');
console.log(result);
hash = await taed_unique.setTrustAnchorKeyValuePair(key_name, key_value, {from: account})
console.log('setTrustAnchorKeyValuePair hash');
console.log(hash);
})();
}

Repeat Step 2 for each recommended key value pairs as noted above.

Step 3: Set the endpoint and IP address for your TA account

// node -e 'require("./vs-sdk").trustAnchorSetEndpoint(account, endpoint_name, ip_address)'
module.exports.trustAnchorSetEndpoint = function (account, endpoint_name, ip_address) {
trustAnchorSetEndpoint(account, endpoint_name, ip_address);
};

Here is the trustAnchorSetEndpoint function:

function trustAnchorSetEndpoint(account, endpoint_name, ip_address) {
(async () => {
ip_address = ip_address.split('.');
taed_generic = await TrustAnchorExtraData_Generic.deployed();
result = await taed_generic.setTrustAnchorDataRetrievalParameters.call(endpoint_name, ip_address, {from: account})
console.log('setTrustAnchorDataRetrievalParameters result');
console.log(result);
hash = await taed_generic.setTrustAnchorDataRetrievalParameters(endpoint_name, ip_address, {from: account})
console.log('setTrustAnchorDataRetrievalParameters hash');
console.log(hash);
})();
}