Skip to main content

Check Connection

Checks if there's an active connection between PlugA on ChainA and PlugB on ChainB, and returns the type of switchboard used.

On-chain

The connection can be verified on-chain by calling the getPlugConfig() method on Socket. More on this here.

Off-chain

GET https://prod.dlapi.socket.tech/v1/check-connection

Header: x-api-key : 2Va1n3HzAS5XfXB8ELhX1aATJwzA1A72sNnJE1a0

Query ParamDescription
slugAChain A slug
slugBChain B slug
plugAAddress of Plug on Chain A
plugBAddress of Plug on Chain B

Example Request

Verifying a connection between Plugs deployed on Goerli and Mumbai testnet

https://prod.dlapi.socket.tech/v1/check-connection?slugA=2999&slugB=10&plugA=0x7b9ed5C43E87DAFB03211651d4FA41fEa1Eb9b3D&plugB=0x1812ff6bd726934f18159164e2927B34949B16a8

Note : Add the x-api-key header mentioned above in the request for authentication.

Response Parameters

ParameterDescription
arePlugsConnectedBoolean value indicating if there's an active connection between Plugs
aToBIntegrationTypeReturns type of switchboard used for connection from PlugA to PlugB (FAST, SLOW, NATIVE)
bToAIntegrationTypeReturns type of switchboard used for connection from PlugB to PlugA (FAST, SLOW, NATIVE)