Skip to content

Commit

Permalink
Merge pull request #630 from shapeshift/add-arbitrum
Browse files Browse the repository at this point in the history
  • Loading branch information
kaladinlight authored Sep 21, 2023
2 parents 3306a2d + e46b5e1 commit d9701ee
Show file tree
Hide file tree
Showing 39 changed files with 102 additions and 77 deletions.
32 changes: 16 additions & 16 deletions examples/sandbox/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hdwallet-sandbox",
"version": "1.50.4",
"version": "1.50.5",
"license": "MIT",
"private": true,
"browserslist": "> 0.5%, last 2 versions, not dead",
Expand All @@ -10,21 +10,21 @@
"clean": "rm -rf public .parcel-cache"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.50.4",
"@shapeshiftoss/hdwallet-keepkey-tcp": "1.50.4",
"@shapeshiftoss/hdwallet-keepkey-webusb": "1.50.4",
"@shapeshiftoss/hdwallet-keplr": "1.50.4",
"@shapeshiftoss/hdwallet-ledger": "1.50.4",
"@shapeshiftoss/hdwallet-ledger-webhid": "1.50.4",
"@shapeshiftoss/hdwallet-ledger-webusb": "1.50.4",
"@shapeshiftoss/hdwallet-metamask": "1.50.4",
"@shapeshiftoss/hdwallet-native": "1.50.4",
"@shapeshiftoss/hdwallet-portis": "1.50.4",
"@shapeshiftoss/hdwallet-tallyho": "1.50.4",
"@shapeshiftoss/hdwallet-trezor": "1.50.4",
"@shapeshiftoss/hdwallet-trezor-connect": "1.50.4",
"@shapeshiftoss/hdwallet-walletconnect": "1.50.4",
"@shapeshiftoss/hdwallet-xdefi": "1.50.4",
"@shapeshiftoss/hdwallet-core": "1.50.5",
"@shapeshiftoss/hdwallet-keepkey-tcp": "1.50.5",
"@shapeshiftoss/hdwallet-keepkey-webusb": "1.50.5",
"@shapeshiftoss/hdwallet-keplr": "1.50.5",
"@shapeshiftoss/hdwallet-ledger": "1.50.5",
"@shapeshiftoss/hdwallet-ledger-webhid": "1.50.5",
"@shapeshiftoss/hdwallet-ledger-webusb": "1.50.5",
"@shapeshiftoss/hdwallet-metamask": "1.50.5",
"@shapeshiftoss/hdwallet-native": "1.50.5",
"@shapeshiftoss/hdwallet-portis": "1.50.5",
"@shapeshiftoss/hdwallet-tallyho": "1.50.5",
"@shapeshiftoss/hdwallet-trezor": "1.50.5",
"@shapeshiftoss/hdwallet-trezor-connect": "1.50.5",
"@shapeshiftoss/hdwallet-walletconnect": "1.50.5",
"@shapeshiftoss/hdwallet-xdefi": "1.50.5",
"bip32": "^2.0.4",
"jquery": "^3.4.1",
"json": "^9.0.6",
Expand Down
20 changes: 10 additions & 10 deletions integration/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/integration",
"version": "1.50.4",
"version": "1.50.5",
"main": "index.js",
"license": "MIT",
"private": true,
Expand All @@ -10,15 +10,15 @@
"dev": "lerna run test --scope integration --parallel --include-filtered-dependencies"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.50.4",
"@shapeshiftoss/hdwallet-keepkey": "1.50.4",
"@shapeshiftoss/hdwallet-keepkey-nodewebusb": "1.50.4",
"@shapeshiftoss/hdwallet-keepkey-tcp": "1.50.4",
"@shapeshiftoss/hdwallet-ledger": "1.50.4",
"@shapeshiftoss/hdwallet-native": "1.50.4",
"@shapeshiftoss/hdwallet-portis": "1.50.4",
"@shapeshiftoss/hdwallet-trezor": "1.50.4",
"@shapeshiftoss/hdwallet-xdefi": "1.50.4",
"@shapeshiftoss/hdwallet-core": "1.50.5",
"@shapeshiftoss/hdwallet-keepkey": "1.50.5",
"@shapeshiftoss/hdwallet-keepkey-nodewebusb": "1.50.5",
"@shapeshiftoss/hdwallet-keepkey-tcp": "1.50.5",
"@shapeshiftoss/hdwallet-ledger": "1.50.5",
"@shapeshiftoss/hdwallet-native": "1.50.5",
"@shapeshiftoss/hdwallet-portis": "1.50.5",
"@shapeshiftoss/hdwallet-trezor": "1.50.5",
"@shapeshiftoss/hdwallet-xdefi": "1.50.5",
"@types/jest": "^26.0.23",
"fast-json-stable-stringify": "^2.1.0",
"jest": "^26.6.3",
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": "3.22.1",
"version": "1.50.4",
"version": "1.50.5",
"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.50.4",
"version": "1.50.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -15,7 +15,7 @@
},
"dependencies": {
"@coinbase/wallet-sdk": "^3.6.6",
"@shapeshiftoss/hdwallet-core": "1.50.4",
"@shapeshiftoss/hdwallet-core": "1.50.5",
"eth-rpc-errors": "^4.0.3",
"lodash": "^4.17.21"
},
Expand Down
1 change: 1 addition & 0 deletions packages/hdwallet-coinbase/src/coinbase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export class CoinbaseHDWallet implements core.HDWallet, core.ETHWallet {
readonly _supportsBSC = true;
readonly _supportsPolygon = true;
readonly _supportsGnosis = true;
readonly _supportsArbitrum = true;
readonly _supportsOsmosisInfo = false;
readonly _supportsOsmosis = false;
readonly _supportsBinanceInfo = false;
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.50.4",
"version": "1.50.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand Down
1 change: 1 addition & 0 deletions packages/hdwallet-core/src/ethereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ export interface ETHWallet extends ETHWalletInfo, HDWallet {
readonly _supportsOptimism: boolean;
readonly _supportsPolygon: boolean;
readonly _supportsGnosis: boolean;
readonly _supportsArbitrum: boolean;
readonly _supportsBSC: boolean;

ethGetAddress(msg: ETHGetAddress): Promise<string | null>;
Expand Down
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 @@ const slip44Table = Object.freeze({
BnbSmartChain: 60,
Polygon: 60,
Gnosis: 60,
Arbitrum: 60,
} as const);
type Slip44ByCoin<T> = T extends keyof typeof slip44Table ? typeof slip44Table[T] : number | undefined;
export function slip44ByCoin<T extends Coin>(coin: T): Slip44ByCoin<T> {
Expand Down
4 changes: 4 additions & 0 deletions packages/hdwallet-core/src/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ export function supportsGnosis(wallet: HDWallet): wallet is ETHWallet {
return isObject(wallet) && (wallet as any)._supportsGnosis;
}

export function supportsArbitrum(wallet: HDWallet): wallet is ETHWallet {
return isObject(wallet) && (wallet as any)._supportsArbitrum;
}

export function infoCosmos(info: HDWalletInfo): info is CosmosWalletInfo {
return isObject(info) && (info as any)._supportsCosmosInfo;
}
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.50.4",
"version": "1.50.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,8 +14,8 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.50.4",
"@shapeshiftoss/hdwallet-keepkey": "1.50.4"
"@shapeshiftoss/hdwallet-core": "1.50.5",
"@shapeshiftoss/hdwallet-keepkey": "1.50.5"
},
"devDependencies": {
"typescript": "^4.3.2"
Expand Down
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.50.4",
"version": "1.50.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,7 +14,7 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-keepkey": "1.50.4",
"@shapeshiftoss/hdwallet-keepkey": "1.50.5",
"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.50.4",
"version": "1.50.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,7 +14,7 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-keepkey": "1.50.4"
"@shapeshiftoss/hdwallet-keepkey": "1.50.5"
},
"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.50.4",
"version": "1.50.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,8 +14,8 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.50.4",
"@shapeshiftoss/hdwallet-keepkey": "1.50.4"
"@shapeshiftoss/hdwallet-core": "1.50.5",
"@shapeshiftoss/hdwallet-keepkey": "1.50.5"
},
"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.50.4",
"version": "1.50.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,8 +14,8 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.50.4",
"@shapeshiftoss/hdwallet-keepkey": "1.50.4",
"@shapeshiftoss/hdwallet-core": "1.50.5",
"@shapeshiftoss/hdwallet-keepkey": "1.50.5",
"axios": "^0.21.1"
},
"devDependencies": {
Expand Down
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.50.4",
"version": "1.50.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,8 +14,8 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.50.4",
"@shapeshiftoss/hdwallet-keepkey": "1.50.4"
"@shapeshiftoss/hdwallet-core": "1.50.5",
"@shapeshiftoss/hdwallet-keepkey": "1.50.5"
},
"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.50.4",
"version": "1.50.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -19,7 +19,7 @@
"@ethereumjs/tx": "^3.3.0",
"@keepkey/device-protocol": "^7.12.2",
"@shapeshiftoss/bitcoinjs-lib": "5.2.0-shapeshift.2",
"@shapeshiftoss/hdwallet-core": "1.50.4",
"@shapeshiftoss/hdwallet-core": "1.50.5",
"@shapeshiftoss/proto-tx-builder": "^0.8.0",
"bignumber.js": "^9.0.1",
"bnb-javascript-sdk-nobroadcast": "^2.16.14",
Expand Down
1 change: 1 addition & 0 deletions packages/hdwallet-keepkey/src/keepkey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,7 @@ export class KeepKeyHDWallet implements core.HDWallet, core.BTCWallet, core.ETHW
readonly _supportsBSC = true;
readonly _supportsPolygon = true;
readonly _supportsGnosis = true;
readonly _supportsArbitrum = true;
readonly _supportsBTC = true;
_supportsCosmos = true;
_supportsOsmosis = true;
Expand Down
4 changes: 2 additions & 2 deletions packages/hdwallet-keplr/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-keplr",
"version": "1.50.4",
"version": "1.50.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -15,7 +15,7 @@
},
"dependencies": {
"@shapeshiftoss/caip": "3.0.0",
"@shapeshiftoss/hdwallet-core": "1.50.4",
"@shapeshiftoss/hdwallet-core": "1.50.5",
"@shapeshiftoss/proto-tx-builder": "^0.8.0",
"@shapeshiftoss/types": "3.1.3",
"base64-js": "^1.5.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/hdwallet-ledger-webhid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-ledger-webhid",
"version": "1.50.4",
"version": "1.50.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -19,8 +19,8 @@
"@ledgerhq/hw-transport": "^6.7.0",
"@ledgerhq/hw-transport-webhid": "^6.7.0",
"@ledgerhq/live-common": "^21.8.2",
"@shapeshiftoss/hdwallet-core": "1.50.4",
"@shapeshiftoss/hdwallet-ledger": "1.50.4",
"@shapeshiftoss/hdwallet-core": "1.50.5",
"@shapeshiftoss/hdwallet-ledger": "1.50.5",
"@types/w3c-web-hid": "^1.0.2",
"typescript": "^4.3.2"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/hdwallet-ledger-webusb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-ledger-webusb",
"version": "1.50.4",
"version": "1.50.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -19,8 +19,8 @@
"@ledgerhq/hw-transport": "^6.7.0",
"@ledgerhq/hw-transport-webusb": "^6.7.0",
"@ledgerhq/live-common": "^21.8.2",
"@shapeshiftoss/hdwallet-core": "1.50.4",
"@shapeshiftoss/hdwallet-ledger": "1.50.4",
"@shapeshiftoss/hdwallet-core": "1.50.5",
"@shapeshiftoss/hdwallet-ledger": "1.50.5",
"@types/w3c-web-usb": "^1.0.4",
"typescript": "^4.3.2"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/hdwallet-ledger/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-ledger",
"version": "1.50.4",
"version": "1.50.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -17,7 +17,7 @@
"dependencies": {
"@ethereumjs/common": "^2.4.0",
"@ethereumjs/tx": "^3.3.0",
"@shapeshiftoss/hdwallet-core": "1.50.4",
"@shapeshiftoss/hdwallet-core": "1.50.5",
"base64-js": "^1.5.1",
"bchaddrjs": "^0.4.4",
"bitcoinjs-lib": "^5.1.6",
Expand Down
1 change: 1 addition & 0 deletions packages/hdwallet-ledger/src/ledger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ export class LedgerHDWallet implements core.HDWallet, core.BTCWallet, core.ETHWa
readonly _supportsBSC = false;
readonly _supportsPolygon = false;
readonly _supportsGnosis = false;
readonly _supportsArbitrum = false;

_isLedger = true;

Expand Down
4 changes: 2 additions & 2 deletions packages/hdwallet-metamask/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-metamask",
"version": "1.50.4",
"version": "1.50.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -16,7 +16,7 @@
"dependencies": {
"@metamask/detect-provider": "^1.2.0",
"@metamask/onboarding": "^1.0.1",
"@shapeshiftoss/hdwallet-core": "1.50.4",
"@shapeshiftoss/hdwallet-core": "1.50.5",
"eth-rpc-errors": "^4.0.3",
"lodash": "^4.17.21"
},
Expand Down
1 change: 1 addition & 0 deletions packages/hdwallet-metamask/src/metamask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export class MetaMaskHDWallet implements core.HDWallet, core.ETHWallet {
readonly _supportsBSC = true;
readonly _supportsPolygon = true;
readonly _supportsGnosis = true;
readonly _supportsArbitrum = true;
readonly _supportsOsmosisInfo = false;
readonly _supportsOsmosis = false;
readonly _supportsBinanceInfo = false;
Expand Down
Loading

1 comment on commit d9701ee

@vercel
Copy link

@vercel vercel bot commented on d9701ee Sep 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hdwallet – ./

hdwallet-git-master-shapeshift.vercel.app
hdwallet-shapeshift.vercel.app

Please sign in to comment.