@bitgo/utxo-lib
Advanced tools
Comparing version 11.0.0 to 11.0.1
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import * as bitcoinjs from 'bitcoinjs-lib'; | ||
@@ -3,0 +4,0 @@ import { Base58CheckResult, Bech32Result } from 'bitcoinjs-lib/src/address'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/** | ||
@@ -3,0 +4,0 @@ * Implements methods for nonstandard (non-canonical) address formats. |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Network } from '../../networks'; | ||
@@ -3,0 +4,0 @@ import { AddressFormat } from '../../addressFormat'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { DashTransaction } from './DashTransaction'; | ||
@@ -3,0 +4,0 @@ import { PsbtOpts, UtxoPsbt } from '../UtxoPsbt'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Transaction } from 'bitcoinjs-lib'; | ||
@@ -3,0 +4,0 @@ import { UtxoTransaction } from '../UtxoTransaction'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import * as bitcoinjs from 'bitcoinjs-lib'; | ||
@@ -3,0 +4,0 @@ import { Network } from '../../networks'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { ECPairInterface } from 'ecpair'; | ||
@@ -3,0 +4,0 @@ import { Network } from '../networks'; |
@@ -7,2 +7,3 @@ /** | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Network } from '../../networks'; | ||
@@ -9,0 +10,0 @@ export declare function toUncompressedPub(pubkey: Buffer): Buffer; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { PsbtOpts, UtxoPsbt } from '../UtxoPsbt'; | ||
@@ -3,0 +4,0 @@ import { Network } from '../../networks'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { UtxoTransaction } from '../UtxoTransaction'; | ||
@@ -3,0 +4,0 @@ import { Network, networks } from '../../networks'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { SessionKey } from '@brandonblack/musig'; | ||
@@ -3,0 +4,0 @@ import { Tuple } from './types'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import * as bitcoinjs from 'bitcoinjs-lib'; | ||
@@ -3,0 +4,0 @@ import { Network } from '..'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { TxInput } from 'bitcoinjs-lib'; | ||
@@ -3,0 +4,0 @@ export declare function isPlaceholderSignature(v: number | Buffer): boolean; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { PsbtInputUpdate } from 'bip174/src/lib/interfaces'; | ||
@@ -3,0 +4,0 @@ import { TxOutput } from '../..'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
export declare function isP2wsh(scriptPubkey: Buffer, redeemScript?: Buffer): boolean; | ||
@@ -3,0 +4,0 @@ export declare function isP2wpkh(scriptPubkey: Buffer, redeemScript?: Buffer): boolean; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { ProprietaryKey } from 'bip174/src/lib/proprietaryKeyVal'; | ||
@@ -3,0 +4,0 @@ import { PsbtInput } from 'bip174/src/lib/interfaces'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { BIP32Interface } from 'bip32'; | ||
@@ -3,0 +4,0 @@ import { TxOutput } from 'bitcoinjs-lib'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { TxOutput } from 'bitcoinjs-lib'; | ||
@@ -3,0 +4,0 @@ import { Network } from '../networks'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { TapLeafScript } from 'bip174/src/lib/interfaces'; | ||
@@ -3,0 +4,0 @@ export { TapLeafScript }; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { TxOutput } from 'bitcoinjs-lib'; | ||
@@ -3,0 +4,0 @@ import { Network } from '..'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Psbt as PsbtBase } from 'bip174'; | ||
@@ -3,0 +4,0 @@ import { Bip32Derivation, PsbtInput } from 'bip174/src/lib/interfaces'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import * as bitcoinjs from 'bitcoinjs-lib'; | ||
@@ -3,0 +4,0 @@ import { Network } from '../networks'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { TxOutput, Transaction } from 'bitcoinjs-lib'; | ||
@@ -3,0 +4,0 @@ import { Network } from '..'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { PsbtInput } from 'bip174/src/lib/interfaces'; | ||
@@ -3,0 +4,0 @@ import { BIP32Interface } from 'bip32'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { UtxoTransactionBuilder } from '../UtxoTransactionBuilder'; | ||
@@ -3,0 +4,0 @@ import { WalletUnspentSigner } from './WalletUnspentSigner'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/** | ||
@@ -3,0 +4,0 @@ * Classes for deriving key triples for wallet addresses. |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Base58CheckResult } from 'bitcoinjs-lib/src/address'; | ||
@@ -3,0 +4,0 @@ import { Network } from '../../networks'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/** | ||
@@ -3,0 +4,0 @@ * Implements hashing methods described in https://zips.z.cash/zip-0244. |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/** | ||
@@ -3,0 +4,0 @@ * Transaction (de)serialization helpers. |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { PsbtOpts, UtxoPsbt } from '../UtxoPsbt'; | ||
@@ -3,0 +4,0 @@ import { ZcashTransaction } from './ZcashTransaction'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { networks } from '../../networks'; | ||
@@ -3,0 +4,0 @@ import { UtxoTransaction } from '../UtxoTransaction'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import * as bitcoinjs from 'bitcoinjs-lib'; | ||
@@ -3,0 +4,0 @@ import { Network } from '../..'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
declare const types: { | ||
@@ -3,0 +4,0 @@ P2MS: string; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { TapTree as PsbtTapTree } from 'bip174/src/lib/interfaces'; | ||
@@ -3,0 +4,0 @@ import { payments as bpayments } from 'bitcoinjs-lib'; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Stack } from '../../'; | ||
@@ -3,0 +4,0 @@ export declare function check(script: Buffer | Stack, allowIncomplete?: boolean): boolean; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Stack } from '../../'; | ||
@@ -3,0 +4,0 @@ export declare function check(script: Buffer | Stack, allowIncomplete?: boolean): boolean; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
export declare function check(script: Buffer | Array<number | Buffer>): boolean; | ||
@@ -3,0 +4,0 @@ export declare namespace check { |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Stack } from '../../'; | ||
@@ -3,0 +4,0 @@ export declare function check(script: Buffer | Stack): boolean; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Stack } from '../../'; | ||
@@ -3,0 +4,0 @@ export declare function check(script: Buffer | Stack): boolean; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Stack } from '../../'; | ||
@@ -3,0 +4,0 @@ export declare function check(script: Buffer | Stack): boolean; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
export declare function check(script: Buffer | Array<number | Buffer>): boolean; | ||
@@ -3,0 +4,0 @@ export declare namespace check { |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
export declare function check(script: Buffer | Array<number | Buffer>, allowIncomplete?: boolean): boolean; | ||
@@ -3,0 +4,0 @@ export declare namespace check { |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
export declare function check(script: Buffer | Array<number | Buffer>): boolean; | ||
@@ -3,0 +4,0 @@ export declare namespace check { |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
export declare function check(chunks: Buffer[]): boolean; | ||
@@ -3,0 +4,0 @@ export declare namespace check { |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
export declare function check(script: Buffer | Array<number | Buffer>): boolean; | ||
@@ -3,0 +4,0 @@ export declare namespace check { |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Stack } from '../../'; | ||
@@ -3,0 +4,0 @@ export declare function check(script: Buffer | Stack, allowIncomplete?: boolean): boolean; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Stack } from '../../'; | ||
@@ -3,0 +4,0 @@ export declare function check(script: Buffer | Stack, allowIncomplete?: boolean): boolean; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
export declare function check(script: Buffer | Array<number | Buffer>): boolean; | ||
@@ -3,0 +4,0 @@ export declare namespace check { |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Stack } from '../../'; | ||
@@ -3,0 +4,0 @@ export declare function check(script: Buffer | Stack): boolean; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
export declare function check(script: Buffer | Array<number | Buffer>): boolean; | ||
@@ -3,0 +4,0 @@ export declare namespace check { |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
export declare function check(chunks: Buffer[], allowIncomplete?: boolean): boolean; | ||
@@ -3,0 +4,0 @@ export declare namespace check { |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
export declare function check(script: Buffer | Array<number | Buffer>): boolean; | ||
@@ -3,0 +4,0 @@ export declare namespace check { |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { BIP32Interface } from 'bip32'; | ||
@@ -3,0 +4,0 @@ import { Network } from '../networks'; |
@@ -28,2 +28,4 @@ import { ScriptType, ScriptType2Of3 } from '../bitgo/outputScripts'; | ||
address: string; | ||
} | { | ||
script: string; | ||
}); | ||
@@ -30,0 +32,0 @@ /** |
@@ -114,6 +114,10 @@ "use strict"; | ||
} | ||
else if (output.address) { | ||
else if ('address' in output) { | ||
const { address, value } = output; | ||
psbt.addOutput({ script: (0, address_1.toOutputScript)(address, network), value }); | ||
} | ||
else if ('script' in output) { | ||
const { script, value } = output; | ||
psbt.addOutput({ script: Buffer.from(script, 'hex'), value }); | ||
} | ||
}); | ||
@@ -158,2 +162,2 @@ if (sign === 'unsigned') { | ||
exports.verifyFullySignedSignatures = verifyFullySignedSignatures; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHNidC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90ZXN0dXRpbC9wc2J0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGlDQUFpQztBQUVqQywwREFNZ0M7QUFDaEMsb0NBa0JrQjtBQUVsQixpQ0FBd0U7QUFDeEUsd0NBQTRDO0FBMEI1Qzs7OztHQUlHO0FBQ1UsUUFBQSxnQkFBZ0IsR0FBRyxDQUFDLEdBQUcsK0JBQWUsRUFBRSxxQkFBcUIsRUFBRSxrQ0FBa0IsQ0FBVSxDQUFDO0FBRXpHOztHQUVHO0FBQ1UsUUFBQSxpQkFBaUIsR0FBRywrQkFBZSxDQUFDO0FBRWpEOztHQUVHO0FBQ0gsU0FBZ0IsU0FBUyxDQUN2QixLQUFZLEVBQ1osS0FBYSxFQUNiLE9BQWdCLEVBQ2hCLGNBQThCO0lBRTlCLElBQUksS0FBSyxDQUFDLFVBQVUsS0FBSyxVQUFVLEVBQUU7UUFDbkMsT0FBTyxJQUFBLGtDQUEyQixFQUFDLE9BQU8sRUFBRSxLQUFLLENBQUMsS0FBSyxFQUFFLEVBQUUsR0FBRyxFQUFFLGNBQWMsQ0FBQyxNQUFNLENBQUMsRUFBRSxJQUFJLEVBQUUsS0FBSyxFQUFFLENBQUMsQ0FBQztLQUN4RztTQUFNO1FBQ0wsTUFBTSxLQUFLLEdBQUcsSUFBQSw0QkFBb0IsRUFBQyxLQUFLLENBQUMsVUFBVSxLQUFLLHF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25lciA9PT0gJ2JhY2t1cCcgJiYgY29zaWduZXIgPT09ICd1c2VyJykpIHtcbiAgICAgICAgcmV0dXJuIHJlc3VsdFswXSAmJiByZXN1bHRbMV0gJiYgIXJlc3VsdFsyXTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiAhcmVzdWx0WzBdICYmIHJlc3VsdFsxXSAmJiByZXN1bHRbMl07XG4gICAgICB9XG4gICAgfVxuICB9KTtcbn1cbiJdfQ== |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Network } from './'; | ||
@@ -3,0 +4,0 @@ import { TxOutput, Transaction } from './'; |
{ | ||
"name": "@bitgo/utxo-lib", | ||
"version": "11.0.0", | ||
"version": "11.0.1", | ||
"description": "Client-side Bitcoin JavaScript library", | ||
@@ -87,3 +87,3 @@ "main": "./dist/src/index.js", | ||
"license": "MIT", | ||
"gitHead": "46d7ad685ea88ad47b4f9e7dc4f45eee08515dc0" | ||
"gitHead": "0db4da52437f3f3f07026d9fbbc668e7dca7967f" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
1670172
12933