Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .changeset/core-update-1775136416.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---

---

Update core dependencies: @swapkit/core@4.4.4
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
registry=https://registry.npmjs.org/
always-auth=true
//registry.npmjs.org/:_authToken=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
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,4 @@
{
"name": "swapkit-wallets",
"private": true,
"packageManager": "bun@1.3.4",
"workspaces": ["packages/*", "tools/*"],
"scripts": {
"build": "bun run --filter './packages/*' build",
"build:clean": "bun run --filter './packages/*' build:clean",
"build:ci": "bun run build && bun run build:dts",
"build:dts": "bun run ./tools/builder/dts.ts",
"lint": "bunx @biomejs/biome check --fix .",
"type-check": "bun run --filter './packages/*' type-check",
"type-check:ci": "bun run --filter './packages/*' type-check",
"test": "bun test",
"changeset": "bunx changeset",
"version-bump": "bunx changeset version",
"publish-packages": "bun run build:ci && bunx changeset publish"
},
"devDependencies": {
"@biomejs/biome": "2.3.11",
"@changesets/changelog-github": "0.6.0",
Expand All @@ -26,5 +9,22 @@
"@types/bun": "1.3.6",
"@types/node": "24.10.0",
"typescript": "5.9.3"
}
},
"name": "swapkit-wallets",
"packageManager": "bun@1.3.4",
"private": true,
"scripts": {
"build": "bun run --filter './packages/*' build",
"build:ci": "bun run build && bun run build:dts",
"build:clean": "bun run --filter './packages/*' build:clean",
"build:dts": "bun run ./tools/builder/dts.ts",
"changeset": "bunx changeset",
"lint": "bunx @biomejs/biome check --fix .",
"publish-packages": "bun run build:ci && bunx changeset publish",
"test": "bun test",
"type-check": "bun run --filter './packages/*' type-check",
"type-check:ci": "bun run --filter './packages/*' type-check",
"version-bump": "bunx changeset version"
},
"workspaces": ["packages/*", "tools/*"]
}
12 changes: 4 additions & 8 deletions packages/wallet-extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,19 +134,15 @@
"types": "./dist/types/vultisig/index.d.ts"
}
},
"files": [
"dist/"
],
"files": ["dist/"],
"homepage": "https://github.com/swapkit/wallets",
"license": "SEE LICENSE IN LICENSE",
"name": "@swapkit/wallet-extensions",
"publishConfig": {
"access": "public"
},
"publishConfig": { "access": "public" },
"repository": {
"directory": "packages/wallet-extensions",
"type": "git",
"url": "git+https://github.com/swapkit/wallets.git",
"directory": "packages/wallet-extensions"
"url": "git+https://github.com/swapkit/wallets.git"
},
"scripts": {
"build": "bun run ./build.ts",
Expand Down
9 changes: 1 addition & 8 deletions packages/wallet-extensions/src/cosmostation/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import type { Keplr } from "@keplr-wallet/types";
import {
Chain,
ChainId,
ChainToChainId,
filterSupportedChains,
SwapKitError,
WalletOption,
} from "@swapkit/helpers";
import { Chain, ChainId, ChainToChainId, filterSupportedChains, SwapKitError, WalletOption } from "@swapkit/helpers";
import { createWallet, getWalletSupportedChains } from "../core";

const cosmostationSupportedChainIds = [ChainId.Cosmos, ChainId.Kujira, ChainId.Noble, ChainId.THORChain] as const;
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-extensions/src/evm-extensions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
switchEVMWalletNetwork,
WalletOption,
} from "@swapkit/helpers";
import { createWallet, getWalletSupportedChains } from "../core";
import type { BrowserProvider, Eip1193Provider } from "ethers";
import { createWallet, getWalletSupportedChains } from "../core";

