# @adora-wallet/adoracore-wallet-client

> Client for adoracore-wallet-service

Latest version **8.31.34** (published 2022-11-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @adora-wallet/adoracore-wallet-client
pnpm add @adora-wallet/adoracore-wallet-client
yarn add @adora-wallet/adoracore-wallet-client
bun add @adora-wallet/adoracore-wallet-client
```

## Health

**Score 25/100 (F)** — status: abandoned.

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 8.31.34 |
| Published | 2022-11-03 |
| First published | 2022-06-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 14 |
| Unpacked size | 866.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | murmuri |
| Keywords | bitcoin, multisig, wallet, client, adoracore, AWS, AWC |

## Links

- npm: https://www.npmjs.com/package/@adora-wallet/adoracore-wallet-client
- npm.io page: https://npm.io/package/@adora-wallet/adoracore-wallet-client

## Dependencies (14)

- [ajv](https://npm.io/package/ajv.md) ^6.10.0
- [sjcl](https://npm.io/package/sjcl.md) 1.0.3
- [async](https://npm.io/package/async.md) ^0.9.0
- [bip38](https://npm.io/package/bip38.md) ^1.3.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.20
- [superagent](https://npm.io/package/superagent.md) ^5.1.0
- [typescript](https://npm.io/package/typescript.md) ^3.9.3
- [preconditions](https://npm.io/package/preconditions.md) ^2.2.3
- [source-map-loader](https://npm.io/package/source-map-loader.md) ^0.2.4
- [source-map-support](https://npm.io/package/source-map-support.md) ^0.5.19
- [json-stable-stringify](https://npm.io/package/json-stable-stringify.md) ^1.0.1
- [awesome-typescript-loader](https://npm.io/package/awesome-typescript-loader.md) ^5.2.1
- [@adora-wallet/adoracore-mnemonic](https://npm.io/package/@adora-wallet/adoracore-mnemonic.md) ^8.25.30
- [@adora-wallet/crypto-wallet-core](https://npm.io/package/@adora-wallet/crypto-wallet-core.md) ^8.29.33

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 8.31.34 (latest) — 2022-11-03
- 8.30.34 — 2022-10-26
- 8.29.34 — 2022-09-27
- 8.29.33 — 2022-09-19
- 8.29.32 — 2022-09-15
- 8.29.31 — 2022-09-15
- 8.29.30 — 2022-09-15
- 8.28.30 — 2022-09-07
- 8.27.30 — 2022-08-16
- 8.26.30 — 2022-07-12
- 8.25.30 — 2022-06-22

## README

# Adoracore-wallet-client


The *official* client library for Adoracore-wallet-service

## Description

This package communicates with AWS Adoracore wallet service using the REST API. All REST endpoints are wrapped as simple async methods. All relevant responses from AWS are checked independently by the peers, thus the importance of using this library when talking to a third party AWS instance.

See Adoracore-wallet for a simple CLI wallet implementation that relays on AWS and uses adoracore-wallet-client.

## Get Started

You can start using @adora-wallet/adoracore-wallet-client : by running `npm install @adora-wallet/adoracore-wallet-client` from your console.

## Example

Start your own local Adoracore wallet service instance. In this example we assume you have `adoracore-wallet-service` running on your `localhost:3232`.

Then create two files `irene.js` and `tomas.js` with the content below:

### **irene.js**

``` javascript
var Client = require('@adora-wallet/adoracore-wallet-client');


var fs = require('fs');
var AWS_INSTANCE_URL = 'https://adora-api-dev.rocknblock.io/aws/api'

var client = new Client({
  baseUrl: AWS_INSTANCE_URL,
  verbose: false,
});

client.createWallet("My Wallet", "Irene", 2, 2, {network: 'testnet'}, function(err, secret) {
  if (err) {
    console.log('error: ',err);
    return
  };
  // Handle err
  console.log('Wallet Created. Share this secret with your copayers: ' + secret);
  fs.writeFileSync('irene.dat', client.export());
});
```

### **tomas.js**

``` javascript

var Client = require('@adora-wallet/adoracore-wallet-client');


var fs = require('fs');
var AWS_INSTANCE_URL = 'https://adora-api-dev.rocknblock.io/aws/api'

var secret = process.argv[2];
if (!secret) {
  console.log('./tomas.js <Secret>')

  process.exit(0);
}

var client = new Client({
  baseUrl: AWS_INSTANCE_URL,
  verbose: false,
});

client.joinWallet(secret, "Tomas", {}, function(err, wallet) {
  if (err) {
    console.log('error: ', err);
    return
  };

  console.log('Joined ' + wallet.name + '!');
  fs.writeFileSync('tomas.dat', client.export());


  client.openWallet(function(err, ret) {
    if (err) {
      console.log('error: ', err);
      return
    };
    console.log('\n\n** Wallet Info', ret); //TODO

    console.log('\n\nCreating first address:', ret); //TODO
    if (ret.wallet.status == 'complete') {
      client.createAddress({}, function(err,addr){
        if (err) {
          console.log('error: ', err);
          return;
        };

        console.log('\nReturn:', addr)
      });
    }
  });
});
```

Install `@adora-wallet/adoracore-wallet-client` before start:

```sh
npm i @adora-wallet/adoracore-wallet-client
```

Create a new wallet with the first script:

```sh
$ node irene.js
info Generating new keys
 Wallet Created. Share this secret with your copayers: JbTDjtUkvWS4c3mgAtJf4zKyRGzdQzZacfx2S7gRqPLcbeAWaSDEnazFJF6mKbzBvY1ZRwZCbvT
```

Join to this wallet with generated secret:

```sh
$ node tomas.js JbTDjtUkvWS4c3mgAtJf4zKyRGzdQzZacfx2S7gRqPLcbeAWaSDEnazFJF6mKbzBvY1ZRwZCbvT
Joined My Wallet!

Wallet Info: [...]

Creating first address:

Return: [...]

```

Note that the scripts created two files named `irene.dat` and `tomas.dat`. With these files you can get status, generate addresses, create proposals, sign transactions, etc.The MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

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