Class: Remote

Remote

The Remote class represents a the base class for all remote nodes, Peer, Orderer , and MemberServicespeer.

new Remote(url, opts)

Constructs an object with the endpoint configuration settings.
Parameters:
Name Type Description
url string The orderer URL with format of 'grpc(s)://host:port'.
opts Object An Object that may contain options to pass to grpcs calls
- pem {string} The certificate file, in PEM format, to use with the gRPC protocol (that is, with TransportCredentials). Required when using the grpcs protocol.
- clientKey {string} The private key file, in PEM format, to use with the gRPC protocol (that is, with TransportCredentials). Required when using the grpcs protocol with client certificates.
- clientCert {string} The public certificate file, in PEM format, to use with the gRPC protocol (that is, with TransportCredentials). Required when using the grpcs protocol with client certificates.
- ssl-target-name-override {string} Used in test environment only, when the server certificate's hostname (in the 'CN' field) does not match the actual host endpoint that the server process runs at, the application can work around the client TLS verify failure by setting this property to the value of the server certificate's hostname
- any other standard grpc call options will be passed to the grpc service calls directly grpc options must be an object with string keys and integer or string values

Methods


getCharacteristics()

Get this remote endpoints characteristics It's name, url, and connection options are the items that make this instance unique. These items may be useful when debugging issues or validating responses.

getClientCertHash()

Get the client certificate hash
Returns:
The hash of the client certificate
Type
Array.<byte>

getName()

Get the name. This is a client-side only identifier for this object.
Returns:
The name of the object
Type
string

getUrl()

Get the URL of this object.
Returns:
Get the URL associated with the object.
Type
string

isTLS()

Determine whether or not this remote endpoint uses TLS.
Returns:
True if this endpoint uses TLS, false otherwise.
Type
boolean

setName(name)

Set the name as a client-side only identifier of this object.
Parameters:
Name Type Description
name string

toString()

return a printable representation of this object