Skip to content

Commit

Permalink
Fix import as a module
Browse files Browse the repository at this point in the history
  • Loading branch information
m-pilarczyk committed Nov 19, 2021
1 parent 42064d1 commit c05336e
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.0.1] - 2021-11-19
### Fixed
- Import as a module

## [1.0.0] - 2021-11-17
### Added
- Support for RPC commands:
Expand All @@ -23,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Changelog
- Contributing

[Unreleased]: https://github.com/adshares/ads-js-client/compare/v1.0.0...HEAD
[Unreleased]: https://github.com/adshares/ads-js-client/compare/v1.0.1...HEAD

[1.0.1]: https://github.com/adshares/ads-js/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/adshares/ads-js-client/releases/tag/v1.0.0
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,31 @@ ADS JS Client is an **JavaScript ES2015** client for the [ADS blockchain](https:

The module can be used to send basic transactions. ADS JS Client is a free, open-source npm module. It supports both mainnet and testnet.

## Install

```bash
npm install @adshares/ads-client
```
or
```bash
yarn add @adshares/ads-client
```

## Usage

All methods return Promises.

```js
import AdsClient from '@adshares/ads-client';

// pass true to enable testnet
const adsClient = new AdsClient(false);

adsWallet.getInfo().then(info => {})
adsWallet.getNodes().then(nodes => {})
adsWallet.sendTransaction(_DATA_, _SIGNATURE_).then(response => {})

```

### Contributing

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"homepage": "https://github.com/adshares/ads-js-client#readme",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"browser": "dist/index.js",
"scripts": {
"build": "rollup -c",
"dev": "rollup -c -w --environment BUILD:dev",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default [
input: 'src/client.js',
output: {
name: 'AdsClient',
file: pkg.browser,
file: 'dist/index.js',
format: 'iife',
globals: {
crypto: 'Crypto'
Expand Down
2 changes: 1 addition & 1 deletion src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export default class AdsClient {
})
}

sendTransaction (data, signature, host) {
sendTransaction (data, signature) {
const sender = Ads.Tx.decodeSender(data)
return this.getNode(Ads.splitAddress(sender).nodeId)
.then(node => {
Expand Down

0 comments on commit c05336e

Please sign in to comment.