Skip to content

Commit

Permalink
Merge pull request #9 from tangem/update-4.0.21-tangem2
Browse files Browse the repository at this point in the history
Update to 4.0.21-tangem2 (368fcf770524e0946a1c98451c47bdca9ce7c53d)
  • Loading branch information
Balashov152 committed Feb 6, 2024
2 parents 6e1eed5 + 3601edf commit abb6fca
Show file tree
Hide file tree
Showing 167 changed files with 958,023 additions and 630,449 deletions.
2 changes: 1 addition & 1 deletion TangemWalletCore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'TangemWalletCore'
s.version = '3.2.4-tangem1'
s.version = '4.0.21-tangem2'
s.summary = 'Use TW xcframework for Tangem integration'

# This description is used to generate tags and improve search results.
Expand Down
14 changes: 9 additions & 5 deletions WalletCore.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,35 @@
<key>AvailableLibraries</key>
<array>
<dict>
<key>BinaryPath</key>
<string>WalletCore.framework/WalletCore</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>WalletCore.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>WalletCore.framework/WalletCore</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>WalletCore.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.

#pragma once

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.

#pragma once

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.

#pragma once

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.

#pragma once

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.
#pragma once

#include "TWBase.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#pragma once

#include <functional>
#include "TWBase.h"
#include "TWCoinType.h"
#include "TWData.h"
#include "TWString.h"

// TANGEM
extern TWData *_Nonnull TWAnySignerSignExternally(TWData* _Nonnull data, enum TWCoinType coin, TWData *_Nonnull publicKey, std::function<const TWData *_Nonnull(const TWData *_Nonnull)> externalSigner);
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.

#pragma once

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.
#pragma once

#include "TWBase.h"
Expand Down Expand Up @@ -30,7 +28,7 @@ TWString *_Nonnull TWBarzGetCounterfactualAddress(TWData *_Nonnull input);
/// \param verificationFacet Verification facet address
/// \return The address.
TW_EXPORT_STATIC_METHOD
TWData *_Nonnull TWBarzGetInitCode(TWString* _Nonnull factory, struct TWPublicKey* _Nonnull publicKey, TWString* _Nonnull verificationFacet);
TWData *_Nonnull TWBarzGetInitCode(TWString* _Nonnull factory, struct TWPublicKey* _Nonnull publicKey, TWString* _Nonnull verificationFacet, uint32_t salt);

/// Converts the original ASN-encoded signature from webauthn to the format accepted by Barz
///
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.

#if !defined(TW_EXTERN_C_BEGIN)
#if defined(__cplusplus)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.

#pragma once

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.

#pragma once

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.

#pragma once

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.

#pragma once

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: Apache-2.0
//
// Copyright © 2017 Trust Wallet.

#pragma once

#include "TWData.h"
#include "TWString.h"

TW_EXTERN_C_BEGIN

TW_EXPORT_CLASS
struct TWBitcoinFee;

/// Calculates the fee of any Bitcoin transaction.
///
/// \param data: the signed transaction in its final form.
/// \param satVb: the satoshis per vbyte amount. The passed on string is interpreted as a unit64_t.
/// \returns the fee denominated in satoshis or nullptr if the transaction failed to be decoded.
TW_EXPORT_STATIC_METHOD
TWString* _Nullable TWBitcoinFeeCalculateFee(TWData* _Nonnull data, TWString* _Nonnull satVb);

TW_EXTERN_C_END
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.

#pragma once

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.

#pragma once

