... | ... | @@ -27,17 +27,17 @@ Below we have more detailed descriptions of a number of use cases and diagrams t |
|
|
|
|
|
> setContractAddress(**string** contractName, **address** address) : **void**
|
|
|
|
|
|
Set the *address* for the given *contractName*. This can only be called from the address that originally installed this contract (All contracts should be installed on startup of a primary node and are then immutable for the lifetime of that instance of Emerald)
|
|
|
Set the *address* for the given *contractName*. This can only be called from the address that originally installed this contract (All contracts should be installed on startup of a primary node and are then immutable for the lifetime of that instance of Emerald)
|
|
|
|
|
|
> getContractAddress(**string** contractName) : **string**
|
|
|
> getContractAddress(**string** contractName) : **string**
|
|
|
|
|
|
Get the *address* associated with the given *contractName*. This will return the stored contract address or 0x0, the zero address, if no contract exists for the given name.
|
|
|
Get the *address* associated with the given *contractName*. This will return the stored contract address or 0x0, the zero address, if no contract exists for the given name.
|
|
|
|
|
|
## PointToPointServiceRegistrar
|
|
|
|
|
|
> setEndpoints(**string[2]** bankIdentifierAndContractName, **string[]** endpoints) : **void**
|
|
|
|
|
|
Set the *endpoints* for the given *bankIdentifierAndContractName*. For example we might store the endpoints for the FXQuoteService for RBS:
|
|
|
Set the *endpoints* for the given *bankIdentifierAndContractName*. For example we might store the endpoints for the FXQuoteService for RBS:
|
|
|
|
|
|
```javascript
|
|
|
setEndpoints(['RBOS', 'FXQuoteService'], ['https://1.2.3.4/FXQuoteService', 'https://5.6.7.8/FXQuoteService'])
|
... | ... | @@ -45,9 +45,9 @@ setEndpoints(['RBOS', 'FXQuoteService'], ['https://1.2.3.4/FXQuoteService', 'htt |
|
|
|
|
|
The bank identifiers should be the 4 character BIC institution code (what is now known as the *Party Prefix* in the 2014 version of the spec). The service name is a well known service name as documented in this specification. Having multiple endpoints allows us to be resilient - I client can expect to connect to any of the endpoints listed and receive the same response back - if an endpoint is unavailable then they should try others in the list before waiting some period of time and trying again.
|
|
|
|
|
|
> getEndpoints(**string[2]** bankIdentifierAndContractName) : **string[]**
|
|
|
> getEndpoints(**string[2]** bankIdentifierAndContractName) : **string[]**
|
|
|
|
|
|
Get the *endpoints* associated with the given *bankIdentifierAndContractName*. This will return the stored endpoints as strings or an empty array if no endpoints are stored for the given bank identifier and contract name.
|
|
|
Get the *endpoints* associated with the given *bankIdentifierAndContractName*. This will return the stored endpoints as strings or an empty array if no endpoints are stored for the given bank identifier and contract name.
|
|
|
|
|
|
## MultiLegPaymentService
|
|
|
|
... | ... | |