-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Sync]: Apply changes from DeFi wallet-core #3225
Conversation
@@ -202,6 +202,10 @@ struct TWBitcoinScript* _Nonnull TWBitcoinScriptBuildPayToWitnessScriptHash(TWDa | |||
TW_EXPORT_STATIC_METHOD | |||
struct TWBitcoinScript* _Nonnull TWBitcoinScriptLockScriptForAddress(TWString* _Nonnull address, enum TWCoinType coin); | |||
|
|||
/// Builds a appropriate lock script for the given address with replay. | |||
TW_EXPORT_STATIC_METHOD | |||
struct TWBitcoinScript *_Nonnull TWBitcoinScriptLockScriptForAddressReplay(TWString *_Nonnull address, enum TWCoinType coin, TWData *_Nonnull blockHash, int64_t blockHeight); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note - int64_t blockHeight
won't work in TypeScript.
See #3197
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use a string instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasm has i64
, maybe fine to keep it, it's weird to see string block height in Bitcoin codebase; worth to add a ts test for sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added this test to wasm/tests/Blockchain/Bitcoin.test.ts
:
it("test TWBitcoinScriptLockScriptForAddressReplay", () => {
const { BitcoinScript, CoinType, HexCoding } = globalThis.core;
const output = TW.Cardano.Proto.TxOutput.create()
const toAddress = "12dNaXQtN5Asn2YFwT1cvciCrJa525fAe4"
const blockHash = HexCoding.decode("1fcb84974220eb76e619d7208e1446ae9c0f755e97fb220a8f61c7dc03a0dfce")
const actual = BitcoinScript.lockScriptForAddressReplay(toAddress, CoinType.bitcoin, blockHash, 123)
// assert.equal(actual, "969750")
});
Here is the runtime error:
UnboundTypeError: Cannot call BitcoinScript.lockScriptForAddressReplay due to unbound types: x
at Error.<anonymous> (dist/lib/wallet-core.js:73:76)
at new <anonymous> (dist/lib/wallet-core.js:72:261)
at Wc (dist/lib/wallet-core.js:89:364)
at Function.m [as lockScriptForAddressReplay] (dist/lib/wallet-core.js:128:471)
at Context.<anonymous> (tests/Blockchain/Bitcoin.test.ts:24:34)
at processImmediate (node:internal/timers:478:21)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can postpone the fix of TWBitcoinScriptLockScriptForAddressReplay
as our users don't use it right now, so we have some time
/// Represents a Substrate address. | ||
TW_EXPORT_CLASS | ||
struct TWSubstrateAddress; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be replaced with TWAnyAddress
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to extend TWSS58AddressType
to include all the networks used in DeFi wallet
/// Builds a transaction to be broadcasted | ||
TW_EXPORT_STATIC_METHOD | ||
TWData *_Nonnull TWSubstrateSignerTransaction(TW_Substrate_Proto_SigningInput data, TWData *_Nonnull publicKey, TWData *_Nonnull signature); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this can be replaced with Entry::compile
.
Also `SigningInput should be passed serialized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use it to support all coins based on substrate that we do not have to define every coin in registry.json
, could we extend Entry::compile
to support that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First review iteration on the interface, will check the source during the second iteration
@@ -202,6 +202,10 @@ struct TWBitcoinScript* _Nonnull TWBitcoinScriptBuildPayToWitnessScriptHash(TWDa | |||
TW_EXPORT_STATIC_METHOD | |||
struct TWBitcoinScript* _Nonnull TWBitcoinScriptLockScriptForAddress(TWString* _Nonnull address, enum TWCoinType coin); | |||
|
|||
/// Builds a appropriate lock script for the given address with replay. | |||
TW_EXPORT_STATIC_METHOD | |||
struct TWBitcoinScript *_Nonnull TWBitcoinScriptLockScriptForAddressReplay(TWString *_Nonnull address, enum TWCoinType coin, TWData *_Nonnull blockHash, int64_t blockHeight); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use a string instead
dataOut = txCompilerTemplate<Proto::SigningInput, Proto::SigningOutput>( | ||
txInputData, [&](const auto& input, auto& output) { | ||
if (signatures.size() == 0 || publicKeys.size() == 0) { | ||
output.set_error(Common::Proto::Error_invalid_params); | ||
output.set_error_message("empty signatures or publickeys"); | ||
return; | ||
} | ||
if (signatures.size() > 1 || publicKeys.size() > 1) { | ||
output.set_error(Common::Proto::Error_no_support_n2n); | ||
output.set_error_message(Common::Proto::SigningError_Name(Common::Proto::Error_no_support_n2n)); | ||
return; | ||
} | ||
output = Signer::compile(signatures[0], publicKeys[0], input); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code snippet repeats multiple times. We could add txCompilerSingleInTemplate
, for example
return Signer::encodeTransaction(signature, publicKey, input); | ||
} | ||
|
||
TW::Data Signer::preImage(const TW::PublicKey& pubKey, const Proto::SigningInput& input) noexcept { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Algorand::Signer
could be refactored to avoid duplicating code by adding Signer::preImageTx() -> std::unique_ptr<BaseTransaction>
.
Priority: low
if (Zen::Address::isValid(string)) { | ||
auto address = Zen::Address(string); | ||
auto data = Data(); | ||
data.reserve(Address::size - 2); | ||
std::copy(address.bytes.begin() + 2, address.bytes.end(), std::back_inserter(data)); | ||
if (address.bytes[1] == TW::p2pkhPrefix(TWCoinTypeZen)) { | ||
return buildPayToPublicKeyHashReplay(data, blockHash, blockHeight); | ||
} else if (address.bytes[1] == TW::p2shPrefix(TWCoinTypeZen)) { | ||
return buildPayToScriptHashReplay(data, blockHash, blockHeight); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great if this is implemented in Zen blockchain (e.g. in src/Zen/Script.h)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, also we may need to refactor Script
to support OP_CHECKBLOCKATHEIGHT
better
src/NEO/Entry.cpp
Outdated
void Entry::compile([[maybe_unused]] TWCoinType coin, const Data& txInputData, const std::vector<Data>& signatures, const std::vector<PublicKey>& publicKeys, Data& dataOut) const { | ||
dataOut = txCompilerTemplate<Proto::SigningInput, Proto::SigningOutput>( | ||
txInputData, [&](const auto& input, auto& output) { | ||
if (signatures.size() == 0 || publicKeys.size() == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably worth to check if they have the same length
@@ -34,4 +34,29 @@ string Entry::signJSON([[maybe_unused]] TWCoinType coin, const std::string& json | |||
return Signer::signJSON(json, key); | |||
} | |||
|
|||
TW::Data Entry::preImageHashes([[maybe_unused]] TWCoinType coin, const TW::Data& txInputData) const { | |||
return txCompilerTemplate<Proto::SigningInput, Proto::PreSigningOutput>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, CoinEntry::preImageHashes
returns TransactionCompiler::PreSigningOutput, but also it may return Solana::PreSigningOutput and Bitcoin::PreSigningOutput.
We should return the same Protobuf message in all cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are right. We define them case by case.
// file LICENSE at the root of the source code distribution tree. | ||
|
||
#include "../BinaryCoding.h" | ||
#include "Extrinsic.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope it's possible to merge Polkadot and Substrate, because (if I'm not mistaken) there a few changes between them
* Replace `Substrate::ScaleCodec` with `Polkadot::ScaleCodec`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will continue review files after Bitcoin Diamond
.../app/src/androidTest/java/com/trustwallet/core/app/blockchains/cardano/TestCardanoSigning.kt
Outdated
Show resolved
Hide resolved
@@ -34,7 +34,9 @@ class CoinAddressDerivationTests { | |||
|
|||
private fun runDerivationChecks(coin: CoinType, address: String?) = when (coin) { | |||
BINANCE -> assertEquals("bnb12vtaxl9952zm6rwf7v8jerq74pvaf77fcmvzhw", address) | |||
TBINANCE -> assertEquals("tbnb12vtaxl9952zm6rwf7v8jerq74pvaf77fkw9xhl", address) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any chance we change it to binance testnet?
@@ -82,7 +82,7 @@ class TestEOSSigning { | |||
val signatureValue: String = signatures.get(0) as String; | |||
assertNotNull("Error parsing JSON result", signatureValue) | |||
assertEquals( | |||
"SIG_K1_KfCdjsrTnx5cBpbA5cUdHZAsRYsnC9uKzuS1shFeqfMCfdZwX4PBm9pfHwGRT6ffz3eavhtkyNci5GoFozQAx8P8PBnDmj", | |||
"SIG_K1_K9RdLC7DEDWjTfR64GU8BtDHcAjzR1ntcT651JMcfHNTpdsvDrUwfyzF1FkvL9fxEi2UCtGJZ9zYoNbJoMF1fbU64cRiJ7", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to test EOS signature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to test EOS signature
We changed the ExpirySeconds
default value from 30 to 3600, so the signature changed.
@@ -202,6 +202,10 @@ struct TWBitcoinScript* _Nonnull TWBitcoinScriptBuildPayToWitnessScriptHash(TWDa | |||
TW_EXPORT_STATIC_METHOD | |||
struct TWBitcoinScript* _Nonnull TWBitcoinScriptLockScriptForAddress(TWString* _Nonnull address, enum TWCoinType coin); | |||
|
|||
/// Builds a appropriate lock script for the given address with replay. | |||
TW_EXPORT_STATIC_METHOD | |||
struct TWBitcoinScript *_Nonnull TWBitcoinScriptLockScriptForAddressReplay(TWString *_Nonnull address, enum TWCoinType coin, TWData *_Nonnull blockHash, int64_t blockHeight); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasm has i64
, maybe fine to keep it, it's weird to see string block height in Bitcoin codebase; worth to add a ts test for sure
@@ -33,6 +34,12 @@ bool Script::isPayToScriptHash() const { | |||
bytes[22] == OP_EQUAL; | |||
} | |||
|
|||
bool Script::isPayToScriptHashReplay() const { | |||
// Extra-fast test for pay-to-script-hash-replay |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no pay-to-script-hash-replay
, still pay-to-script-hash
if (Zen::Address::isValid(string)) { | ||
auto address = Zen::Address(string); | ||
auto data = Data(); | ||
data.reserve(Address::size - 2); | ||
std::copy(address.bytes.begin() + 2, address.bytes.end(), std::back_inserter(data)); | ||
if (address.bytes[1] == TW::p2pkhPrefix(TWCoinTypeZen)) { | ||
return buildPayToPublicKeyHashReplay(data, blockHash, blockHeight); | ||
} else if (address.bytes[1] == TW::p2shPrefix(TWCoinTypeZen)) { | ||
return buildPayToScriptHashReplay(data, blockHash, blockHeight); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, also we may need to refactor Script
to support OP_CHECKBLOCKATHEIGHT
better
src/Bitcoin/Script.h
Outdated
@@ -113,6 +137,35 @@ class Script { | |||
return OP_1 + uint8_t(n - 1); | |||
} | |||
|
|||
/// Encodes an integer | |||
static inline Data encodeNumber(int64_t n) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move it to a separate file
Proto::SigningInput input; | ||
/// Initializes a transaction signer. | ||
explicit Signer(const Proto::SigningInput& input) : chainID(input.chain_id()), input(input) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to hold Proto::SigningInput input
in the Theta::Signer
class.
Priority: low
Proto::SigningInput input; | ||
|
||
Signer() = default; | ||
|
||
/// Initializes a transaction signer. | ||
explicit Signer(const Proto::SigningInput& input) : input(input) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we don't need to hold Proto::SigningInput input
in XRP::Signer
.
Priority: low
if (coin == TWCoinTypeKomodo) { | ||
auto* base58Prefix = std::get_if<Base58Prefix>(&addressPrefix); | ||
return base58Prefix ? Bitcoin::Address::isValid(address, {{base58Prefix->p2pkh}, {base58Prefix->p2sh}}) : false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should create a separate Komodo
blockchain the same way as it's done for Zen
or BitcoinDiamond
instead of checking the coin type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to TODO list
@@ -57,6 +99,7 @@ message SigningInput { | |||
|
|||
// Optional transaction plan (if missing it will be computed) | |||
TransactionPlan plan = 7; | |||
Transaction transaction = 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, Transaction
message should be renamed to TransactionOperation
or TransctionInvocation
// Transaction
message TransactionOperation {
// nep5 token transfer transaction
message Nep5Transfer {
}
// Generic invocation transaction
message InvocationGeneric {
}
oneof operation_oneof {
Nep5Transfer nep5_transfer = 1;
InvocationGeneric invocation_generic = 2;
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to TODO list
{stakingChill, Data{0x07, 0x06}}, | ||
{utilityBatch, Data{0x1a, 0x02}}, | ||
{stakingReBond, Data{0x07, 0x13}}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indices may be changed if Polkadot or substrate upgrades, this happened on Polymesh.
* Remove unused TW interfaces * Rename `TWCoinTypeDeriveAddressFromDerivation` to `TWCoinTypeDeriveAddressFromPublicKeyAndDerivation`
* Add `txCompilerSingleTemplate`
* Revert `TW` prefix changes
"208094ebdc032801126e0a26eb5ae9872103a9a55c040c8eb8120f3d1b32193250841c08af44ea561aac" | ||
"993dbe0f6b6a8fc71240b2612500b80f5ee8fab1574e9b1763fd898a7048910d02e00dea6337d3c848c9" | ||
"5aa2213db595179db076dfdb10f6e2d9b2aa76c9cd3ee11396ac224991e3e0cd180f2001"); | ||
"208094ebdc032801126e0a26eb5ae9872103a9a55c040c8eb8120f3d1b32193250841c08af44ea561aac993dbe0f6b6a8fc712401fbb993d643f03b3e8e757a502035f58c4c45aaaa6e107a3059ab7c6164283c10f1254e87feee21477c64c87b1a27d8481048533ae2f685b3ac0dc66e4edbc0b180f2001" | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note that Binance signatures have been changed
@@ -57,6 +99,7 @@ message SigningInput { | |||
|
|||
// Optional transaction plan (if missing it will be computed) | |||
TransactionPlan plan = 7; | |||
Transaction transaction = 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to TODO list
if (coin == TWCoinTypeKomodo) { | ||
auto* base58Prefix = std::get_if<Base58Prefix>(&addressPrefix); | ||
return base58Prefix ? Bitcoin::Address::isValid(address, {{base58Prefix->p2pkh}, {base58Prefix->p2sh}}) : false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to TODO list
* Simplify `Binance::Address`
@@ -39,7 +39,7 @@ TEST(TWAnySignerEOS, Sign) { | |||
ANY_SIGN(input, TWCoinTypeEOS); | |||
|
|||
EXPECT_EQ(output.error(), Common::Proto::OK); | |||
EXPECT_EQ(output.json_encoded(), R"({"compression":"none","packed_context_free_data":"","packed_trx":"7c59a35cd6679a1f3d4800000000010000000080a920cd000000572d3ccdcd010000000080a920cd00000000a8ed3232330000000080a920cd0000000000ea3055e09304000000000004544b4e00000000126d79207365636f6e64207472616e7366657200","signatures":["SIG_K1_KfCdjsrTnx5cBpbA5cUdHZAsRYsnC9uKzuS1shFeqfMCfdZwX4PBm9pfHwGRT6ffz3eavhtkyNci5GoFozQAx8P8PBnDmj"]})"); | |||
EXPECT_EQ(output.json_encoded(), R"({"compression":"none","packed_context_free_data":"","packed_trx":"6e67a35cd6679a1f3d4800000000010000000080a920cd000000572d3ccdcd010000000080a920cd00000000a8ed3232330000000080a920cd0000000000ea3055e09304000000000004544b4e00000000126d79207365636f6e64207472616e7366657200","signatures":["SIG_K1_K9RdLC7DEDWjTfR64GU8BtDHcAjzR1ntcT651JMcfHNTpdsvDrUwfyzF1FkvL9fxEi2UCtGJZ9zYoNbJoMF1fbU64cRiJ7"]})"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the signature has been changed due to the changed ExpirySeconds
* [r2r]: Add ThetaFuel EVM compatible chain * [r2r]: Bump wc-kotlin version to 3.1.38 (#3218) * [ERC-4337] Fix user operation hash mistake (#3228) * [ERC-4337] Fix user operation hash mistake * Update TestBarz.kt --------- Co-authored-by: hewigovens <[email protected]> * [r2r] Update starknet-ff crate (#3230) * [Sync]: Apply changes from DeFi wallet-core (#3225) * [Barz] Format signature API changes (#3241) * [Barz] Public API refactoring (#3212) * Getting rid of attestationObject in Barz public API * remove duplicates * Update Barz.cpp * Update Barz.cpp * Update BarzTests.swift * update tests * Update WebAuthnTests.cpp * Update TestBarz.kt * Update TestWebAuthn.kt * update android tests * Update TestBarz.kt * Update TestBarz.kt * Update TestBarz.kt * fix nullability * tests update * Add support for Taproot and BRC20 (#3233) * [Barz] Add TokenReceiverFacet support (#3240) * [CFX]: Add support for Conflux eSpace (#3259) * [License]: update to apache 2.0 (#3256) * [Barz] Execute batch (#3257) * [Kotlin] Fixed GH Action (#3263) * feat(evm/thorchain): use depositWithExpiry for regular transfer (#3266) * feat(swift): update to 3.2.1 (#3269) * Add iOS and android tests to check if new methods available (#3267) * [WASM] Fixed CoinType.deriveAddressFromPublicKeyAndDerivation (#3271) * [Polkadot]: Refactor Polkadot to support any Substrate chain (#3261) * [Acala]: Add Acala and AcalaEVM chains (#3274) * [Kotlin] Added UInt value to enums (#3276) Co-authored-by: Sztergbaum Roman <[email protected]> * fix(bitcoin): Fix `TWAnySignerPlan` (#3278) * [README]: Update README.md (#3280) Removed broken IFWallet link Updated supported blockchain count according to registry.md Corrected some typos and grammatical mistakes * [Chain/EVM]: add opbnb testnet (#3291) * [Barz] Upgrade to the new Barz contract constructor (#3288) * [Polkadot]: Fix `Staking::Bond` and `Staking::BondAndNominate` (#3293) * [Webauthn] Add some helpers to extract P256 values (#3292) * [Cardano] Support utxo with legacy(byron) address (#3284) * [Cardano]: Fix signing in JS (#3299) --------- Co-authored-by: Ruslan Serebriakov <[email protected]> Co-authored-by: hewigovens <[email protected]> Co-authored-by: Fabio Lama <[email protected]> Co-authored-by: Sztergbaum Roman <[email protected]> Co-authored-by: Maxim Pestryakov <[email protected]> Co-authored-by: Sabuhi Fatalizada <[email protected]> Co-authored-by: Sergey Balashov <[email protected]>
* [r2r]: Add ThetaFuel EVM compatible chain * [r2r]: Bump wc-kotlin version to 3.1.38 (#3218) * [ERC-4337] Fix user operation hash mistake (#3228) * [ERC-4337] Fix user operation hash mistake * Update TestBarz.kt --------- Co-authored-by: hewigovens <[email protected]> * [r2r] Update starknet-ff crate (#3230) * [Sync]: Apply changes from DeFi wallet-core (#3225) * [Barz] Format signature API changes (#3241) * [Barz] Public API refactoring (#3212) * Getting rid of attestationObject in Barz public API * remove duplicates * Update Barz.cpp * Update Barz.cpp * Update BarzTests.swift * update tests * Update WebAuthnTests.cpp * Update TestBarz.kt * Update TestWebAuthn.kt * update android tests * Update TestBarz.kt * Update TestBarz.kt * Update TestBarz.kt * fix nullability * tests update * Add support for Taproot and BRC20 (#3233) * [Barz] Add TokenReceiverFacet support (#3240) * [CFX]: Add support for Conflux eSpace (#3259) * [License]: update to apache 2.0 (#3256) * [Barz] Execute batch (#3257) * [Kotlin] Fixed GH Action (#3263) * feat(evm/thorchain): use depositWithExpiry for regular transfer (#3266) * feat(swift): update to 3.2.1 (#3269) * Add iOS and android tests to check if new methods available (#3267) * [WASM] Fixed CoinType.deriveAddressFromPublicKeyAndDerivation (#3271) * [Polkadot]: Refactor Polkadot to support any Substrate chain (#3261) * [Acala]: Add Acala and AcalaEVM chains (#3274) * [Kotlin] Added UInt value to enums (#3276) Co-authored-by: Sztergbaum Roman <[email protected]> * fix(bitcoin): Fix `TWAnySignerPlan` (#3278) * [README]: Update README.md (#3280) Removed broken IFWallet link Updated supported blockchain count according to registry.md Corrected some typos and grammatical mistakes * [Chain/EVM]: add opbnb testnet (#3291) * [Barz] Upgrade to the new Barz contract constructor (#3288) * [Polkadot]: Fix `Staking::Bond` and `Staking::BondAndNominate` (#3293) * [Webauthn] Add some helpers to extract P256 values (#3292) * [Cardano] Support utxo with legacy(byron) address (#3284) * [Cardano]: Fix signing in JS (#3299) --------- Co-authored-by: Ruslan Serebriakov <[email protected]> Co-authored-by: hewigovens <[email protected]> Co-authored-by: Fabio Lama <[email protected]> Co-authored-by: Sztergbaum Roman <[email protected]> Co-authored-by: Maxim Pestryakov <[email protected]> Co-authored-by: Sabuhi Fatalizada <[email protected]> Co-authored-by: Sergey Balashov <[email protected]>
* [r2r]: Add ThetaFuel EVM compatible chain * [r2r]: Bump wc-kotlin version to 3.1.38 (#3218) * [ERC-4337] Fix user operation hash mistake (#3228) * [ERC-4337] Fix user operation hash mistake * Update TestBarz.kt --------- Co-authored-by: hewigovens <[email protected]> * [r2r] Update starknet-ff crate (#3230) * [Sync]: Apply changes from DeFi wallet-core (#3225) * [Barz] Format signature API changes (#3241) * [Barz] Public API refactoring (#3212) * Getting rid of attestationObject in Barz public API * remove duplicates * Update Barz.cpp * Update Barz.cpp * Update BarzTests.swift * update tests * Update WebAuthnTests.cpp * Update TestBarz.kt * Update TestWebAuthn.kt * update android tests * Update TestBarz.kt * Update TestBarz.kt * Update TestBarz.kt * fix nullability * tests update * Add support for Taproot and BRC20 (#3233) * [Barz] Add TokenReceiverFacet support (#3240) * [CFX]: Add support for Conflux eSpace (#3259) * [License]: update to apache 2.0 (#3256) * [Barz] Execute batch (#3257) * [Kotlin] Fixed GH Action (#3263) * feat(evm/thorchain): use depositWithExpiry for regular transfer (#3266) * feat(swift): update to 3.2.1 (#3269) * Add iOS and android tests to check if new methods available (#3267) * [WASM] Fixed CoinType.deriveAddressFromPublicKeyAndDerivation (#3271) * [Polkadot]: Refactor Polkadot to support any Substrate chain (#3261) * [Acala]: Add Acala and AcalaEVM chains (#3274) * [Kotlin] Added UInt value to enums (#3276) Co-authored-by: Sztergbaum Roman <[email protected]> * fix(bitcoin): Fix `TWAnySignerPlan` (#3278) * [README]: Update README.md (#3280) Removed broken IFWallet link Updated supported blockchain count according to registry.md Corrected some typos and grammatical mistakes * [Chain/EVM]: add opbnb testnet (#3291) * [Barz] Upgrade to the new Barz contract constructor (#3288) * [Polkadot]: Fix `Staking::Bond` and `Staking::BondAndNominate` (#3293) * [Webauthn] Add some helpers to extract P256 values (#3292) * [Cardano] Support utxo with legacy(byron) address (#3284) * [Cardano]: Fix signing in JS (#3299) --------- Co-authored-by: Ruslan Serebriakov <[email protected]> Co-authored-by: hewigovens <[email protected]> Co-authored-by: Fabio Lama <[email protected]> Co-authored-by: Sztergbaum Roman <[email protected]> Co-authored-by: Maxim Pestryakov <[email protected]> Co-authored-by: Sabuhi Fatalizada <[email protected]> Co-authored-by: Sergey Balashov <[email protected]>
Description
Sync DeFi wallet-core and the base TrustWallet/wallet-core.
How to test
Types of changes
Checklist
If you're adding a new blockchain
CHANGELOG (for Wallet Core)
SetWithdrawAddress
,ExecuteContract
EscrowMessage
,ReclaimEscrowMessage
CreateNonceAccount
,WithdrawNonceAccount
,AdvanceNonceAccount
BREAKING
string
toCommon.Proto.SigningError
. Added SigningOutput::error_message instead.ExpirySeconds
has been increased from 30 to 3600 seconds. Leads to changed EOS transaction hashes and signaturesCHANGELOG (for DeFi)
BREAKING
TODO
Polkadot
andSubstrate
blockchain implementations to work with non-added toregistry.json
Polkadot networksSigner::compile
should handleTransaction::SignatureType::DELEGATED
signature type: commentTWBitcoinScriptLockScriptForAddressReplay
in JS: comment