|
1 | 1 | ## [0.1.0]
|
2 | 2 |
|
3 |
| -#### Functionality Added |
4 |
| -- Generate Mnemonic |
5 |
| -- Create Extended Key |
6 |
| -- Create Xprv |
7 |
| -- Create Descriptor |
8 |
| -- Create Wallet |
9 |
| -- Get New Address |
10 |
| -- Get Wallet Balance |
11 |
| -- Broadcast Transaction |
12 |
| -- Get Pending Transactions |
13 |
| -- Get Confirmed Transactions |
14 |
| -- Get Transactions |
| 3 | +#### APIs exposed |
| 4 | +- `Address` |
| 5 | + - create(address: string) - Constructor |
| 6 | + - scriptPubKey() |
| 7 | +- `Blockchain` |
| 8 | + - create(config: BlockchainElectrumConfig | BlockchainEsploraConfig | BlockchainRpcConfig, blockchainName?: BlockChainNames) - Constructor |
| 9 | + - getHeight() - Get current height of the blockchain. |
| 10 | + - getBlockHash(height?: number) - Get block hash by block height. |
| 11 | + - broadcast(tx: Transaction) - Broadcast transaction. |
| 12 | + - estimateFee(target: number) - Estimate the fee rate required to confirm a transaction in a given target of blocks. |
| 13 | +- `BumpFeeTxBuilder` |
| 14 | + - create(txid: string, newFeeRate: number) - Constructor. |
| 15 | + - allowShrinking(address: string) - Explicitly tells the wallet to reduce the amount of the output matching this `address` in order to bump the fee. |
| 16 | + - enableRbfWithSequence(nSequence: number) - Enable signaling RBF with a specific nSequence value. |
| 17 | + - enableRbf() - Enable signaling RBF. |
| 18 | + - finish(wallet: Wallet) - Finish building the transaction. |
| 19 | +- `DerivationPath` |
| 20 | + - create(path: string) - Constructor. |
| 21 | +- `Descriptor` |
| 22 | + - create(descriptor: string, network: Network) - Constructor. |
| 23 | + - asString() - Return the public version of the output descriptor. |
| 24 | + - asStringPrivate() - Return the private version of the output descriptor if available, otherwise return the public version. |
| 25 | + - newBip44(secretKey: DescriptorSecretKey, keychain: KeychainKind, network: Network) - BIP44 template. Expands to pkh(key/44'/{0,1}'/0'/{0,1}/*). |
| 26 | + - newBip44Public(publicKey: DescriptorPublicKey, fingerprint: string, keychain: KeychainKind, network: Network) - BIP44 public template. Expands to |
| 27 | + pkh(key/{0,1}/*). |
| 28 | + - newBip49(secretKey: DescriptorSecretKey, keychain: KeychainKind, network: Network) - BIP49 template. Expands to sh(wpkh(key/49'/{0,1}'/0'/{0,1}/*)). |
| 29 | + - newBip49Public(publicKey: DescriptorPublicKey, fingerprint: string, keychain: KeychainKind, network: Network) - BIP49 public template. Expands to |
| 30 | + sh(wpkh(key/{0,1}/*)). |
| 31 | + - newBip84(secretKey: DescriptorSecretKey, keychain: KeychainKind, network: Network) - BIP84 template. Expands to wpkh(key/84'/{0,1}'/0'/{0,1}/*). |
| 32 | + - newBip84Public(publicKey: DescriptorPublicKey, fingerprint: string, keychain: KeychainKind, network: Network) - BIP84 public template. Expands to |
| 33 | + wpkh(key/{0,1}/*). |
| 34 | +- `DescriptorPublicKey` |
| 35 | + - create(publicKeyId: string) - Constructor. |
| 36 | + - fromString(publicKey: string) - Create descriptorPublic from public key string. |
| 37 | + - derive(derivationPath: DerivationPath) - Derive descriptorPublic from derivation path. |
| 38 | + - extend(derivationPath: DerivationPath) - Extend descriptorPublic from derivation path. |
| 39 | + - asString() - Get public key as string. |
| 40 | +- `DescriptorSecretKey` |
| 41 | + - create(network: Network, mnemonic: Mnemonic, password?: string) - Constructor. |
| 42 | + - derive(derivationPath: DerivationPath) - Derive xprv from derivation path. |
| 43 | + - extend(derivationPath: DerivationPath) - Extend xprv from derivation path. |
| 44 | + - asPublic() - Create publicSecretKey from xprv. |
| 45 | + - secretBytes() - Create secret bytes of xprv. |
| 46 | + - asString() - Get secret key as string. |
| 47 | +- `Mnemonic` |
| 48 | + - create(wordCount?: WordCount) - Constructor. |
| 49 | + - fromString(mnemonic: string) - Parse a `Mnemonic` with given string |
| 50 | + - fromEntropy(entropy: Array<number>) - Generates `Mnemonic` with given `entropy` |
| 51 | + - asString() - Get `Mnemonic` as string |
| 52 | +- `PartiallySignedTransaction` |
| 53 | + - constructor(base64: string) - Default constructor. |
| 54 | + - combine(other: PartiallySignedTransaction) - Combines this `PartiallySignedTransaction` with other PSBT as described by BIP 174. |
| 55 | + - extractTx() - Return the transaction as bytes. |
| 56 | + - serialize() - Return transaction as string. |
| 57 | + - txid() - Return txid as string. |
| 58 | + - feeAmount() - Return feeAmount. |
| 59 | + - feeRate() - Return feeRate. |
| 60 | +- `Transaction` |
| 61 | + - create(bytes: Array<number>) - Constructor. |
| 62 | + - serialize() - Return the transaction bytes, bitcoin consensus encoded. |
| 63 | +- `TxBuilder` |
| 64 | + - create() - Constructor. |
| 65 | + - addRecipient(script: Script, amount: number) - Add recipient. |
| 66 | + - addUnspendable(outPoint: OutPoint). |
| 67 | + - addUtxo(outPoint: OutPoint). |
| 68 | + - addUtxos(outPoints: Array<OutPoint>). |
| 69 | + - doNotSpendChange(). |
| 70 | + - manuallySelectedOnly() - Only spend utxos added by add_utxo. |
| 71 | + - onlySpendChange(). |
| 72 | + - unspendable(outPoints: Array<OutPoint>). |
| 73 | + - feeRate(feeRate: number). |
| 74 | + - feeAbsolute(feeRate: number). |
| 75 | + - drainWallet() - Spend all the available inputs. |
| 76 | + - drainTo(script: Script) - Sets the address script to drain excess coins to. |
| 77 | + - enableRbf(). |
| 78 | + - enableRbfWithSequence(nsequence: number) - Enable signaling RBF with a specific nSequence value. |
| 79 | + - addData(data: Array<number>) - Add data as an output, using OP_RETURN. |
| 80 | + - setRecipients(recipients: Array<ScriptAmount>). |
| 81 | + - finish(wallet: Wallet) - Finishes the transaction building |
| 82 | +- `Wallet` |
| 83 | + - create(descriptor: Descriptor, changeDescriptor: Descriptor | null | undefined, network: Network, dbConfig: DatabaseConfig) - Constructor. |
| 84 | + - getAddress(addressIndex: AddressIndex) - Return a derived address using the external descriptor. |
| 85 | + - getBalance() - Return balance of current wallet. |
| 86 | + - network() - Get the Bitcoin network the wallet is using. |
| 87 | + - sync(blockchain: Blockchain) - Sync the internal database with the `Blockchain`. |
| 88 | + - listUnspent() - Return the list of unspent outputs of this wallet. |
| 89 | + - listTransactions() - Return an unsorted list of transactions made and received by the wallet. |
| 90 | + - sign(psbt: PartiallySignedTransaction) - Sign PSBT with wallet. |
| 91 | + |
| 92 | + |
0 commit comments