Skip to content

Commit

Permalink
Merge pull request #437 from aeternity/release/3.4.0
Browse files Browse the repository at this point in the history
Release/3.4.0
  • Loading branch information
nduchak authored May 22, 2019
2 parents d957cc9 + 36a076b commit 58e013b
Show file tree
Hide file tree
Showing 39 changed files with 161 additions and 107 deletions.
3 changes: 1 addition & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
TAG=master
TAG=v3.0.0-rc.1
COMPILER_TAG=v2.1.0

19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# [3.4.0](https://github.com/aeternity/aepp-sdk-js/compare/2.4.0...3.4.0) (2019-05-22)


### Bug Fixes

* **State Channels:** Remove automatic pinging to fix browser compatibility ([#432](https://github.com/aeternity/aepp-sdk-js/issues/432)) ([0700f3a](https://github.com/aeternity/aepp-sdk-js/commit/0700f3a))


### Features

* **Transaction Builder:** Improve min fee calculation(Reduce the fee) ([#424](https://github.com/aeternity/aepp-sdk-js/pull/424))
* **AXIOS:** Add ability to intercept error from axios ([#431](https://github.com/aeternity/aepp-sdk-js/pull/431))
> Added additional param to sdk initialization `axiosConfig`
> Example: `Universal({ axiosConfig: { config: { // axios config object }, errorHandler: (err) => throw err }})`
* **Transaction Builder:** Implement vm/abi validation for contract/oracle tx based on consensus protocol version. Add custom verification based on transaction type ([#425](https://github.com/aeternity/aepp-sdk-js/pull/425)) ([#426](https://github.com/aeternity/aepp-sdk-js/pull/426))



# [3.3.0](https://github.com/aeternity/aepp-sdk-js/compare/2.4.0...3.3.0) (2019-05-17)


Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ aepp-sdk is [hosted on GitHub].
![Concept Drawing of aepp-sdk][concept]

[concept]: concept.png "Concept Drawing of aepp-sdk"

[æternity]: https://aeternity.com/
[æternity node]: https://github.com/aeternity/aeternity
[hosted on GitHub]: https://github.com/aeternity/aepp-sdk-js
Expand Down
1 change: 0 additions & 1 deletion docs/api/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/account
Account module

**Export**: Account
**Example**
```js
import Account from '@aeternity/aepp-sdk/es/account'
Expand Down
1 change: 0 additions & 1 deletion docs/api/account/memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/account/memory
Memory Account module

**Export**: MemoryAccount
**Example**
```js
import MemoryAccount from '@aeternity/aepp-sdk/es/account/memory'
Expand Down
1 change: 0 additions & 1 deletion docs/api/account/selector.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Accounts Selector module

This is the complement to [@aeternity/aepp-sdk/es/accounts](#module_@aeternity/aepp-sdk/es/accounts).

**Export**: Account
**Example**
```js
import Selector from '@aeternity/aepp-sdk/es/account/selector'
Expand Down
1 change: 0 additions & 1 deletion docs/api/accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/accounts
Accounts module

**Export**: Accounts
**Example**
```js
import Accounts from '@aeternity/aepp-sdk/es/accounts'
Expand Down
1 change: 0 additions & 1 deletion docs/api/ae.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/ae
Ae module

**Export**: Ae
**Example**
```js
import Ae from '@aeternity/aepp-sdk/es/ae'
Expand Down
1 change: 0 additions & 1 deletion docs/api/ae/aens.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ The high-level description of the naming system is
https://github.com/aeternity/protocol/blob/master/AENS.md in the protocol
repository.

**Export**: Aens
**Example**
```js
import Aens from '@aeternity/aepp-sdk/es/ae/aens'
Expand Down
1 change: 0 additions & 1 deletion docs/api/ae/aepp.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/ae/aepp
Aepp module

**Export**: Aepp
**Example**
```js
import Ae from '@aeternity/aepp-sdk/es/ae/aepp'
Expand Down
1 change: 0 additions & 1 deletion docs/api/ae/contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Contract module - routines to interact with the æternity contract
High level documentation of the contracts are available at
https://github.com/aeternity/protocol/tree/master/contracts and

**Export**: Contract
**Example**
```js
import Contract from '@aeternity/aepp-sdk/es/ae/contract' (Using tree-shaking)
Expand Down
1 change: 0 additions & 1 deletion docs/api/ae/oracle.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ The high-level description of the oracle system is
https://github.com/aeternity/protocol/blob/master/ORACLE.md in the protocol
repository.

**Export**: Oracle
**Example**
```js
import Oracle from '@aeternity/aepp-sdk/es/ae/oracle'
Expand Down
1 change: 0 additions & 1 deletion docs/api/ae/universal.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/ae/universal
Universal module

**Export**: Universal
**Example**
```js
import Ae from '@aeternity/aepp-sdk/es/ae/universal'
Expand Down
1 change: 0 additions & 1 deletion docs/api/ae/wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/ae/wallet
Wallet module

**Export**: Wallet
**Example**
```js
import Wallet from '@aeternity/aepp-sdk/es/ae/wallet'
Expand Down
1 change: 0 additions & 1 deletion docs/api/chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/chain
Chain module

**Export**: Chain
**Example**
```js
import Chain from '@aeternity/aepp-sdk/es/chain'
Expand Down
1 change: 0 additions & 1 deletion docs/api/chain/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ ChainNode module

This is the complement to [@aeternity/aepp-sdk/es/chain](#module_@aeternity/aepp-sdk/es/chain).

**Export**: ChainNode
**Example**
```js
import ChainNode from '@aeternity/aepp-sdk/es/chain/node'
Expand Down
1 change: 0 additions & 1 deletion docs/api/channel/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/channel/index
Channel module

**Export**: Channel
**Example**
```js
import Channel from '@aeternity/aepp-sdk/es/channel/index'
Expand Down
1 change: 0 additions & 1 deletion docs/api/contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/contract
Contract Base module

**Export**: Contract
**Example**
```js
import ContractBase from '@aeternity/aepp-sdk/es/contract'
Expand Down
1 change: 0 additions & 1 deletion docs/api/contract/aci.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/contract/aci
ContractACI module

**Export**: ContractACI
**Example**
```js
import ContractACI from '@aeternity/aepp-sdk/es/contract/aci'
Expand Down
1 change: 0 additions & 1 deletion docs/api/contract/compiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ ContractCompilerAPI module

This is the complement to [@aeternity/aepp-sdk/es/contract](#module_@aeternity/aepp-sdk/es/contract).

**Export**: ContractCompilerAPI
**Example**
```js
import ContractCompilerAPI from '@aeternity/aepp-sdk/es/contract/compiler'
Expand Down
21 changes: 18 additions & 3 deletions docs/api/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/node
Node module

**Export**: Node
**Example**
```js
import Node from '@aeternity/aepp-sdk/es/node'
Expand All @@ -12,8 +11,9 @@ import Node from '@aeternity/aepp-sdk/es/node'
* [@aeternity/aepp-sdk/es/node](#module_@aeternity/aepp-sdk/es/node)
* [Node([options])](#exp_module_@aeternity/aepp-sdk/es/node--Node)`Object`
* [~loader(options)](#module_@aeternity/aepp-sdk/es/node--Node..loader)`function`
* [~getConsensusProtocolVersion(protocols, height)](#module_@aeternity/aepp-sdk/es/node--Node..getConsensusProtocolVersion)`Number`
* _async_
* [~remoteSwag(url)](#module_@aeternity/aepp-sdk/es/node--Node..remoteSwag)`Object`
* [~remoteSwag(url, axiosConfig)](#module_@aeternity/aepp-sdk/es/node--Node..remoteSwag)`Object`

<a id="exp_module_@aeternity/aepp-sdk/es/node--Node"></a>

Expand All @@ -29,6 +29,7 @@ import Node from '@aeternity/aepp-sdk/es/node'
| [options] | `Object` | <code>{}</code> | Options |
| options.url | `String` | | Base URL for Node |
| options.internalUrl | `String` | | Base URL for internal requests |
| options.axiosConfig | `String` | | Object with axios configuration. Example { config: {}, errorHandler: (err) => throw err } |

**Example**
```js
Expand All @@ -49,9 +50,22 @@ Node specific loader for `urlFor`
| options.url | `String` | Base URL for Node |
| options.internalUrl | `String` | Base URL for internal requests |

<a id="module_@aeternity/aepp-sdk/es/node--Node..getConsensusProtocolVersion"></a>

#### Node~getConsensusProtocolVersion(protocols, height) ⇒ `Number`
get consensus protocol version

**Kind**: inner method of [`Node`](#exp_module_@aeternity/aepp-sdk/es/node--Node)
**Returns**: `Number` - version Protocol version

| Param | Type | Description |
| --- | --- | --- |
| protocols | `Array` | Array of protocols |
| height | `Number` | Height |

<a id="module_@aeternity/aepp-sdk/es/node--Node..remoteSwag"></a>

#### Node~remoteSwag(url) ⇒ `Object`
#### Node~remoteSwag(url, axiosConfig) ⇒ `Object`
Obtain Swagger configuration from Node node

**Kind**: inner method of [`Node`](#exp_module_@aeternity/aepp-sdk/es/node--Node)
Expand All @@ -62,4 +76,5 @@ Obtain Swagger configuration from Node node
| Param | Type | Description |
| --- | --- | --- |
| url | `String` | Node base URL |
| axiosConfig | `Object` | Axios configuration object |

1 change: 0 additions & 1 deletion docs/api/oracle.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/oracle
Oracle Base module

**Export**: Contract
**Example**
```js
import ContractBase from '@aeternity/aepp-sdk/es/oracle'
Expand Down
1 change: 0 additions & 1 deletion docs/api/oracle/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ OracleNodeAPI module

This is the complement to [@aeternity/aepp-sdk/es/oracle](#module_@aeternity/aepp-sdk/es/oracle).

**Export**: OracleNodeAPI
**Example**
```js
import OracleNodeAPI from '@aeternity/aepp-sdk/es/oracle/node'
Expand Down
1 change: 0 additions & 1 deletion docs/api/rpc/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/rpc/client
RPC client module

**Export**: RpcClient
**Example**
```js
import RpcClient from '@aeternity/aepp-sdk/es/rpc/client'
Expand Down
1 change: 0 additions & 1 deletion docs/api/tx.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/tx
Tx module

**Export**: Tx
**Example**
```js
import Tx from '@aeternity/aepp-sdk/es/tx'
Expand Down
1 change: 0 additions & 1 deletion docs/api/tx/builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/tx/builder
JavaScript-based Transaction builder

**Export**: TxBuilder
**Example**
```js
import Transaction from '@aeternity/aepp-sdk/es/tx/builder'
Expand Down
1 change: 0 additions & 1 deletion docs/api/tx/builder/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/tx/builder/helpers
JavaScript-based Transaction builder helper function's

**Export**: TxBuilderHelper
**Example**
```js
import TxBuilderHelper from '@aeternity/aepp-sdk/es/tx/builder/helpers'
Expand Down
1 change: 0 additions & 1 deletion docs/api/tx/builder/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/tx/builder/schema
Transaction Schema for TxBuilder

**Export**: TxSchema
**Example**
```js
import TxSchema from '@aeternity/aepp-sdk/es/tx/builder/schema'
Expand Down
1 change: 0 additions & 1 deletion docs/api/tx/tx.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/tx/tx
Transaction module

**Export**: Transaction
**Example**
```js
import Transaction from '@aeternity/aepp-sdk/es/tx/tx'
Expand Down
1 change: 0 additions & 1 deletion docs/api/tx/validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/tx/validator
Transaction validator

**Export**: TransactionValidator
**Example**
```js
import TransactionValidator from '@aeternity/aepp-sdk/es/tx/validator'
Expand Down
2 changes: 1 addition & 1 deletion docs/api/utils/swagger.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## @aeternity/aepp-sdk/es/utils/swagger
Swagger module

**Export**: Swagger
**Example**
```js
import Swagger from '@aeternity/aepp-sdk/es/utils/swagger'
Expand Down Expand Up @@ -44,6 +43,7 @@ Swagger Stamp
| --- | --- | --- |
| options | `Object` | Initializer object |
| options.swag | `Object` | Swagger definition |
| options.axiosConfig | `Object` | Object with axios configuration. Example { config: {}, errorHandler: (err) => throw err } |

**Example**
```js
Expand Down
22 changes: 0 additions & 22 deletions es/channel/internal.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ import * as R from 'ramda'
import { pascalToSnake } from '../utils/string'
import { awaitingConnection } from './handlers'

const PING_TIMEOUT_MS = 10000
const PONG_TIMEOUT_MS = 5000

const options = new WeakMap()
const status = new WeakMap()
const state = new WeakMap()
Expand All @@ -37,8 +34,6 @@ const actionQueueLocked = new WeakMap()
const sequence = new WeakMap()
const channelId = new WeakMap()
const rpcCallbacks = new WeakMap()
const pingTimeoutId = new WeakMap()
const pongTimeoutId = new WeakMap()

function channelURL (url, params) {
const paramString = R.join('&', R.values(R.mapObjIndexed((value, key) =>
Expand Down Expand Up @@ -159,21 +154,10 @@ function call (channel, method, params) {
})
}

function ping (channel) {
const ws = websockets.get(channel)
if (ws.readyState === ws.OPEN) {
ws._connection.ping()
clearTimeout(pongTimeoutId.get(channel))
pongTimeoutId.set(channel, setTimeout(() => ws._connection.drop(), PONG_TIMEOUT_MS))
}
}

function disconnect (channel) {
const ws = websockets.get(channel)
if (ws.readyState === ws.OPEN) {
ws._connection.close()
clearTimeout(pongTimeoutId.get(channel))
clearTimeout(pingTimeoutId.get(channel))
}
}

Expand Down Expand Up @@ -213,12 +197,6 @@ async function initialize (channel, channelOptions) {
onclose: () => changeStatus(channel, 'disconnected'),
onmessage: ({ data }) => onMessage(channel, data)
})
ws._connection.on('pong', () => {
clearTimeout(pongTimeoutId.get(channel))
clearTimeout(pingTimeoutId.get(channel))
pingTimeoutId.set(channel, setTimeout(() => ping(channel), PING_TIMEOUT_MS))
})
pingTimeoutId.set(channel, setTimeout(() => ping(channel), PING_TIMEOUT_MS))
websockets.set(channel, ws)
}

Expand Down
Loading

0 comments on commit 58e013b

Please sign in to comment.