Function connectToWalletRpc

  • Create a client connected to monero-wallet-rpc.

    Examples:

    let walletRpc = await moneroTs.connectToWalletRpc({
       uri: "http://localhost:38081",
       username: "superuser",
       password: "abctesting123",
       rejectUnauthorized: false // e.g. local development
    });


    // connect to monero-wallet-rpc running as internal process
    let walletRpc = await moneroTs.connectToWalletRpc({cmd: [
       "/path/to/monero-wallet-rpc",
       "--stagenet",
       "--daemon-address", "http://localhost:38081",
       "--daemon-login", "superuser:abctesting123",
       "--rpc-bind-port", "38085",
       "--rpc-login", "rpc_user:abc123",
       "--wallet-dir", "/path/to/wallets", // defaults to monero-wallet-rpc directory
       "--rpc-access-control-origins", "http://localhost:8080"
     ]});

    Parameters

    • uriOrConfig: string | string[] | Partial<MoneroRpcConnection> | Partial<MoneroWalletConfig>

      uri or rpc connection or config or terminal parameters to connect to monero-wallet-rpc

    • Optional username: string

      username to authenticate with monero-wallet-rpc

    • Optional password: string

      password to authenticate with monero-wallet-rpc

    Returns Promise<MoneroWalletRpc>

    the wallet RPC client

Generated using TypeDoc