(publicKey: Uint8Array)
| 305 | } |
| 306 | |
| 307 | export function publicKeyToP2PKHLockingBytecode(publicKey: Uint8Array): Uint8Array { |
| 308 | const pubkeyHash = hash160(publicKey); |
| 309 | const addressContents = { payload: pubkeyHash, type: LockingBytecodeType.p2pkh }; |
| 310 | const lockingBytecode = addressContentsToLockingBytecode(addressContents); |
| 311 | return lockingBytecode; |
| 312 | } |
| 313 | |
| 314 | export function utxoComparator(a: Utxo, b: Utxo): number { |
| 315 | if (a.satoshis > b.satoshis) return 1; |