Skip to content

Commit

Permalink
Merge pull request #51 from qianbin/types
Browse files Browse the repository at this point in the history
Types
  • Loading branch information
qianbin committed Jun 21, 2019
2 parents a4aeacf + 06ddbd8 commit b65c55e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -352,7 +352,7 @@ declare namespace Connex {
type Clause = {
to: string | null
value: string | number
data: string
data?: string
}

namespace Transaction {
Expand All @@ -368,7 +368,11 @@ declare namespace Connex {
chainTag: number
blockRef: string
expiration: number
clauses: Clause[]
clauses: Array<{
to: string | null
value: string
data: string
}>
gasPriceCoef: number
gas: number
origin: string
Expand Down Expand Up @@ -555,7 +559,7 @@ declare namespace Connex {
type TxMessage = Array<{
to: string | null
value: string | number
data: string
data?: string
/**
* comment to the clause
*/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit b65c55e

Please sign in to comment.