Skip to content

Commit 6214925

Browse files
realpaaaoclaude
andauthored
[SDK] Add Vultisig and refresh wallet definitions (#8966)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent b52f501 commit 6214925

302 files changed

Lines changed: 6881 additions & 4459 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.changeset/olive-moons-search.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Add Vultisig and refresh the wallet registry
Lines changed: 65 additions & 0 deletions
Loading

‎packages/thirdweb/scripts/wallets/extra-wallets.json‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,5 +203,33 @@
203203
"native": null,
204204
"universal": null
205205
}
206+
},
207+
{
208+
"id": "me.vultisig",
209+
"name": "Vultisig",
210+
"homepage": "https://vultisig.com",
211+
"image_id": "vultisig.svg",
212+
"app": {
213+
"browser": null,
214+
"ios": "https://apps.apple.com/app/apple-store/id6503023896",
215+
"android": "https://play.google.com/store/apps/details?id=com.vultisig.wallet",
216+
"mac": null,
217+
"windows": null,
218+
"linux": null,
219+
"chrome": "https://chromewebstore.google.com/detail/vultisig-extension/ggafhcdaplkhmmnlbfjpnnkepdfjaelb",
220+
"firefox": null,
221+
"safari": null,
222+
"edge": null,
223+
"opera": null
224+
},
225+
"rdns": "me.vultisig",
226+
"mobile": {
227+
"native": null,
228+
"universal": null
229+
},
230+
"desktop": {
231+
"native": null,
232+
"universal": null
233+
}
206234
}
207235
]

‎packages/thirdweb/scripts/wallets/generate.ts‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ const EXCLUDED_WALLETS = [
77
"co.lobstr", // Not EVM compatible
88
];
99

10+
// When several listings share an rdns, the first one wins; pin the listing to use where that order is unstable
11+
const PREFERRED_LISTINGS: Record<string, string> = {
12+
// OKX Wallet app (okxwallet://), not the OKX exchange app (okex://)
13+
"com.okex.wallet":
14+
"5d9f1395b3a8e848684848dc4147cbd05c8d54bb737eac78fe103901fe6b01a1",
15+
};
16+
1017
const walletConnectWallets = await fetch(
1118
"https://explorer-api.walletconnect.com/w3m/v1/getAllListings?projectId=145769e410f16970a79ff77b2d89a1e0",
1219
).then(async (res) => {
@@ -15,6 +22,10 @@ const walletConnectWallets = await fetch(
1522
// Remove duplicated wallets by wallet RDNS
1623
const filteredWallets: Wallet[] = [];
1724
for (const _w of Object.values(wallets.listings)) {
25+
const preferred = _w.rdns ? PREFERRED_LISTINGS[_w.rdns] : undefined;
26+
if (preferred && _w.id !== preferred) {
27+
continue;
28+
}
1829
if (_w.rdns && filteredWallets.find((w) => w.rdns === _w.rdns)) {
1930
continue;
2031
}
@@ -121,7 +132,8 @@ const allWalletsWithIds = allWalletsArray
121132

122133
return { ...wallet, id: id };
123134
})
124-
.filter((w) => !EXCLUDED_WALLETS.includes(w.id));
135+
// a homepage without a hostname yields an empty id
136+
.filter((w) => w.id && !EXCLUDED_WALLETS.includes(w.id));
125137

126138
// filter duplicate ids, we'll keep the first ones
127139

0 commit comments

Comments
 (0)