2.0.0 • Published 1 year ago

ripple-keypairs v2.0.0

Weekly downloads
15,381
License
ISC
Repository
github
Last release
1 year ago

ripple-keypairs NPM Build Status Codecov

An implementation of XRP Ledger keypairs & wallet generation using elliptic which supports rfc6979 and eddsa deterministic signatures.

NPM

API Methods

generateSeed({entropy?: Array<integer>, algorithm?: string}) -> string

Generate a seed that can be used to generate keypairs. Entropy can be provided as an array of bytes expressed as integers in the range 0-255. If provided, it must be 16 bytes long (additional bytes are ignored). If not provided, entropy will be automatically generated. The "algorithm" defaults to "ecdsa-secp256k1", but can also be set to "ed25519". The result is a seed encoded in base58, starting with "s".

deriveKeypair(seed: string) -> {privateKey: string, publicKey: string}

Derive a public and private key from a seed. The keys are represented as 33-byte hexadecimal strings.

sign(messageHex: string, privateKey: string) -> string

Sign an arbitrary hex-encoded message with a private key. Returns the signature as a hexadecimal string.

verify(messageHex: string, signature: string, publicKey: string) -> boolean

Verify a signature for a given hex-encoded message and public key. Returns true if the signature is valid, false otherwise.

deriveAddress(publicKey: string) -> string

Derive an XRP Ledger classic address from a public key.

deriveNodeAddress(publicKey: string) -> string

Derive a node address from a public key.

Generate a random XRP Ledger address

const seed = generateSeed();
const keypair = deriveKeypair(seed);
const address = deriveAddress(keypair.publicKey);
@tyz-wallet/tyz-wallet-core-cryptoalebusse@coinspace/cs-ripple-walletcrypto-wallet-core-vitonode-blockchain-sdk@infinitebrahmanuniverse/nolb-rip@tequ/xrpl@everything-registry/sub-chunk-2670test-evernode-js-clientwallet-common-dwanchain-cross-sdkwanchain-js-sdkx-tokenizevoluptasvoluptas@crossmarkio/xrpl-amm@crossmarkio/xrpl-sidechain@payburner/keyburner-core@payvo/sdk-xrpjachavaljichaolijiclibitgokeypair-generatorripple-lib-1sologenic-ripple-lib-1-10-0-patchedsologenic-nft-conversion-verifierutex@arkecosystem/platform-sdk-xrp@aqfr/aqfr-ripple-lib@ardenthq/sdk-xrp@adora-wallet/crypto-wallet-core@aloe2/sdk-coin-xrp@bitgo-beta/sdk-coin-xrp@bitrupee/crypto-wallet-core@bitgo/sdk-coin-xrp@blockcore/crypto-wallet-core@chainz/moca-lib@abcpros/crypto-wallet-corezc-ripple-libxpring-common-jsxrpl-accountlibxrpl-hooksxrpl-secret-numbersxrpl-sign-keypairsxrpl-snapxrpl-toolsxrp-providerxrp-replxrpl-validator-domainsxrpsignxrp-wallet-clixrplvipay-multichain-walletverify-xrpl-signature@ducatus/crypto-wallet-core@ducatus/ducatus-crypto-wallet-core-rev@ducatus/ducatuscore-crypto@gatehub/ripple-lib@futureverse/react@futureverse/signer@infinitywallet/core-sdk@lnssh/xrpl@ln1778/hwal@lnssh/hwal@ledhed2222/ripple-lib@nescampos/ilp-sdk@kava-labs/ilp-plugin-xrp-asym-client@kava-labs/ilp-plugin-xrp-paychan@kava-labs/switch-api@klyntar/valardohaeris@oigrwhsoi/ripple@ryan-bitgo/bitgo@quantnetwork/overledger-dlt-ripple@quantnetwork/overledger-dlt-xrp-ledger@quantnetwork/overledger-sdk@poro-wallet/core@o0o2022/crypto-wallet-core@o0o2022sg/crypto-wallet-core@peersyst/xrpl-snapmsg-controllermultichain-wallet-sdkmultichain-wallet-vipaymulticrypto-wallet-coremoneyd-uplink-xrpnarademopayid-signscript-ripple-librcp-offline-walletsavour-snowsavourlabs-wallet-sdksequisintnbellanichnbellanich-1pkp-xrplpefish-ripple-libripple-sign-keypairsripple-wallet-cliripplewarpwalletrmineripple-zxlibripple-lib-1.6.5
2.0.0

1 year ago

1.3.1

2 years ago

2.0.0-beta.1

2 years ago

2.0.0-beta.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.5

2 years ago

1.1.4

3 years ago

1.1.1

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.0.4-storm.1

4 years ago

1.0.4-storm.2

4 years ago

1.1.0

4 years ago

1.0.3

4 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.1.0-beta.0

5 years ago

1.0.0

5 years ago

1.0.0-beta.6

5 years ago

1.0.0-beta.5

5 years ago

1.0.0-beta.4

5 years ago

1.0.0-beta.3

5 years ago

1.0.0-beta.2

5 years ago

0.11.1

5 years ago

1.0.0-beta.1

5 years ago

1.0.0-beta.0

5 years ago

0.11.0

7 years ago

0.10.2

7 years ago

0.10.1

8 years ago

0.10.0

10 years ago

0.9.0

10 years ago

0.8.0

10 years ago

0.7.3

10 years ago

0.7.2

10 years ago

0.7.1

10 years ago

0.7.0

10 years ago

0.6.0

10 years ago

0.5.2

10 years ago

0.5.1

10 years ago

0.5.0

10 years ago

0.4.0

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago