rango-sdk 0.0.6 → 0.0.7
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/lib/types/api/meta.d.ts +85 -12
- package/lib/types/api/meta.d.ts.map +1 -1
- package/package.json +3 -3
package/lib/types/api/meta.d.ts
CHANGED
|
@@ -1,17 +1,84 @@
|
|
|
1
1
|
import type { Asset } from './common';
|
|
2
2
|
import { TransactionType } from './transactions';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* EVM Chain Info
|
|
5
5
|
*
|
|
6
|
-
* @property {
|
|
7
|
-
* @property {string
|
|
8
|
-
* @property {
|
|
6
|
+
* @property {string} chainName - Chain name, e.g. Polygon Mainnet
|
|
7
|
+
* @property {name: string, symbol: string, decimals: null} nativeCurrency
|
|
8
|
+
* @property {string[]} rpcUrls - e.g. "https://polygon-rpc.com"
|
|
9
|
+
* @property {string[]} blockExplorerUrls - e.g. "https://polygonscan.com"
|
|
10
|
+
* @property {string} addressUrl - Explorer address base url for this blockchain,
|
|
11
|
+
* e.g. "https://bscscan.com/address/{wallet}"
|
|
12
|
+
* @property {string} transactionUrl - Explorer transaction base url for this blockchain,
|
|
13
|
+
* e.g. "https://bscscan.com/tx/{txHash}"
|
|
9
14
|
*
|
|
10
15
|
*/
|
|
11
|
-
export declare type
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
export declare type EVMChainInfo = {
|
|
17
|
+
chainName: string;
|
|
18
|
+
nativeCurrency: {
|
|
19
|
+
name: string;
|
|
20
|
+
symbol: string;
|
|
21
|
+
decimals: number;
|
|
22
|
+
};
|
|
23
|
+
rpcUrls: string[];
|
|
24
|
+
blockExplorerUrls: string[];
|
|
25
|
+
addressUrl: string;
|
|
26
|
+
transactionUrl: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Cosmos Chain Info - Used for adding experimental chains to keplr if needed
|
|
30
|
+
*
|
|
31
|
+
* @see https://github.com/osmosis-labs/osmosis-frontend/blob/0b88e39740cb087be576f464bfcd6cc2971ed2fd/packages/web/config/chain-infos.ts
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export declare type CosmosChainInfo = {
|
|
35
|
+
experimental: boolean;
|
|
36
|
+
rpc: string;
|
|
37
|
+
rest: string;
|
|
38
|
+
cosmostationLcdUrl: string | null;
|
|
39
|
+
cosmostationApiUrl: string | null;
|
|
40
|
+
cosmostationDenomTracePath: string;
|
|
41
|
+
mintScanName: string | null;
|
|
42
|
+
chainName: string;
|
|
43
|
+
stakeCurrency: {
|
|
44
|
+
coinDenom: string;
|
|
45
|
+
coinMinimalDenom: string;
|
|
46
|
+
coinDecimals: number;
|
|
47
|
+
coinGeckoId: string;
|
|
48
|
+
coinImageUrl: string;
|
|
49
|
+
};
|
|
50
|
+
bip44: {
|
|
51
|
+
coinType: number;
|
|
52
|
+
};
|
|
53
|
+
bech32Config: {
|
|
54
|
+
bech32PrefixAccAddr: string;
|
|
55
|
+
bech32PrefixAccPub: string;
|
|
56
|
+
bech32PrefixValAddr: string;
|
|
57
|
+
bech32PrefixValPub: string;
|
|
58
|
+
bech32PrefixConsAddr: string;
|
|
59
|
+
bech32PrefixConsPub: string;
|
|
60
|
+
};
|
|
61
|
+
currencies: {
|
|
62
|
+
coinDenom: string;
|
|
63
|
+
coinMinimalDenom: string;
|
|
64
|
+
coinDecimals: number;
|
|
65
|
+
coinGeckoId: string;
|
|
66
|
+
coinImageUrl: string;
|
|
67
|
+
}[];
|
|
68
|
+
feeCurrencies: {
|
|
69
|
+
coinDenom: string;
|
|
70
|
+
coinMinimalDenom: string;
|
|
71
|
+
coinDecimals: number;
|
|
72
|
+
coinGeckoId: string;
|
|
73
|
+
coinImageUrl: string;
|
|
74
|
+
}[];
|
|
75
|
+
features: string[];
|
|
76
|
+
explorerUrlToTx: string;
|
|
77
|
+
gasPriceStep: {
|
|
78
|
+
low: number;
|
|
79
|
+
average: number;
|
|
80
|
+
high: number;
|
|
81
|
+
} | null;
|
|
15
82
|
};
|
|
16
83
|
/**
|
|
17
84
|
* Blockchain Meta Information
|
|
@@ -23,21 +90,27 @@ export declare type BlockchainExtraInfo = {
|
|
|
23
90
|
* used for input validation, example: [ "^(0x)[0-9A-Fa-f]{40}$" ]
|
|
24
91
|
* @property {string} logo - Logo of the blockchain
|
|
25
92
|
* @property {string} displayName - Display name for the blockchain
|
|
93
|
+
* @property {string} shortName - Short name for the blockchain
|
|
26
94
|
* @property {string} color - Suggested color for the blockchain
|
|
27
|
-
* @property {boolean} enabled - Is blockchain enabled or not
|
|
28
|
-
* @property {
|
|
95
|
+
* @property {boolean} enabled - Is blockchain enabled or not in Rango
|
|
96
|
+
* @property {TransactionType} type - Type of the blockchain
|
|
97
|
+
* @property {string | null} chainId - e.g. "0xa86a" for Avax, "osmosis-1" for Osmosis, etc.
|
|
98
|
+
* @property {EVMChainInfo | CosmosChainInfo | null} info - Chain specific information
|
|
29
99
|
*
|
|
30
100
|
*/
|
|
31
101
|
export declare type BlockchainMeta = {
|
|
32
102
|
name: string;
|
|
103
|
+
shortName: string;
|
|
104
|
+
displayName: string;
|
|
33
105
|
defaultDecimals: number;
|
|
34
106
|
feeAssets: Asset[];
|
|
35
107
|
addressPatterns: string[];
|
|
36
108
|
logo: string;
|
|
37
|
-
displayName: string;
|
|
38
109
|
color: string;
|
|
39
110
|
enabled: boolean;
|
|
40
|
-
|
|
111
|
+
type: TransactionType;
|
|
112
|
+
chainId: string | null;
|
|
113
|
+
info: EVMChainInfo | CosmosChainInfo | null;
|
|
41
114
|
};
|
|
42
115
|
/**
|
|
43
116
|
* Metadata of Swapper
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/types/api/meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD
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EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,oBAAY,KAAK,GAAG;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,eAAe,EAAE,OAAO,CAAA;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B,CAAA;AAED;;;;;;;;GAQG;AACH,oBAAY,YAAY,GAAG;IACzB,WAAW,EAAE,cAAc,EAAE,CAAA;IAC7B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,aAAa,EAAE,KAAK,EAAE,CAAA;IACtB,QAAQ,EAAE,cAAc,EAAE,CAAA;CAC3B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rango-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "Rango Exchange SDK for dApps",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"scripts": {
|
|
16
16
|
"test": "jest --config jestconfig.json",
|
|
17
17
|
"build": "tsc",
|
|
18
|
-
"format": "prettier --write ./src",
|
|
19
18
|
"lint": "eslint */**/*.{js,ts} --quiet --fix",
|
|
20
|
-
"semantic-release": "semantic-release"
|
|
19
|
+
"semantic-release": "semantic-release",
|
|
20
|
+
"format": "prettier --write './**/*.{js,jsx,ts,tsx,css,md,json}' --config ./.prettierrc"
|
|
21
21
|
},
|
|
22
22
|
"keywords": [
|
|
23
23
|
"Rango Exchange",
|