A local connector holds one or more XRPL accounts in-process and signs operations locally. This connector is intended for development and testing purposes. Since this method doesn't require external authentication, it is constructed synchronously unlike other connectors.
Builds one wallet per XRPL_*_SEED environment variable (matching XRPL_<NAME>_SEED and a plain XRPL_SEED). The primary defaults to the first seed found.
LocalSigner.fromEnv(options?: LocalSignerFromEnvOptions): LocalSigner| Field | Type | Required | Description |
|---|---|---|---|
primary | string | No | The primary account's r-address. Defaults to the first seed in scan order. |
env | Record<string, string | undefined> | No | Environment source to scan — a map of variable names to values. Defaults to process.env. |
Builds a single wallet from a seed string.
LocalSigner.fromSeed(seed: string): LocalSigner| Parameter | Type | Required | Description |
|---|---|---|---|
seed | string | Yes | The wallet seed (the caller's responsibility to source). |
Builds from pre-constructed xrpl Wallet objects.
LocalSigner.create(options: LocalSignerCreateOptions): LocalSigner| Field | Type | Required | Description |
|---|---|---|---|
wallets | readonly Wallet[] | Yes | The xrpl Wallet objects this signer holds (at least one), e.g. [Wallet.fromSeed(seed)]. |
primary | string | No | The primary account's r-address. Defaults to the first wallet. |
// One wallet per XRPL_*_SEED in the environment.
const local = LocalSigner.fromEnv()