Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
![](https://img.shields.io/npm/v/@liquality/wallet-core?label=wallet-core)
![master](https://github.com/liquality/wallet-core/actions/workflows/build-test.yml/badge.svg?branch=master)

Wallet Core is a cryptocurrency wallet library in Typescript. It provides an abstracted interface that handles all the necessary internals of a muilti chain wallet.
Wallet Core is a cryptocurrency wallet library in Typescript. It provides an abstracted interface that handles all the necessary internals of a multi chain wallet.

# Features

- State management
- Seed management and security
- Account management
- Blockchain communication under a common interface, powered by [Chainify](https://github.com/liquality/chainify)
- Retriving balances
- Retrieving balances
- Sending transactions
- Intra and cross chain swaps supporting a host of decentralised exchanges - Liquality, Thorchain, Uniswap, 1inch, Sovryn, Astroport etc.
- Hardware wallet support
Expand Down Expand Up @@ -59,7 +59,7 @@ See `WalletOptions` in [types](src/types.ts)
```typescript
{
initialState?: RootState; // The initial state of the wallet
crypto: { // Implmenetation for platform specific crypto
crypto: { // Implementation for platform specific crypto
pbkdf2(password: string, salt: string, iterations: number, length: number, digest: string): Promise<string>;
encrypt(value: string, key: string): Promise<any>;
decrypt(value: any, key: string): Promise<any>;
Expand Down
2 changes: 1 addition & 1 deletion packages/error-parser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Error Parser is an Error formatting and reporting Library for Liquality. It's an
4. **Custom Internal Errors:** The Error Parser package contains a list of [reusable Custom Errors](src/LiqualityErrors/customErrors.ts) that can be used anywhere there is a need to throw an Internal Error.

5. **Error Reporting:**
- The error reporting is done seemlessly without the developer's intervention. The error reporting function is automatically invoked [after parsing an external](https://github.com/liquality/wallet-core/blob/911aa835d15782c33811a7b3b03d7766d4c52d93/packages/error-parser/src/parsers/ErrorParser.ts#L32) error and [after creating a custom error](https://github.com/liquality/wallet-core/blob/8f8b6cb5dae62a791c2608a6a21f85e3132c63ff/packages/error-parser/src/utils/index.ts#L17).
- The error reporting is done seamlessly without the developer's intervention. The error reporting function is automatically invoked [after parsing an external](https://github.com/liquality/wallet-core/blob/911aa835d15782c33811a7b3b03d7766d4c52d93/packages/error-parser/src/parsers/ErrorParser.ts#L32) error and [after creating a custom error](https://github.com/liquality/wallet-core/blob/8f8b6cb5dae62a791c2608a6a21f85e3132c63ff/packages/error-parser/src/utils/index.ts#L17).
- The Error parser package relies on two env variables
- `VUE_APP_REPORT_TARGETS` listing a comma-separated list of destinations where error reports should be sent(`Console` and `Discord` are currently supported) and
- `VUE_APP_DISCORD_WEBHOOK` to hold the discord webhook (if necessary)
Expand Down
12 changes: 6 additions & 6 deletions packages/wallet-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
![](https://img.shields.io/npm/v/@liquality/wallet-core?label=wallet-core)
![master](https://github.com/liquality/wallet-core/actions/workflows/build-test.yml/badge.svg?branch=master)

Wallet Core is a cryptocurrency wallet library in Typescript. It provides an abstracted interface that handles all the necessary internals of a muilti chain wallet. Featuring:
Wallet Core is a cryptocurrency wallet library in Typescript. It provides an abstracted interface that handles all the necessary internals of a multi chain wallet. Featuring:

- State management
- Seed management and security
- Account management
- Blockchain communication under a common interface, powered by [Chainify](https://github.com/liquality/chainify)
- Retriving balances
- Retrieving balances
- Sending transactions
- Intra and cross chain swaps supporting a host of decentralised exchanges - Liquality, Thorchain, Uniswap, 1inch, Sovryn, Astroport etc.
- Hardware wallet support
Expand Down Expand Up @@ -57,7 +57,7 @@ See `WalletOptions` in [types](src/types.ts)
```typescript
{
initialState?: RootState; // The initial state of the wallet
crypto: { // Implmenetation for platform specific crypto
crypto: { // Implementation for platform specific crypto
pbkdf2(password: string, salt: string, iterations: number, length: number, digest: string): Promise<string>;
encrypt(value: string, key: string): Promise<any>;
decrypt(value: any, key: string): Promise<any>;
Expand Down Expand Up @@ -94,7 +94,7 @@ yarn test

2. Add the config or settings that you need inside the [build.config](https://github.com/liquality/wallet-core/blob/develop/packages/wallet-core/src/build.config.ts) file using the new type added in `SwapProviderType` enum, this should be inside the field `swapProviders` and then you can add different settings for `testnet` and `mainnet`. For example, if your swap provider will need to make some http calls and if you want to set the root url for it.

3. Create a new folder for your new provider inside `packages/wallet-core/src/swaps`, then add a new file named `info.json` whith a content like (you can check the other providers to get an example):
3. Create a new folder for your new provider inside `packages/wallet-core/src/swaps`, then add a new file named `info.json` with a content like (you can check the other providers to get an example):

```
{
Expand All @@ -120,9 +120,9 @@ yarn test

This will add metadata/info for your new provider to the available providers info/details.

5. Create a new file for your new provider inside `packages/wallet-core/src/swaps/YOUR_PROVIDER`. You can create any separated clases or files if you need. Please check the folder `packages/wallet-core/src/swaps/` and the other providers to get an example.
5. Create a new file for your new provider inside `packages/wallet-core/src/swaps/YOUR_PROVIDER`. You can create any separated classes or files if you need. Please check the folder `packages/wallet-core/src/swaps/` and the other providers to get an example.

6. Implement the provider: your new provider should extend the class [SwapProvider](https://github.com/liquality/wallet-core/blob/develop/packages/wallet-core/src/swaps/SwapProvider.ts), it is an abtract class so you should implement at least these methods:
6. Implement the provider: your new provider should extend the class [SwapProvider](https://github.com/liquality/wallet-core/blob/develop/packages/wallet-core/src/swaps/SwapProvider.ts), it is an abstract class so you should implement at least these methods:

- \_getStatuses(): Record<string, SwapStatus>;
- \_txTypes(): Record<string, string | null>;
Expand Down