From 364cea46c7838793acfa96af8228013e0096ea27 Mon Sep 17 00:00:00 2001 From: qianbin Date: Fri, 21 Jun 2019 14:18:37 +0800 Subject: [PATCH 1/4] set clause.data to optional --- index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index 429e55c..45f2be5 100644 --- a/index.d.ts +++ b/index.d.ts @@ -352,7 +352,7 @@ declare namespace Connex { type Clause = { to: string | null value: string | number - data: string + data?: string } namespace Transaction { @@ -368,7 +368,7 @@ declare namespace Connex { chainTag: number blockRef: string expiration: number - clauses: Clause[] + clauses: Required[] gasPriceCoef: number gas: number origin: string @@ -555,7 +555,7 @@ declare namespace Connex { type TxMessage = Array<{ to: string | null value: string | number - data: string + data?: string /** * comment to the clause */ From da8ea696fe3bdfc36f23b3fd9bb28061e393b2a2 Mon Sep 17 00:00:00 2001 From: qianbin Date: Fri, 21 Jun 2019 17:37:27 +0800 Subject: [PATCH 2/4] gasPrice type set to string | number --- index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.d.ts b/index.d.ts index 45f2be5..8158d00 100644 --- a/index.d.ts +++ b/index.d.ts @@ -150,9 +150,9 @@ declare namespace Connex { /** * set gas price - * @param gp gas price in hex string + * @param gp gas price in number or hex/dec string */ - gasPrice(gp: string): this + gasPrice(gp: string | number): this /** * Turn on caching for result of method call @@ -261,9 +261,9 @@ declare namespace Connex { /** * set gas price - * @param gp gas price in hex string + * @param gp gas price in number or hex/dec string */ - gasPrice(gp: string): this + gasPrice(gp: string | number): this /** * execute clauses From 9c9977ffd8fe018fd6edefbc90ac3d2ca6f2ee72 Mon Sep 17 00:00:00 2001 From: qianbin Date: Fri, 21 Jun 2019 22:25:49 +0800 Subject: [PATCH 3/4] types --- index.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 8158d00..c6c9298 100644 --- a/index.d.ts +++ b/index.d.ts @@ -368,7 +368,11 @@ declare namespace Connex { chainTag: number blockRef: string expiration: number - clauses: Required[] + clauses: Array<{ + to: string | null + value: string + data: string + }> gasPriceCoef: number gas: number origin: string From 06ddbd8e85feda1f715c578981dd5998742b370d Mon Sep 17 00:00:00 2001 From: qianbin Date: Fri, 21 Jun 2019 22:25:56 +0800 Subject: [PATCH 4/4] ver 1.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a559f52..a6c013d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vechain/connex", - "version": "1.2.3", + "version": "1.3.0", "description": "Standard interface to connect DApp with VeChain and user", "main": "index.js", "types": "index.d.ts",