Comparing version 3.0.1 to 4.0.0
@@ -114,5 +114,3 @@ 'use strict'; | ||
}).catch(function (error) { | ||
if (debug) { | ||
console.error('api error =>', url, body, error); | ||
} | ||
console.error('api error =>', url, body, error); | ||
try { | ||
@@ -119,0 +117,0 @@ callback(error); |
@@ -17,4 +17,4 @@ 'use strict'; | ||
@property {string} ref_block_prefix - get_block.ref_block_prefix .. This is | ||
the same block referenced in `ref_block_num`. | ||
@property {number} ref_block_prefix - get_block.ref_block_prefix .. This is | ||
a 32 bit number identifier (identify the same block referenced in `ref_block_num`). | ||
@@ -25,3 +25,3 @@ @property {string} expiration - This is based on the head block time from the | ||
Example: `new Date(info.head_block_time + 'Z').getTime() + expireInSeconds * 1000` | ||
Example: `new Date(new Date(info.head_block_time + 'Z').getTime() + expireInSeconds * 1000).toISOString().split('.')[0]` | ||
*/ | ||
@@ -54,2 +54,3 @@ | ||
// Back-up 3 blocks to help avoid mini-forks. | ||
// todo: dawn3 ((head_blocknum/0xffff)*0xffff) + head_blocknum%0xffff | ||
var ref_block_num = info.head_block_num - 3 & 0xFFFF; | ||
@@ -60,8 +61,10 @@ | ||
var headers = { | ||
expiration: expiration.toISOString().split('.')[0], | ||
region: 0, | ||
ref_block_num: ref_block_num, | ||
ref_block_prefix: block.refBlockPrefix || block.ref_block_prefix, | ||
expiration: expiration.toISOString().split('.')[0], | ||
scope: [], | ||
read_scope: [], | ||
messages: [], | ||
ref_block_prefix: block.ref_block_prefix, | ||
packed_bandwidth_words: 0, | ||
context_free_cpu_bandwidth: 0, | ||
context_free_actions: [], | ||
actions: [], | ||
signatures: [] | ||
@@ -68,0 +71,0 @@ }; |
@@ -40,3 +40,3 @@ 'use strict'; | ||
@example api.processArgs(args, ['code'], 'contract', optionsFormatter) | ||
@example api.processArgs(args, ['account'], 'contract', optionsFormatter) | ||
*/ | ||
@@ -43,0 +43,0 @@ function processArgs(args, defParams) { |
{ | ||
"name": "eosjs-api", | ||
"version": "3.0.1", | ||
"version": "4.0.0", | ||
"description": "Application programming interface to EOS blockchain nodes.", | ||
@@ -36,2 +36,3 @@ "main": "lib/index.js", | ||
"istanbul": "^0.4.5", | ||
"jsdoc-to-markdown": "^4.0.1", | ||
"mocha": "^3.4.2" | ||
@@ -41,3 +42,3 @@ }, | ||
"camel-case": "^3.0.0", | ||
"eosjs-json": "^2.0.3", | ||
"eosjs-json": "^3.0.0", | ||
"isomorphic-fetch": "^2.2.1" | ||
@@ -44,0 +45,0 @@ }, |
22503
514
8
+ Addedeosjs-json@3.0.2(transitive)
- Removedeosjs-json@2.0.3(transitive)
Updatedeosjs-json@^3.0.0