Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tezbridge-network

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tezbridge-network - npm Package Compare versions

Comparing version 1.0.32 to 1.0.33

8

package.json
{
"name": "tezbridge-network",
"version": "1.0.32",
"version": "1.0.33",
"description": "The TezBridge network library for Tezos blockchain in JavaScript with Flow type system",

@@ -21,9 +21,9 @@ "main": "Pt24m4xi/index.js",

"devDependencies": {
"@babel/core": "^7.4.5",
"@babel/core": "^7.5.4",
"@babel/plugin-transform-flow-strip-types": "^7.4.4",
"@babel/plugin-transform-runtime": "^7.4.4",
"@babel/plugin-transform-runtime": "^7.5.0",
"flow-bin": "^0.86.0"
},
"dependencies": {
"@babel/runtime": "^7.4.5"
"@babel/runtime": "^7.5.4"
},

@@ -30,0 +30,0 @@ "babel": {

@@ -81,2 +81,11 @@ // @flow

run_operation(head_hash : string, ops : TezJSON) {
const param = {
branch: head_hash,
contents: ops,
signature: 'edsigu6FNEzqHPAbQAUjjKtcAFkiW4The5BQbCj53bCyV9st32aHrcZhqnzLWw74HiwMScMh1SiTgY8juYUAUsJ3JG2DvGeCFjd'
}
return this.submit(`/chains/main/blocks/head/helpers/scripts/run_operation`, param)
}
preapply_operation(head_hash : string, ops : TezJSON, protocol : string, signature : string) {

@@ -295,16 +304,13 @@ const param = {

outside.step = 3
op_bytes_result.signature = await sign_fn(op_bytes_result.operation_hex)
// preapply the max fee operation to get the cost fee
// also it will assign the cost fee to the items of `ops`
outside.step = 4
const preapplyed_result : any = await this.submit.preapply_operation(
op_bytes_result.branch, op_bytes_result.contents, op_bytes_result.protocol, op_bytes_result.signature)
outside.step = 3
const run_operation_result : any = await this.submit.run_operation(
op_bytes_result.branch, op_bytes_result.contents)
if (!(preapplyed_result instanceof Array))
throw `Invalid preapplyed result: ${preapplyed_result}`
if (!(run_operation_result instanceof Array))
throw `Invalid run operation result: ${run_operation_result}`
let gas_sum = 0
preapplyed_result[0].contents.forEach((content, index) => {
run_operation_result[0].contents.forEach((content, index) => {
let gas_limit = 0

@@ -361,3 +367,3 @@ let storage_limit = 0

outside.step = 5
outside.step = 4
// operation bytes generated with exact fee

@@ -369,3 +375,3 @@ const final_op_result = await this.makeOperationBytes({

outside.step = 6
outside.step = 5
// remote / local bytes comparison

@@ -379,6 +385,6 @@ const final_local_hex = TBC.localop.forgeOperation(final_op_result.contents, final_op_result.branch)

outside.step = 7
outside.step = 6
final_op_result.signature = await sign_fn(final_op_result.operation_hex)
outside.step = 8
outside.step = 7
// preapply the exact fee operation to get the originated contracts

@@ -415,3 +421,3 @@ const final_op_with_sig = final_op_result.operation_hex + TBC.codec.toHex(TBC.codec.bs58checkDecode(final_op_result.signature))

outside.step = 9
outside.step = 8

@@ -418,0 +424,0 @@ return {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc