Skip to content

Commit b95cdbc

Browse files
feat(statics): add Starknet to statics and environments CECHO-924
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b6be824 commit b95cdbc

6 files changed

Lines changed: 56 additions & 0 deletions

File tree

modules/sdk-core/src/bitgo/environments.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ interface EnvironmentTemplate {
7878
sgbExplorerApiToken?: string;
7979
icpNodeUrl: string;
8080
kaspaNodeUrl: string;
81+
starknetNodeUrl: string;
8182
hyperLiquidNodeUrl: string;
8283
wemixExplorerBaseUrl?: string;
8384
wemixExplorerApiToken?: string;
@@ -369,6 +370,7 @@ const mainnetBase: EnvironmentTemplate = {
369370
},
370371
icpNodeUrl: 'https://ic0.app',
371372
kaspaNodeUrl: 'https://api.kaspa.org',
373+
starknetNodeUrl: 'https://starknet-mainnet-rpc.publicnode.com/',
372374
hyperLiquidNodeUrl: 'https://api.hyperliquid.xyz',
373375
worldExplorerBaseUrl: 'https://worldscan.org/',
374376
somniaExplorerBaseUrl: 'https://mainnet.somnia.w3us.site/',
@@ -448,6 +450,7 @@ const testnetBase: EnvironmentTemplate = {
448450
sgbExplorerBaseUrl: 'https://coston-explorer.flare.network',
449451
icpNodeUrl: 'https://ic0.app',
450452
kaspaNodeUrl: 'https://api-tn10.kaspa.org',
453+
starknetNodeUrl: 'https://starknet-sepolia-rpc.publicnode.com/',
451454
hyperLiquidNodeUrl: 'https://api.hyperliquid-testnet.xyz',
452455
monExplorerBaseUrl: 'https://api.etherscan.io/v2',
453456
worldExplorerBaseUrl: 'https://sepolia.worldscan.org/',

modules/statics/src/allCoinsAndTokens.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ import {
121121
SGB_FEATURES,
122122
SOL_FEATURES,
123123
SONEIUM_FEATURES,
124+
STARKNET_FEATURES,
124125
STX_FEATURES,
125126
SUI_FEATURES,
126127
SUI_TOKEN_FEATURES,
@@ -2263,6 +2264,28 @@ export const allCoinsAndTokens = [
22632264
ICP_FEATURES,
22642265
KeyCurve.Secp256k1
22652266
),
2267+
account(
2268+
'56e92a2e-523c-4d48-8375-bff7e35eec11',
2269+
'starknet',
2270+
'Starknet',
2271+
Networks.main.starknet,
2272+
18,
2273+
UnderlyingAsset.STARKNET,
2274+
BaseUnit.STARKNET,
2275+
STARKNET_FEATURES,
2276+
KeyCurve.Secp256k1
2277+
),
2278+
account(
2279+
'2a359f78-0cfa-4c15-8026-be508b05a37b',
2280+
'tstarknet',
2281+
'Testnet Starknet',
2282+
Networks.test.starknet,
2283+
18,
2284+
UnderlyingAsset.STARKNET,
2285+
BaseUnit.STARKNET,
2286+
STARKNET_FEATURES,
2287+
KeyCurve.Secp256k1
2288+
),
22662289
account(
22672290
'd348f38d-bff6-4936-842a-c9721e5027c1',
22682291
'polyx',

modules/statics/src/base.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ export enum CoinFamily {
115115
SOL = 'sol',
116116
SONIC = 'sonic',
117117
SONEIUM = 'soneium',
118+
STARKNET = 'starknet',
118119
STT = 'stt',
119120
SUI = 'sui',
120121
STX = 'stx',
@@ -688,6 +689,7 @@ export enum UnderlyingAsset {
688689
SOMI = 'somi', // Somnia Chain
689690
SONEIUM = 'soneium',
690691
SONIC = 'sonic',
692+
STARKNET = 'starknet',
691693
STT = 'stt',
692694
STX = 'stx',
693695
SUI = 'sui',
@@ -3979,6 +3981,7 @@ export enum BaseUnit {
39793981
TASI = 'atestfet',
39803982
CANTON = 'canton',
39813983
KASPA = 'sompi',
3984+
STARKNET = 'fri',
39823985
USDC = 'usdc',
39833986
}
39843987

modules/statics/src/coinFeatures.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,15 @@ export const ICP_FEATURES = [
645645
CoinFeature.REBUILD_ON_CUSTODY_SIGNING,
646646
];
647647

648+
export const STARKNET_FEATURES = [
649+
...ACCOUNT_COIN_DEFAULT_FEATURES,
650+
CoinFeature.TSS,
651+
CoinFeature.TSS_COLD,
652+
CoinFeature.MPCV2,
653+
CoinFeature.SHA256_WITH_ECDSA_TSS,
654+
CoinFeature.REBUILD_ON_CUSTODY_SIGNING,
655+
];
656+
648657
export const TAO_FEATURES = [
649658
...ACCOUNT_COIN_DEFAULT_FEATURES,
650659
CoinFeature.TSS,

modules/statics/src/networks.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,20 @@ class SolTestnet extends Testnet implements AccountNetwork {
942942
explorerUrl = 'https://explorer.solana.com/tx/?cluster=devnet';
943943
}
944944

945+
class StarknetMainnet extends Mainnet implements AccountNetwork {
946+
name = 'Starknet';
947+
family = CoinFamily.STARKNET;
948+
explorerUrl = 'https://voyager.online/tx/';
949+
accountExplorerUrl = 'https://voyager.online/contract/';
950+
}
951+
952+
class StarknetTestnet extends Testnet implements AccountNetwork {
953+
name = 'Testnet Starknet';
954+
family = CoinFamily.STARKNET;
955+
explorerUrl = 'https://sepolia.voyager.online/tx/';
956+
accountExplorerUrl = 'https://sepolia.voyager.online/contract/';
957+
}
958+
945959
class Sui extends Mainnet implements AccountNetwork {
946960
name = 'Sui';
947961
family = CoinFamily.SUI;
@@ -2854,6 +2868,7 @@ export const Networks = {
28542868
sgb: Object.freeze(new Songbird()),
28552869
sol: Object.freeze(new Sol()),
28562870
sonic: Object.freeze(new Sonic()),
2871+
starknet: Object.freeze(new StarknetMainnet()),
28572872
sui: Object.freeze(new Sui()),
28582873
near: Object.freeze(new Near()),
28592874
stx: Object.freeze(new Stx()),
@@ -2982,6 +2997,7 @@ export const Networks = {
29822997
sei: Object.freeze(new SeiTestnet()),
29832998
seievm: Object.freeze(new SeiEvmTestnet()),
29842999
sol: Object.freeze(new SolTestnet()),
3000+
starknet: Object.freeze(new StarknetTestnet()),
29853001
sui: Object.freeze(new SuiTestnet()),
29863002
near: Object.freeze(new NearTestnet()),
29873003
stx: Object.freeze(new StxTestnet()),

modules/statics/test/unit/fixtures/expectedColdFeatures.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ export const expectedColdFeatures = {
136136
'sol',
137137
'sonic',
138138
'somi',
139+
'starknet',
139140
'sui',
140141
'unieth',
141142
'usdt0',
@@ -220,6 +221,7 @@ export const expectedColdFeatures = {
220221
'tsei',
221222
'tsgb',
222223
'tsol',
224+
'tstarknet',
223225
'tstt',
224226
'tsui',
225227
'ttao',

0 commit comments

Comments
 (0)