Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
21477bf
chore: version packages to 1.62.12-tron-support.0
NeOMakinG Nov 26, 2025
6b22beb
chore: temporarily skip build for publish
NeOMakinG Nov 26, 2025
5b368ce
chore: version packages to 1.62.12-tron-alpha.0
NeOMakinG Nov 26, 2025
b7fa895
chore: version packages to 1.62.12-tron-alpha.1
NeOMakinG Nov 26, 2025
6624af5
fix: rename adapter to tronAdapter to avoid property collision with S…
NeOMakinG Nov 26, 2025
844e640
chore: version packages to 1.62.14-tron-adapter-fix.0
NeOMakinG Nov 26, 2025
4536ed9
fix: resolve TypeScript error in GridPlus ethereum transaction data
NeOMakinG Nov 26, 2025
8dec9a0
fix: restore proper build scripts in package.json files
NeOMakinG Nov 26, 2025
6fc3d0b
chore: version packages to 1.62.14-tron-adapter-fix.1
NeOMakinG Nov 26, 2025
0791b70
chore: fix clean scripts and version to 1.62.14-tron-adapter-fix.2
NeOMakinG Nov 26, 2025
2011f88
chore: update gitHead in package.json files
NeOMakinG Nov 26, 2025
516d886
fix: convert Uint8Array to Buffer before toString in TRON address der…
NeOMakinG Nov 26, 2025
b1bf1e9
fix: use slice(1) instead of slice(2) for TRON public key
NeOMakinG Nov 26, 2025
cdfb59c
chore: bump version to 1.62.14-tron-adapter-fix.4
NeOMakinG Nov 26, 2025
4119922
fix: lint
NeOMakinG Nov 27, 2025
d71a3fe
fix: reset packages
NeOMakinG Nov 27, 2025
f441d6e
fix: reset gridplus
NeOMakinG Nov 27, 2025
99f5a85
fix: reset yarn
NeOMakinG Nov 27, 2025
822f49a
chore: bump version to 1.62.15-tron.1
gomesalexandre Nov 27, 2025
5cd6b3e
chore: reset package.json and lerna.json to origin/master
gomesalexandre Nov 27, 2025
6ff6cda
Merge remote-tracking branch 'origin/master' into tron-support-native
gomesalexandre Nov 27, 2025
caa3b9d
chore(release): publish 1.62.14
gomesalexandre Nov 27, 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
38 changes: 19 additions & 19 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.13",
"version": "1.62.14",
"license": "MIT",
"private": true,
"browserslist": "> 0.5%, last 2 versions, not dead",
Expand All @@ -12,24 +12,24 @@
"dependencies": {
"@esm2cjs/p-queue": "^7.3.0",
"@metamask/eth-sig-util": "^7.0.0",
"@shapeshiftoss/hdwallet-coinbase": "1.62.13",
"@shapeshiftoss/hdwallet-core": "1.62.13",
"@shapeshiftoss/hdwallet-keepkey": "1.62.13",
"@shapeshiftoss/hdwallet-keepkey-tcp": "1.62.13",
"@shapeshiftoss/hdwallet-keepkey-webusb": "1.62.13",
"@shapeshiftoss/hdwallet-keplr": "1.62.13",
"@shapeshiftoss/hdwallet-ledger": "1.62.13",
"@shapeshiftoss/hdwallet-ledger-webhid": "1.62.13",
"@shapeshiftoss/hdwallet-ledger-webusb": "1.62.13",
"@shapeshiftoss/hdwallet-metamask-multichain": "1.62.13",
"@shapeshiftoss/hdwallet-native": "1.62.13",
"@shapeshiftoss/hdwallet-phantom": "1.62.13",
"@shapeshiftoss/hdwallet-portis": "1.62.13",
"@shapeshiftoss/hdwallet-trezor": "1.62.13",
"@shapeshiftoss/hdwallet-trezor-connect": "1.62.13",
"@shapeshiftoss/hdwallet-vultisig": "1.62.13",
"@shapeshiftoss/hdwallet-walletconnect": "1.62.13",
"@shapeshiftoss/hdwallet-walletconnectv2": "1.62.13",
"@shapeshiftoss/hdwallet-coinbase": "1.62.14",
"@shapeshiftoss/hdwallet-core": "1.62.14",
"@shapeshiftoss/hdwallet-keepkey": "1.62.14",
"@shapeshiftoss/hdwallet-keepkey-tcp": "1.62.14",
"@shapeshiftoss/hdwallet-keepkey-webusb": "1.62.14",
"@shapeshiftoss/hdwallet-keplr": "1.62.14",
"@shapeshiftoss/hdwallet-ledger": "1.62.14",
"@shapeshiftoss/hdwallet-ledger-webhid": "1.62.14",
"@shapeshiftoss/hdwallet-ledger-webusb": "1.62.14",
"@shapeshiftoss/hdwallet-metamask-multichain": "1.62.14",
"@shapeshiftoss/hdwallet-native": "1.62.14",
"@shapeshiftoss/hdwallet-phantom": "1.62.14",
"@shapeshiftoss/hdwallet-portis": "1.62.14",
"@shapeshiftoss/hdwallet-trezor": "1.62.14",
"@shapeshiftoss/hdwallet-trezor-connect": "1.62.14",
"@shapeshiftoss/hdwallet-vultisig": "1.62.14",
"@shapeshiftoss/hdwallet-walletconnect": "1.62.14",
"@shapeshiftoss/hdwallet-walletconnectv2": "1.62.14",
"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.13",
"version": "1.62.14",
"main": "index.js",
"license": "MIT",
"private": true,
Expand All @@ -11,16 +11,16 @@
},
"dependencies": {
"@bitcoinerlab/secp256k1": "^1.1.1",
"@shapeshiftoss/hdwallet-core": "1.62.13",
"@shapeshiftoss/hdwallet-keepkey": "1.62.13",
"@shapeshiftoss/hdwallet-keepkey-nodewebusb": "1.62.13",
"@shapeshiftoss/hdwallet-keepkey-tcp": "1.62.13",
"@shapeshiftoss/hdwallet-ledger": "1.62.13",
"@shapeshiftoss/hdwallet-metamask-multichain": "1.62.13",
"@shapeshiftoss/hdwallet-native": "1.62.13",
"@shapeshiftoss/hdwallet-portis": "1.62.13",
"@shapeshiftoss/hdwallet-trezor": "1.62.13",
"@shapeshiftoss/hdwallet-vultisig": "1.62.13",
"@shapeshiftoss/hdwallet-core": "1.62.14",
"@shapeshiftoss/hdwallet-keepkey": "1.62.14",
"@shapeshiftoss/hdwallet-keepkey-nodewebusb": "1.62.14",
"@shapeshiftoss/hdwallet-keepkey-tcp": "1.62.14",
"@shapeshiftoss/hdwallet-ledger": "1.62.14",
"@shapeshiftoss/hdwallet-metamask-multichain": "1.62.14",
"@shapeshiftoss/hdwallet-native": "1.62.14",
"@shapeshiftoss/hdwallet-portis": "1.62.14",
"@shapeshiftoss/hdwallet-trezor": "1.62.14",
"@shapeshiftoss/hdwallet-vultisig": "1.62.14",
"fast-json-stable-stringify": "^2.1.0",
"msw": "^0.27.1",
"whatwg-fetch": "^3.6.2"
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lerna": "5.2.0",
"version": "1.62.13",
"version": "1.62.14",
"npmClient": "yarn",
"useWorkspaces": true,
"command": {
Expand Down
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.13",
"version": "1.62.14",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -15,7 +15,7 @@
},
"dependencies": {
"@coinbase/wallet-sdk": "^3.6.6",
"@shapeshiftoss/hdwallet-core": "1.62.13",
"@shapeshiftoss/hdwallet-core": "1.62.14",
"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.13",
"version": "1.62.14",
"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 @@ -18,6 +18,7 @@ export * from "./terra";
export * from "./thorchain";
export * from "./solana";
export * from "./transport";
export * from "./tron";
export * from "./utils";
export * from "./utxoUtils";
export * from "./wallet";
87 changes: 87 additions & 0 deletions packages/hdwallet-core/src/tron.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import { addressNListToBIP32, slip44ByCoin } from "./utils";
import { BIP32Path, HDWallet, HDWalletInfo, PathDescription } from "./wallet";

export interface TronGetAddress {
addressNList: BIP32Path;
showDisplay?: boolean;
pubKey?: string;
}

export interface TronSignTx {
addressNList: BIP32Path;
/** Raw transaction data in hex format */
rawDataHex: string;
}

export interface TronSignedTx {
serialized: string;
signature: string;
}

export interface TronTxSignature {
signature: string;
}

export interface TronGetAccountPaths {
accountIdx: number;
}

export interface TronAccountPath {
addressNList: BIP32Path;
}

export interface TronWalletInfo extends HDWalletInfo {
readonly _supportsTronInfo: boolean;

/**
* Returns a list of bip32 paths for a given account index in preferred order
* from most to least preferred.
*/
tronGetAccountPaths(msg: TronGetAccountPaths): Array<TronAccountPath>;

/**
* Returns the "next" account path, if any.
*/
tronNextAccountPath(msg: TronAccountPath): TronAccountPath | undefined;
}

export interface TronWallet extends TronWalletInfo, HDWallet {
readonly _supportsTron: boolean;

tronGetAddress(msg: TronGetAddress): Promise<string | null>;
tronGetAddresses?(msgs: TronGetAddress[]): Promise<string[]>;
tronSignTx(msg: TronSignTx): Promise<TronSignedTx | null>;
tronSendTx?(msg: TronSignTx): Promise<TronTxSignature | null>;
}

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

if (path.length != 5) return unknown;
if (path[0] != 0x80000000 + 44) return unknown;
if (path[1] != 0x80000000 + slip44ByCoin("Tron")) 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: `Tron Account #${index}`,
accountIdx: index,
wholeAccount: true,
coin: "Tron",
isKnown: true,
};
}

