Skip to content

Commit 221584f

Browse files
[Bitcoin/Rust]: Finalize Bitcoin V2 refactoring (#3848)
* [Bitcoin/V2]: Add a `rust/frameworks` directory, move `tw_utxo` there * [Bitcoin/V2]: Add Bitcoin Legacy address implementation * [Bitcoin/V2]: Add `StandardBitcoinAddres` * [Bitcoin/V2]: Add segwit address * Switch to TW Bitcoin Address implementation in `BitcoinEntry` * [Bitcoin/V2]: Implement signAsDER and verifyAsDER used in Bitcoin * [BitcoinV2]: Add standard Unsigned and Signed Transaction declarations * Add and implement Bitcoin encoding for Signed Transaction * [BitcoinV2]: Refactor `TWDerivation` to avoid Coin names * [BitcoinV2]: Refactor preimage hashing * Delegate transaction preimage hashing to `LegacyPreimage`, `Witness0Preimage` helpers * [BitcoinV2]: Design a `TransactionSigner` API * [BitcoinV2]: Design an API for `TransactionPlanner`, `TransactionBuilder` * add Script check methods * cargo fmt * make signing_method optional, try to automatically determine signing method if unavailable * start expanding verify_signatures * add schnorr module to tw_keypair, wip * expand KeyPair impl for schnorr * expand enums in tw module with Schnorr * simplify schnorr module structure * complete SigningKeyTrait and VerifyingKeyTrait impl for KeyPair * complete verify_signatures mechanism * adjust some types, complete compile method * add test interface for signer, wip * handle Schnorr variant in tw_keypair * ignore the recovery byte in ECDSA signature * update comment * specify the keys explicitly in tests * continue debugging * remove UseDefault from SighashBase, use All as default, fix sighash calculation * formatting * add Witness type, correctly consensus-encode items * fix P2WPKH scriptPubkey generation * add standard OPCodes and add convenience functions for Script * complete standard Script builders and checkers * update script submodule structures * build claim scripts for standardized transaction variants * fix Script method call * update comments, use H264 for new_p2pk instead of PublicKey type * small cleanup to push_slice * fix typo * rename Sighash to SighashType * expand TransactionBuilder * adjust builder and add test, wip * update TransactionBuilder, init test, wip * complete build_legacy_tx test * assert in build_legacy_tx * add BitcoinEcdsaSignature type, serialize correctly for claim script * add SER_SIZE const to BitcoinEcdsaSignature * rename TransactionSigner to SighashComputer * add a ClaimBuilder * rename some types * add tests for building Segwit transactions * delete playgrounds * track transaction builder test * add fee calculation traits, implement for standard Transaction, Inputs and Outputs * implement TransactionFee::fee * implement CompactInteger::serialized_len * consider Segwith flag and marker when calculating weight/size/fee * add select_inputs logic to TransactionFee, handle vbyte/size calculation edge case * expand tests with size, vsize and weight calculation * add fee() calculation tests * add input selection tests, wip * add base_size to TransactionFee trait, implement method * move input selection logic out of TransactionFee trait and to ComputedTransaction * add change amount related methods * continue with change output build pattern, wip * mvoe utxo input selector to separate module * complete test for utxo selection with change output generation * add note slight fee difference * extra comments * introduce CompiledSelectionBuilder * add p2tr condition builder functions * add builders for input, claim and output P2TR-key-path scripts * track taproot1_sighash, wip * extra conditions * add tests for Taproot inputs, spending conditions and claims. wip * continue on Taproot sighash calculation, wip * continuing with Taproot Sighash debugging... * add mockup of TapsighHash * extend test, wip * remove unused fields in UtxoPreiamgeArgs * implement Hasher::TapSighash variant * rename TapSighash prefix const * seperate sighash methods on PreimageInterface into legacy/segwit and taproot * move spent_* hashing methods to TransactionHasher * adjust TapSighash workflow to other variants * move tx_hasher and sighash_ty to a per-input basis * add const for Annex indicator * include leaf_hash and separator as part of TapSighash * construct Taproot script-path spending info and merkle root, wip * add p2tr_script_path spending script builder * init asset/ module, move brc20 and ordinals there * adjust brc20 and ordinal code for new changes, add brc20_transfer input builder * separate input builder into individual modules * fix and format * remove unused DEFAULT_TX_HASHER in utxo_selector * build brc20 spending input * build brc20 transfer output * add tweak support to tw_keypair * build brc20 transfer output * add support for non aux rand data when signing for schnorr, complete P2TR key-path test * add test for BRC20 transfer output, fix issue with payload * testing brc20 transfer reveal, wip * finalize brc20 reveal construction with tests * get rid of dbg! * add custom script builders * wipe tw_bitcoin's preimage_hashes_impl, start with utxo builder migration * handle custom script proto builder * start migrating output proto to builder matcher, wip * use SelectionBuilder * expand migration of tw_bitcoin preimage_hashes_impl * create dummy claims for preiamge_hashes_impl * add and handle a UseAll selector * complete construction of proto outputs * add init module with proto_input_to_native function * implement proto_output_to_native * process change output * handle custom script_pubkey outputs * fix signature issue for p2tr_script_path, expand p2wsh impl * set send_to_address tests to ignore for now * remove ignore attribute for ordinals and brc20, all related tests pass * derive P2PKH and P2SH from base58 address * derive P2WSH and P2WPKH from bech32 address * move address to native derivation logic to individual function * init taproot module with TaprootAddress * implement p2tr_with_coin_and_prefix for TaprootAddress, derive from StandardBitcoinAddress * fix tests for reference changes * distinguish between Segwit and Taproot for StandardBitcoinAddress * derive Taproot program from address, do extra witness program check * complete builders for P2WPKH and P2WSH derived from address string * complete legacy P2PKH and P2SH builders derived from address string * move address derivation logic to address_to_native * complete proto builders for p2pkh and p2wpkh from_hash variants * expand output builder for P2SH, both redeem script and hash * expand P2SH input claiming, wip * set ignore attribute to p2sh tests for now * add option to provide sigs to proto_input_to_native, deprecate some legacy code * construct proto return value for compile method * implement txid and fix ownership issue with proto return structure * update tw_bitcoin calls in wallet_core_rs for legacy FFI functions * update p2tr_script_path test module, use updated tw_utxo crate * adjust legacy_script tests to tw_utxo changes * remove unused imports * remove print/dbg statements * remove proto interface for tw_utxo * add proto_input_to_spending_data function * rename to proto_sighash_to_sig * sign sighashes and compile final transaction in tw_bitcon entry * formatting * add todo to fn txid * [Bitcoin]: Cleanups * [Bitcoin]: Fix most of clippy warnings * [Bitcoin]: Refactor schnorr private and public keys * [Bitcoin]: Fix BRC20 tests * [Bitcoin]: Fix txid * [Bitcoin]: Temporary add `BitcoinV3.proto` - refactored API * [Bitcoin]: Deprecate tw_bitcoin/src/modules * [Bitcoin]: Add `TransactionProtobuf` module * [Bitcoin]: Use `TWError<SigningError>` in tw_utxo * [Bitcoin]: Add `UtxoProtobuf` builder * Merge `SigningMethod::TaprootAll` and `SigningMethod::TaprootOnePrevout` * Temporary remove `OrdinalInscription` * [Bitcoin]: Add a `SpendingDataConstructor` pattern * Refactor `UtxoBuilder` to create a corresponding `SpendingDataConstructor` * Slightly refactor `BitcoinV3.proto` API * [Bitcoin]: Finalize UTXO selectors * Add `MaxSelector`, add `SigningInput::max_amount_output` * Refactor `SelectorBuilder` as `ExactSelector` * Add `DustFilter` and `DustPolicy` * Slightly refactor `BitcoinV3.proto` API * [Bitcoin]: Finalize UTXO selectors, split `SighashComputer` * Add `MaxSelector`, add `SigningInput::max_amount_output` * Refactor `SelectorBuilder` as `ExactSelector` * Add `DustFilter` and `DustPolicy` * Slightly refactor `BitcoinV3.proto` API * Split `SighashComputer` into several modules * Finalize `TxCompiler` * Finalize `SighashVerifier` * [Bitcoin]: Add `TxSigner` * [Bitcoin]: Add `OutputProtobuf` builder * Fix Segwit address to not allow witness version > 0 * [Bitcoin]: Refactor `TaprootAddress` and `SegwitAddress` * [Bitcoin]: Add transaction signer * [Bitcoin]: Add transaction planner * [Bitcoin]: Add transaction compiler * [Bitcoin]: Make `TxPlanner` generic * [Bitcoin]: Some clean ups * [Bitcoin]: Remove legacy BRC20 API * [Bitcoin]: Add BRC20 test * Add default chain info if not provided * Add default sequence if not provided * [Bitcoin]: Add P2PKH test * [Bitcoin]: Fix final fee calculation * [Bitcoin]: Add p2tr_key_path * [Bitcoin]: Move unit tests to `tw_any_coin/tests/chains/bitcoin` * [Bitcoin]: Fix `send_to_address` tests * [Bitcoin]: Fix broken tests * [Bitcoin]: Move UTXO selection to `tw_any_coin/tests` * [Bitcoin]: Add exact selector with and without change test * [Bitcoin]: Check transaction weight * Add more exact_selector tests * [Bitcoin]: Add more selector tests, increase code coverage * [Bitcoin]: Add p2pkh compile test * [Bitcoin]: Add mainnet BCH test * Fix fork_id sighashing * [Bitcoin]: Add send to p2sh and p2wsh address tests * Add p2wpkh signing test * Set V1 default transaction version * [Bitcoin]: Add OP_RETURN test * [Bitcoin]: Allow to pass a DER encoded signature to `TransactionCompiler` * [Bitcoin]: Test Bitcoin addresses * [Bitcoin]: Add BRC20 compile tests * [Bitcoin]: Fix transaction weight * [Bitcoin]: Remove legacy FFI TWBitcoinFeeCalculateFee * Return an error if `is_it_brc_operation` is true * [Bitcoin]: Add P2SH output signing test * [Bitcoin]: Add p2tr_script_path output test * Reorg p2tr_key_path tests to cover multiple protobuf types * [Bitcoin]: Fix p2tr custom script * [Bitcoin]: Fix P2PK * Extend P2PKH test to cover all protobuf inputs * Add P2WSH output test * Add sighash single test * [Bitcoin]: Fix some TODOs * [Bitcoin]: Finalize BitcoinV2 * Remove `Bitcoin.SigningInput.is_it_brc_operation` and `Bitcoin.SigningInput.planning_v2` * TODO adopt C++ BRC20 tests for BitcoinV2 * [Bitcoin]: Fix one of Android tests * Add Rust `test_bitcoin_sign_brc20_transfer` test * [Bitcoin]: Uncomment out Android tests * [Bitcoin]: Fix iOS tests * Remove NFT data from Android and iOS test suits * [Bitcoin]: Fix WASM BRC20 tests * [CI] Trigger CI * [Bitcoin]: Minor fixes * [Bitcoin]: Fix Rust WASM tests * [Bitcoin]: Add real P2TR transaction tests * [TON]: Add P2TR test in WASM --------- Co-authored-by: lamafab <42901763+lamafab@users.noreply.github.com>
1 parent 9373610 commit 221584f

File tree

237 files changed

+12669
-9400
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

237 files changed

+12669
-9400
lines changed

android/app/src/androidTest/java/com/trustwallet/core/app/blockchains/TestCoinType.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@ class TestCoinType {
5252
fun testDerivationPath() {
5353
var res = CoinType.createFromValue(CoinType.BITCOIN.value()).derivationPath().toString()
5454
assertEquals(res, "m/84'/0'/0'/0/0")
55-
res = CoinType.createFromValue(CoinType.BITCOIN.value()).derivationPathWithDerivation(Derivation.BITCOINLEGACY).toString()
55+
res = CoinType.createFromValue(CoinType.BITCOIN.value()).derivationPathWithDerivation(Derivation.LEGACY).toString()
5656
assertEquals(res, "m/44'/0'/0'/0/0")
57-
res = CoinType.createFromValue(CoinType.SOLANA.value()).derivationPathWithDerivation(Derivation.SOLANASOLANA).toString()
57+
res = CoinType.createFromValue(CoinType.SOLANA.value()).derivationPathWithDerivation(Derivation.SOLANA).toString()
5858
assertEquals(res, "m/44'/501'/0'/0'")
5959
}
6060

6161
@Test
6262
fun testDeriveAddressFromPublicKeyAndDerivation() {
6363
val publicKey = PublicKey("0279BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798".toHexByteArray(), PublicKeyType.SECP256K1)
6464

65-
val address = CoinType.BITCOIN.deriveAddressFromPublicKeyAndDerivation(publicKey, Derivation.BITCOINSEGWIT)
65+
val address = CoinType.BITCOIN.deriveAddressFromPublicKeyAndDerivation(publicKey, Derivation.SEGWIT)
6666
assertEquals(address, "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4")
6767
}
6868
}

android/app/src/androidTest/java/com/trustwallet/core/app/blockchains/bitcoin/TestBitcoinFee.kt

Lines changed: 0 additions & 47 deletions
This file was deleted.

android/app/src/androidTest/java/com/trustwallet/core/app/blockchains/bitcoin/TestBitcoinSigning.kt

Lines changed: 166 additions & 811 deletions
Large diffs are not rendered by default.

android/app/src/androidTest/java/com/trustwallet/core/app/utils/TestAnyAddress.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ class TestAnyAddress {
5353
fun testCreateWithPublicKeyDerivation() {
5454
val coin = CoinType.BITCOIN
5555
val pubkey = PublicKey(any_address_test_pubkey.toHexByteArray(), PublicKeyType.SECP256K1)
56-
val address1 = AnyAddress(pubkey, coin, Derivation.BITCOINSEGWIT)
56+
val address1 = AnyAddress(pubkey, coin, Derivation.SEGWIT)
5757
assertEquals(address1.description(), any_address_test_address)
5858

59-
val address2 = AnyAddress(pubkey, coin, Derivation.BITCOINLEGACY)
59+
val address2 = AnyAddress(pubkey, coin, Derivation.LEGACY)
6060
assertEquals(address2.description(), "1JvRfEQFv5q5qy9uTSAezH7kVQf4hqnHXx")
6161
}
6262

android/app/src/androidTest/java/com/trustwallet/core/app/utils/TestHDWallet.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,13 @@ class TestHDWallet {
113113
val coin = CoinType.BITCOIN
114114
val wallet = HDWallet(words, password)
115115

116-
val key1 = wallet.getKeyDerivation(coin, Derivation.BITCOINSEGWIT)
116+
val key1 = wallet.getKeyDerivation(coin, Derivation.SEGWIT)
117117
assertEquals(key1.data().toHex(), "0x1901b5994f075af71397f65bd68a9fff8d3025d65f5a2c731cf90f5e259d6aac")
118118

119-
val key2 = wallet.getKeyDerivation(coin, Derivation.BITCOINLEGACY)
119+
val key2 = wallet.getKeyDerivation(coin, Derivation.LEGACY)
120120
assertEquals(key2.data().toHex(), "0x28071bf4e2b0340db41b807ed8a5514139e5d6427ff9d58dbd22b7ed187103a4")
121121

122-
val key3 = wallet.getKeyDerivation(coin, Derivation.BITCOINTESTNET)
122+
val key3 = wallet.getKeyDerivation(coin, Derivation.TESTNET)
123123
assertEquals(key3.data().toHex(), "0xca5845e1b43e3adf577b7f110b60596479425695005a594c88f9901c3afe864f")
124124
}
125125

@@ -137,13 +137,13 @@ class TestHDWallet {
137137
val coin = CoinType.BITCOIN
138138
val wallet = HDWallet(words, password)
139139

140-
val address1 = wallet.getAddressDerivation(coin, Derivation.BITCOINSEGWIT)
140+
val address1 = wallet.getAddressDerivation(coin, Derivation.SEGWIT)
141141
assertEquals(address1, "bc1qumwjg8danv2vm29lp5swdux4r60ezptzz7ce85")
142142

143-
val address2 = wallet.getAddressDerivation(coin, Derivation.BITCOINLEGACY)
143+
val address2 = wallet.getAddressDerivation(coin, Derivation.LEGACY)
144144
assertEquals(address2, "1PeUvjuxyf31aJKX6kCXuaqxhmG78ZUdL1")
145145

146-
val address3 = wallet.getAddressDerivation(coin, Derivation.BITCOINTESTNET)
146+
val address3 = wallet.getAddressDerivation(coin, Derivation.TESTNET)
147147
assertEquals(address3, "tb1qwgpxgwn33z3ke9s7q65l976pseh4edrzfmyvl0")
148148
}
149149

codegen/bin/coins

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ def self.derivation_name(deriv)
3131
deriv['name'].downcase
3232
end
3333

34-
def self.derivation_enum_name(deriv, coin)
34+
def self.derivation_enum_name(deriv)
3535
return "TWDerivationDefault" if deriv['name'].nil?
36-
"TWDerivation" + format_name(coin['name']) + camel_case(deriv['name'])
36+
"TWDerivation" + camel_case(deriv['name'])
3737
end
3838

3939
def self.coin_img(coin)
@@ -53,6 +53,7 @@ coins = JSON.parse(json_string).sort_by { |x| x['coinId'] }
5353

5454
# used in some cases for numbering enum values
5555
enum_count = 0
56+
derivations = {}
5657

5758
erbs = [
5859
{'template' => 'TWDerivation.h.erb', 'folder' => 'include/TrustWalletCore', 'file' => 'TWDerivation.h'},

codegen/lib/templates/CoinInfoData.cpp.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const CoinInfo getCoinInfo(TWCoinType coin) {
5151
TWCurve<%= format_name(coin['curve']) %>,
5252
{
5353
<% coin['derivation'].each do |deriv| -%>{
54-
<%= derivation_enum_name(deriv, coin) %>,
54+
<%= derivation_enum_name(deriv) %>,
5555
"<%= deriv['path'] %>",
5656
"<%= derivation_name(deriv) %>",
5757
TWHDVersion<% if deriv['xpub'].nil? -%>None<% else -%><%= format_name(deriv['xpub']) %><% end -%>,

codegen/lib/templates/TWDerivation.h.erb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ enum TWDerivation {
1818
TWDerivationCustom = 1, // custom, for any coin
1919
<% enum_count += 1 -%>
2020
<% coins.each do |coin| -%>
21-
<% if coin['derivation'].count > 1 -%>
2221
<% coin['derivation'].each_with_index do |deriv, index| -%>
23-
<% if index > 0 or !deriv['name'].nil? -%>
24-
<%= derivation_enum_name(deriv, coin) %> = <% enum_count += 1 -%><%= enum_count %>,
25-
<% end -%>
22+
<% if !deriv['name'].nil? and !derivations.has_key?(deriv['name']) -%>
23+
<% derivations[deriv['name']] = true -%>
24+
<%= derivation_enum_name(deriv) %> = <% enum_count += 1 -%><%= enum_count %>,
2625
<% end -%>
2726
<% end -%>
2827
<% end -%>

include/TrustWalletCore/TWBitcoinFee.h

Lines changed: 0 additions & 23 deletions
This file was deleted.

include/TrustWalletCore/TWBitcoinScript.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -191,26 +191,6 @@ struct TWBitcoinScript* _Nonnull TWBitcoinScriptBuildPayToWitnessPubkeyHash(TWDa
191191
TW_EXPORT_STATIC_METHOD
192192
struct TWBitcoinScript* _Nonnull TWBitcoinScriptBuildPayToWitnessScriptHash(TWData* _Nonnull scriptHash);
193193

194-
/// Builds the Ordinals inscripton for BRC20 transfer.
195-
///
196-
/// \param ticker ticker of the brc20
197-
/// \param amount uint64 transfer amount
198-
/// \param pubkey Non-null pointer to a pubkey
199-
/// \note Must be deleted with \TWBitcoinScriptDelete
200-
/// \return A pointer to the built script
201-
TW_EXPORT_STATIC_METHOD
202-
TWData* _Nonnull TWBitcoinScriptBuildBRC20InscribeTransfer(TWString* _Nonnull ticker, TWString* _Nonnull amount, TWData* _Nonnull pubkey);
203-
204-
/// Builds the Ordinals inscripton for NFT construction.
205-
///
206-
/// \param mimeType the MIME type of the payload
207-
/// \param payload the payload to inscribe
208-
/// \param pubkey Non-null pointer to a pubkey
209-
/// \note Must be deleted with \TWBitcoinScriptDelete
210-
/// \return A pointer to the built script
211-
TW_EXPORT_STATIC_METHOD
212-
TWData* _Nonnull TWBitcoinScriptBuildOrdinalNftInscription(TWString* _Nonnull mimeType, TWData* _Nonnull payload, TWData* _Nonnull pubkey);
213-
214194
/// Builds a appropriate lock script for the given address..
215195
///
216196
/// \param address Non-null pointer to an address

registry.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"blockchain": "Bitcoin",
5757
"derivation": [
5858
{
59+
"name": "segwit",
5960
"path": "m/84'/2'/0'/0/0",
6061
"xpub": "zpub",
6162
"xprv": "zprv"
@@ -159,9 +160,16 @@
159160
"blockchain": "Bitcoin",
160161
"derivation": [
161162
{
163+
"name": "segwit",
162164
"path": "m/84'/14'/0'/0/0",
163165
"xpub": "zpub",
164166
"xprv": "zprv"
167+
},
168+
{
169+
"name": "legacy",
170+
"path": "m/44'/14'/0'/0/0",
171+
"xpub": "xpub",
172+
"xprv": "xprv"
165173
}
166174
],
167175
"curve": "secp256k1",
@@ -225,6 +233,7 @@
225233
"blockchain": "Bitcoin",
226234
"derivation": [
227235
{
236+
"name": "segwit",
228237
"path": "m/84'/20'/0'/0/0",
229238
"xpub": "zpub",
230239
"xprv": "zprv"
@@ -258,9 +267,16 @@
258267
"blockchain": "Bitcoin",
259268
"derivation": [
260269
{
270+
"name": "legacy",
261271
"path": "m/44'/22'/0'/0/0",
262272
"xpub": "xpub",
263273
"xprv": "xprv"
274+
},
275+
{
276+
"name": "segwit",
277+
"path": "m/84'/22'/0'/0/0",
278+
"xpub": "zpub",
279+
"xprv": "zprv"
264280
}
265281
],
266282
"curve": "secp256k1",
@@ -324,9 +340,16 @@
324340
"blockchain": "Bitcoin",
325341
"derivation": [
326342
{
343+
"name": "segwit",
327344
"path": "m/84'/57'/0'/0/0",
328345
"xpub": "zpub",
329346
"xprv": "zprv"
347+
},
348+
{
349+
"name": "legacy",
350+
"path": "m/44'/57'/0'/0/0",
351+
"xpub": "xpub",
352+
"xprv": "xprv"
330353
}
331354
],
332355
"curve": "secp256k1",
@@ -1517,9 +1540,16 @@
15171540
"blockchain": "Bitcoin",
15181541
"derivation": [
15191542
{
1543+
"name": "segwit",
15201544
"path": "m/84'/156'/0'/0/0",
15211545
"xpub": "zpub",
15221546
"xprv": "zprv"
1547+
},
1548+
{
1549+
"name": "legacy",
1550+
"path": "m/44'/156'/0'/0/0",
1551+
"xpub": "xpub",
1552+
"xprv": "xprv"
15231553
}
15241554
],
15251555
"curve": "secp256k1",
@@ -2842,9 +2872,16 @@
28422872
"blockchain": "Bitcoin",
28432873
"derivation": [
28442874
{
2875+
"name": "legacy",
28452876
"path": "m/44'/2301'/0'/0/0",
28462877
"xpub": "xpub",
28472878
"xprv": "xprv"
2879+
},
2880+
{
2881+
"name": "segwit",
2882+
"path": "m/84'/2301'/0'/0/0",
2883+
"xpub": "zpub",
2884+
"xprv": "zprv"
28482885
}
28492886
],
28502887
"curve": "secp256k1",
@@ -4243,6 +4280,7 @@
42434280
"blockchain": "Bitcoin",
42444281
"derivation": [
42454282
{
4283+
"name": "segwit",
42464284
"path": "m/44'/105105'/0'/0/0",
42474285
"xpub": "xpub",
42484286
"xprv": "xprv"

0 commit comments

Comments
 (0)