Skip to content

Local

[Source]

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.

LocalSigner.fromEnv()

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.

Signature

LocalSigner.fromEnv(options?: LocalSignerFromEnvOptions): LocalSigner

Options

FieldTypeRequiredDescription
primarystringNoThe primary account's r-address. Defaults to the first seed in scan order.
envRecord<string, string | undefined>NoEnvironment source to scan — a map of variable names to values. Defaults to process.env.

LocalSigner.fromSeed()

Builds a single wallet from a seed string.

Signature

LocalSigner.fromSeed(seed: string): LocalSigner

Parameters

ParameterTypeRequiredDescription
seedstringYesThe wallet seed (the caller's responsibility to source).

LocalSigner.create()

Builds from pre-constructed xrpl Wallet objects.

Signature

LocalSigner.create(options: LocalSignerCreateOptions): LocalSigner

Options

FieldTypeRequiredDescription
walletsreadonly Wallet[]YesThe xrpl Wallet objects this signer holds (at least one), e.g. [Wallet.fromSeed(seed)].
primarystringNoThe primary account's r-address. Defaults to the first wallet.

Example

// One wallet per XRPL_*_SEED in the environment.
const local = LocalSigner.fromEnv()