@getpara/web-sdk 3.0.0-alpha.0 → 3.0.0-alpha.1
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.ts +1 -1
- package/dist/index.js +3 -1
- package/dist/utils/chainIcons.d.ts +2 -0
- package/dist/utils/chainIcons.js +41 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Para as ParaWeb } from './ParaWeb.js';
|
|
|
3
3
|
import ParaCore from '@getpara/core-sdk';
|
|
4
4
|
export { type StorageUtils, type ConstructorOpts, Environment, type OnRampConfig, type OnRampAssets, } from '@getpara/core-sdk';
|
|
5
5
|
export { createCredential, generateSignature, parseCredentialCreationRes } from './cryptography/webAuth.js';
|
|
6
|
-
export { truncateEthAddress, isPasskeySupported, offRampSend } from './utils/index.js';
|
|
6
|
+
export { truncateEthAddress, isPasskeySupported, offRampSend, getChainLogoUrl, getCurrencyLogoUrl } from './utils/index.js';
|
|
7
7
|
export * from './utils/isMobile.js';
|
|
8
8
|
export * from './types/index.js';
|
|
9
9
|
export { ParaWeb, ParaCore };
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
Environment
|
|
8
8
|
} from "@getpara/core-sdk";
|
|
9
9
|
import { createCredential, generateSignature, parseCredentialCreationRes } from "./cryptography/webAuth.js";
|
|
10
|
-
import { truncateEthAddress, isPasskeySupported, offRampSend } from "./utils/index.js";
|
|
10
|
+
import { truncateEthAddress, isPasskeySupported, offRampSend, getChainLogoUrl, getCurrencyLogoUrl } from "./utils/index.js";
|
|
11
11
|
export * from "./utils/isMobile.js";
|
|
12
12
|
export * from "./types/index.js";
|
|
13
13
|
var src_default = ParaWeb;
|
|
@@ -18,6 +18,8 @@ export {
|
|
|
18
18
|
createCredential,
|
|
19
19
|
src_default as default,
|
|
20
20
|
generateSignature,
|
|
21
|
+
getChainLogoUrl,
|
|
22
|
+
getCurrencyLogoUrl,
|
|
21
23
|
isPasskeySupported,
|
|
22
24
|
offRampSend,
|
|
23
25
|
parseCredentialCreationRes,
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../chunk-YJOFEY2L.js";
|
|
3
|
+
const LLAMA_CDN = "https://icons.llamao.fi/icons/chains/rsz_";
|
|
4
|
+
const CHAIN_ID_TO_LLAMA = {
|
|
5
|
+
"56": "bsc",
|
|
6
|
+
"100": "gnosis",
|
|
7
|
+
"324": "zksync-era",
|
|
8
|
+
"1101": "polygon-zkevm"
|
|
9
|
+
};
|
|
10
|
+
const CURRENCY_TO_LLAMA = {
|
|
11
|
+
ETH: "ethereum",
|
|
12
|
+
BNB: "bsc",
|
|
13
|
+
MATIC: "polygon",
|
|
14
|
+
POL: "polygon",
|
|
15
|
+
AVAX: "avalanche",
|
|
16
|
+
FTM: "fantom",
|
|
17
|
+
CELO: "celo",
|
|
18
|
+
xDAI: "gnosis",
|
|
19
|
+
CRO: "cronos",
|
|
20
|
+
GLMR: "moonbeam",
|
|
21
|
+
MOVR: "moonriver",
|
|
22
|
+
MNT: "mantle",
|
|
23
|
+
ONE: "harmony",
|
|
24
|
+
METIS: "metis",
|
|
25
|
+
KAVA: "kava",
|
|
26
|
+
FUSE: "fuse",
|
|
27
|
+
ATOM: "cosmos"
|
|
28
|
+
};
|
|
29
|
+
function getChainLogoUrl(chainId, chainName) {
|
|
30
|
+
var _a;
|
|
31
|
+
const name = (_a = CHAIN_ID_TO_LLAMA[chainId]) != null ? _a : chainName.toLowerCase().replace(/\s+/g, "-");
|
|
32
|
+
return `${LLAMA_CDN}${name}.jpg`;
|
|
33
|
+
}
|
|
34
|
+
function getCurrencyLogoUrl(symbol) {
|
|
35
|
+
const name = CURRENCY_TO_LLAMA[symbol];
|
|
36
|
+
return name ? `${LLAMA_CDN}${name}.jpg` : null;
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
getChainLogoUrl,
|
|
40
|
+
getCurrencyLogoUrl
|
|
41
|
+
};
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/web-sdk",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.1",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@getpara/core-sdk": "3.0.0-alpha.
|
|
6
|
-
"@getpara/user-management-client": "3.0.0-alpha.
|
|
5
|
+
"@getpara/core-sdk": "3.0.0-alpha.1",
|
|
6
|
+
"@getpara/user-management-client": "3.0.0-alpha.1",
|
|
7
7
|
"base64url": "^3.0.1",
|
|
8
8
|
"buffer": "6.0.3",
|
|
9
9
|
"cbor-web": "^9.0.2",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dist",
|
|
30
30
|
"package.json"
|
|
31
31
|
],
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "839d225579de67feb5be4da225d232290b2a2a04",
|
|
33
33
|
"main": "dist/index.js",
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "rm -rf dist && yarn typegen && node ./scripts/build.mjs && yarn post-build",
|