Comments (7)
Correction- the dust threshold is irrelevant, I made a mistake in the console. So I guess the question is- is sendmany
broken? Or does it expect different input?
from bitgojs.
Ah, it looks an issue with the docs + not properly distinguishing between an array and an object in the JS.
The docs say /sendmany
takes a recipients argument like [{address: '38BKDNZbPcLogvVbcx2ekJ9E6Vv94DqDqw’, amount: 1500}, ..]
, not {'38BKDNZbPcLogvVbcx2ekJ9E6Vv94DqDqw': 1500}
.
Editing the title and leaving this open as a docs issue.
from bitgojs.
Hey there, can you clarify which network you were running Bitgo express on ? Your examples show both testnet and bitcoin addresses (if you use a testnet address on prod it will give the invalid address error).
from bitgojs.
@bencxr the original example is the code that I ran- on testnet. The other comments are about the docs, and thus use mainnet addresses.
It's a simple problem- the docs specify the wrong data structure to send, and wallet.js
doesn't properly validate the data, instead throwing an inscrutable 500.
If there's a repo for the docs (or I just missed them) I'd be happy to provide a PR. I'm less confident in my JS or I'd patch that as well.
from bitgojs.
The first example was what I ran on testnet. The second is from the docs- it's using mainnet addresses because I copied it straight out.
from bitgojs.
@mhluongo the docs specify the more recent version of the structure. If you look into transactionBuilder.js, you will see that we actually support both (backwards compatible). You can specify an array of address: amount object or dictionary of address keys with amounts (however you can't send more than one output to the same address this way). So I don't think that was the cause of a problem in this case.
from bitgojs.
Realized I'm running an odler version- git pull
ing and trying it again
from bitgojs.
Related Issues (20)
- Unable to resolve "@brandonblack/musig/base_crypto" from "../../node_modules/@bitgo/utxo-lib/dist/src/noble_ecc.js"
- resolve/test/resolver/multirepo/package.json has malicious code
- Problem with a dependency that has malicious code HOT 1
- Error: Unable to resolve module @brandonblack/musig/base_crypto HOT 2
- ReferenceError: window is not defined HOT 2
- Error on account consolidation HOT 1
- Note status of vulnerabilities regarding Threshold Signature Scheme, TSSHOCK and CVE-2023-33241
- Security issue: replace non-secure cryptography
- Unable to generate custodial wallet. HOT 3
- Error: Cannot find module '@brandonblack/musig/base_crypto' HOT 1
- SyntaxError: Invalid or unexpected token HOT 2
- Can't get address from the Public key in Zcash HOT 2
- Super expression must either be null or a function in react-native HOT 2
- Action Required: Fix Renovate Configuration
- Nestjs: Failed to load bindings, pure JS will be used HOT 4
- Issues when using eCash (XEC) with big values HOT 2
- Signing Prebuilt PSBTs HOT 6
- Tx outputs does not match with expected txParams recipients HOT 2
- Signing Prebuilt PSBTs #2 HOT 7
- Signing Prebuilt PSBTs #3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitgojs.