- Convert tests to typescript - Update type definitions causing errors in tests - `makeParser` to accept a `Buffer` in addition to `string` - `SerializedType` constructor allows not passing in a byte array - `Comparable` is now a generic type so that it allows `compareTo` methods to take more that the type itself. Example: `Uint64.compareTo` can accept `number` - Update tests to use jasmine compatible functions - Switching from `test` to `it`. - Updated test checking if coretypes all implement SerializedType - Import fixtures directly instead of using `loadFixture` utility - Remove importing of `buffer/` explicitly. It was throwing off type checking in tests. Buffer is going away in a future PR anyway. - Fixed `npm run clean` not clearing `.tsbuildinfo` files for keypairs - Remove unused account-tx-transactions.db. It was likely used in the past to test historical ledgers.
ripple-keypairs

An implementation of XRP Ledger keypairs & wallet generation using elliptic which supports rfc6979 and eddsa deterministic signatures.
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);
