Function substrateSocketConnect
- substrateSocketConnect(state: {
apiState: undefined | null | string;
jsonrpc: {
[x: string]: Record<string, DefinitionRpcExt>;
};
socket: string;
}, callbacks?: SubstrateSocketConnectionCallbacksType): undefined | ApiPromise
-
Parameters
-
state: {
apiState: undefined | null | string;
jsonrpc: {
[x: string]: Record<string, DefinitionRpcExt>;
};
socket: string;
}
-
apiState: undefined | null | string
-
jsonrpc: {
[x: string]: Record<string, DefinitionRpcExt>;
}
-
[x: string]: Record<string, DefinitionRpcExt>
-
socket: string
-
Returns undefined | ApiPromise
Connects to a Substrate node using WebSockets API by creating a new WsProvider instance with the given socket address.
Returns