• Creates a Multichain API client with the specified transport

    Type Parameters

    • T extends RpcApi = DefaultRpcApi

    Parameters

    • options: {
          transport: Transport;
      }

      Configuration options for the client

      • transport: Transport

        The transport layer to use for communication with the wallet

    Returns MultichainApiClient<T>

    A promise that resolves to a MultichainApiClient instance

    const client = getMultichainClient({
    transport: getDefaultTransport()
    });

    // Create a session with optional scopes
    const session = await client.createSession({
    optionalScopes: { 'eip155:1': { methods: ['eth_sendTransaction'] } }
    });

    // Invoke a method
    const result = await client.invokeMethod({
    scope: 'eip155:1',
    request: {
    method: 'eth_sendTransaction',
    params: { to: '0x1234...', value: '0x0' }
    }
    });