create static method

Future<ProtoTransport> create({
  1. required ProtoConnection protoConnection,
})

Implementation

static Future<ProtoTransport> create({
  required ProtoConnection protoConnection,
}) async {
  final instance = ProtoTransport._(protoConnection);

  final lib = createLib();
  instance.transport = await lib.newStaticMethodProtoTransportImpl(
    protoConnection: protoConnection.connection,
  );

  instance.networkId = await instance.getNetworkId();

  instance.connectionParamsHash =
      getHash('proto:${protoConnection.settings.endpoint}');

  return instance;
}