@kheopskit/core 0.0.20 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +74 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +122 -89
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -3
- package/CHANGELOG.md +0 -123
- package/src/api/accounts.ts +0 -43
- package/src/api/appKit.ts +0 -122
- package/src/api/config.ts +0 -13
- package/src/api/ethereum/accounts.ts +0 -207
- package/src/api/ethereum/wallets.ts +0 -117
- package/src/api/index.ts +0 -3
- package/src/api/kheopskit.ts +0 -45
- package/src/api/polkadot/accounts.ts +0 -159
- package/src/api/polkadot/wallets.ts +0 -123
- package/src/api/store.ts +0 -36
- package/src/api/types.ts +0 -109
- package/src/api/wallets.ts +0 -72
- package/src/index.ts +0 -1
- package/src/utils/WalletAccountId.ts +0 -22
- package/src/utils/WalletId.ts +0 -21
- package/src/utils/createStore.ts +0 -45
- package/src/utils/getAccountAddressType.ts +0 -11
- package/src/utils/getCachedObservable.ts +0 -12
- package/src/utils/getQuery.ts +0 -72
- package/src/utils/index.ts +0 -10
- package/src/utils/isEthereumAddress.ts +0 -4
- package/src/utils/isSs58Address.ts +0 -15
- package/src/utils/isValidAddress.ts +0 -8
- package/src/utils/isWalletPlatform.ts +0 -7
- package/src/utils/logObservable.ts +0 -21
- package/src/utils/polkadotExtensions.ts +0 -21
- package/src/utils/sleep.ts +0 -2
- package/src/utils/sortAccounts.ts +0 -36
- package/src/utils/sortWallets.ts +0 -14
- package/src/utils/throwAfter.ts +0 -6
- package/tsconfig.json +0 -10
package/src/utils/sortWallets.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Wallet } from "@/api";
|
|
2
|
-
|
|
3
|
-
export const sortWallets = (w1: Wallet, w2: Wallet) => {
|
|
4
|
-
// Sort by platform first: polkadot first, then ethereum
|
|
5
|
-
if (w1.platform !== w2.platform) {
|
|
6
|
-
return w1.platform === "polkadot" ? -1 : 1;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
// Sort by name, but Talisman first
|
|
10
|
-
if (w1.name.toLowerCase() === "talisman") return -1;
|
|
11
|
-
if (w2.name.toLowerCase() === "talisman") return 1;
|
|
12
|
-
|
|
13
|
-
return w1.name.localeCompare(w2.name);
|
|
14
|
-
};
|
package/src/utils/throwAfter.ts
DELETED