# @coolwallet/xrp

> Coolwallet Ripple App

Latest version **2.0.3** (published 2026-05-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install @coolwallet/xrp
pnpm add @coolwallet/xrp
yarn add @coolwallet/xrp
bun add @coolwallet/xrp
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2026-05-21 |
| First published | 2020-06-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 198.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 37 |
| Author | coolwallet-team |
| Maintainers | coolwallet-team |
| Keywords | XRP, xrp, ripple, coolwallet, xrp, javascript, hardwarewallet, cryptocurrency, coolbitx, transaction |

## Links

- npm: https://www.npmjs.com/package/@coolwallet/xrp
- Repository: https://github.com/CoolBitX-Technology/coolwallet3-sdk
- Homepage: https://github.com/CoolBitX-Technology/coolwallet3-sdk#readme
- Issues: https://github.com/CoolBitX-Technology/coolwallet3-sdk/issues
- npm.io page: https://npm.io/package/@coolwallet/xrp

## Dependencies (6)

- [rlp](https://npm.io/package/rlp.md) ^3.0.0
- [base-x](https://npm.io/package/base-x.md) ^3.0.7
- [typescript](https://npm.io/package/typescript.md) ^3.8.3
- [@types/node](https://npm.io/package/@types/node.md) ^13.11.1
- [@coolwallet/core](https://npm.io/package/@coolwallet/core.md) ^2.0.0
- [ripple-binary-codec](https://npm.io/package/ripple-binary-codec.md) ^2.7.0

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 2.0.3 (latest) — 2026-05-21
- 2.0.4-beta.0 (beta) — 2026-06-10
- 2.0.2 — 2026-05-20
- 2.0.1-beta.1 — 2026-03-25
- 2.0.1-beta.0 — 2026-03-20
- 2.0.0 — 2025-05-05
- 2.0.0-beta.2 — 2025-03-13
- 2.0.0-beta.1 — 2025-02-14
- 1.1.3 — 2022-02-25
- 1.1.1 — 2022-02-24
- 1.0.1 — 2021-08-19
- 1.0.1-beta.0 — 2021-08-19
- 1.0.0 — 2021-04-30
- 0.1.0 — 2021-04-30
- 0.1.0-beta.12 — 2021-04-09
- … 12 more at https://npm.io/package/@coolwallet/xrp/versions

## README

# CoolWallet Ripple (XRP) SDK
[![Version](https://img.shields.io/npm/v/@coolwallet/xrp)](https://www.npmjs.com/package/@coolwallet/xrp)

Typescript library with support for the integration of Ripple for third party application, include the functionalities of generation of addresses and signed transactions.

## Install

```shell
npm i @coolwallet/xrp
```

## Usage

```javascript
import XRP from '@coolwallet/xrp'
const xrp = new XRP();

const address = await xrp.getAddress(transport, appPrivateKey, appId, 0);
// rEoA7FTruU4SMdG99yuuUbUPxp1bh9aZjR

const payment = {
  Sequence: 1566719,
  DestinationTag: 1882298635,
  LastLedgerSequence: 47914574,
  Amount: "100000", // in drops
  Fee: "1000",      // in drops
  SigningPubKey: "027f033c29de4bc02096492da93e00d55d2851f74dc0b5ab58c9b83b3e8067b4af",  // optional
  Account: "rEoA7FTruU4SMdG99yuuUbUPxp1bh9aZjR",  // optional
  Destination: "rp6ENYKqYfT5qJqQiN2Y9AnZmFEWv9hRpq"
}

const signTxData = {
    transport,
    appPrivateKey,
    appId,
    payment,
    addressIndex
}

const transaction = await xrp.signTransaction(signTxData)
```

You might already know the public key of the source account (by calling `.getPublicKey()` before ). if that's the case, put it in the Payment object as `SigningPubKey`. Otherwise we would need another bluetooth command to derive the key again.

## Methods

### getAddress

#### Description

Get address by address index.

The XRP address generated is compatible to BIP44 with **account** and **change** set to 0, which means calling `getAddress` with `addressIndex = i` will get the address of folllowing path:

```none
m/44'/144'/0'/0/{i}
```

In the design of current hardware, we only support path `m/44'/144'/0'/0/{i}` for speed optimization. This might change in the future and we will then open a more general interface to deal with custom path.

```javascript
async getAddress(
    transport: Transport, 
    appPrivateKey: string, 
    appId: string, 
    addressIndex: number
    ): Promise<string> 
```

#### Arguments

|      Arg      |                  Description                 |    Type   | Required |
|:-------------:|:--------------------------------------------:|:---------:|:--------:|
|   transport   | Object to communicate with CoolWallet device | Transport |   TRUE   |
| appPrivateKey |   Private key for the connected application  |   string  |   TRUE   |
|     appId     |       ID for the connected application       |   string  |   TRUE   |
|  addressIndex |  The from address index in BIP44 derivation  |   number  |   TRUE   |

### signTransaction

#### Description

Sign Ripple Transaction.

```javascript
async signTransaction(signTxData: signTxType):Promise<string>
```

#### signTxType Arguments

|      Arg      |                              Description                             |    Type   | Required |
|:-------------:|:--------------------------------------------------------------------:|:---------:|:--------:|
|   transport   |             Object to communicate with CoolWallet device             | Transport |   TRUE   |
| appPrivateKey |               Private key for the connected application              |   string  |   TRUE   |
|     appId     |                   ID for the connected application                   |   string  |   TRUE   |
|    payment    |          Essential information/property for XRP Transaction          |  Payment  |   TRUE   |
|  addressIndex |              The from address index in BIP44 derivation              |   number  |   TRUE   |
|   confirmCB   |      Callback of confirmation data to the connected application      |  Function |   FALSE  |
|  authorizedCB | Callback of authorized transaction data to the connected application |  Function |   FALSE  |

---
_Source: https://npm.io/package/@coolwallet/xrp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
