Btcb2Coin class
Create a BTCB2 wallet using a mnemonic or private key.
BTCB2 uses Bitcoin mainnet BIP44/secp256k1/P2PKH rules for account derivation. Its transaction signer is exposed separately so BTCB2 does not accidentally use ordinary Bitcoin transaction sighash rules.
- Inheritance
-
- Object
- WalletType
- Btcb2Coin
Constructors
- Btcb2Coin({WalletSetting? setting})
- Btcb2Coin.fromPrivateKey(dynamic privateKey, [WalletSetting? setting])
-
factory
Properties
- address → String
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- mnemonic ↔ String?
-
privateKey and publicKey key are always Uint8List;
mnemonic and address are always String
latefinalinherited
- privateKey ↔ Uint8List
-
latefinalinherited
- publicKey → Uint8List
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- setting → WalletSetting
-
final
Methods
-
initFromMnemonic(
String mnemonic) → Future< void> -
inherited
-
initFromPrivateKey(
Uint8List privateKey) → void -
inherited
-
mnemonicToAddress(
String mnemonic) → Future< String> -
inherited
-
mnemonicToPrivateKey(
String mnemonic) → Future< Uint8List> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
privateKeyToPublicKey(
Uint8List privateKey) → Uint8List -
override
-
publicKeyToAddress(
Uint8List publicKey) → String -
override
-
sign(
String message) → String -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
verify(
String signature, String message) → bool -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
addressFromPublicKeyBytes(
List< int> publicKeyBytes) → String - Returns the Bitcoin mainnet P2PKH address for a compressed public key.
-
fromMnemonic(
String mnemonic, [WalletSetting? setting]) → Future< Btcb2Coin> -
isP2pkhScript(
List< int> script) → bool -
scriptPubKeyFromAddress(
String address) → List< int> - Converts a Bitcoin mainnet address into its standard output script.
Constants
- defaultDerivationPath → const String