Expand Down Expand Up @@ -203,14 +201,24 @@ struct TWBitcoinScript* _Nonnull TWBitcoinScriptBuildPayToWitnessScriptHash(TWDa
TW_EXPORT_STATIC_METHOD
TWData* _Nonnull TWBitcoinScriptBuildBRC20InscribeTransfer(TWString* _Nonnull ticker, TWString* _Nonnull amount, TWData* _Nonnull pubkey);

/// Builds the Ordinals inscripton for NFT construction.
///
/// \param mimeType the MIME type of the payload
/// \param payload the payload to inscribe
/// \param pubkey Non-null pointer to a pubkey
/// \note Must be deleted with \TWBitcoinScriptDelete
/// \return A pointer to the built script
TW_EXPORT_STATIC_METHOD
TWData* _Nonnull TWBitcoinScriptBuildOrdinalNftInscription(TWString* _Nonnull mimeType, TWData* _Nonnull payload, TWData* _Nonnull pubkey);

/// Builds a appropriate lock script for the given address..
///
/// \param address Non-null pointer to an address
/// \param coin coin type
/// \note Must be deleted with \TWBitcoinScriptDelete
/// \return A pointer to the built script
TW_EXPORT_STATIC_METHOD
struct TWBitcoinScript* _Nonnull TWBitcoinScriptLockScriptForAddress(TWString* _Nonnull address, enum TWCoinType coin);
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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.

#pragma once

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.

#pragma once

Expand Down Expand Up @@ -63,6 +61,10 @@ enum TWBlockchain {
TWBlockchainHedera = 48, // Hedera
TWBlockchainTheOpenNetwork = 49,
TWBlockchainSui = 50,
TWBlockchainGreenfield = 51,
TWBlockchainInternetComputer = 52,
TWBlockchainNativeEvmos = 53, // Cosmos
TWBlockchainNativeInjective = 54, // Cosmos
};

TW_EXTERN_C_END
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.

#pragma once

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.

#pragma once

Expand Down Expand Up @@ -72,7 +70,7 @@ enum TWCoinType {
TWCoinTypeTheta = 500,
TWCoinTypeThunderCore = 1001,
TWCoinTypeNEO = 888,
TWCoinTypeTomoChain = 889,
TWCoinTypeViction = 889,
TWCoinTypeTron = 195,
TWCoinTypeVeChain = 818,
TWCoinTypeViacoin = 14,
Expand Down Expand Up @@ -120,7 +118,7 @@ enum TWCoinType {
TWCoinTypeSyscoin = 57,
TWCoinTypeVerge = 77,
TWCoinTypeZen = 121,
TWCoinTypeMetis = 1001088,
TWCoinTypeMetis = 10001088,
TWCoinTypeAurora = 1323161554,
TWCoinTypeEvmos = 10009001,
TWCoinTypeNativeEvmos = 20009001,
Expand Down Expand Up @@ -162,13 +160,28 @@ enum TWCoinType {
TWCoinTypePersistence = 16000118,
TWCoinTypeAkash = 17000118,
TWCoinTypeNoble = 18000118,
TWCoinTypeScroll = 534353,
TWCoinTypeScroll = 534352,
TWCoinTypeRootstock = 137,
TWCoinTypeThetaFuel = 361,
TWCoinTypeConfluxeSpace = 1030,
TWCoinTypeAcala = 787,
TWCoinTypeAcalaEVM = 10000787,
TWCoinTypeOpBNBtestnet = 5611,
TWCoinTypeOpBNB = 204,
TWCoinTypeNeon = 245022934,
TWCoinTypeBase = 8453,
TWCoinTypeSei = 19000118,
TWCoinTypeArbitrumNova = 10042170,
TWCoinTypeLinea = 59144,
TWCoinTypeGreenfield = 5600,
TWCoinTypeMantle = 5000,
TWCoinTypeZenEON = 7332,
TWCoinTypeInternetComputer = 223,
TWCoinTypeTia = 21000118,
TWCoinTypeMantaPacific = 169,
TWCoinTypeNativeZetaChain = 10007000,
TWCoinTypeZetaEVM = 20007000,
TWCoinTypeDydx = 22000118,
// end_of_tw_coin_type_marker_do_not_modify
};

/// Returns the blockchain for a coin type.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.

#pragma once

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2017-2023 Trust Wallet.
// SPDX-License-Identifier: Apache-2.0
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
// Copyright © 2017 Trust Wallet.

#pragma once

Expand Down
Loading

0 comments on commit abb6fca

Please sign in to comment.