Giter Site home page Giter Site logo

bitgo / bitgojs Goto Github PK

View Code? Open in Web Editor NEW
344.0 344.0 263.0 89.61 MB

BitGo JavaScript SDK

Home Page: https://developers.bitgo.com/

License: Apache License 2.0

JavaScript 5.70% HTML 0.01% Shell 0.04% Dockerfile 0.05% TypeScript 93.84% WebAssembly 0.37% SCSS 0.01%

bitgojs's People

Contributors

alebusse avatar alia-bitgo avatar argjv avatar bencxr avatar bitgoaaron avatar byhow avatar capnmigraine avatar davidkaplanbitgo avatar dcousens avatar dpkjnr avatar ewangbitgo avatar gianchandania avatar glowang avatar joey-bai avatar joeybaibg avatar kyledrake avatar lcovar avatar marktoda avatar mbelshe avatar mmcshinsky-bitgo avatar ottoallmendinger avatar perrybitgo avatar pranavjain97 avatar sachushaji avatar saravanan7mani avatar twtaylorbitgo avatar tylerlevine avatar weilu avatar wesgraham avatar zahin-mohammad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitgojs's Issues

Error: output value is less than dust threshold on test.bitgo.com

I recently noticed this error in my tests (I wasn't getting it before) when sending an OP_RETURN transaction on testnet:

[Error: output value is less than dust threshold] status: 400, result: { error: 'output value is less than dust threshold' 

What does it mean? And what is the minimum threshold?

Malware address check

Hi, is the malware address list provided by BitGo api at GET /api/v1/malware/bitcoin supposed to be checked against account key values in entries object - entries object is itself a key in object obtained after querying BitGo api with hash received in webhook respone? (see below)

Webhook response -
{
...
hash: some_hash
...
}

wallet.getTransaction({id: some_hash}) response -
{
...
entries: [{account: some_address, value: some_btc_value}, ...]
...
}

What should malware addresses should be checked against, is not clearly mentioned in the BitGo api.

Getting Error When I install

Hi,

when i run npm install getting error.

64448 error Windows_NT 6.1.7601
64449 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
64450 error node v6.9.4
64451 error npm v3.10.10
64452 error code ELIFECYCLE
64453 error [email protected] install: node-gyp rebuild
64453 error Exit status 1
64454 error Failed at the [email protected] install script 'node-gyp rebuild'.
64454 error Make sure you have the latest version of node.js and npm installed.
64454 error If you do, this is most likely a problem with the sha3 package,
64454 error not with npm itself.
64454 error Tell the author that this fails on your system:
64454 error node-gyp rebuild
64454 error You can get information on how to open an issue for this project with:
64454 error npm bugs sha3
64454 error Or if that isn't available, you can get their info via:
64454 error npm owner ls sha3
64454 error There is likely additional logging output above.
64455 verbose exit [ 1, true ]

Webhook notification should identify the payee

This is a sample webhook notification on bitcoin sending confirmation -

{ hash: 'some_random_hash',
  type: 'transaction',
  coin: 'bitcoin',
  walletId: 'some_wallet_id' }

Lets say I have 10 users on my website, sending me bitcoins at around the same time (at different addresses) in the same wallet, then there should be a way for me to figure which user's notification I have received on my webhook. Currently, I do not see any address field (related to the wallet, at which the user had sent his bitcoins) in the webhook notification json, which, if present, will solve the matter!

(a suggestion based on my preference - a callback will be much easier to implement (for developers choosing BitGo as their bitcoin API) than a webhook, as the question of payee identification will not arise in case of a callback. Besides, a webhook also requires ngrok or something similar to test on localhost, bitcoin APIs should not be so difficult to test and implement)

cannot find module

var BitGo = require('bitgo');
Error: Cannot find module 'bitgo'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at repl:1:13
at sigintHandlersWrap (vm.js:22:35)
at sigintHandlersWrap (vm.js:73:12)
at ContextifyScript.Script.runInThisContext (vm.js:21:12)
at REPLServer.defaultEval (repl.js:346:29)
at bound (domain.js:280:14)

Cannot read property 'network' of undefined

Hi there,
I have npm installled bitgo version v2.2.0
When I try to make an instance using
var bitgo = new BitGo.BitGo({ accessToken: process.env.BITGO_ACCESS_TOKEN })

Its throwing this TypeError
TypeError: Cannot read property 'network' of undefined at new BitGo (/home/rihan/codefarm/nodejs/auto-cashout/node_modules/bitgo/src/bitgo.js:197:52) at repl:1:13 at sigintHandlersWrap (vm.js:22:35) at sigintHandlersWrap (vm.js:96:12) at ContextifyScript.Script.runInThisContext (vm.js:21:12) at REPLServer.defaultEval (repl.js:346:29) at bound (domain.js:280:14) at REPLServer.runBound [as eval] (domain.js:293:12) at REPLServer.<anonymous> (repl.js:545:10) at emitOne (events.js:101:20)

PS - This was not happening yesterday. Only today I am facing this issue

500 when following /sendmany example from the docs

Following the example at https://bitgo.com/api/?shell#send-coins-to-multiple-addresses, I my local express server and got

> curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $ACCESS_TOKEN" -d '{"recipients": [{"address": "2N7Sms6BqZaQVp6Cv73qhJeDHmbSzAe7gV1", "amount": 1000}], "walletPassphrase": "passprhase" }' "http://localhost:3080/api/v1/wallet/$WALLETID/sendmany"

{"error":"invalid bitcoin address: 0"} # the server shows this is a 500

After fooling with it a bit, I tried the same tx using /sendcoins:

> curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $ACCESS_TOKEN" -d '{"address": "2N7Sms6BqZaQVp6Cv73qhJeDHmbSzAe7gV1", "amount": 1000, "walletPassphrase": "passphrase" }' "http://localhost:3080/api/v1/wallet/$WALLETID/sendcoins"

{"error":"output value is less than dust threshold"}

I increase the amount in the /sendmany example, and it works. I think both should respond with the same error message (and no 500s).

Error XRP transactions v2

Hi,
When I try to send transactions many with XRP with Bitgo v2, it returns an error,
"error": "Ripple supports only simultaneous recipient"
Please help.
Thanks

Broken unit tests

The unit tests seems to be broken due to the hardcoded [email protected] test user being inexistant on the test platform. Please confirm that the test password for this account is superhardseypassphrase and make it obvious in the documentation or README once restored. If I'm wrong, please add more instructions to the README.

I tried with my personal account on the test platform and it went fine for a while, until it reaches the tests with the hardcoded wallets and such.

Bitgo production sendOTP/ unlock API not getting OTP code.

Hi team bitgo,
I am done with using the testnet env with bitgo. It works perfectly fine. Now, I have my env switched to 'prod' and I need the OTP code to unlock sendcoins API. I contacted bitgo support and got to know that sendOTP SMS option is deprecated and that you should use Authy to get the OTP via push notification. I have setup the 2FA using Authy and hitting the sendOTP API once again, but I am not receiving the OTP via push notification.

sha3 warnings while npm install

λ laptop BitGoJS-4.8.0 → npm i
npm WARN excluding symbolic link build/ripple-latest-min.js -> /Users/yxfxmx/Dev/BitGoJS-4.8.0/node_modules/.staging/ripple-lib-2c55d6cb/ripple-lib/build/ripple-0.17.3-min.js
npm WARN excluding symbolic link build/ripple-latest.js -> /Users/yxfxmx/Dev/BitGoJS-4.8.0/node_modules/.staging/ripple-lib-2c55d6cb/ripple-lib/build/ripple-0.17.3.js

> [email protected] install /Users/yxfxmx/Dev/BitGoJS-4.8.0/node_modules/fsevents
> node install

[fsevents] Success: "/Users/yxfxmx/Dev/BitGoJS-4.8.0/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

> [email protected] install /Users/yxfxmx/Dev/BitGoJS-4.8.0/node_modules/sha3
> node-gyp rebuild

  CXX(target) Release/obj.target/sha3/src/addon.o
../src/addon.cpp:59:36: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
                        info.GetReturnValue().Set(cons->NewInstance(argc, argv));
                                                        ^
/Users/yxfxmx/.node-gyp/6.9.5/include/node/v8.h:3269:3: note: 'NewInstance' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version",
  ^
/Users/yxfxmx/.node-gyp/6.9.5/include/node/v8config.h:336:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
1 warning generated.
  CXX(target) Release/obj.target/sha3/src/displayIntermediateValues.o
  CXX(target) Release/obj.target/sha3/src/KeccakF-1600-reference.o
  CXX(target) Release/obj.target/sha3/src/KeccakNISTInterface.o
  CXX(target) Release/obj.target/sha3/src/KeccakSponge.o
  SOLINK_MODULE(target) Release/sha3.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]

> [email protected] install /Users/yxfxmx/Dev/BitGoJS-4.8.0/node_modules/prova-lib/node_modules/secp256k1
> prebuild-install || node-gyp rebuild || echo "Secp256k1 bindings compilation fail. Pure JS implementation will be used."

prebuild-install info begin Prebuild-install version 2.3.0
prebuild-install info looking for local prebuild @ prebuilds/secp256k1-v3.3.0-node-v48-darwin-x64.tar.gz
prebuild-install info looking for cached prebuild @ /Users/yxfxmx/.npm/_prebuilds/https-github.com-cryptocoinjs-secp256k1-node-releases-download-v3.3.0-secp256k1-v3.3.0-node-v48-darwin-x64.tar.gz
prebuild-install info found cached prebuild
prebuild-install info unpacking @ /Users/yxfxmx/.npm/_prebuilds/https-github.com-cryptocoinjs-secp256k1-node-releases-download-v3.3.0-secp256k1-v3.3.0-node-v48-darwin-x64.tar.gz
prebuild-install info unpack resolved to /Users/yxfxmx/Dev/BitGoJS-4.8.0/node_modules/prova-lib/node_modules/secp256k1/build/Release/secp256k1.node
prebuild-install info unpack required /Users/yxfxmx/Dev/BitGoJS-4.8.0/node_modules/prova-lib/node_modules/secp256k1/build/Release/secp256k1.node successfully
prebuild-install info install Successfully installed prebuilt binary!

> [email protected] install /Users/yxfxmx/Dev/BitGoJS-4.8.0/node_modules/secp256k1
> prebuild-install || node-gyp rebuild || echo "Secp256k1 bindings compilation fail. Pure JS implementation will be used."

prebuild-install info begin Prebuild-install version 2.3.0
prebuild-install info looking for local prebuild @ prebuilds/secp256k1-v3.2.5-node-v48-darwin-x64.tar.gz
prebuild-install info looking for cached prebuild @ /Users/yxfxmx/.npm/_prebuilds/https-github.com-cryptocoinjs-secp256k1-node-releases-download-v3.2.5-secp256k1-v3.2.5-node-v48-darwin-x64.tar.gz
prebuild-install info found cached prebuild
prebuild-install info unpacking @ /Users/yxfxmx/.npm/_prebuilds/https-github.com-cryptocoinjs-secp256k1-node-releases-download-v3.2.5-secp256k1-v3.2.5-node-v48-darwin-x64.tar.gz
prebuild-install info unpack resolved to /Users/yxfxmx/Dev/BitGoJS-4.8.0/node_modules/secp256k1/build/Release/secp256k1.node
prebuild-install info unpack required /Users/yxfxmx/Dev/BitGoJS-4.8.0/node_modules/secp256k1/build/Release/secp256k1.node successfully
prebuild-install info install Successfully installed prebuilt binary!

Could someone pls explain me what is the danger of these warnings and how can I get rid of them?

Send Transaction Failure

Hi Bitgo Team,
I use testnet environment for send tarnsctaions i have put address in receptions parameter like a in documenation, get a message Error: Missing parameter: address,
let params = { recipients: [ { amount: 0.01 * 1e8, address: '0x127be4f95f6e06d652c2cf30ad983d92a937b2ea', } ], walletPassphrase: 'BtTl1TIE7pqbzU3kFxkd6W7GT8ynMPtI' }; wallet.send(params) .then(function(transaction) { // print transaction details console.dir(transaction); }).catch(function(error) { // print transaction details console.dir(error); });

Please help. thanks

ping is not a function of bitgo

This is my code, taken from the API docs:

var bitgo = require('bitgo');

bitgo.ping({}, function(err, res) {
    console.log(err, res);
});

I get:

bitgo.ping({}, function(err, res) {
      ^

TypeError: bitgo.ping is not a function
    at Object.<anonymous> (/Users/justin/Desktop/Duo-Money/backend/services/bitgo.js:7:7)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:457:10)
    at startup (node.js:136:18)
    at node.js:972:3

I then tried looking at what is available in the bitgo object, and got:

for(var i in bitgo) {
    console.log(i);
}
BitGo
bitcoin
sjcl
bs58
setNetwork
getNetwork

What am I doing wrong?

Issue: [email protected] rebuild: `node-gyp rebuild`

I spent the last 3 days trying to install bitgojs on my server without success. I already installed this without any issue in past.

Please help me:

[root@CentOS-68-64-minimal ~]# git clone https://github.com/BitGo/BitGoJS
Initialized empty Git repository in /root/BitGoJS/.git/
remote: Counting objects: 2743, done.
remote: Total 2743 (delta 0), reused 0 (delta 0), pack-reused 2743
Receiving objects: 100% (2743/2743), 1.33 MiB | 557 KiB/s, done.
Resolving deltas: 100% (1943/1943), done.
[root@CentOS-68-64-minimal ~]# 
[root@CentOS-68-64-minimal ~]# cd BitGoJS
[root@CentOS-68-64-minimal BitGoJS]# 
[root@CentOS-68-64-minimal BitGoJS]# 
[root@CentOS-68-64-minimal BitGoJS]# npm install

npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

> [email protected] install /root/BitGoJS/node_modules/secp256k1
> npm run rebuild


> [email protected] rebuild /root/BitGoJS/node_modules/secp256k1
> node-gyp rebuild

make: Entering directory `/root/BitGoJS/node_modules/secp256k1/build'
  CXX(target) Release/obj.target/secp256k1/src/addon.o
  CXX(target) Release/obj.target/secp256k1/src/privatekey.o
  CXX(target) Release/obj.target/secp256k1/src/publickey.o
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/memory:83,
                 from ../src/publickey.cc:1:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h: In member function 'virtual void* std::_Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp>::_M_get_deleter(const std::type_info&)':
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h:146: error: cannot use typeid with -fno-rtti
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h: In member function 'virtual void* std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_get_deleter(const std::type_info&)':
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h:204: error: cannot use typeid with -fno-rtti
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h: In constructor 'std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, _Alloc, _Args&& ...)':
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h:861: error: cannot use typeid with -fno-rtti
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h: In function '_Del* std::get_deleter(const std::__shared_ptr<_Tp2, _Lp>&)':
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h:1005: error: cannot use typeid with -fno-rtti
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-maybe-uninitialized"
make: *** [Release/obj.target/secp256k1/src/publickey.o] Error 1
make: Leaving directory `/root/BitGoJS/node_modules/secp256k1/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 2.6.32-642.6.2.el6.x86_64
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/BitGoJS/node_modules/secp256k1
gyp ERR! node -v v0.10.30
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok 

npm ERR! [email protected] rebuild: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] rebuild script.
npm ERR! This is most likely a problem with the secp256k1 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls secp256k1
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-642.6.2.el6.x86_64
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "run" "rebuild"
npm ERR! cwd /root/BitGoJS/node_modules/secp256k1
npm ERR! node -v v0.10.30
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /root/BitGoJS/node_modules/secp256k1/npm-debug.log
npm ERR! not ok code 0
[email protected] /root/BitGoJS
├─┬ [email protected] 
│ └── [email protected] 
├─┬ [email protected] 
│ └── [email protected] 
├─┬ [email protected] 
│ ├─┬ [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ ├─┬ [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ ├─┬ [email protected] 
│ │ │ │ │ └── [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ └── [email protected] 
│ │ │ ├── [email protected] 
│ │ │ └── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ ├─┬ [email protected] 
│ │ │ │ └─┬ [email protected] 
│ │ │ │   └─┬ [email protected] 
│ │ │ │     └── [email protected] 
│ │ │ ├── [email protected] 
│ │ │ └── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ ├─┬ [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ └── [email protected] 
│ │ │ └─┬ [email protected] 
│ │ │   └── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ └── [email protected] 
│ │ ├── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ ├── [email protected] 
│ │ │ └─┬ [email protected] 
│ │ │   └── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ └── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ └── [email protected] 
├── [email protected] 
├── [email protected] 
├─┬ [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ └─┬ [email protected] 
│   └── [email protected] 
├─┬ [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ └─┬ [email protected] 
│   ├── [email protected] 
│   └─┬ [email protected] 
│     └── [email protected] 
├─┬ [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ ├── [email protected] 
│ │ │ ├─┬ [email protected] 
│ │ │ │ └── [email protected] 
│ │ │ ├── [email protected] 
│ │ │ └── [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ ├─┬ [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ └── [email protected] 
│ │ └── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ ├─┬ [email protected] 
│ │ │ │ └── [email protected] 
│ │ │ ├─┬ [email protected] 
│ │ │ │ └─┬ [email protected] 
│ │ │ │   └── [email protected] 
│ │ │ └── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ ├── [email protected] 
│ │ │ ├── [email protected] 
│ │ │ ├─┬ [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ └── [email protected] 
│ │ │ └─┬ [email protected] 
│ │ │   └── [email protected] 
│ │ ├── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ └── [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └─┬ [email protected] 
│ │   └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ └─┬ [email protected] 
│ │   └─┬ [email protected] 
│ │     └── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ └─┬ [email protected] 
│ │   └─┬ [email protected] 
│ │     └── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ └── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ └── [email protected] 
│ │ └─┬ [email protected] 
│ │   └─┬ [email protected] 
│ │     └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └─┬ [email protected] 
│ │   └── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ ├─┬ [email protected] 
│ │ └─┬ [email protected] 
│ │   └── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ └── [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├─┬ [email protected] 
│ │ └─┬ [email protected] 
│ │   └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ └── [email protected] 
├── [email protected] 
├── [email protected] 
├─┬ [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ └─┬ [email protected] 
│   ├── [email protected] 
│   ├── [email protected] 
│   ├── [email protected] 
│   ├─┬ [email protected] 
│   │ ├── [email protected] 
│   │ └─┬ [email protected] 
│   │   └── [email protected] 
│   ├─┬ [email protected] 
│   │ ├── [email protected] 
│   │ ├── [email protected] 
│   │ ├── [email protected] 
│   │ └── [email protected] 
│   ├── [email protected] 
│   ├── [email protected] 
│   ├── [email protected] 
│   ├── [email protected] 
│   ├── [email protected] 
│   └── [email protected] 
├── [email protected] 
├── [email protected] 
├─┬ [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ ├─┬ [email protected] 
│ │ │ │ └── [email protected] 
│ │ │ └─┬ [email protected] 
│ │ │   ├── [email protected] 
│ │ │   ├── [email protected] 
│ │ │   └── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ └── [email protected] 
├─┬ [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ └── [email protected] 
├─┬ [email protected] 
│ ├── [email protected] 
│ └── [email protected] 
├─┬ [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ ├── [email protected] 
│ │ │ ├── [email protected] 
│ │ │ ├── [email protected] 
│ │ │ ├── [email protected] 
│ │ │ └── [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ └── [email protected] 
│ │ └─┬ [email protected] 
│ │   └── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ └─┬ [email protected] 
│ │   ├── [email protected] 
│ │   └─┬ [email protected] 
│ │     └── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ └── [email protected] 
├─┬ [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ ├── [email protected] 
│ │ │ └─┬ [email protected] 
│ │ │   ├─┬ [email protected] 
│ │ │   │ └── [email protected] 
│ │ │   ├─┬ [email protected] 
│ │ │   │ ├─┬ [email protected] 
│ │ │   │ │ └─┬ [email protected] 
│ │ │   │ │   ├── [email protected] 
│ │ │   │ │   ├─┬ [email protected] 
│ │ │   │ │   │ └── [email protected] 
│ │ │   │ │   ├── [email protected] 
│ │ │   │ │   └── [email protected] 
│ │ │   │ ├── [email protected] 
│ │ │   │ └── [email protected] 
│ │ │   ├─┬ [email protected] 
│ │ │   │ └── [email protected] 
│ │ │   ├── [email protected] 
│ │ │   ├── [email protected] 
│ │ │   ├── [email protected] 
│ │ │   ├── [email protected] 
│ │ │   ├─┬ [email protected] 
│ │ │   │ ├─┬ [email protected] 
│ │ │   │ │ └── [email protected] 
│ │ │   │ └── [email protected] 
│ │ │   ├─┬ [email protected] 
│ │ │   │ ├── [email protected] 
│ │ │   │ └── [email protected] 
│ │ │   └─┬ [email protected] 
│ │ │     ├── [email protected] 
│ │ │     └── [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ └── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ └── [email protected] 
│ │ └─┬ [email protected] 
│ │   ├─┬ [email protected] 
│ │   │ └── [email protected] 
│ │   └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ └─┬ [email protected] 
│ │   └─┬ [email protected] 
│ │     ├── [email protected] 
│ │     └── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └─┬ [email protected] 
│ │   ├── [email protected] 
│ │   └── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├─┬ [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ ├── [email protected] 
│ │ │ ├─┬ [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ └── [email protected] 
│ │ │ └─┬ [email protected] 
│ │ │   ├── [email protected] 
│ │ │   └── [email protected] 
│ │ ├── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ └─┬ [email protected] 
│ │ │   ├── [email protected] 
│ │ │   ├── [email protected] 
│ │ │   ├── [email protected] 
│ │ │   └── [email protected] 
│ │ ├─┬ [email protected] 
│ │ │ ├── [email protected] 
│ │ │ ├── [email protected] 
│ │ │ ├── [email protected] 
│ │ │ ├─┬ [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ ├── [email protected] 
│ │ │ │ └── [email protected] 
│ │ │ ├── [email protected] 
│ │ │ ├─┬ [email protected] 
│ │ │ │ └─┬ [email protected] 
│ │ │ │   └── [email protected] 
│ │ │ └── [email protected] 
│ │ └─┬ [email protected] 
│ │   ├── [email protected] 
│ │   └── [email protected] 
│ ├── [email protected] 
│ └─┬ [email protected] 
│   └── [email protected] 
├── [email protected] 
├── [email protected] 
├─┬ [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ └─┬ [email protected] 
│   └── [email protected] 
├── [email protected] 
├── [email protected] 
├─┬ [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ └── [email protected] 
├── [email protected] 
├── [email protected] 
├─┬ [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ └─┬ [email protected] 
│   └── [email protected] 
├── [email protected] 
├── [email protected] 
├─┬ [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ └─┬ [email protected] 
│ │   └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ └── [email protected] 
├─┬ [email protected] 
│ └─┬ [email protected] 
│   ├─┬ [email protected] 
│   │ └── [email protected] 
│   ├── [email protected] 
│   ├── [email protected] 
│   ├── [email protected] 
│   ├─┬ [email protected] 
│   │ ├─┬ [email protected] 
│   │ │ ├── [email protected] 
│   │ │ ├── [email protected] 
│   │ │ ├─┬ [email protected] 
│   │ │ │ ├── [email protected] 
│   │ │ │ └── [email protected] 
│   │ │ └─┬ [email protected] 
│   │ │   └── [email protected] 
│   │ ├─┬ [email protected] 
│   │ │ ├── [email protected] 
│   │ │ ├─┬ [email protected] 
│   │ │ │ ├── [email protected] 
│   │ │ │ ├─┬ [email protected] 
│   │ │ │ │ ├─┬ [email protected] 
│   │ │ │ │ │ ├── [email protected] 
│   │ │ │ │ │ ├── [email protected] 
│   │ │ │ │ │ └── [email protected] 
│   │ │ │ │ └── [email protected] 
│   │ │ │ └── [email protected] 
│   │ │ ├── [email protected] 
│   │ │ ├─┬ [email protected] 
│   │ │ │ ├─┬ [email protected] 
│   │ │ │ │ ├─┬ [email protected] 
│   │ │ │ │ │ └── [email protected] 
│   │ │ │ │ ├── [email protected] 
│   │ │ │ │ ├── [email protected] 
│   │ │ │ │ ├── [email protected] 
│   │ │ │ │ ├── [email protected] 
│   │ │ │ │ ├── [email protected] 
│   │ │ │ │ ├── [email protected] 
│   │ │ │ │ ├── [email protected] 
│   │ │ │ │ ├── [email protected] 
│   │ │ │ │ └─┬ [email protected] 
│   │ │ │ │   ├── [email protected] 
│   │ │ │ │   ├─┬ [email protected] 
│   │ │ │ │   │ ├─┬ [email protected] 
│   │ │ │ │   │ │ ├─┬ [email protected] 
│   │ │ │ │   │ │ │ └── [email protected] 
│   │ │ │ │   │ │ └── [email protected] 
│   │ │ │ │   │ ├── [email protected] 
│   │ │ │ │   │ └── [email protected] 
│   │ │ │ │   ├── [email protected] 
│   │ │ │ │   ├─┬ [email protected] 
│   │ │ │ │   │ └─┬ [email protected] 
│   │ │ │ │   │   └── [email protected] 
│   │ │ │ │   ├── [email protected] 
│   │ │ │ │   └── [email protected] 
│   │ │ │ └── [email protected] 
│   │ │ └── [email protected] 
│   │ └─┬ [email protected] 
│   │   └── [email protected] 
│   └─┬ [email protected] 
│     └─┬ [email protected] 
│       ├── [email protected] 
│       └── [email protected] 
├─┬ [email protected] 
│ └─┬ [email protected] 
│   ├── [email protected] 
│   ├── [email protected] 
│   ├── [email protected] 
│   ├─┬ [email protected] 
│   │ ├── [email protected] 
│   │ └─┬ [email protected] 
│   │   └── [email protected] 
│   ├── [email protected] 
│   ├── [email protected] 
│   ├── [email protected] 
│   └── [email protected] 
├─┬ [email protected] 
│ └── [email protected] 
├─┬ [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ └── [email protected] 
├─┬ [email protected] 
│ ├── [email protected] 
│ └── [email protected] 
└── [email protected] 

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] No license field.
npm ERR! Linux 2.6.32-642.6.2.el6.x86_64
npm ERR! argv "node" "/usr/bin/npm" "install"
npm ERR! node v0.10.30
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `npm run rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'npm run rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the secp256k1 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs secp256k1
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls secp256k1
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /root/BitGoJS/npm-debug.log

Create addresses semi-working on test platform

I get the following stacktrace:

api_1 | AssertionError: Not enough pubKeys provided
api_1 |     at Object.multisigOutput (/app/node_modules/bitcoinjs-lib/src/scripts.js:206:3)
api_1 |     at Object.Util.p2shMultisigOutputScript (/app/node_modules/bitgo/src/util.js:21:30)
api_1 |     at calcAddress (/app/node_modules/bitgo/src/wallet.js:214:23)
api_1 |     at Wallet.validateAddress (/app/node_modules/bitgo/src/wallet.js:219:22)
api_1 |     at /app/node_modules/bitgo/src/wallet.js:185:12
api_1 |     at _fulfilled (/app/node_modules/bitgo/node_modules/q/q.js:794:54)
api_1 |     at self.promiseDispatch.done (/app/node_modules/bitgo/node_modules/q/q.js:823:30)
api_1 |     at Promise.promise.promiseDispatch (/app/node_modules/bitgo/node_modules/q/q.js:756:13)
api_1 |     at /app/node_modules/bitgo/node_modules/q/q.js:564:44
api_1 |     at flush (/app/node_modules/bitgo/node_modules/q/q.js:110:17)
api_1 |     at /app/node_modules/async-listener/glue.js:188:31
api_1 |     at doNTCallback0 (node.js:417:9)
api_1 |     at process._tickCallback (node.js:346:13)

It does create the addresses on the test platform, but the promise being rejected I need to use a hack-ish way to get the newly created address information.

2FA with email link

Currently, BitGo requires its users to either download Google Authenticator App or buy a Yubikey for 2FA, while creating an account.

Why does BitGo not give an option for an email based 2FA?

(Email based 2FA - a link is sent to the email on every login, which when clicked, authorizes the login, like in case of blockchain.info wallets)

Breaks superagent

When requiring bitgo, my node process hangs which means that bitgo is probably opening some connection?

Encrypt/Decrypt not setting the sjcl salt option

We used the Bitgo.encrypt method in our system, and notice that many encrypted data had the same salt assigned. When we took a look at this method we notice no salt param is set to sjcl.encrypt. Seems like this lib internally reuses the salts. ( [email protected] Bitgo.js line 303 )

BitGo.prototype.encrypt = function(params) {
  params = params || {};
  common.validateParams(params, ['input', 'password'], []);
  var encryptOptions = { iter: 10000, ks: 256 };
  return sjcl.encrypt(params.password, params.input, encryptOptions);
};

The recommended way to use sjcl is to use a generated salt like:

const salt = sjcl.random.randomWords('10','0')
sjcl.encrypt(backend.SIGNATURE , text, { iter:10000,ks:256,"salt": salt });

wallets/simplecreate API returns error

On calling the API " wallets/simplecreate " we get a response as

{
"error": "ethUtil.publicToAddress is not a function",
"message": "ethUtil.publicToAddress is not a function"
}.

Even tried a nodeJs code to call wallets().createWalletWithKeychains which returns the same error.
Please help us with this error.

Multiple DoS Security threat vectors exposed by chain-node

Your module is making use of chain-node which currently uses an older version of request that exposes multiple threat vectors.

│               │ Denial-of-Service Extended Event Loop Blocking
│ Name          │ qs
│ Installed     │ 0.6.6
│ Vulnerable    │ <1.0.0
│ Patched       │ >= 1.x
│ Path          │ [email protected] > [email protected] > [email protected] > [email protected]
│ More Info     │ https://nodesecurity.io/advisories/28

│               │ Denial-of-Service Memory Exhaustion
│ Name          │ qs
│ Installed     │ 0.6.6
│ Vulnerable    │ <1.0.0
│ Patched       │ >= 1.x
│ Path          │ [email protected] > [email protected] > [email protected] > [email protected]
│ More Info     │ https://nodesecurity.io/advisories/29

│               │ Regular Expression Denial of Service
│ Name          │ hawk
│ Installed     │ 1.0.0
│ Vulnerable    │ <4.1.1
│ Patched       │ >=4.1.1
│ Path          │ [email protected] > [email protected] > [email protected] > [email protected]
│ More Info     │ https://nodesecurity.io/advisories/77

Information generated by nsp

Unless you find another solution, chain-node is currently blocking this

I can't generate wallet in teth

Hi team BitGo,
I have installled bitgo version v3.4.0

when i generate wallet with teth, i got a error Error: cannot access this route with coin type teth,

this is my code
this.bitgo.coin('teth').wallets() .generateWallet({ label: label, passphrase: passphrase }) .then(function(wallet) { // print the new wallet console.dir(wallet); }).catch(function(err) { console.log(err); });

thanks

Can't compile v4.8.0

Downloaded zip of v4.8.0, trying to compile a browser bundle, getting errors:

npm ERR! Darwin 16.7.0
npm ERR! argv "/Users/yxfxmx/.nvm/versions/node/v6.9.5/bin/node" "/Users/yxfxmx/.nvm/versions/node/v6.9.5/bin/npm" "run-script" "compile"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] compile: `mkdir -p browser && ./node_modules/.bin/browserify ./src/index.js --exclude superagent-proxy --exclude morgan -s BitGoJS -g uglifyify -o browser/BitGoJS-min.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] compile script 'mkdir -p browser && ./node_modules/.bin/browserify ./src/index.js --exclude superagent-proxy --exclude morgan -s BitGoJS -g uglifyify -o browser/BitGoJS-min.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bitgo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     mkdir -p browser && ./node_modules/.bin/browserify ./src/index.js --exclude superagent-proxy --exclude morgan -s BitGoJS -g uglifyify -o browser/BitGoJS-min.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs bitgo
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls bitgo
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/yxfxmx/Dev/BitGoJS-4.8.0/npm-debug.log

The mentioned npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ '/Users/yxfxmx/.nvm/versions/node/v6.9.5/bin/node',
1 verbose cli   '/Users/yxfxmx/.nvm/versions/node/v6.9.5/bin/npm',
1 verbose cli   'run-script',
1 verbose cli   'compile' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'precompile', 'compile', 'postcompile' ]
5 info lifecycle [email protected]~precompile: [email protected]
6 silly lifecycle [email protected]~precompile: no script for precompile, continuing
7 info lifecycle [email protected]~compile: [email protected]
8 verbose lifecycle [email protected]~compile: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~compile: PATH: /Users/yxfxmx/.nvm/versions/node/v6.9.5/lib/node_modules/npm/bin/node-gyp-bin:/Users/yxfxmx/Dev/BitGoJS-4.8.0/node_modules/.bin:/Users/yxfxmx/.nvm/versions/node/v6.9.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/MacGPG2/bin:/usr/local/bin:/Users/yxfxmx/Library/Android/sdk/tools:/Users/yxfxmx/Library/Android/sdk/platform-tools:/Users/yxfxmx/Library/Android/sdk/build-tools/25.0.0
10 verbose lifecycle [email protected]~compile: CWD: /Users/yxfxmx/Dev/BitGoJS-4.8.0
11 silly lifecycle [email protected]~compile: Args: [ '-c',
11 silly lifecycle   'mkdir -p browser && ./node_modules/.bin/browserify ./src/index.js --exclude superagent-proxy --exclude morgan -s BitGoJS -g uglifyify -o browser/BitGoJS-min.js' ]
12 silly lifecycle [email protected]~compile: Returned: code: 1  signal: null
13 info lifecycle [email protected]~compile: Failed to exec compile script
14 verbose stack Error: [email protected] compile: `mkdir -p browser && ./node_modules/.bin/browserify ./src/index.js --exclude superagent-proxy --exclude morgan -s BitGoJS -g uglifyify -o browser/BitGoJS-min.js`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/Users/yxfxmx/.nvm/versions/node/v6.9.5/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (/Users/yxfxmx/.nvm/versions/node/v6.9.5/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:877:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid [email protected]
16 verbose cwd /Users/yxfxmx/Dev/BitGoJS-4.8.0
17 error Darwin 16.7.0
18 error argv "/Users/yxfxmx/.nvm/versions/node/v6.9.5/bin/node" "/Users/yxfxmx/.nvm/versions/node/v6.9.5/bin/npm" "run-script" "compile"
19 error node v6.9.5
20 error npm  v3.10.10
21 error code ELIFECYCLE
22 error [email protected] compile: `mkdir -p browser && ./node_modules/.bin/browserify ./src/index.js --exclude superagent-proxy --exclude morgan -s BitGoJS -g uglifyify -o browser/BitGoJS-min.js`
22 error Exit status 1
23 error Failed at the [email protected] compile script 'mkdir -p browser && ./node_modules/.bin/browserify ./src/index.js --exclude superagent-proxy --exclude morgan -s BitGoJS -g uglifyify -o browser/BitGoJS-min.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the bitgo package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     mkdir -p browser && ./node_modules/.bin/browserify ./src/index.js --exclude superagent-proxy --exclude morgan -s BitGoJS -g uglifyify -o browser/BitGoJS-min.js
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs bitgo
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls bitgo
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

What is the problem here? How can I resolve? I also had issues when doing npm install before compiling: #69
Could these be related?

ReferenceError: _ is not defined

Get this error when try to create an wallet by CURL:

ReferenceError: _ is not defined
at Wallets.add (/var/www/html/BitGoJS/src/wallets.js:468:53)
at /var/www/html/BitGoJS/src/wallets.js:374:17
at tryCatcher (/var/www/html/BitGoJS/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/var/www/html/BitGoJS/node_modules/bluebird/js/main/promise.js:510:31)
at Promise._settlePromiseAt (/var/www/html/BitGoJS/node_modules/bluebird/js/main/promise.js:584:18)
at Async._drainQueue (/var/www/html/BitGoJS/node_modules/bluebird/js/main/async.js:128:12)
at Async._drainQueues (/var/www/html/BitGoJS/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues (/var/www/html/BitGoJS/node_modules/bluebird/js/main/async.js:15:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)

I can't generate wallet in txrp

Hi team BitGo,
I have installled bitgo version v3.4.0

bitgo.coin('txrp).wallets().generateWallet({ label: "label", passphrase: "passphrase" })
.then(function(wallet) {
console.log(wallet);
res.json({ wallet });
},function(response){
res.json({ response });

});

When I try to generate my wallet in txrp the response is:

{
"response": {
"status": 404,
"result": {
"error": "address balance not found"
}
}
}

sdk env notset

$ node index
BitGo SDK env not set - defaulting to testnet at test.bitgo.com.
{ Error: unauthorized
at errFromResponse (C:\projects\BitGoJS\node_modules\bitgo\src\bitgo.js:76:1

at handleResponseError (C:\projects\BitGoJS\node_modules\bitgo\src\bitgo.js:

:11)
at _rejected (C:\projects\BitGoJS\node_modules\q\q.js:804:24)
at C:\projects\BitGoJS\node_modules\q\q.js:830:30
at Promise.when (C:\projects\BitGoJS\node_modules\q\q.js:1064:31)
at Promise.promise.promiseDispatch (C:\projects\BitGoJS\node_modules\q\q.js:
8:41)
at C:\projects\BitGoJS\node_modules\q\q.js:564:44
at flush (C:\projects\BitGoJS\node_modules\q\q.js:110:17)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
status: 401,
result: { error: 'unauthorized' },
invalidToken: true }
undefined

Unexpected API response for insufficient funds

When the wallet balance is too low, the "Send Coins to Address" API returns a 500 HTTP status and something like this:

{
  "available": 406245,
  "message": "Insufficient funds",
  "fee": 14160
}

This caught us by surprise and seems like a mistake, since the "Error Handling" section of the API docs says:

All errors follow general REST principles. Included in the body of any error response (e.g. non-200 status code) will be an error object of the form:

Parameter  Value
status     The HTTP error status returned
error      The detailed description of the error

The spec led me to expect an error attribute, but instead we got a message attribute.

If this is intentional, perhaps this behavior at least calls for a special mention in the documentation.

BitGoExpress Error - Failed to Sign Input

I'm trying to use the sendcoin api call via bitgo express in PHP. I'm getting the error shown in the screenshot, does anyone know if this is a bitgo express related issue or am I just doing something wrong?
screenshot from 2017-05-23 18-11-03

Rounding error in instant fee calculation

While creating an instant transaction the following error was thrown:

AssertionError: value has a fractional component
    at verifuint (…/node_modules/bitgo/node_modules/bitcoinjs-lib/src/bufferutils.js:9:3)
    at Object.writeUInt64LE (…/node_modules/bitgo/node_modules/bitcoinjs-lib/src/bufferutils.js:124:3)
    at writeUInt64 (…/node_modules/bitgo/node_modules/bitcoinjs-lib/src/transaction.js:293:17)
    at …/node_modules/bitgo/node_modules/bitcoinjs-lib/src/transaction.js:316:5

One of the outputs, the instant fee output, had this value: 900000.0000000001

I tried to round the value of the output manually to 900000 and 900001 but both times the BitGo api threw this error:

Error: instant fee incorrect, expected 900000.0000000001

Satisfying the requirement of a fractional instant fee is not possible with Satoshis, they don't have fractions.

This looks like a rounding error to me.

secp256k1 errors during npm installation

going to remove from package as suggested but this is prevents the build from completing as is and also means i have to clone this repo which is a step currently in the installation guide

slack channel signup error

receive this error when requesting slack invite
getaddrinfo ENOTFOUND bitgodevs.slack.com bitgodevs.slack.com:443

Cannot find module error

I had this error when I tried to run BitGo using this:
./bitgo-express --debug --bind localhost

Error: Cannot find module './Wallet'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/home/eugene/Documents/frontdevs/BitGoJS/src/v2/wallets.js:2:14)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)

I solved it by changing in src/v2/wallets.js it:
var Wallet = require('./Wallet');
to
var Wallet = require('./wallet');

Can't manage to get a list of wallets.

I tried using code from the Bitgo api manual for getting a list of all the wallets.

var BitGoJS = require('bitgo');

var accessToken = process.argv[2];
var bitgo = new BitGoJS.BitGo({env: 'test', accessToken: accessToken});

var wallets = bitgo.wallets();
wallets.list({}, function callback(err, wallets) {
  // handle error, do something with wallets
  for (id in wallets) {
    var wallet = wallets[id].wallet;

    console.log(JSON.stringify(wallet, null, 4));
  }
});

And all I'm getting back is

$ node listWallets.js $ACCESS_TOKEN
undefined
undefined
undefined
undefined
undefined

I tried doing the same using login, password, otp with the same results.
My token should give access to

'wallet_view_all',
'wallet_spend_all',
'wallet_manage_all',
'wallet_create'

BitGOJS Browser Library - Unable to compile a single file to use in the browser

I'm having a hard time trying to get my hands on the BitGo Client-side JavaScript Library (for Browsers). I'll explain below the steps I took and the outcome of those steps.

  1. Version Check
    1_versions

  2. Cloning the Repo
    2_clone

  3. npm install
    Below are sections where I saw errors or suspicious output
    3_npm_install
    4_unsupported_platform

  4. npm run-script compile
    5_compile

  5. npm run-script compile-dbg
    6_compile_dbg

What am I doing wrong? My goal is to compile a single JavaScript library file to use in the browser. Am I on the right track?

npm-debug.log file
https://ufile.io/9cksn

The Website is Down

Test.bitgo.com is down.

Is there any way to test for this in the code, to make sure you're not sending requests to a server that's down.

isup.me/test.bitgo.com

sendMany() throws "error": "Cannot send to more than one address"

Hi there,

I'm using the wallet.sendMany method and with only one recipients: [{address, amount}] works fine, but if the recipients contain more than one ([{address, amount}, {address, amount}, {address, amount}]) it throws:

"error": "Cannot send to more than one address"

What could be the reason for that?

Always Return 'Already Login' from bitgo-express & 404 for link

Hi,

I'm trying to combine BitGo-Express with PHP.
As the tutorial says, BitGo may combine with any language as long as BitGo Express running.

Problem :

  1. When i login from browser (PHP Script) return always :

stdClass Object
(
[error] => already logged in
[message] => already logged in
)

Test(s) i've done (from php script) before login from node js example :

  1. Try to access session (response) :
    stdClass Object
    (
    [error] => unauthorized
    [message] => unauthorized
    )

  2. List Wallet (response) :
    stdClass Object
    (
    [error] => unauthorized
    [message] => unauthorized
    )

  3. Create Wallet (response) :
    stdClass Object
    (
    [error] => unauthorized
    [message] => unauthorized
    )

I assume that login is needed :

  1. Try to login from node js in example (response) :
    => List of login detail
    => Access Token of course

Then, i used access token given from login with node js and use it in php script.
I face no problem. Every access (above) run well, except several like (user/me) return 404.

Event logout method run well from php script.

The questions are :
=> Why login (from php) always return "Already Login" (even not login yet) but success from node JS ?
=> Why link like (user/me) return 404 ?

Thx in advance

BitGo is not a constructor

TypeError: BitGo.BitGo is not a constructor
at repl:1:13
at sigintHandlersWrap (vm.js:22:35)
at sigintHandlersWrap (vm.js:73:12)
at ContextifyScript.Script.runInThisContext (vm.js:21:12)
at REPLServer.defaultEval (repl.js:346:29)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
at REPLServer. (repl.js:545:10)
at emitOne (events.js:101:20)
at REPLServer.emit (events.js:188:7)

Error: needs unlock

Currently I am getting an "Error: needs unlock" when spending coins via API. I have a setup an long access token and clicked on all the options. The website states that "Long-lived access tokens are suitable for use on servers/unattended devices. The tokens do not require an OTP for spending and must be locked down to IP addresses.".

But I cannot spend the BTC without an OPT.

Hd wallet path for segwit addresses

I can see segwit address of change are generated on chain 11,
Can you provide full path m/0/0/11 does not work
Also what will be path of receive addresses ?

Cannot get example working

Followed the tutorial step-by-step (in particular, I did npm install bitgo). Below is the error I get:

node BitGoJS/example/auth.js
module.js:339
    throw err;
    ^

Error: Cannot find module 'superagent'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/Users/justin/Desktop/Duo-Money/backend/BitGoJS/src/bitgo.js:7:18)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)

Error generate wallet for XRP

Hello,
When I try to generate Wallet for Ripple using API Rest v2, I got this error:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $ACCESS_TOKEN" -d "{ "label": "MY_LABEL","passphrase": "MY_PASSPHRASE" }" http://localhost:3080/api/v2/txrp/wallet/generate
{"error":"Cannot read property 'r' of undefined","message":"Cannot read property 'r' of undefined"}
Please help with this.
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.