Skip to content

Commit 4b6f8ee

Browse files
authored
docs: standardize README format across packages (#1518)
- Update package headers to use consistent centered layout with NPM badges - Standardize installation instructions to include both yarn and npm commands - Fix typo 'Enviroment' 'Environment' in xchain-avax - Add missing modules, features, and documentation sections - Improve package descriptions and add peer dependencies - Ensure consistent code block syntax highlighting (\\\sh) Updated packages: - xchain-crypto: Complete header and structure overhaul - xchain-wallet: Added comprehensive documentation sections - xchain-client: Enhanced with proper modules and features - xchain-avax: Fixed typo and installation format - xchain-thorchain: Standardized installation commands Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 2dccd18 commit 4b6f8ee

File tree

5 files changed

+143
-31
lines changed

5 files changed

+143
-31
lines changed

packages/xchain-avax/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@
66

77
## Installation
88

9-
```
9+
```sh
1010
yarn add @xchainjs/xchain-avax
1111
```
1212

13-
Following peer dependencies have to be installed into your project. These are not included in `@xchainjs/xchain-avax`.
13+
or
1414

15+
```sh
16+
npm install @xchainjs/xchain-avax
1517
```
18+
19+
Following peer dependencies have to be installed into your project. These are not included in `@xchainjs/xchain-avax`.
20+
21+
```sh
1622
yarn add @xchainjs/xchain-evm @xchainjs/xchain-client @xchainjs/xchain-crypto @xchainjs/xchain-util axios ethers
1723
```
1824

@@ -39,7 +45,7 @@ Etherscan API rate limits: https://snowtrace.io/apis
3945

4046
- This package uses `etherjs` library, by default it uses several providers. (`https://docs.ethers.io/v5/api-keys/`)
4147

42-
### Enviroment variables
48+
### Environment Variables
4349

4450

4551
```sh

packages/xchain-client/README.md

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,57 @@
1-
# XChainJS Wallet Client Interface
1+
<div align="center">
2+
<h1 align="center">XChain Client</h1>
23

3-
A specification for a generalised interface for crypto wallets clients, to be used by XChainJS implementations. The client should not have any functionality to generate a key, instead, the `xchain-crypto` library should be used to ensure cross-chain compatible keystores are handled. The client is only ever passed a master BIP39 phrase, from which a temporary key and address is decoded.
4+
<p align="center">
5+
<a href='https://www.npmjs.com/package/@xchainjs/xchain-client' target='_blank'>
6+
<img alt="NPM Version" src="https://img.shields.io/npm/v/%40xchainjs%2Fxchain-client" />
7+
</a>
8+
<a href='https://www.npmjs.com/package/@xchainjs/xchain-client' target='_blank'>
9+
<img alt="NPM Downloads" src="https://img.shields.io/npm/d18m/%40xchainjs%2Fxchain-client" />
10+
</a>
11+
</p>
12+
</div>
13+
14+
<br />
15+
16+
Base client interface and abstract implementation for XChainJS blockchain clients. Provides a standardized interface for wallet operations across different blockchain networks.
17+
18+
## Modules
19+
20+
- `BaseXChainClient` - Abstract base class for all blockchain clients
21+
- `types` - Core type definitions and interfaces
22+
- `fees` - Fee calculation utilities
23+
- `protocols` - Supported blockchain protocol definitions
24+
25+
## Installation
26+
27+
```sh
28+
yarn add @xchainjs/xchain-client
29+
```
30+
31+
or
32+
33+
```sh
34+
npm install @xchainjs/xchain-client
35+
```
36+
37+
Following peer dependencies have to be installed into your project. These are not included in `@xchainjs/xchain-client`.
38+
39+
```sh
40+
yarn add @xchainjs/xchain-crypto @xchainjs/xchain-util axios
41+
```
442

543
## Documentation
644

745
### [`xchain client`](http://docs.xchainjs.org/xchain-client/)
46+
847
[`Overview of xchain-client`](http://docs.xchainjs.org/xchain-client/overview.html)\
948
[`Interface of xchain-client`](http://docs.xchainjs.org/xchain-client/interface.html)
1049

50+
## Features
51+
52+
- **Standardized Interface**: Consistent API across all blockchain implementations
53+
- **Key Management**: Secure BIP39 phrase handling without key generation
54+
- **Network Support**: Mainnet, Testnet, and Stagenet configurations
55+
- **Fee Management**: Flexible fee calculation and bounds
56+
- **Abstract Implementation**: Base class for easy client extension
57+

packages/xchain-crypto/README.md

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,50 @@
1-
# XCHAIN-CRYPTO
1+
<div align="center">
2+
<h1 align="center">XChain Crypto</h1>
23

3-
The XCHAIN CRYPTO package is a crypto package used by all `XCHAIN` clients.
4+
<p align="center">
5+
<a href='https://www.npmjs.com/package/@xchainjs/xchain-crypto' target='_blank'>
6+
<img alt="NPM Version" src="https://img.shields.io/npm/v/%40xchainjs%2Fxchain-crypto" />
7+
</a>
8+
<a href='https://www.npmjs.com/package/@xchainjs/xchain-crypto' target='_blank'>
9+
<img alt="NPM Downloads" src="https://img.shields.io/npm/d18m/%40xchainjs%2Fxchain-crypto" />
10+
</a>
11+
</p>
12+
</div>
413

5-
XCHAIN-CRYPTO encrypts a master phrase to a keystore. This keystore can then be exported to other XCHAIN wallets or stored securely.
14+
<br />
615

7-
Users can export their phrase and import them into other wallets since it is a BIP39 compatible phrase.
16+
The XChain Crypto package provides cryptographic utilities used by all XChain clients. It encrypts master phrases to keystores and supports BIP39 compatible phrase import/export across wallets.
817

9-
## Installation
18+
## Modules
19+
20+
- `crypto` - Core cryptographic functions for keystore encryption/decryption
21+
- `types` - TypeScript type definitions for keystores and crypto operations
1022

11-
- Install `@xchainjs/xchain-crypto` from `npm`
23+
## Installation
1224

13-
```bash
25+
```sh
1426
yarn add @xchainjs/xchain-crypto
1527
```
1628

29+
or
30+
31+
```sh
32+
npm install @xchainjs/xchain-crypto
33+
```
34+
1735
## Documentation
1836

1937
### [`xchain crypto`](http://docs.xchainjs.org/xchain-crypto/)
2038
[`How xchain-crypto works`](http://docs.xchainjs.org/xchain-crypto/how-it-works.html)\
2139
[`How to use xchain-crypto`](http://docs.xchainjs.org/xchain-crypto/how-to-use.html)
2240

2341

24-
## Build
25-
26-
```bash
27-
yarn build
28-
```
42+
## Features
2943

30-
## Tests
31-
32-
```bash
33-
yarn test
34-
```
44+
- **BIP39 Compatible**: Full support for BIP39 mnemonic phrases
45+
- **Secure Encryption**: Uses AES-128-CTR with PBKDF2 (262,144 iterations)
46+
- **Cross-Chain**: Works with all XChain client implementations
47+
- **Keystore Export**: Compatible with other wallet formats
3548

3649
### Constants
3750

packages/xchain-thorchain/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@ Thorchain Module for XChainJS Clients
44

55
## Installation
66

7-
```
7+
```sh
88
yarn add @xchainjs/xchain-thorchain
99
```
1010

11-
Following peer dependencies have to be installed into your project. These are not included in `@xchainjs/xchain-thorchain`.
11+
or
1212

13+
```sh
14+
npm install @xchainjs/xchain-thorchain
1315
```
16+
17+
Following peer dependencies have to be installed into your project. These are not included in `@xchainjs/xchain-thorchain`.
18+
19+
```sh
1420
yarn add @xchainjs/xchain-client @xchainjs/xchain-crypto @xchainjs/xchain-util @xchainjs/xchain-cosmos axios @cosmos-client/core bech32-buffer
1521
```
1622

packages/xchain-wallet/README.md

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,57 @@
1-
# `@xchainjs/xchain-wallet`
1+
<div align="center">
2+
<h1 align="center">XChain Wallet</h1>
23

3-
XChainJS client wrapper to work with several XChainJS client at a time
4+
<p align="center">
5+
<a href='https://www.npmjs.com/package/@xchainjs/xchain-wallet' target='_blank'>
6+
<img alt="NPM Version" src="https://img.shields.io/npm/v/%40xchainjs%2Fxchain-wallet" />
7+
</a>
8+
<a href='https://www.npmjs.com/package/@xchainjs/xchain-wallet' target='_blank'>
9+
<img alt="NPM Downloads" src="https://img.shields.io/npm/d18m/%40xchainjs%2Fxchain-wallet" />
10+
</a>
11+
</p>
12+
</div>
413

5-
## Install
14+
<br />
615

7-
```bash
16+
Multi-chain wallet wrapper that allows you to work with multiple XChainJS clients simultaneously. Provides a unified interface for managing assets across different blockchain networks.
17+
18+
## Modules
19+
20+
- `wallet` - Main wallet class for multi-chain asset management
21+
- `types` - TypeScript type definitions for wallet operations
22+
23+
## Installation
24+
25+
```sh
826
yarn add @xchainjs/xchain-wallet
927
```
1028

11-
## Examples
29+
or
30+
31+
```sh
32+
npm install @xchainjs/xchain-wallet
33+
```
1234

13-
To see an example, go to the wallet example of the examples folder of the repository
35+
Following peer dependencies have to be installed into your project. These are not included in `@xchainjs/xchain-wallet`.
36+
37+
```sh
38+
yarn add @xchainjs/xchain-client @xchainjs/xchain-crypto @xchainjs/xchain-util
39+
```
1440

1541
## Documentation
1642

17-
To be done
43+
### [`xchain wallet`](http://docs.xchainjs.org/xchain-wallet/)
44+
45+
[`How xchain-wallet works`](http://docs.xchainjs.org/xchain-wallet/how-it-works.html)\
46+
[`How to use xchain-wallet`](http://docs.xchainjs.org/xchain-wallet/how-to-use.html)
47+
48+
## Features
49+
50+
- **Multi-Chain Support**: Manage assets across all supported blockchains
51+
- **Unified Interface**: Single wallet instance for multiple clients
52+
- **Balance Aggregation**: View balances across all connected chains
53+
- **Transaction Management**: Send and receive across different networks
54+
55+
## Examples
56+
57+
You can find examples using the Wallet package in the [wallet](https://github.com/xchainjs/xchainjs-lib/tree/master/examples/wallet) examples folder.

0 commit comments

Comments
 (0)