Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move TransactionBuilder.scriptForAddress to Address.getScriptPubKey. Resolves #373 #384

Merged
merged 1 commit into from
Jun 20, 2014
Merged

Move TransactionBuilder.scriptForAddress to Address.getScriptPubKey. Resolves #373 #384

merged 1 commit into from
Jun 20, 2014

Conversation

manan19
Copy link
Contributor

@manan19 manan19 commented Jun 19, 2014

Move TransactionBuilder.scriptForAddress to Address.getScriptPubKey
fixes #373

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 1e79ce7 on manan19:move-scriptForAddress into 83aada8 on bitpay:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling b6ff29d on manan19:move-scriptForAddress into 83aada8 on bitpay:master.

@maraoz maraoz changed the title Resolves #373 Move TransactionBuilder.scriptForAddress to Address.getScriptPubKey. Resolves #373 Jun 19, 2014
@maraoz
Copy link
Contributor

maraoz commented Jun 19, 2014

Good work. I like what you did, but my idea of #373 was to have an instance method for Address, so you could do:

var a = new Address('1FpjY2BzdYKw8bP1LNxat4ddhkyhL52uLU');
console.log(a.getScriptPubKey());

I can see the usefulness of having a static/class method, though, as you don't need to create an instance if you only have the address string. Thoughts?

@ryanxcharles
Copy link
Contributor

Agreed with @maraoz . Seems the more appropriate way to do this is an instance method.

@manan19
Copy link
Contributor Author

manan19 commented Jun 19, 2014

Haha, I initially put in a pull request with an instance method and then modified it.
I'll change it back, should be easy.

Move TransactionBuilder.scriptForAddress to Address#getScriptPubKey (instance method)
@manan19
Copy link
Contributor Author

manan19 commented Jun 19, 2014

Pushed the changes.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) when pulling d83fc6e on manan19:move-scriptForAddress into 6ac5154 on bitpay:master.

ryanxcharles pushed a commit that referenced this pull request Jun 20, 2014
Move TransactionBuilder.scriptForAddress to Address.getScriptPubKey. Resolves #373
@ryanxcharles ryanxcharles merged commit a727028 into bitpay:master Jun 20, 2014
slowfx pushed a commit to slowfx/bitcore-mona that referenced this pull request Jul 14, 2015
micahriggan pushed a commit to micahriggan/bitcore that referenced this pull request Dec 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move TransactionBuilder.scriptForAddress to Address.js
4 participants