export type EVMWalletOptions =
| WalletOption.BRAVE
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-extensions/src/keepkey-bex/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AssetValue, Chain, ChainId, filterSupportedChains, SwapKitError, WalletOption } from "@swapkit/helpers";
import { createWallet, getWalletSupportedChains } from "../core";
import type { Eip1193Provider } from "ethers";
import { createWallet, getWalletSupportedChains } from "../core";
import {
getKEEPKEYAddress,
getKEEPKEYMethods,
Expand Down
9 changes: 1 addition & 8 deletions packages/wallet-extensions/src/keplr/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import {
Chain,
ChainId,
ChainToChainId,
filterSupportedChains,
SwapKitError,
WalletOption,
} from "@swapkit/helpers";
import { Chain, ChainId, ChainToChainId, filterSupportedChains, SwapKitError, WalletOption } from "@swapkit/helpers";
import { createWallet, getWalletSupportedChains } from "../core";
import { chainRegistry } from "./chainRegistry";

Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-extensions/src/onekey/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
WalletOption,
} from "@swapkit/helpers";
import { Transaction } from "@swapkit/utxo-signer";
import { createWallet, getWalletSupportedChains } from "../core";
import type { BitcoinProvider, GetAddressOptions, GetAddressResponse, SignTransactionOptions } from "sats-connect";
import { createWallet, getWalletSupportedChains } from "../core";