// The standard BIP44 derivation path for Tron is: m/44'/195'/<account>'/0/0
Comment thread
gomesalexandre marked this conversation as resolved.
// https://github.com/tronprotocol/tips/issues/102
export function tronGetAccountPaths(msg: TronGetAccountPaths): Array<TronAccountPath> {
const slip44 = slip44ByCoin("Tron");
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 @@ -156,6 +156,7 @@ export const slip44Table = Object.freeze({
Terra: 330,
Kava: 459,
Solana: 501,
Tron: 195,
// EVM chains all use the same SLIP44
Ethereum: 60,
Avalanche: 60,
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 @@ -16,6 +16,7 @@ import { SolanaWallet, SolanaWalletInfo } from "./solana";
import { TerraWallet, TerraWalletInfo } from "./terra";
import { ThorchainWallet, ThorchainWalletInfo } from "./thorchain";
import { Transport } from "./transport";
import { TronWallet, TronWalletInfo } from "./tron";

export type BIP32Path = Array<number>;

Expand Down Expand Up @@ -257,6 +258,14 @@ export function infoSolana(info: HDWalletInfo): info is SolanaWalletInfo {
return isObject(info) && (info as any)._supportsSolanaInfo;
}

export function supportsTron(wallet: HDWallet): wallet is TronWallet {
return isObject(wallet) && (wallet as any)._supportsTron;
}

export function infoTron(info: HDWalletInfo): info is TronWalletInfo {
return isObject(info) && (info as any)._supportsTronInfo;
}

export function supportsDebugLink(wallet: HDWallet): wallet is DebugLinkWallet {
return isObject(wallet) && (wallet as any)._supportsDebugLink;
}
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.13",
"version": "1.62.14",
"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.13",
"@shapeshiftoss/hdwallet-core": "1.62.14",
"bech32": "^1.1.4",
"bs58": "^5.0.0",
"crypto-js": "^4.2.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.13",
"version": "1.62.14",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,7 +14,7 @@
"prepublishOnly": "rm -rf dist && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.62.13",
"@shapeshiftoss/hdwallet-keepkey": "1.62.13"
"@shapeshiftoss/hdwallet-core": "1.62.14",
"@shapeshiftoss/hdwallet-keepkey": "1.62.14"
}
}
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.13",
"version": "1.62.14",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,7 +14,7 @@
"prepublishOnly": "rm -rf dist && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-keepkey": "1.62.13",
"@shapeshiftoss/hdwallet-keepkey": "1.62.14",
"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.13",
"version": "1.62.14",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,7 +14,7 @@
"prepublishOnly": "rm -rf dist && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-keepkey": "1.62.13"
"@shapeshiftoss/hdwallet-keepkey": "1.62.14"
},
"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.13",
"version": "1.62.14",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,8 +14,8 @@
"prepublishOnly": "rm -rf dist && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.62.13",
"@shapeshiftoss/hdwallet-keepkey": "1.62.13"
"@shapeshiftoss/hdwallet-core": "1.62.14",
"@shapeshiftoss/hdwallet-keepkey": "1.62.14"
},
"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.13",
"version": "1.62.14",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,8 +14,8 @@
"prepublishOnly": "rm -rf dist && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.62.13",
"@shapeshiftoss/hdwallet-keepkey": "1.62.13",
"@shapeshiftoss/hdwallet-core": "1.62.14",
"@shapeshiftoss/hdwallet-keepkey": "1.62.14",
"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.13",
"version": "1.62.14",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,8 +14,8 @@
"prepublishOnly": "rm -rf dist && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.62.13",
"@shapeshiftoss/hdwallet-keepkey": "1.62.13"
"@shapeshiftoss/hdwallet-core": "1.62.14",
"@shapeshiftoss/hdwallet-keepkey": "1.62.14"
},
"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.13",
"version": "1.62.14",
"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.0",
"@shapeshiftoss/hdwallet-core": "1.62.13",
"@shapeshiftoss/hdwallet-core": "1.62.14",
"@shapeshiftoss/proto-tx-builder": "0.10.0",
"bignumber.js": "^9.0.1",
"bnb-javascript-sdk-nobroadcast": "2.16.15",
Expand Down
Loading