Skip to main content


The fexr.invalidate challenge is passed to the server/node to disconnect from the node to which we are connected. The node/server responds with challenge response. The challenge response is received at the client which indicates whether the disconnection is success or not.


The input parameters for InValidatePermission is the IP,DID and a code. When this challenge is given to the server which is the node to which we are already connected, we are trying to disconnect it.


type: string | required

proxyIP or the public IP address of the node or server is the mandatory input parameter for InValidatePermission. It is using this public IP address the connection between the node and the wallet is established.


type: string | optional

DID or Decentralized Identity is the unique identity of each node. This value is an optional parameter because for a new node in the network the DID will only be created after the first connection is established.


type: int | required

Code is just an integer code number which is used as a identification code.


When the challenge is received at the server/node side, the server/node responds with a challenge response,


type: bool

This peer to peer connection status is a boolean value which indicates whether the connection is existing or not.


type: int

This response code is an integer value which indicates the status of the connection.

Sample Code

  PassportService().invalidatePermission("IP Address",
"DID", 404)
.then((p2pConnectionStatus value) => setState(() {
_CONNECTED = value.connected;


Future<p2pConnectionStatus> invalidatePermission(
String proxyIP, String dID, int code) async {
p2pConnectionStatus response;
final channel = ClientChannel(
port: Const.PORT,
options: ChannelOptions(
credentials: ChannelCredentials.insecure(),
CodecRegistry(codecs: const [GzipCodec(), IdentityCodec()]),

stub = POPServiceClient(channel,
options: CallOptions(timeout: Duration(seconds: 10)));

try {
response = await stub
.invalidatePermission(web3WalletPermission(dID: dID, code: code));

// result = response.toString();
} catch (e) {
return p2pConnectionStatus(
connected: false, code: 404, message: e.toString());
return response;
// await channel.shutdown();