Const
uri or rpc connection or config or terminal parameters to connect to monerod
Optional
username: stringusername to authenticate with monerod
Optional
password: stringpassword to authenticate with monerod
the daemon RPC client
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"
]});
uri or rpc connection or config or terminal parameters to connect to monero-wallet-rpc
Optional
username: stringusername to authenticate with monero-wallet-rpc
Optional
password: stringpassword to authenticate with monero-wallet-rpc
the wallet RPC client
Create a Monero wallet using client-side WebAssembly bindings to monero-project's wallet2 in C++.
Example:
const wallet = await moneroTs.createWalletFull({
path: "./test_wallets/wallet1", // leave blank for in-memory wallet
password: "supersecretpassword",
networkType: moneroTs.MoneroNetworkType.STAGENET,
seed: "coexist igloo pamphlet lagoon...",
restoreHeight: 1543218,
server: "http://localhost:38081"
});
const wallet = await moneroTs.createWalletFull({
path: "./test_wallets/wallet1", // leave blank for in-memory wallet
password: "supersecretpassword",
networkType: moneroTs.MoneroNetworkType.STAGENET,
seed: "coexist igloo pamphlet lagoon...",
restoreHeight: 1543218,
proxyToWorker: false, // override default
server: {
uri: "http://localhost:38081",
username: "daemon_user",
password: "daemon_password_123"
}
});
MoneroWalletConfig or equivalent config object
the created wallet
Create a wallet using WebAssembly bindings to monero-project.
Example:
const wallet = await moneroTs.createWalletKeys({
password: "abc123",
networkType: moneroTs.MoneroNetworkType.STAGENET,
seed: "coexist igloo pamphlet lagoon..."
});
MoneroWalletConfig or equivalent config object
the created wallet
Get the version of the monero-ts library.
the version of this monero-ts library
Open an existing Monero wallet using client-side WebAssembly bindings to monero-project's wallet2 in C++.
Example:
const wallet = await moneroTs.openWalletFull({
path: "./wallets/wallet1",
password: "supersecretpassword",
networkType: moneroTs.MoneroNetworkType.STAGENET,
server: { // daemon configuration
uri: "http://localhost:38081",
username: "superuser",
password: "abctesting123"
}
});
config to open a full wallet
the opened wallet
Generated using TypeDoc
Create a client connected to monerod.
Examples:
let daemon = await moneroTs.connectToDaemonRpc("http://localhost:38081");
let daemon = await moneroTs.connectToDaemonRpc({
uri: "http://localhost:38081",
username: "superuser",
password: "abctesting123"
});
// start monerod as an internal process
let daemon = await moneroTs.connectToDaemonRpc({
cmd: ["path/to/monerod", ...params...],
});