Coder Social home page Coder Social logo

Comments (7)

mhluongo avatar mhluongo commented on August 16, 2024

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.

mhluongo avatar mhluongo commented on August 16, 2024

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.

bencxr avatar bencxr commented on August 16, 2024

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.

mhluongo avatar mhluongo commented on August 16, 2024

@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.

mhluongo avatar mhluongo commented on August 16, 2024

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.

bencxr avatar bencxr commented on August 16, 2024

@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.

mhluongo avatar mhluongo commented on August 16, 2024

Realized I'm running an odler version- git pulling and trying it again

from bitgojs.

Related Issues (20)

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.