createInstance static method

Future<Web3Wallet> createInstance({
  1. required String projectId,
  2. String relayUrl = WalletConnectConstants.DEFAULT_RELAY_URL,
  3. String pushUrl = WalletConnectConstants.DEFAULT_PUSH_URL,
  4. required PairingMetadata metadata,
  5. bool memoryStore = false,
  6. LogLevel logLevel = LogLevel.nothing,
  7. IHttpClient httpClient = const HttpWrapper(),
})

Implementation

static Future<Web3Wallet> createInstance({
  required String projectId,
  String relayUrl = WalletConnectConstants.DEFAULT_RELAY_URL,
  String pushUrl = WalletConnectConstants.DEFAULT_PUSH_URL,
  required PairingMetadata metadata,
  bool memoryStore = false,
  LogLevel logLevel = LogLevel.nothing,
  IHttpClient httpClient = const HttpWrapper(),
}) async {
  final client = Web3Wallet(
    core: Core(
      projectId: projectId,
      relayUrl: relayUrl,
      pushUrl: pushUrl,
      memoryStore: memoryStore,
      logLevel: logLevel,
      httpClient: httpClient,
    ),
    metadata: metadata,
  );
  await client.init();

  return client;
}