Comparing version 0.18.3 to 0.19.0
@@ -210,2 +210,3 @@ 'use strict'; | ||
if (!bufferVersion.network || (networkObj && networkObj !== bufferVersion.network)) { | ||
console.log(bufferVersion) | ||
throw new TypeError('Address has mismatched network type.'); | ||
@@ -212,0 +213,0 @@ } |
@@ -197,5 +197,5 @@ 'use strict'; | ||
prefix: 'bitcoincash', | ||
pubkeyhash: 28, | ||
pubkeyhash: 0x00, | ||
privatekey: 0x80, | ||
scripthash: 40, | ||
scripthash: 0x05, | ||
xpubkey: 0x0488b21e, | ||
@@ -202,0 +202,0 @@ xprivkey: 0x0488ade4, |
{ | ||
"name": "bsv", | ||
"version": "0.18.3", | ||
"version": "0.19.0", | ||
"description": "A pure and powerful JavaScript Bitcoin SV library.", | ||
"author": "BitPay <dev@bitpay.com>", | ||
"author": "Ryan X. Charles <ryan@moneybutton.com>", | ||
"main": "index.js", | ||
@@ -31,3 +31,3 @@ "scripts": { | ||
"type": "git", | ||
"url": "https://github.com/bitpay/bitcore-lib/tree/cash" | ||
"url": "https://github.com/moneybutton/bsv" | ||
}, | ||
@@ -34,0 +34,0 @@ "browser": { |
@@ -21,3 +21,3 @@ 'use strict'; | ||
var pubkeyhash = new Buffer('3c3fa3d4adcaf8f52d5b1843975e122548269937', 'hex'); | ||
var buf = Buffer.concat([new Buffer([28]), pubkeyhash]); | ||
var buf = Buffer.concat([new Buffer([0]), pubkeyhash]); | ||
var str = 'bitcoincash:qq7rlg754h903afdtvvy8967zgj5sf5exueg36nyc7'; | ||
@@ -70,2 +70,10 @@ | ||
describe('generic tests', function () { | ||
it('should pass these tests', function () { | ||
let str = '13k3vneZ3yvZnc9dNWYH2RJRFsagTfAERv'; | ||
var address = Address.fromString(str) | ||
address.toLegacyAddress().should.equal(str) | ||
}) | ||
}) | ||
describe('Cashaddr', function() { | ||
@@ -77,8 +85,8 @@ | ||
var t = [ | ||
['CTH8H8Zj6DSnXFBKQeDG28ogAS92iS16Bp', 'bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a'], | ||
['Cazk5ZxnJGY1iYqqTefvo7ZtwLYx3YzjgY', 'bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy'], | ||
['CGZpaFRaJYHqohPJ8BKYvKmxffV2dcmmN9', 'bitcoincash:qqq3728yw0y47sqn6l2na30mcw6zm78dzqre909m2r'], | ||
['HHLN6S9BcP1JLSrMhgD5qe57iVEMFMLCBT', 'bitcoincash:ppm2qsznhks23z7629mms6s4cwef74vcwvn0h829pq'], | ||
['HR3ytsYEpS6XXkWskgfkccqLVPeGdXQ1S8', 'bitcoincash:pr95sy3j9xwd2ap32xkykttr4cvcu7as4yc93ky28e'], | ||
['H6d4PZ12phrMcu4LRDKNjq3QDiaMDz3fUd', 'bitcoincash:pqq3728yw0y47sqn6l2na30mcw6zm78dzq5ucqzc37'], | ||
['1BpEi6DfDAUFd7GtittLSdBeYJvcoaVggu', 'bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a'], | ||
['1KXrWXciRDZUpQwQmuM1DbwsKDLYAYsVLR', 'bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy'], | ||
['16w1D5WRVKJuZUsSRzdLp9w3YGcgoxDXb', 'bitcoincash:qqq3728yw0y47sqn6l2na30mcw6zm78dzqre909m2r'], | ||
['3CWFddi6m4ndiGyKqzYvsFYagqDLPVMTzC', 'bitcoincash:ppm2qsznhks23z7629mms6s4cwef74vcwvn0h829pq'], | ||
['3LDsS579y7sruadqu11beEJoTjdFiFCdX4', 'bitcoincash:pr95sy3j9xwd2ap32xkykttr4cvcu7as4yc93ky28e'], | ||
['31nwvkZwyPdgzjBJZXfDmSWsC4ZLKpYyUw', 'bitcoincash:pqq3728yw0y47sqn6l2na30mcw6zm78dzq5ucqzc37'], | ||
]; | ||
@@ -158,7 +166,7 @@ var i; | ||
var PKHLivenet = [ | ||
'CMPeBN1BZDzaqU5DF66X5QykLcS1voucT9', | ||
'15vkcKf7gB23wLAnZLmbVuMiiVDc1Nm4a2', | ||
'bitcoincash:qp3awknl3dz8ezu3rmapff3phnzz95kansf0r3rs4x', | ||
'CTHVPhghRAmiLHajoKYTGRyiU8RomQmAfZ', | ||
'CaSvYEmgxVRYiAauWzW1XP4SHkyTiS78yy', | ||
' CaSvYEmgxVRYiAauWzW1XP4SHkyTiS78yy \t\n' | ||
'1BpbpfLdY7oBS9gK7aDXgvMgr1DPvNhEB2', | ||
'1Jz2yCRd5ST1p2gUqFB5wsSQfdm3jaFfg7', | ||
' 1Jz2yCRd5ST1p2gUqFB5wsSQfdm3jaFfg7 \t\n' | ||
]; | ||
@@ -169,6 +177,6 @@ | ||
'bitcoincash:pqv60krfqv3k3lglrcnwtee6ftgwgaykpccr8hujjz', | ||
'H8kzbJ9Mw46WdAxC8SAFadHn1oNqp6jEsu', | ||
'HCGvZEM8pNyAFBfRrz9Eo4N4eGJPuFahd9', | ||
'HVZezVtqnDwoTZTZ997fZUUGZMetDFUDLf', | ||
'\tHVZezVtqnDwoTZTZ997fZUUGZMetDFUDLf \n \r' | ||
'33vt8ViH5jsr115AGkW6cEmEz9MpvJSwDk', | ||
'37Sp6Rv3y4kVd1nQ1JV5pfqXccHNyZm1x3', | ||
'3QjYXhTkvuj8qPaXHTTWb5wjXhdsLAAWVy', | ||
'\t3QjYXhTkvuj8qPaXHTTWb5wjXhdsLAAWVy \n \r' | ||
]; | ||
@@ -186,6 +194,6 @@ | ||
var badChecksums = [ | ||
'C5vkcKf7gB23wLAnZLmbVuMiiVDc3nq4a2', | ||
'CA6ut1tWnUq1SEQLMr4ttDh24wcbj4w2TT', | ||
'CBpbpfLdY7oBS9gK7aDXgvMgr1DpvNH3B2', | ||
'CJz2yCRd5ST1p2gUqFB5wsSQfdmEJaffg7' | ||
'15vkcKf7gB23wLAnZLmbVuMiiVDc3nq4a2', | ||
'1A6ut1tWnUq1SEQLMr4ttDh24wcbj4w2TT', | ||
'1BpbpfLdY7oBS9gK7aDXgvMgr1DpvNH3B2', | ||
'1Jz2yCRd5ST1p2gUqFB5wsSQfdmEJaffg7' | ||
]; | ||
@@ -195,6 +203,6 @@ | ||
var nonBase58 = [ | ||
'C5vkcKf7g#23wLAnZLmb$uMiiVDc3nq4a2', | ||
'CA601ttWnUq1SEQLMr4ttDh24wcbj4w2TT', | ||
'CBpbpfLdY7oBS9gK7aIXgvMgr1DpvNH3B2', | ||
'CJz2yCRdOST1p2gUqFB5wsSQfdmEJaffg7' | ||
'15vkcKf7g#23wLAnZLmb$uMiiVDc3nq4a2', | ||
'1A601ttWnUq1SEQLMr4ttDh24wcbj4w2TT', | ||
'1BpbpfLdY7oBS9gK7aIXgvMgr1DpvNH3B2', | ||
'1Jz2yCRdOST1p2gUqFB5wsSQfdmEJaffg7' | ||
]; | ||
@@ -218,8 +226,8 @@ | ||
it('isValid returns true on a valid livenet address', function() { | ||
Address.isValid('HC1hAdrx7APHg1DkE4bVLsZhY1SE5Dik1r', 'livenet').should.equal(true); | ||
Address.isValid('37BahqRsFrAd3qLiNNwLNV3AWMRD7itxTo', 'livenet').should.equal(true); | ||
}); | ||
it('isValid returns false on network mismatch', function() { | ||
Address.isValid('HC1hAdrx7APHg1DkE4bVLsZhY1SE5Dik1r', 'testnet').should.equal(false); | ||
Address.isValid('HC1hAdrx7APHg1DkE4bVLsZhY1SE5Dik1r', 'regtest').should.equal(false); | ||
Address.isValid('37BahqRsFrAd3qLiNNwLNV3AWMRD7itxTo', 'testnet').should.equal(false); | ||
Address.isValid('37BahqRsFrAd3qLiNNwLNV3AWMRD7itxTo', 'regtest').should.equal(false); | ||
}); | ||
@@ -226,0 +234,0 @@ |
@@ -9,8 +9,2 @@ [ | ||
[ | ||
"19dcawoKcZdQz365WpXWMhX6QCUpR9SY4r" | ||
], | ||
[ | ||
"37Sp6Rv3y4kVd1nQ1JV5pfqXccHNyZm1x3" | ||
], | ||
[ | ||
"37qgekLpCCHrQuSjvX3fs496FWTGsHFHizjJAs6NPcR47aefnnCWECAhHV6E3g4YN7u7Yuwod5Y" | ||
@@ -112,3 +106,3 @@ ], | ||
[ | ||
"1PhFUhUAh8ZQQisH8QQWafAxtQYju3SFTX" | ||
"HPhFUhUAh8ZQQisH8QQWafAxtQYju3SFTX" | ||
], | ||
@@ -115,0 +109,0 @@ [ |
[ | ||
[ | ||
"CRjG93RdHa96NpA9X3Mdh4eF1bEhzApax4", | ||
"1AGNa15ZQXAZUgFiqJ2i7Z2DPU2J6hW62i", | ||
"65a16059864a2fdbc7c99a4723a8395bc6f188eb", | ||
@@ -12,3 +12,3 @@ { | ||
[ | ||
"HHBUiko6ebQGgatGgHTKJUWXJvhF19L2GP", | ||
"3CMNFxN1oHBc4R1EpboAL5yzHGgE611Xou", | ||
"74f209f6ea907e2ea48f74fae05782ae8a665257", | ||
@@ -76,3 +76,3 @@ { | ||
[ | ||
"CSQxFcEezj9FnAN9cgyf8oAuzVYrv6bJ9P", | ||
"1Ax4gZtb7gAit2TivwejZHYtNNLT18PUXJ", | ||
"6d23156cbbdcc82a5a47eee4c2c7c583c18b6bf4", | ||
@@ -86,3 +86,3 @@ { | ||
[ | ||
"HVZezVtqnDwoTZTZ997fZUUGZMetDFUDLf", | ||
"3QjYXhTkvuj8qPaXHTTWb5wjXhdsLAAWVy", | ||
"fcc5460dd6e2487c7d75b1963625da0e8f4c5975", | ||
@@ -150,3 +150,3 @@ { | ||
[ | ||
"CTYV1mMn7KTDLbWRQj6BgiQ2kMaptRX8TP", | ||
"1C5bSj1iEGUgSTbziymG7Cn18ENQuT36vv", | ||
"7987ccaa53d02c8873487ef919677cd3db7a6912", | ||
@@ -160,3 +160,3 @@ { | ||
[ | ||
"HFcVRP2d87gdAtLGRcuPm3P1qJGYEYwN5r", | ||
"3AnNxabYGoTxYiTEZwFEnerUoeFXK2Zoks", | ||
"63bcc565f9e68ee0189dd5cc67f1b0e5f02f45cb", | ||
@@ -224,3 +224,3 @@ { | ||
[ | ||
"CYJddWGB2S7Y6jus9ADPdNdXi9KXHavv7U", | ||
"1Gqk4Tv79P91Cc1STQtU3s1W6277M2CVWu", | ||
"adc1cc2081a27206fae25792f28bbc55b831549d", | ||
@@ -234,3 +234,3 @@ { | ||
[ | ||
"H8kzbJ9Mw46WdAxC8SAFadHn1oNqp6jEsu", | ||
"33vt8ViH5jsr115AGkW6cEmEz9MpvJSwDk", | ||
"188f91a931947eddd7432d6e614387e32b244709", | ||
@@ -298,3 +298,3 @@ { | ||
[ | ||
"CaQF5DqQmmpRmkW172udeLTKRsufArS4wS", | ||
"1JwMWBVLtiqtscbaRHai4pqHokhFCbtoB4", | ||
"c4c1b72491ede1eedaca00618407ee0b772cad0d", | ||
@@ -308,3 +308,3 @@ { | ||
[ | ||
"HV37PTm9Qk9RvRbYMsA6w4A7PqU98b2bxJ", | ||
"3QCzvfL4ZRvmJFiWWBVwxfdaNBT8EtxB5y", | ||
"f6fe69bcb548a829cce4c57bf6fff8af3a5981f9", | ||
@@ -372,3 +372,3 @@ { | ||
[ | ||
"CR6W9z9PVcbwtAzWCZrRwD982KhEEGCjcq", | ||
"19dcawoKcZdQz365WpXWMhX6QCUpR9SY4r", | ||
"5eadaf9bb7121f0f192561a5a62f5e5f54210292", | ||
@@ -382,3 +382,3 @@ { | ||
[ | ||
"HCGvZEM8pNyAFBfRrz9Eo4N4eGJPuFahd9", | ||
"37Sp6Rv3y4kVd1nQ1JV5pfqXccHNyZm1x3", | ||
"3f210e7277c899c3a155cc1c90f4106cbddeec6e", | ||
@@ -401,3 +401,3 @@ { | ||
[ | ||
"bchtest:pzvmx80heyrg69ypkkt90rwmknfmmy96av8f02lrrf", | ||
"2N7FuwuUuoTBrDFdrAZ9KxBmtqMLxce9i1C", | ||
"99b31df7c9068d1481b596578ddbb4d3bd90baeb", | ||
@@ -447,3 +447,3 @@ { | ||
[ | ||
"CKGuHmh1kqq9p7k39fdTLLeC4kkFb672zQ", | ||
"13p1ijLwsnrcuyqcTvJXkq2ASdXqcnEBLE", | ||
"1ed467017f043e91ed4c44b4e8dd674db211c4e6", | ||
@@ -457,3 +457,3 @@ { | ||
[ | ||
"HFAQjwyDvKhrtnNbPrHy8Rr9jTQAFnYkeY", | ||
"3ALJH9Y951VCGcVZYAdpA3KchoP9McEj1G", | ||
"5ece0cadddc415b1980f001785947120acdb36fc", | ||
@@ -460,0 +460,0 @@ { |
@@ -67,5 +67,5 @@ [ | ||
"from", [{ | ||
"address":"HDd3XftwtyQwdibDbEJZ8uYRBJXNsRq1gS","txid":"073281b2cc94e879aaf30ea2e92947d9827b270015849d3a5b96a89ee15bfa66","vout":0,"ts":1418877950,"scriptPubKey":"a9144de752833233fe69a20064f29b2ca0f6399c8af387","amount":0.00318512,"confirmationsFromCache":false | ||
"address":"38nw4sTs3fCH1YiBjYeQAX1t9eWMxpek8Z","txid":"073281b2cc94e879aaf30ea2e92947d9827b270015849d3a5b96a89ee15bfa66","vout":0,"ts":1418877950,"scriptPubKey":"a9144de752833233fe69a20064f29b2ca0f6399c8af387","amount":0.00318512,"confirmationsFromCache":false | ||
}, ["03411e021210a933c247ea9c8dad4bbead281597d508ad84e899de13e4ce98b4ba", "03bda2c3cc11a391b36e3d695b03ab42b96fe04086b2349056108d858983e60dab", "03c16e6ecf4e02bf9db23d3247ab92db8881f0866133ffb530c3470f6d8dea7330"], 2], | ||
"to", ["HGR6veMqmYQH8uzKvZFqQBV1xkskQxZEYu", 300299], | ||
"to", ["3BazTqvkvEBcWk7J4sbgRnxUw6rjYrogf9", 300299], | ||
"sign", [["L3y1PAXfjayeB3w6NP7qfNxPbuPpQFA6hd6gj4BUKa2xSdLwoVSZ", "L3a57fiNjqfbXBdYvvGYPQ1HiDX463mwA2xFGTYVkXYdooaz9Z2u"], 1], | ||
@@ -75,9 +75,9 @@ "serialize", "010000000166fa5be19ea8965b3a9d841500277b82d94729e9a20ef3aa79e894ccb281320700000000fc0047304402202f66fcfc0d5bff109ec12327ca37e0bc7722d08da9538f12468994799534bed602203a0b374f3a6810b0ee26028c390e14f5b6bada8fa390f4364d70d04aee240d350147304402206757f710f25937cd846fd8c56687c463a4561e9e0421fc173c78eaf2de9b9a7d02204995db6b81513b67a42b09dabab6ed4cb90901c52f6f945b768827a9390bda60014c69522103411e021210a933c247ea9c8dad4bbead281597d508ad84e899de13e4ce98b4ba2103bda2c3cc11a391b36e3d695b03ab42b96fe04086b2349056108d858983e60dab2103c16e6ecf4e02bf9db23d3247ab92db8881f0866133ffb530c3470f6d8dea733053aeffffffff010b9504000000000017a9146c8d8b04c6a1e664b1ec20ec932760760c97688e8700000000" | ||
[ | ||
"from", [{"address":"HGR6veMqmYQH8uzKvZFqQBV1xkskQxZEYu","txid":"afbf98ca4a43db8915d75184b5204fbe71d916482adfe85cb0ed3635764fc220","vout":0,"ts":1418878108,"scriptPubKey":"a9146c8d8b04c6a1e664b1ec20ec932760760c97688e87","amount":0.00318512,"confirmationsFromCache":false}, ["020483ebb834d91d494a3b649cf0e8f5c9c4fcec5f194ab94341cc99bb440007f2", "0271ebaeef1c2bf0c1a4772d1391eab03e4d96a6e9b48551ab4e4b0d2983eb452b", "03a659828aabe443e2dedabb1db5a22335c5ace5b5b7126998a288d63c99516dd8"], 2 | ||
"from", [{"address":"3BazTqvkvEBcWk7J4sbgRnxUw6rjYrogf9","txid":"afbf98ca4a43db8915d75184b5204fbe71d916482adfe85cb0ed3635764fc220","vout":0,"ts":1418878108,"scriptPubKey":"a9146c8d8b04c6a1e664b1ec20ec932760760c97688e87","amount":0.00318512,"confirmationsFromCache":false}, ["020483ebb834d91d494a3b649cf0e8f5c9c4fcec5f194ab94341cc99bb440007f2", "0271ebaeef1c2bf0c1a4772d1391eab03e4d96a6e9b48551ab4e4b0d2983eb452b", "03a659828aabe443e2dedabb1db5a22335c5ace5b5b7126998a288d63c99516dd8"], 2 | ||
], | ||
"from", [ | ||
{"address":"HGR6veMqmYQH8uzKvZFqQBV1xkskQxZEYu","txid":"dc2e197ab72f71912c39bc23a42d823a3aa8d469fe65eb591c086e60d14c64a0","vout":0,"ts":1418878014,"scriptPubKey":"a9146c8d8b04c6a1e664b1ec20ec932760760c97688e87","amount":0.00300299,"confirmationsFromCache":false}, ["020483ebb834d91d494a3b649cf0e8f5c9c4fcec5f194ab94341cc99bb440007f2", "0271ebaeef1c2bf0c1a4772d1391eab03e4d96a6e9b48551ab4e4b0d2983eb452b", "03a659828aabe443e2dedabb1db5a22335c5ace5b5b7126998a288d63c99516dd8"], 2], | ||
"to", ["HDd3XftwtyQwdibDbEJZ8uYRBJXNsRq1gS", 150000], | ||
"to", ["HDd3XftwtyQwdibDbEJZ8uYRBJXNsRq1gS", 160000], | ||
"change", ["HGR6veMqmYQH8uzKvZFqQBV1xkskQxZEYu"], | ||
{"address":"3BazTqvkvEBcWk7J4sbgRnxUw6rjYrogf9","txid":"dc2e197ab72f71912c39bc23a42d823a3aa8d469fe65eb591c086e60d14c64a0","vout":0,"ts":1418878014,"scriptPubKey":"a9146c8d8b04c6a1e664b1ec20ec932760760c97688e87","amount":0.00300299,"confirmationsFromCache":false}, ["020483ebb834d91d494a3b649cf0e8f5c9c4fcec5f194ab94341cc99bb440007f2", "0271ebaeef1c2bf0c1a4772d1391eab03e4d96a6e9b48551ab4e4b0d2983eb452b", "03a659828aabe443e2dedabb1db5a22335c5ace5b5b7126998a288d63c99516dd8"], 2], | ||
"to", ["38nw4sTs3fCH1YiBjYeQAX1t9eWMxpek8Z", 150000], | ||
"to", ["38nw4sTs3fCH1YiBjYeQAX1t9eWMxpek8Z", 160000], | ||
"change", ["3BazTqvkvEBcWk7J4sbgRnxUw6rjYrogf9"], | ||
"sign", ["L2U9m5My3cdyN5qX1PH4B7XstGDZFWwyukdX8gj8vsJ3fkrqArQo", 1], | ||
@@ -84,0 +84,0 @@ "sign", ["L4jFVcDaqZCkknP5KQWjCBgiLFxKxRxywNGTucm3jC3ozByZcbZv", 1], |
@@ -352,18 +352,18 @@ 'use strict'; | ||
describe('hashes', function() { | ||
it('should pass this test', function () { | ||
// wif private key, address | ||
// see: https://github.com/bitcoin/bitcoin/blob/master/src/test/key_tests.cpp#L20 | ||
var data = [ | ||
['5HxWvvfubhXpYYpS3tJkw6fq9jE9j18THftkZjHHfmFiWtmAbrj', '1QFqqMUD55ZV3PJEJZtaKCsQmjLT6JkjvJ'], | ||
['5KC4ejrDjv152FGwP386VD1i2NYc5KkfSMyv1nGy1VGDxGHqVY3', '1F5y5E5FMc5YzdJtB9hLaUe43GDxEKXENJ'], | ||
['Kwr371tjA9u2rFSMZjTNun2PXXP3WPZu2afRHTcta6KxEUdm1vEw', '1NoJrossxPBKfCHuJXT4HadJrXRE9Fxiqs'], | ||
['L3Hq7a8FEQwJkW1M2GNKDW28546Vp5miewcCzSqUD9kCAXrJdS3g', '1CRj2HyM1CXWzHAXLQtiGLyggNT9WQqsDs'] | ||
]; | ||
// wif private key, address | ||
// see: https://github.com/bitcoin/bitcoin/blob/master/src/test/key_tests.cpp#L20 | ||
var data = [ | ||
['5HxWvvfubhXpYYpS3tJkw6fq9jE9j18THftkZjHHfmFiWtmAbrj', 'CfijQPpGx8Y1wXCezKDVtiVSPrYs1TqKcS'], | ||
['5KC4ejrDjv152FGwP386VD1i2NYc5KkfSMyv1nGy1VGDxGHqVY3', 'CWYreGRKEf45tmDJru2G9zG5fPSN7JN6T1'], | ||
['Kwr371tjA9u2rFSMZjTNun2PXXP3WPZu2afRHTcta6KxEUdm1vEw', 'CeGCRrDwqS9rZLCKzGmys6FLUede24ZV4o'], | ||
['L3Hq7a8FEQwJkW1M2GNKDW28546Vp5miewcCzSqUD9kCAXrJdS3g', 'CTtcbLKQtFW3tR4x2ADdqrbiJVfZQD9cFm'] | ||
]; | ||
data.forEach(function(d){ | ||
var publicKey = PrivateKey.fromWIF(d[0]).toPublicKey(); | ||
var address = Address.fromString(d[1]); | ||
address.hashBuffer.should.deep.equal(publicKey._getID()); | ||
data.forEach(function(d){ | ||
var publicKey = PrivateKey.fromWIF(d[0]).toPublicKey(); | ||
var address = Address.fromString(d[1]); | ||
address.hashBuffer.should.deep.equal(publicKey._getID()); | ||
}); | ||
}); | ||
}); | ||
@@ -370,0 +370,0 @@ |
@@ -825,3 +825,3 @@ 'use strict'; | ||
it('inherits network property from other script', function() { | ||
var s1 = new Script.fromAddress(new Address('CWuF5o5ZGDwXNWe2eCPxPZPWwKMWuiixY2')); | ||
var s1 = new Script.fromAddress(new Address('1FSMWkjVPAxzUNjbxT52p3mVKC971rfW3S')); | ||
var s2 = Script.buildScriptHashOut(s1); | ||
@@ -833,3 +833,3 @@ should.exist(s1._network); | ||
it('inherits network property form an address', function() { | ||
var address = new Address('H9Ctbp1Y7th1TgkbabT19mpXGqEsTXggJE'); | ||
var address = new Address('34Nn91aTGaULqWsZiunrBPHzFBDrZ3B8XS'); | ||
var script = Script.buildScriptHashOut(address); | ||
@@ -909,3 +909,3 @@ should.exist(script._network); | ||
it('for a P2PKH address', function() { | ||
var address = Address.fromString('Ce3M4ysH6XH7RMK1RYu4wLujcC7sv4EhNU'); | ||
var address = Address.fromString('1NaTVwXDDUJaXDQajoa9MqHhz4uTxtgK14'); | ||
var script = Script.buildPublicKeyHashOut(address); | ||
@@ -912,0 +912,0 @@ expect(BufferUtil.equal(script.getData(), address.hashBuffer)).to.be.true(); |
@@ -24,3 +24,3 @@ 'use strict'; | ||
var public3 = privateKey3.publicKey; | ||
var address = new Address('H8piCq1XQrr3DbkPF5YFi5VdMV2mCQEnKW'); | ||
var address = new Address('33zbk2aSZYdNbRsMPPt6jgy6Kq1kQreqeb'); | ||
@@ -27,0 +27,0 @@ var output = { |
@@ -24,6 +24,6 @@ 'use strict'; | ||
var public3 = privateKey3.publicKey; | ||
var address = new Address('H8piCq1XQrr3DbkPF5YFi5VdMV2mCQEnKW'); | ||
var address = new Address('33zbk2aSZYdNbRsMPPt6jgy6Kq1kQreqeb'); | ||
var output = { | ||
address: 'H8piCq1XQrr3DbkPF5YFi5VdMV2mCQEnKW', | ||
address: '33zbk2aSZYdNbRsMPPt6jgy6Kq1kQreqeb', | ||
txId: '66e64ef8a3b384164b78453fa8c8194de9a473ba14f89485a0e433699daec140', | ||
@@ -30,0 +30,0 @@ outputIndex: 0, |
@@ -23,3 +23,3 @@ 'use strict'; | ||
var output = { | ||
address: 'H8piCq1XQrr3DbkPF5YFi5VdMV2mCQEnKW', | ||
address: '33zbk2aSZYdNbRsMPPt6jgy6Kq1kQreqeb', | ||
txId: '66e64ef8a3b384164b78453fa8c8194de9a473ba14f89485a0e433699daec140', | ||
@@ -26,0 +26,0 @@ outputIndex: 0, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3015081
32755