Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
6a2302a
chore: version packages to 1.62.32-starknet.0
NeOMakinG Dec 22, 2025
dca2f76
fix: cleanup shit
gomesalexandre Dec 24, 2025
1917f29
fix: restore starknet dependencies to hdwallet-native
gomesalexandre Dec 24, 2025
6c6b329
chore: version packages to 1.62.33-starknet.0
gomesalexandre Dec 24, 2025
45b0493
fix: ci
gomesalexandre Dec 24, 2025
deb8f8e
[skip ci] wip: skip ci
gomesalexandre Dec 24, 2025
87270a8
fix: ci
gomesalexandre Dec 24, 2025
a2ce8d8
chore: version packages to 1.62.33-starknet.1
gomesalexandre Dec 24, 2025
9522d96
fix: sig length
gomesalexandre Dec 24, 2025
d2979c0
feat: don't pollute bip32 node
gomesalexandre Dec 24, 2025
43949d3
chore: version packages to 1.62.33-starknet.2
gomesalexandre Dec 24, 2025
601c369
feat: add comprehensive logging for starknet debugging
gomesalexandre Dec 24, 2025
95aff1c
chore: version packages to 1.62.33-starknet.3
gomesalexandre Dec 24, 2025
754eee5
fix: make starkMasterKey optional in initialize
gomesalexandre Dec 24, 2025
9b8ee2b
chore: version packages to 1.62.33-starknet.4
gomesalexandre Dec 24, 2025
41c6e7a
feat: add initialization logging
gomesalexandre Dec 24, 2025
1a84c9b
chore: version packages to 1.62.33-starknet.5
gomesalexandre Dec 24, 2025
e71eaa3
fix: stark master key initialization in constructor
gomesalexandre Dec 24, 2025
63b360d
chore: version packages to 1.62.33-starknet.6
gomesalexandre Dec 24, 2025
cd03b76
chore: version packages to 1.62.33-starknet.6
gomesalexandre Dec 24, 2025
2d43148
fix: add stark master key to loadDevice
gomesalexandre Dec 24, 2025
81966c7
chore: version packages to 1.62.33-starknet.8
gomesalexandre Dec 24, 2025
1a2fc8c
fix: support non-hardened derivation in stark engine
gomesalexandre Dec 24, 2025
6f8d24e
chore: version packages to 1.62.33-starknet.9
gomesalexandre Dec 24, 2025
ae0cfa5
fix: compute actual contract address instead of returning public key
gomesalexandre Dec 24, 2025
e3d0a98
chore: version packages to 1.62.33-starknet.10
gomesalexandre Dec 24, 2025
dce57a5
docs: add STARK curve and Starknet spec references
gomesalexandre Dec 24, 2025
746cf06
docs: add comprehensive Stark curve documentation and references
gomesalexandre Dec 24, 2025
48b924f
docs: add comments explaining Stark master key in bip32, dummy, and a…
gomesalexandre Dec 24, 2025
bac3fa7
refactor: clean up debugging logs and move stark init back to Promise…
gomesalexandre Dec 24, 2025
fb79a67
fix: pad Starknet public keys to 64 hex chars
gomesalexandre Dec 24, 2025
ef327d7
chore: version packages to 1.62.33-starknet.11
gomesalexandre Dec 24, 2025
6b84173
fix: pad contract address to 64 hex chars
gomesalexandre Dec 24, 2025
b44b240
chore: version packages to 1.62.33-starknet.12
gomesalexandre Dec 24, 2025
4dc33a9
chore: remove debug logging
gomesalexandre Dec 24, 2025
11f947d
chore: version packages to 1.62.33-starknet.13
gomesalexandre Dec 24, 2025
7be85cb
chore: version packages to 1.62.33-starknet.14
gomesalexandre Dec 24, 2025
8feaab6
chore: revert versions to 1.62.32 and use npmjs registry
gomesalexandre Dec 24, 2025
bf77265
fix: remove carets from 1.62.32 versions (should be exact)
gomesalexandre Dec 24, 2025
2a80641
chore: pin all dependency versions across all packages
gomesalexandre Dec 24, 2025
cfb2b6a
feat: clean shit up
gomesalexandre Dec 24, 2025
ffafa43
fix: uh oh
gomesalexandre Dec 24, 2025
c1b54f1
fix: add starkMasterKey to native wallet tests
gomesalexandre Dec 24, 2025
2b1c409
style: format loadDevice calls in native tests
gomesalexandre Dec 24, 2025
2c1b669
chore(release): publish 1.62.33
gomesalexandre Dec 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions examples/sandbox/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-sandbox",
"version": "1.62.32",
"version": "1.62.33-starknet.0",
"license": "MIT",
"private": true,
"browserslist": "> 0.5%, last 2 versions, not dead",
Expand All @@ -12,25 +12,25 @@
"dependencies": {
"@esm2cjs/p-queue": "^7.3.0",
"@metamask/eth-sig-util": "^7.0.0",
"@shapeshiftoss/hdwallet-coinbase": "1.62.32",
"@shapeshiftoss/hdwallet-core": "1.62.32",
"@shapeshiftoss/hdwallet-gridplus": "1.62.32",
"@shapeshiftoss/hdwallet-keepkey": "1.62.32",
"@shapeshiftoss/hdwallet-keepkey-tcp": "1.62.32",
"@shapeshiftoss/hdwallet-keepkey-webusb": "1.62.32",
"@shapeshiftoss/hdwallet-keplr": "1.62.32",
"@shapeshiftoss/hdwallet-ledger": "1.62.32",
"@shapeshiftoss/hdwallet-ledger-webhid": "1.62.32",
"@shapeshiftoss/hdwallet-ledger-webusb": "1.62.32",
"@shapeshiftoss/hdwallet-metamask-multichain": "1.62.32",
"@shapeshiftoss/hdwallet-native": "1.62.32",
"@shapeshiftoss/hdwallet-phantom": "1.62.32",
"@shapeshiftoss/hdwallet-portis": "1.62.32",
"@shapeshiftoss/hdwallet-trezor": "1.62.32",
"@shapeshiftoss/hdwallet-trezor-connect": "1.62.32",
"@shapeshiftoss/hdwallet-vultisig": "1.62.32",
"@shapeshiftoss/hdwallet-walletconnect": "1.62.32",
"@shapeshiftoss/hdwallet-walletconnectv2": "1.62.32",
"@shapeshiftoss/hdwallet-coinbase": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-core": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-gridplus": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-keepkey": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-keepkey-tcp": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-keepkey-webusb": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-keplr": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-ledger": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-ledger-webhid": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-ledger-webusb": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-metamask-multichain": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-native": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-phantom": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-portis": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-trezor": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-trezor-connect": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-vultisig": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-walletconnect": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-walletconnectv2": "^1.62.33-starknet.0",
"bip32": "^2.0.4",
"eip-712": "^1.0.0",
"jquery": "^3.7.1",
Expand Down
22 changes: 11 additions & 11 deletions integration/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/integration",
"version": "1.62.32",
"version": "1.62.33-starknet.0",
"main": "index.js",
"license": "MIT",
"private": true,
Expand All @@ -12,16 +12,16 @@
"dependencies": {
"@bitcoinerlab/secp256k1": "^1.1.1",
"@bitgo/utxo-lib": "^11.18.0",
"@shapeshiftoss/hdwallet-core": "1.62.32",
"@shapeshiftoss/hdwallet-keepkey": "1.62.32",
"@shapeshiftoss/hdwallet-keepkey-nodewebusb": "1.62.32",
"@shapeshiftoss/hdwallet-keepkey-tcp": "1.62.32",
"@shapeshiftoss/hdwallet-ledger": "1.62.32",
"@shapeshiftoss/hdwallet-metamask-multichain": "1.62.32",
"@shapeshiftoss/hdwallet-native": "1.62.32",
"@shapeshiftoss/hdwallet-portis": "1.62.32",
"@shapeshiftoss/hdwallet-trezor": "1.62.32",
"@shapeshiftoss/hdwallet-vultisig": "1.62.32",
"@shapeshiftoss/hdwallet-core": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-keepkey": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-keepkey-nodewebusb": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-keepkey-tcp": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-ledger": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-metamask-multichain": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-native": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-portis": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-trezor": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-vultisig": "^1.62.33-starknet.0",
"fast-json-stable-stringify": "^2.1.0",
"msw": "^0.27.1",
"whatwg-fetch": "^3.6.2"
Expand Down
9 changes: 7 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
{
"lerna": "5.2.0",
"version": "1.62.32",
"version": "1.62.33-starknet.0",
"npmClient": "yarn",
"useWorkspaces": true,
"command": {
"publish": {
"message": "chore(release): publish %v"
}
},
"ignoreChanges": ["**/__fixtures__/**", "**/__tests__/**", "**/*.md", "**/.env"]
"ignoreChanges": [
"**/__fixtures__/**",
"**/__tests__/**",
"**/*.md",
"**/.env"
]
}
4 changes: 2 additions & 2 deletions packages/hdwallet-coinbase/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-coinbase",
"version": "1.62.32",
"version": "1.62.33-starknet.0",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -15,7 +15,7 @@
},
"dependencies": {
"@coinbase/wallet-sdk": "^3.6.6",
"@shapeshiftoss/hdwallet-core": "1.62.32",
"@shapeshiftoss/hdwallet-core": "^1.62.33-starknet.0",
"eth-rpc-errors": "^4.0.3",
"lodash": "^4.17.21"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/hdwallet-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-core",
"version": "1.62.32",
"version": "1.62.33-starknet.0",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand Down
1 change: 1 addition & 0 deletions packages/hdwallet-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export * from "./secret";
export * from "./terra";
export * from "./thorchain";
export * from "./solana";
export * from "./starknet";
export * from "./sui";
export * from "./transport";
export * from "./tron";
Expand Down
68 changes: 68 additions & 0 deletions packages/hdwallet-core/src/starknet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import { addressNListToBIP32, slip44ByCoin } from "./utils";
import { BIP32Path, HDWallet, HDWalletInfo, PathDescription } from "./wallet";

export interface StarknetGetAddress {
addressNList: BIP32Path;
showDisplay?: boolean;
}

export interface StarknetSignTx {
addressNList: BIP32Path;
txHash: string;
}

export interface StarknetSignedTx {
signature: string[];
}

export interface StarknetGetAccountPaths {
accountIdx: number;
}

export interface StarknetAccountPath {
addressNList: BIP32Path;
}

export interface StarknetWalletInfo extends HDWalletInfo {
readonly _supportsStarknetInfo: boolean;

starknetGetAccountPaths(msg: StarknetGetAccountPaths): Array<StarknetAccountPath>;
starknetNextAccountPath(msg: StarknetAccountPath): StarknetAccountPath | undefined;
}

export interface StarknetWallet extends StarknetWalletInfo, HDWallet {
readonly _supportsStarknet: boolean;

starknetGetAddress(msg: StarknetGetAddress): Promise<string | null>;
starknetSignTx(msg: StarknetSignTx): Promise<StarknetSignedTx | null>;
}

export function starknetDescribePath(path: BIP32Path): PathDescription {
const pathStr = addressNListToBIP32(path);
const unknown: PathDescription = {
verbose: pathStr,
coin: "Starknet",
isKnown: false,
};

if (path.length != 5) return unknown;
if (path[0] != 0x80000000 + 44) return unknown;
if (path[1] != 0x80000000 + slip44ByCoin("Starknet")) return unknown;
if ((path[2] & 0x80000000) >>> 0 !== 0x80000000) return unknown;
if (path[3] !== 0) return unknown;
if (path[4] !== 0) return unknown;

const index = path[2] & 0x7fffffff;
return {
verbose: `Starknet Account #${index}`,
accountIdx: index,
wholeAccount: true,
coin: "Starknet",
isKnown: true,
};
}
Comment thread
gomesalexandre marked this conversation as resolved.

export function starknetGetAccountPaths(msg: StarknetGetAccountPaths): Array<StarknetAccountPath> {
const slip44 = slip44ByCoin("Starknet");
return [{ addressNList: [0x80000000 + 44, 0x80000000 + slip44, 0x80000000 + msg.accountIdx, 0, 0] }];
}
1 change: 1 addition & 0 deletions packages/hdwallet-core/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export const slip44Table = Object.freeze({
Terra: 330,
Kava: 459,
Solana: 501,
Starknet: 9004,
Tron: 195,
Sui: 784,
// EVM chains all use the same SLIP44
Expand Down
9 changes: 9 additions & 0 deletions packages/hdwallet-core/src/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { OsmosisWallet, OsmosisWalletInfo } from "./osmosis";
import { RippleWallet, RippleWalletInfo } from "./ripple";
import { SecretWallet, SecretWalletInfo } from "./secret";
import { SolanaWallet, SolanaWalletInfo } from "./solana";
import { StarknetWallet, StarknetWalletInfo } from "./starknet";
import { SuiWallet, SuiWalletInfo } from "./sui";
import { TerraWallet, TerraWalletInfo } from "./terra";
import { ThorchainWallet, ThorchainWalletInfo } from "./thorchain";
Expand Down Expand Up @@ -271,6 +272,14 @@ export function infoSolana(info: HDWalletInfo): info is SolanaWalletInfo {
return isObject(info) && (info as any)._supportsSolanaInfo;
}

export function supportsStarknet(wallet: HDWallet): wallet is StarknetWallet {
return isObject(wallet) && (wallet as any)._supportsStarknet;
}

export function infoStarknet(info: HDWalletInfo): info is StarknetWalletInfo {
return isObject(info) && (info as any)._supportsStarknetInfo;
}

export function supportsTron(wallet: HDWallet): wallet is TronWallet {
return isObject(wallet) && (wallet as any)._supportsTron;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/hdwallet-gridplus/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-gridplus",
"version": "1.62.32",
"version": "1.62.33-starknet.0",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -20,7 +20,7 @@
"@ethereumjs/rlp": "5.0.2",
"@ethereumjs/tx": "5.4.0",
"@metamask/eth-sig-util": "^7.0.0",
"@shapeshiftoss/hdwallet-core": "1.62.32",
"@shapeshiftoss/hdwallet-core": "^1.62.33-starknet.0",
"bech32": "^1.1.4",
"bs58": "^5.0.0",
"bs58check": "^4.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/hdwallet-keepkey-chromeusb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-keepkey-chromeusb",
"version": "1.62.32",
"version": "1.62.33-starknet.0",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,7 +14,7 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.62.32",
"@shapeshiftoss/hdwallet-keepkey": "1.62.32"
"@shapeshiftoss/hdwallet-core": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-keepkey": "^1.62.33-starknet.0"
}
}
4 changes: 2 additions & 2 deletions packages/hdwallet-keepkey-electron/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-keepkey-electron",
"version": "1.62.32",
"version": "1.62.33-starknet.0",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,7 +14,7 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-keepkey": "1.62.32",
"@shapeshiftoss/hdwallet-keepkey": "^1.62.33-starknet.0",
"uuid": "^8.3.2"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/hdwallet-keepkey-nodehid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-keepkey-nodehid",
"version": "1.62.32",
"version": "1.62.33-starknet.0",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,7 +14,7 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-keepkey": "1.62.32"
"@shapeshiftoss/hdwallet-keepkey": "^1.62.33-starknet.0"
},
"peerDependencies": {
"node-hid": "^2.1.1"
Expand Down
6 changes: 3 additions & 3 deletions packages/hdwallet-keepkey-nodewebusb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-keepkey-nodewebusb",
"version": "1.62.32",
"version": "1.62.33-starknet.0",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,8 +14,8 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.62.32",
"@shapeshiftoss/hdwallet-keepkey": "1.62.32"
"@shapeshiftoss/hdwallet-core": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-keepkey": "^1.62.33-starknet.0"
},
"peerDependencies": {
"usb": "^2.3.1"
Expand Down
6 changes: 3 additions & 3 deletions packages/hdwallet-keepkey-tcp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-keepkey-tcp",
"version": "1.62.32",
"version": "1.62.33-starknet.0",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,8 +14,8 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.62.32",
"@shapeshiftoss/hdwallet-keepkey": "1.62.32",
"@shapeshiftoss/hdwallet-core": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-keepkey": "^1.62.33-starknet.0",
"axios": "^0.21.1"
}
}
6 changes: 3 additions & 3 deletions packages/hdwallet-keepkey-webusb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-keepkey-webusb",
"version": "1.62.32",
"version": "1.62.33-starknet.0",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,8 +14,8 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.62.32",
"@shapeshiftoss/hdwallet-keepkey": "1.62.32"
"@shapeshiftoss/hdwallet-core": "^1.62.33-starknet.0",
"@shapeshiftoss/hdwallet-keepkey": "^1.62.33-starknet.0"
},
"devDependencies": {
"@types/w3c-web-usb": "^1.0.4"
Expand Down
4 changes: 2 additions & 2 deletions packages/hdwallet-keepkey/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-keepkey",
"version": "1.62.32",
"version": "1.62.33-starknet.0",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -21,7 +21,7 @@
"@keepkey/device-protocol": "7.13.4",
"@metamask/eth-sig-util": "^7.0.0",
"@shapeshiftoss/bitcoinjs-lib": "7.0.0-shapeshift.2",
"@shapeshiftoss/hdwallet-core": "1.62.32",
"@shapeshiftoss/hdwallet-core": "^1.62.33-starknet.0",
"@shapeshiftoss/proto-tx-builder": "0.10.0",
"bignumber.js": "^9.0.1",
"bnb-javascript-sdk-nobroadcast": "2.16.15",
Expand Down
Loading