Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 7af21d5

Browse files
authored
Add Squid for Cosmos sdk chains (#1793)
* Add Cosmos WASM execute swap signing Add Decodable models (CosmosExecuteContractValue, CosmosCoinData, CosmosExecuteContractData) to parse execute contract JSON payloads and implement signSwap(in:privateKey:) in CosmosSigner. The new method decodes swap data, builds a CosmosMessage.wasmExecuteContractGeneric (setting sender, contract, executeMsg and mapping funds to CosmosAmount), and calls the existing sign(...) flow to produce a signed transaction string (preserving the memo). * add squid icon and rust chain signer * Update core * fix signSwap in cosmos signer * Update core: merge main into squid * Update core: merge refactor-swap-referral
1 parent 8c379d9 commit 7af21d5

7 files changed

Lines changed: 28 additions & 2 deletions

File tree

Packages/Primitives/Sources/SwapProvider.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ public enum SwapProvider: String, Codable, Equatable, Hashable, Sendable {
2424
case relay
2525
case hyperliquid
2626
case orca
27+
case squid
2728
}

Packages/PrimitivesComponents/Sources/Extensions/SwapProviderType+Gemstone.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public extension SwapProvider {
2626
case .orca: Images.SwapProviders.orca
2727
case .panora: Images.SwapProviders.panora
2828
case .okx: Images.SwapProviders.okx
29+
case .squid: Images.SwapProviders.squid
2930
}
3031
}
3132
}

Packages/Signer/Sources/Chains/CosmosSigner.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import Foundation
44
import WalletCore
55
import Primitives
6-
import Keystore
76

87
// https://github.com/trustwallet/wallet-core/blob/master/swift/Tests/Blockchains/THORChainTests.swift#L27
98
struct CosmosSigner: Signable {
@@ -63,6 +62,10 @@ struct CosmosSigner: Signable {
6362
return output.serialized
6463
}
6564

65+
func signSwap(input: SignerInput, privateKey: Data) throws -> [String] {
66+
try ChainSigner(chain: input.asset.chain).signSwap(input: input, privateKey: privateKey)
67+
}
68+
6669
func signData(input: Primitives.SignerInput, privateKey: Data) throws -> String {
6770
fatalError()
6871
}

Packages/Style/Sources/Images.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public enum Images {
8383
public static let panora = Image(.panora)
8484
public static let okx = Image(.okx)
8585
public static let nearIntents = Image(.nearIntents)
86+
public static let squid = Image(.squid)
8687
}
8788

8889
public enum EarnProviders {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "squid.svg",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
},
12+
"properties" : {
13+
"preserves-vector-representation" : true
14+
}
15+
}
Lines changed: 5 additions & 0 deletions
Loading

core

Submodule core updated 42 files

0 commit comments

Comments
 (0)