Browse Source
The introduction of these two functions allow for the all the network related code to be eventually removed from Transaction and Script. Previously the result for non-standard transactions was undefined behaviour. This change mandates that an exception is thrown if a non-standard transaction is input.hk-custom-address
4 changed files with 126 additions and 27 deletions
@ -1,30 +1,45 @@ |
|||||
module.exports = { |
module.exports = { |
||||
pubKeyHash: [ |
valid: [ |
||||
{ |
{ |
||||
description: 'pubKeyHash (bitcoin)', |
description: 'pubKeyHash', |
||||
|
network: 'bitcoin', |
||||
version: 0, |
version: 0, |
||||
hex: '751e76e8199196d454941c45d1b3a323f1433bd6', |
hex: '751e76e8199196d454941c45d1b3a323f1433bd6', |
||||
base58check: '1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH' |
base58check: '1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH', |
||||
|
script: '76a914751e76e8199196d454941c45d1b3a323f1433bd688ac' |
||||
}, |
}, |
||||
{ |
{ |
||||
description: 'pubKeyHash (testnet)', |
description: 'pubKeyHash', |
||||
|
network: 'testnet', |
||||
version: 111, |
version: 111, |
||||
hex: '751e76e8199196d454941c45d1b3a323f1433bd6', |
hex: '751e76e8199196d454941c45d1b3a323f1433bd6', |
||||
base58check: 'mrCDrCybB6J1vRfbwM5hemdJz73FwDBC8r' |
base58check: 'mrCDrCybB6J1vRfbwM5hemdJz73FwDBC8r', |
||||
} |
script: '76a914751e76e8199196d454941c45d1b3a323f1433bd688ac' |
||||
], |
}, |
||||
scriptHash: [ |
|
||||
{ |
{ |
||||
description: 'scriptHash (bitcoin)', |
description: 'scriptHash', |
||||
|
network: 'bitcoin', |
||||
version: 5, |
version: 5, |
||||
hex: 'cd7b44d0b03f2d026d1e586d7ae18903b0d385f6', |
hex: 'cd7b44d0b03f2d026d1e586d7ae18903b0d385f6', |
||||
base58check: '3LRW7jeCvQCRdPF8S3yUCfRAx4eqXFmdcr' |
base58check: '3LRW7jeCvQCRdPF8S3yUCfRAx4eqXFmdcr', |
||||
|
script: 'a914cd7b44d0b03f2d026d1e586d7ae18903b0d385f687' |
||||
}, |
}, |
||||
{ |
{ |
||||
description: 'scriptHash (testnet)', |
description: 'scriptHash', |
||||
|
network: 'testnet', |
||||
version: 196, |
version: 196, |
||||
hex: 'cd7b44d0b03f2d026d1e586d7ae18903b0d385f6', |
hex: 'cd7b44d0b03f2d026d1e586d7ae18903b0d385f6', |
||||
base58check: '2NByiBUaEXrhmqAsg7BbLpcQSAQs1EDwt5w' |
base58check: '2NByiBUaEXrhmqAsg7BbLpcQSAQs1EDwt5w', |
||||
|
script: 'a914cd7b44d0b03f2d026d1e586d7ae18903b0d385f687' |
||||
} |
} |
||||
] |
], |
||||
|
invalid: { |
||||
|
toScriptPubKey: [ |
||||
|
{ |
||||
|
description: 'Unknown Address version', |
||||
|
version: 0x99, |
||||
|
hex: 'cd7b44d0b03f2d026d1e586d7ae18903b0d385f6' |
||||
|
} |
||||
|
] |
||||
|
} |
||||
} |
} |
||||
|
Loading…
Reference in new issue