async function getWalletMethodsForExtension(chain: Chain) {
switch (chain) {
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-extensions/src/talisman/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
switchEVMWalletNetwork,
WalletOption,
} from "@swapkit/helpers";
import { createWallet, getWalletSupportedChains } from "../core";
import type { Eip1193Provider } from "ethers";
import { createWallet, getWalletSupportedChains } from "../core";

export const talismanWallet = createWallet({
connect: ({ addChain, supportedChains, walletType }) =>
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-extensions/src/trustwallet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
WalletOption,
} from "@swapkit/helpers";
import type { TONTransactionMessage } from "@swapkit/toolboxes/ton";
import { createWallet, getWalletSupportedChains } from "../core";
import type { Eip1193Provider } from "ethers";
import { createWallet, getWalletSupportedChains } from "../core";

export type TrustWalletTonProvider = {
adapter: { handler: (request: { method: string; params?: unknown }) => Promise<unknown>; strategy: string };
Expand Down
4 changes: 1 addition & 3 deletions packages/wallet-extensions/src/vultisig/walletHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,7 @@ export function getVultisigMethods(provider: BrowserProvider, chain: EVMChain) {
if (!contractAddress) {
throw new SwapKitError("wallet_vultisig_contract_address_not_provided");
}
const { createContract, getCreateContractTxObject, isStateChangingCall } = await import(
"@swapkit/toolboxes/evm"
);
const { createContract, getCreateContractTxObject, isStateChangingCall } = await import("@swapkit/toolboxes/evm");

const isStateChanging = isStateChangingCall({ abi, funcName });

Expand Down
12 changes: 4 additions & 8 deletions packages/wallet-hardware/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,15 @@
"types": "./dist/types/trezor/index.d.ts"
}
},
"files": [
"dist/"
],
"files": ["dist/"],
"homepage": "https://github.com/swapkit/wallets",
"license": "SEE LICENSE IN LICENSE",
"name": "@swapkit/wallet-hardware",
"publishConfig": {
"access": "public"
},
"publishConfig": { "access": "public" },
"repository": {
"directory": "packages/wallet-hardware",
"type": "git",
"url": "git+https://github.com/swapkit/wallets.git",
"directory": "packages/wallet-hardware"
"url": "git+https://github.com/swapkit/wallets.git"
},
"scripts": {
"build": "bun run ./build.ts",
Expand Down
7 changes: 1 addition & 6 deletions packages/wallet-hardware/src/ledger/clients/utxo.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import type BitcoinApp from "@ledgerhq/hw-app-btc";
import type { CreateTransactionArg } from "@ledgerhq/hw-app-btc/lib-es/createTransaction";
import { hex } from "@scure/base";
import {
type DerivationPathArray,
derivationPathToString,
getWalletFormatFor,
SwapKitError,
} from "@swapkit/helpers";
import { type DerivationPathArray, derivationPathToString, getWalletFormatFor, SwapKitError } from "@swapkit/helpers";
import type { UTXOType } from "@swapkit/toolboxes/utxo";
import type { PCZT, Transaction } from "@swapkit/utxo-signer";

Expand Down
17 changes: 5 additions & 12 deletions packages/wallet-mobile/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"author": "swapkit",
"dependencies": {
"@swapkit/helpers": "^4.12.0",
"@swapkit/toolboxes": "^4.11.2"
},
"dependencies": { "@swapkit/helpers": "^4.12.0", "@swapkit/toolboxes": "^4.11.2" },
"description": "SwapKit - Wallet Mobile",
"exports": {
".": {
Expand All @@ -13,19 +10,15 @@
"types": "./dist/types/index.d.ts"
}
},
"files": [
"dist/"
],
"files": ["dist/"],
"homepage": "https://github.com/swapkit/wallets",
"license": "SEE LICENSE IN LICENSE",
"name": "@swapkit/wallet-mobile",
"publishConfig": {
"access": "public"
},
"publishConfig": { "access": "public" },
"repository": {
"directory": "packages/wallet-mobile",
"type": "git",
"url": "git+https://github.com/swapkit/wallets.git",
"directory": "packages/wallet-mobile"
"url": "git+https://github.com/swapkit/wallets.git"
},
"scripts": {
"build": "bun run ./build.ts",
Expand Down
16 changes: 4 additions & 12 deletions packages/wallets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"@near-wallet-selector/bitget-wallet": "~10.1.0",
"@near-wallet-selector/core": "~10.1.0",
"@near-wallet-selector/modal-ui-js": "~10.1.0",
"@noble/hashes": "~2.0.0",
"@passkeys/core": "~4.1.0",
"@passkeys/react": "~3.0.1",
"@radixdlt/babylon-gateway-api-sdk": "~1.10.0",
"@radixdlt/radix-dapp-toolkit": "~2.2.0",
"@noble/hashes": "~2.0.0",
"@scure/base": "~2.0.0",
"@scure/bip39": "~2.0.0",
"@swapkit/helpers": "^4.12.0",
Expand Down Expand Up @@ -204,20 +204,12 @@
"types": "./dist/types/xaman/index.d.ts"
}
},
"files": [
"dist/"
],
"files": ["dist/"],
"homepage": "https://github.com/swapkit/wallets",
"license": "SEE LICENSE IN LICENSE",
"name": "@swapkit/wallets",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/swapkit/wallets.git",
"directory": "packages/wallets"
},
"publishConfig": { "access": "public" },
"repository": { "directory": "packages/wallets", "type": "git", "url": "git+https://github.com/swapkit/wallets.git" },
"scripts": {
"build": "bun run ./build.ts",
"build:clean": "rm -rf dist && bun run ./build.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/wallets/src/passkeys/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
} from "@swapkit/helpers";
import type { SolanaProvider } from "@swapkit/toolboxes/solana";
import { Transaction } from "@swapkit/utxo-signer";
import { createWallet, getWalletSupportedChains } from "../core";
import {
AddressPurpose,
BitcoinNetworkType,
Expand All @@ -23,6 +22,7 @@ import {
signTransaction as satsSignTransaction,
} from "sats-connect";
import { match } from "ts-pattern";
import { createWallet, getWalletSupportedChains } from "../core";

async function getPasskeyWallet() {
const appId = SKConfig.get("apiKeys").passkeys;
Expand Down
9 changes: 1 addition & 8 deletions packages/wallets/src/radix/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import {
type AssetValue,
Chain,
filterSupportedChains,
SKConfig,
SwapKitError,
WalletOption,
} from "@swapkit/helpers";
import { type AssetValue, Chain, filterSupportedChains, SKConfig, SwapKitError, WalletOption } from "@swapkit/helpers";
import { createWallet, getWalletSupportedChains } from "../core";

export const radixWallet = createWallet({
Expand Down
5 changes: 1 addition & 4 deletions packages/wallets/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ export async function loadWallet<W extends WalletOption>(walletOption: W): Promi
.with(WalletOption.PASSKEYS, async () => (await import("./passkeys")).passkeysWallet)
.with(WalletOption.PETRA, async () => (await import("@swapkit/wallet-extensions/petra")).petraWallet)
.with(WalletOption.PHANTOM, async () => (await import("@swapkit/wallet-extensions/phantom")).phantomWallet)
.with(
WalletOption.POLKADOT_JS,
async () => (await import("@swapkit/wallet-extensions/polkadotjs")).polkadotWallet,
)
.with(WalletOption.POLKADOT_JS, async () => (await import("@swapkit/wallet-extensions/polkadotjs")).polkadotWallet)
.with(WalletOption.RADIX_WALLET, async () => (await import("./radix")).radixWallet)
.with(WalletOption.TALISMAN, async () => (await import("@swapkit/wallet-extensions/talisman")).talismanWallet)
.with(WalletOption.TRONLINK, async () => (await import("@swapkit/wallet-extensions/tronlink")).tronlinkWallet)
Expand Down
2 changes: 1 addition & 1 deletion packages/wallets/src/walletconnect/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import {
import type { ThorchainDepositParams } from "@swapkit/toolboxes/cosmos";
import type { NearSigner } from "@swapkit/toolboxes/near";
import type { TronSignedTransaction, TronSigner, TronTransaction } from "@swapkit/toolboxes/tron";
import { createWallet, getWalletSupportedChains } from "../core";
import type { WalletConnectModal } from "@walletconnect/modal";
import type { SignClient } from "@walletconnect/sign-client";
import type { SessionTypes, SignClientTypes } from "@walletconnect/types";
import { createWallet, getWalletSupportedChains } from "../core";
import {
DEFAULT_APP_METADATA,
DEFAULT_COSMOS_METHODS,
Expand Down
2 changes: 1 addition & 1 deletion packages/wallets/src/xaman/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Chain, filterSupportedChains, SKConfig, SwapKitError, WalletOption } from "@swapkit/helpers";
import { createWallet, getWalletSupportedChains } from "../core";
import { Xumm } from "xumm";
import { createWallet, getWalletSupportedChains } from "../core";
import { getWalletForChain } from "./helpers";
import type { XamanConfig } from "./types";
import { connectXamanWallet as connectXamanWalletMethod } from "./walletMethods";
Expand Down
9 changes: 2 additions & 7 deletions tools/builder/dts.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { $, Glob } from "bun";
import { existsSync, mkdirSync, readdirSync, symlinkSync } from "node:fs";
import { join, resolve } from "node:path";
import { $ } from "bun";

/**
* Bun stores dependencies in node_modules/.bun/ instead of hoisting them
Expand Down Expand Up @@ -91,12 +91,7 @@ const dtsPlugin = {
},
};

export const orderedPackages = [
"wallet-extensions",
"wallet-hardware",
"wallet-mobile",
"wallets",
];
export const orderedPackages = ["wallet-extensions", "wallet-hardware", "wallet-mobile", "wallets"];

// Symlink .bun/ deps to standard node_modules/ paths so tsc can resolve them
console.info("Symlinking .bun/ dependencies for tsc compatibility...");
Expand Down
6 changes: 1 addition & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
{
"compilerOptions": { "types": ["@types/bun"] },
"exclude": ["dist"],
"extends": "./tools/typescript/base.json"
}
{ "compilerOptions": { "types": ["@types/bun"] }, "exclude": ["dist"], "extends": "./tools/typescript/base.json" }