Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
ICP blockchain (#791)
Browse files Browse the repository at this point in the history
  • Loading branch information
fedorov-d authored Aug 5, 2024
1 parent a89d041 commit cc8f557
Show file tree
Hide file tree
Showing 27 changed files with 877 additions and 5 deletions.
3 changes: 3 additions & 0 deletions BlockchainSdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ Use BlockchainSdk for Tangem wallet integration
# 'CryptoSwift' dependency must be added via SPM
# 'SwiftProtobuf' dependency must be added via SPM
# 'TangemWalletCore' dependency must be added via SPM
# 'BigInt' dependency must be added via SPM
# 'ScaleCodec' dependency must be added via SPM
# 'TonSwift' dependency must be added via SPM

s.dependency 'TangemSdk'
s.dependency 'SwiftyJSON', '5.0.1'
Expand Down
75 changes: 74 additions & 1 deletion BlockchainSdk.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
0A54FF452BB475B9000D293D /* TangemNetworkLoggerPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A54FF442BB475B9000D293D /* TangemNetworkLoggerPlugin.swift */; };
0A6272652BD96736003B2F4D /* SS58.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A6272642BD96736003B2F4D /* SS58.swift */; };
0A7084B82BF797E900FD519D /* TONAddressService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7084B72BF797E900FD519D /* TONAddressService.swift */; };
0A7624DB2C2950E8002FA139 /* ICPTransactionBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7624DA2C2950E8002FA139 /* ICPTransactionBuilder.swift */; };
0A7624E32C296969002FA139 /* ICPWalletManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7624E22C296969002FA139 /* ICPWalletManager.swift */; };
0A7973FE2C5B9F7500CE8182 /* IcpKit in Frameworks */ = {isa = PBXBuildFile; productRef = 0A7973FD2C5B9F7500CE8182 /* IcpKit */; };
0A7E10B92C4E8E5700644977 /* ICPTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7E10B82C4E8E5700644977 /* ICPTests.swift */; };
0A7C5BFB2C174E6400B32CA5 /* DwellirAPIResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7C5BFA2C174E6400B32CA5 /* DwellirAPIResolver.swift */; };
0A7C5BFD2C174E7700B32CA5 /* OnfinalityAPIResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7C5BFC2C174E7700B32CA5 /* OnfinalityAPIResolver.swift */; };
0A92275F2C16E5D500CB7777 /* BittensorExternalLinkProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A92275E2C16E5D500CB7777 /* BittensorExternalLinkProvider.swift */; };
Expand All @@ -28,6 +32,11 @@
0ABC610B2C4107F000065EBA /* TweetNacl in Frameworks */ = {isa = PBXBuildFile; productRef = 0ABC610A2C4107F000065EBA /* TweetNacl */; };
0AEE1E702C1B1BEA000BFCB2 /* BittensorWalletAssembly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AEE1E6F2C1B1BEA000BFCB2 /* BittensorWalletAssembly.swift */; };
0AEFB5392B7656EC007519F9 /* NodeRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AEFB5382B7656EC007519F9 /* NodeRequest.swift */; };
0AEFED0A2C3D5A5200C0F400 /* ICPNetworkProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AEFED092C3D5A5200C0F400 /* ICPNetworkProvider.swift */; };
0AEFED102C3D5B0E00C0F400 /* ICPProviderTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AEFED0F2C3D5B0D00C0F400 /* ICPProviderTarget.swift */; };
0AEFED122C3D5B5D00C0F400 /* ICPNetworkService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AEFED112C3D5B5D00C0F400 /* ICPNetworkService.swift */; };
0AF503312C199A6200193358 /* ICPWalletAssembly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AF503302C199A6200193358 /* ICPWalletAssembly.swift */; };
0AF503352C199C2A00193358 /* ICPExternalLinkProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AF503342C199C2A00193358 /* ICPExternalLinkProvider.swift */; };
0AF90CD72B87624800772F04 /* AreonExternalLinkProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AF90CD62B87624800772F04 /* AreonExternalLinkProvider.swift */; };
0AF90CD92B87655A00772F04 /* Playa3ullGamesExternalLinkProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AF90CD82B87655A00772F04 /* Playa3ullGamesExternalLinkProvider.swift */; };
0AF90CDB2B87657F00772F04 /* PulsechainExternalLinkProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AF90CDA2B87657F00772F04 /* PulsechainExternalLinkProvider.swift */; };
Expand Down Expand Up @@ -903,12 +912,20 @@
0A54FF442BB475B9000D293D /* TangemNetworkLoggerPlugin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TangemNetworkLoggerPlugin.swift; sourceTree = "<group>"; };
0A6272642BD96736003B2F4D /* SS58.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SS58.swift; sourceTree = "<group>"; };
0A7084B72BF797E900FD519D /* TONAddressService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TONAddressService.swift; sourceTree = "<group>"; };
0A7624DA2C2950E8002FA139 /* ICPTransactionBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICPTransactionBuilder.swift; sourceTree = "<group>"; };
0A7624E22C296969002FA139 /* ICPWalletManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICPWalletManager.swift; sourceTree = "<group>"; };
0A7E10B82C4E8E5700644977 /* ICPTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICPTests.swift; sourceTree = "<group>"; };
0A7C5BFA2C174E6400B32CA5 /* DwellirAPIResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DwellirAPIResolver.swift; sourceTree = "<group>"; };
0A7C5BFC2C174E7700B32CA5 /* OnfinalityAPIResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnfinalityAPIResolver.swift; sourceTree = "<group>"; };
0A92275E2C16E5D500CB7777 /* BittensorExternalLinkProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BittensorExternalLinkProvider.swift; sourceTree = "<group>"; };
0AA9E3782B9A03450084E8A7 /* MantaExternalLinkProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MantaExternalLinkProvider.swift; sourceTree = "<group>"; };
0AEE1E6F2C1B1BEA000BFCB2 /* BittensorWalletAssembly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BittensorWalletAssembly.swift; sourceTree = "<group>"; };
0AEFB5382B7656EC007519F9 /* NodeRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NodeRequest.swift; sourceTree = "<group>"; };
0AEFED092C3D5A5200C0F400 /* ICPNetworkProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICPNetworkProvider.swift; sourceTree = "<group>"; };
0AEFED0F2C3D5B0D00C0F400 /* ICPProviderTarget.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICPProviderTarget.swift; sourceTree = "<group>"; };
0AEFED112C3D5B5D00C0F400 /* ICPNetworkService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICPNetworkService.swift; sourceTree = "<group>"; };
0AF503302C199A6200193358 /* ICPWalletAssembly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICPWalletAssembly.swift; sourceTree = "<group>"; };
0AF503342C199C2A00193358 /* ICPExternalLinkProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICPExternalLinkProvider.swift; sourceTree = "<group>"; };
0AF90CD62B87624800772F04 /* AreonExternalLinkProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AreonExternalLinkProvider.swift; sourceTree = "<group>"; };
0AF90CD82B87655A00772F04 /* Playa3ullGamesExternalLinkProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Playa3ullGamesExternalLinkProvider.swift; sourceTree = "<group>"; };
0AF90CDA2B87657F00772F04 /* PulsechainExternalLinkProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PulsechainExternalLinkProvider.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1761,6 +1778,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
0A7973FE2C5B9F7500CE8182 /* IcpKit in Frameworks */,
0ABC60F32C41021000065EBA /* ScaleCodec in Frameworks */,
B6A2CC432B6C55FE00864CD2 /* secp256k1 in Frameworks */,
0ABC60F02C4101ED00065EBA /* TonSwift in Frameworks */,
Expand Down Expand Up @@ -1808,6 +1826,36 @@
path = DTO;
sourceTree = "<group>";
};
0A7E10B72C4E8DEC00644977 /* ICP */ = {
isa = PBXGroup;
children = (
0A7E10B82C4E8E5700644977 /* ICPTests.swift */,
);
path = ICP;
sourceTree = "<group>";
};
0AEFED0E2C3D5AF300C0F400 /* Network */ = {
isa = PBXGroup;
children = (
0AEFED092C3D5A5200C0F400 /* ICPNetworkProvider.swift */,
0AEFED0F2C3D5B0D00C0F400 /* ICPProviderTarget.swift */,
0AEFED112C3D5B5D00C0F400 /* ICPNetworkService.swift */,
);
path = Network;
sourceTree = "<group>";
};
0AF5032F2C199A4200193358 /* ICP */ = {
isa = PBXGroup;
children = (
0AF503302C199A6200193358 /* ICPWalletAssembly.swift */,
0A7624E22C296969002FA139 /* ICPWalletManager.swift */,
0AF503342C199C2A00193358 /* ICPExternalLinkProvider.swift */,
0A7624DA2C2950E8002FA139 /* ICPTransactionBuilder.swift */,
0AEFED0E2C3D5AF300C0F400 /* Network */,
);
path = ICP;
sourceTree = "<group>";
};
2D01EBFB2B04FC2F00DEF1CC /* Decimal */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -2145,6 +2193,7 @@
2DB613CE2B912CFB007CFA9B /* Radiant */,
DAE343C42BF3630A001B3F38 /* Koinos */,
DAD62DE42C4676E8008509BE /* Mantle */,
0A7E10B72C4E8DEC00644977 /* ICP */,
5D14E47E2397B80F00C15FC8 /* Info.plist */,
);
path = BlockchainSdkTests;
Expand All @@ -2168,6 +2217,7 @@
5D94E55F23A37EF7009C7482 /* Ethereum */,
B64A68092BCE9E62009ED960 /* EthereumOptimisticRollup */,
B6FC9DC62B62A44000448D8A /* Hedera */,
0AF5032F2C199A4200193358 /* ICP */,
DA63B08E29CB3FC700AC6E49 /* Kaspa */,
5D54FE1623E41CAE009FAC2F /* Litecoin */,
B63B79302AD854010055BD06 /* NEAR */,
Expand Down Expand Up @@ -4163,6 +4213,7 @@
0ABC60EF2C4101ED00065EBA /* TonSwift */,
0ABC60F22C41021000065EBA /* ScaleCodec */,
0ABC61032C41040500065EBA /* TweetNacl */,
0A7973FD2C5B9F7500CE8182 /* IcpKit */,
);
productName = BlockchainSdk;
productReference = 5D14E46E2397B80F00C15FC8 /* BlockchainSdk.framework */;
Expand Down Expand Up @@ -4263,6 +4314,7 @@
0ABC60EE2C4101ED00065EBA /* XCRemoteSwiftPackageReference "ton-swift" */,
0ABC60F12C41021000065EBA /* XCRemoteSwiftPackageReference "ScaleCodec" */,
0ABC60FE2C4103A600065EBA /* XCRemoteSwiftPackageReference "tweetnacl-swiftwrap" */,
0A7973FC2C5B9F7500CE8182 /* XCRemoteSwiftPackageReference "IcpKit" */,
);
productRefGroup = 5D14E46F2397B80F00C15FC8 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -4508,6 +4560,7 @@
2D78F4072A5C319300962CCA /* ChiaWalletAssembly.swift in Sources */,
EF57BEE32A1E682D00C2A493 /* Blockchain+AllCases.swift in Sources */,
EF332D1B288EB3D900AE3C85 /* NetworkProviderConfiguration.swift in Sources */,
0AEFED122C3D5B5D00C0F400 /* ICPNetworkService.swift in Sources */,
B00DF99E2BBEAB91004397CB /* InfuraAPIResolver.swift in Sources */,
EF3FFFFE2A27740400C6E7D9 /* AdaliteBalanceResponseDTO.swift in Sources */,
2D24F5B12B6D2C6500D502A0 /* AptosFeeParams.swift in Sources */,
Expand Down Expand Up @@ -4647,10 +4700,12 @@
EFD717DF2A27310E00E5430D /* AddressType.swift in Sources */,
B69F21E62B86CD4A00A1177B /* UnixTimestamp.swift in Sources */,
EFF607C72BD000D000C37210 /* EthereumAddressService.swift in Sources */,
0A7624E32C296969002FA139 /* ICPWalletManager.swift in Sources */,
B675E9672B321102004AF179 /* VeChainNetworkParams.Transaction.swift in Sources */,
EF3B193A2AA85D170084AA1C /* AvalancheExternalLinkProvider.swift in Sources */,
DC5E65132B1650F400E81AA5 /* OP_SWAP.swift in Sources */,
DC5E65022B1650F400E81AA5 /* OP_NUMEQUALVERIFY.swift in Sources */,
0AF503312C199A6200193358 /* ICPWalletAssembly.swift in Sources */,
DC5E65252B1650F400E81AA5 /* OP_RESERVED.swift in Sources */,
5D908C5726A6D39C00270FA3 /* BinanceTransactionParams.swift in Sources */,
EF9E382D2B7A47C7004B694C /* AnyPublisher+Async.swift in Sources */,
Expand Down Expand Up @@ -4796,6 +4851,7 @@
DC5E652F2B1650F400E81AA5 /* OP_NOP.swift in Sources */,
5D4B33D523F7DFB400C93A84 /* BinanceTransactionBuilder.swift in Sources */,
2D79B15E2C00CE9000E71EBB /* SolanaApiLoggerUtil.swift in Sources */,
0AF503352C199C2A00193358 /* ICPExternalLinkProvider.swift in Sources */,
5D26CEEC243CB92700994CC0 /* BlockcypherResponse.swift in Sources */,
EF74D63E2BA35099000550F3 /* URLSessionWebSocketDelegateWrapper.swift in Sources */,
B6B083572AE6B11C0099D6F8 /* NEARAccessKeyInfo.swift in Sources */,
Expand Down Expand Up @@ -4882,6 +4938,7 @@
B63068CC2B31163700E79053 /* VeChainNetworkProvider.swift in Sources */,
DC5E64D92B1650F400E81AA5 /* OP_SHA1.swift in Sources */,
2DA4A4432BB5431700E55526 /* RadiantAddressUtils.swift in Sources */,
0A7624DB2C2950E8002FA139 /* ICPTransactionBuilder.swift in Sources */,
5D557CB023AA888D009B32AF /* Uint64+.swift in Sources */,
B0BAEE9C25FF1E4200F318A6 /* RosettaData.swift in Sources */,
2DDE5BA129C4F8D200A5B708 /* DucatusWalletAssembly.swift in Sources */,
Expand Down Expand Up @@ -4935,13 +4992,15 @@
DAE657D92BFC71A600D7D63A /* options.proto in Sources */,
B63068C22B3102FA00E79053 /* VeChainTransactionBuilder.swift in Sources */,
B68A7D472B35D39700822BAF /* VeChainTransactionInfo.swift in Sources */,
0AEFED0A2C3D5A5200C0F400 /* ICPNetworkProvider.swift in Sources */,
EF193BFE2A77ED9E0048C0C3 /* TransactionHistoryPages.swift in Sources */,
EFB952402A6FEF1700996D16 /* TransactionRecord.swift in Sources */,
DC5E653D2B16641300E81AA5 /* BitcoinScriptBuilder.swift in Sources */,
DA5ACCC02C05B7D1005892AC /* KoinosTransferEvent.swift in Sources */,
DA570CF927A82322007F34EB /* PolkadotBlockchainMeta.swift in Sources */,
5D14E4972397B87000C15FC8 /* WalletManager.swift in Sources */,
B6F3AA6D2ADD92230059C99A /* Publisher+.swift in Sources */,
0AEFED102C3D5B0E00C0F400 /* ICPProviderTarget.swift in Sources */,
DC5E64E12B1650F400E81AA5 /* OP_CHECKSIG.swift in Sources */,
DA9F76F127EC9C8300F0665C /* TronJsonRpcProvider.swift in Sources */,
5D4B33BC23F6EA0500C93A84 /* BlockchairTarget.swift in Sources */,
Expand Down Expand Up @@ -5266,6 +5325,7 @@
2D535E792A0CC5E50081EB76 /* TestVectorsUtility.swift in Sources */,
EF0DA78528523FAC0081092A /* BlockchainSdkTests.swift in Sources */,
DA198B5929E3F6E400DB6EEA /* CosmosTests.swift in Sources */,
0A7E10B92C4E8E5700644977 /* ICPTests.swift in Sources */,
EF1339BF2AB8EF8C00B78BA3 /* SmartContractMethodTests.swift in Sources */,
DA3738F229EFDF9600439F6B /* XCTAssert+.swift in Sources */,
B00DEAD3290008910077CD19 /* SolanaEd25519Tests.swift in Sources */,
Expand Down Expand Up @@ -5683,6 +5743,14 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
0A7973FC2C5B9F7500CE8182 /* XCRemoteSwiftPackageReference "IcpKit" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/tangem/IcpKit";
requirement = {
kind = exactVersion;
version = "0.1.2-tangem3";
};
};
0ABC60EE2C4101ED00065EBA /* XCRemoteSwiftPackageReference "ton-swift" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/tangem/ton-swift.git";
Expand Down Expand Up @@ -5712,7 +5780,7 @@
repositoryURL = "https://github.com/tangem/wallet-core-binaries-ios.git";
requirement = {
kind = exactVersion;
version = "4.0.21-tangem6";
version = "4.0.46-tangem1";
};
};
B66B57642B6C504000320FF9 /* XCRemoteSwiftPackageReference "hedera-sdk-swift" */ = {
Expand Down Expand Up @@ -5750,6 +5818,11 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
0A7973FD2C5B9F7500CE8182 /* IcpKit */ = {
isa = XCSwiftPackageProductDependency;
package = 0A7973FC2C5B9F7500CE8182 /* XCRemoteSwiftPackageReference "IcpKit" */;
productName = IcpKit;
};
0ABC60EF2C4101ED00065EBA /* TonSwift */ = {
isa = XCSwiftPackageProductDependency;
package = 0ABC60EE2C4101ED00065EBA /* XCRemoteSwiftPackageReference "ton-swift" */;
Expand Down
60 changes: 57 additions & 3 deletions BlockchainSdk.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "336688749094918bc44fd9820378abd48013483cfc95431dcdd1a02334fd5d02",
"originHash" : "de1af1fe46575050340d4c1e3bff712b85f35f88e3b4a5357c5bd0afe10705fe",
"pins" : [
{
"identity" : "anyasyncsequence",
Expand All @@ -10,6 +10,15 @@
"version" : "1.0.2"
}
},
{
"identity" : "base32",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Jarema/Base32.git",
"state" : {
"revision" : "7f723a2e55f1c76e7c79263aebf89dbfcd58e77d",
"version" : "0.10.2"
}
},
{
"identity" : "bigint",
"kind" : "remoteSourceControl",
Expand All @@ -28,6 +37,15 @@
"version" : "1.8.1"
}
},
{
"identity" : "float16",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SusanDoggie/Float16.git",
"state" : {
"revision" : "936ae66adccf1c91bcaeeb9c0cddde78a13695c3",
"version" : "1.1.1"
}
},
{
"identity" : "grpc-swift",
"kind" : "remoteSourceControl",
Expand All @@ -46,6 +64,33 @@
"version" : "0.26.0-tangem3"
}
},
{
"identity" : "icpkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/tangem/IcpKit",
"state" : {
"revision" : "02aad763a1ebb0847b1f0eaff755159b3a95707a",
"version" : "0.1.2-tangem3"
}
},
{
"identity" : "potentcodables",
"kind" : "remoteSourceControl",
"location" : "https://github.com/outfoxx/PotentCodables.git",
"state" : {
"revision" : "660e33e84e00b9bf07bd41dd99ff800600e435e7",
"version" : "3.5.0"
}
},
{
"identity" : "regex",
"kind" : "remoteSourceControl",
"location" : "https://github.com/sharplet/Regex.git",
"state" : {
"revision" : "76c2b73d4281d77fc3118391877efd1bf972f515",
"version" : "2.1.1"
}
},
{
"identity" : "scalecodec.swift",
"kind" : "remoteSourceControl",
Expand Down Expand Up @@ -163,6 +208,15 @@
"version" : "2.4.2"
}
},
{
"identity" : "swift-numerics",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-numerics",
"state" : {
"revision" : "0a5bc04095a675662cf24757cc0640aa2204253b",
"version" : "1.0.2"
}
},
{
"identity" : "swift-protobuf-binaries",
"kind" : "remoteSourceControl",
Expand Down Expand Up @@ -204,8 +258,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/tangem/wallet-core-binaries-ios.git",
"state" : {
"revision" : "b9906e7e5c56706f0fe1ad3545dbf02dcf195b34",
"version" : "4.0.21-tangem6"
"revision" : "67be5876186284e85a5f5f8757de209ba53d5729",
"version" : "4.0.46-tangem1"
}
}
],
Expand Down
25 changes: 25 additions & 0 deletions BlockchainSdk/Blockchains/ICP/ICPExternalLinkProvider.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// ICPExternalLinkProvider.swift
// BlockchainSdk
//
// Created by Dmitry Fedorov on 12.06.2024.
// Copyright © 2024 Tangem AG. All rights reserved.
//

import Foundation

struct ICPExternalLinkProvider: ExternalLinkProvider {
var testnetFaucetURL: URL? {
return nil
}

private let baseExplorerURL = URL(string: "https://dashboard.internetcomputer.org")

func url(address: String, contractAddress: String?) -> URL? {
baseExplorerURL?.appendingPathComponent("account").appendingPathComponent(address)
}

func url(transaction hash: String) -> URL? {
baseExplorerURL?.appendingPathComponent("transaction").appendingPathComponent(hash)
}
}
Loading

0 comments on commit cc8f557

Please sign in to comment.