Constructors
Properties
Static
BIP32
BIP32: BIP32API = ...
Static
ECPair
ECPair: ECPairAPI = ...
Methods
Static
fromPrivateKey
- fromPrivateKey(privateKey, network?): ECPairInterface
Parameters
- privateKey: Uint8Array | Buffer
- network: Network = networks.bitcoin
Returns ECPairInterface
Static
fromPublicKey
- fromPublicKey(publicKey, network?): ECPairInterface
Parameters
- publicKey: Uint8Array | Buffer
- network: Network = networks.bitcoin
Returns ECPairInterface
Static
fromSeed
- fromSeed(seed, network?): BIP32Interface
Parameters
- seed: Buffer
- network: Network = networks.bitcoin
Returns BIP32Interface
Static
fromSeedKeyPair
- fromSeedKeyPair(seed, network?): ECPairInterface
Parameters
- seed: Buffer
- network: Network = networks.bitcoin
Returns ECPairInterface
Static
fromWIF
- fromWIF(wif, network?): ECPairInterface
Parameters
- wif: string
- network: Network = networks.bitcoin
Returns ECPairInterface
Static
generateMultiSigAddress
- generateMultiSigAddress(pubKeys, minimumSignatureRequired, network?): string
Parameters
- pubKeys: Buffer[]
- minimumSignatureRequired: number
- network: Network = networks.bitcoin
Returns string
Static
generateRandomKeyPair
- generateRandomKeyPair(network?): ECPairInterface
Parameters
- network: Network = networks.bitcoin
Returns ECPairInterface
Static
generateWallet
- generateWallet(network?): IWallet
Parameters
- network: Network = networks.bitcoin
Static
getLegacyAddress
- getLegacyAddress(keyPair, network?): string
Parameters
- keyPair: ECPairInterface
- network: Network = networks.bitcoin
Returns string
Static
getLegacySegwitAddress
- getLegacySegwitAddress(keyPair, network?): string
Parameters
- keyPair: ECPairInterface
- network: Network = networks.bitcoin
Returns string
Static
getP2PKAddress
- getP2PKAddress(keyPair, network?): string
Parameters
- keyPair: ECPairInterface
- network: Network = networks.bitcoin
Returns string
Static
getP2WPKHAddress
- getP2WPKHAddress(keyPair, network?): string
Parameters
- keyPair: ECPairInterface
- network: Network = networks.bitcoin
Returns string
Static
getTaprootAddress
- getTaprootAddress(keyPair, network?): string
Parameters
- keyPair: ECPairInterface | Signer
- network: Network = networks.bitcoin
Returns string
Static
getTaprootAddressFromAddress
- getTaprootAddressFromAddress(inAddr, network?): string
Parameters
- inAddr: string
- network: Network = networks.bitcoin
Returns string
Static
tweakedPubKeyBufferToAddress
- tweakedPubKeyBufferToAddress(tweakedPubKeyBuffer, network): string
Parameters
- tweakedPubKeyBuffer: Uint8Array | Buffer
- network: Network
Returns string
Static
tweakedPubKeyToAddress
- tweakedPubKeyToAddress(tweakedPubKeyHex, network): string
Parameters
- tweakedPubKeyHex: string
- network: Network
Returns string
Static
tweakPublicKey
- tweakPublicKey(compressedPubKeyHex): string
Parameters
- compressedPubKeyHex: string
Returns string
- The tweaked public key hex string
Static
verifyContractAddress
- verifyContractAddress(contractAddress, network?): boolean
Parameters
- contractAddress: string
- network: Network = networks.bitcoin
Returns boolean
- Whether the address is valid
Static
verifyPubKeys
- verifyPubKeys(pubKeys, network?): Buffer[]
Parameters
- pubKeys: Buffer[]
- network: Network = networks.bitcoin
Returns Buffer[]
Static
xOnlyTweakedPubKeyToAddress
- xOnlyTweakedPubKeyToAddress(tweakedPubKeyHex, network): string
Parameters
- tweakedPubKeyHex: string
- network: Network
Returns string
Generate a keypair from a private key