rango-sdk 0.0.5 → 0.0.6

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/README.md CHANGED
@@ -1,16 +1,10 @@
1
- # Rango Exchange SDK (BETA)
1
+ # Rango Exchange SDK
2
2
 
3
3
  [![npm version](https://badge.fury.io/js/rango-sdk.svg)](https://badge.fury.io/js/rango-sdk)
4
4
  [![license](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://github.com/rango-exchange/rango-sdk/blob/master/LICENSE)
5
5
 
6
-
7
- This is the first phase of Rango SDK which only wraps Rest API calls. In the next phase, we will handle connecting to the wallet providers.
8
-
9
6
  > **WARNING:** The Rango SDK is still beta. Please use it on your own risk.
10
7
 
11
- > **WARNING:** The Rango SDK has not stabilized yet, and we might make some breaking changes.
12
-
13
-
14
8
  ## Installation
15
9
 
16
10
  ```shell
@@ -1,12 +1,31 @@
1
1
  import type { Asset } from './common';
2
+ import { TransactionType } from './transactions';
2
3
  /**
3
- * Blockchain information
4
+ * Extra information specific to this type of blockchain
5
+ *
6
+ * @property {TransactionType} tyoe - Type of the blockchain
7
+ * @property {string | null} rpc - Suggested RPC url for the EVM blockchains
8
+ * @property {number | null} chainId - Chain ID for the EVM blockchains
9
+ *
10
+ */
11
+ export declare type BlockchainExtraInfo = {
12
+ type: TransactionType;
13
+ rpc: string | null;
14
+ chainId: number | null;
15
+ };
16
+ /**
17
+ * Blockchain Meta Information
4
18
  *
5
19
  * @property {string} name - Unique name of blockchain, this field is used in all endpoints as the identifier
6
20
  * @property {number} defaultDecimals - The default decimals of blockchain, do not use it in computations, use Token.decimals instead
7
21
  * @property {Asset[]} feeAssets - List of assets that can be used as fee in this blockchain
8
22
  * @property {string[]} addressPatterns - List of all regex patterns for wallet addresses of this blockchain, can be
9
23
  * used for input validation, example: [ "^(0x)[0-9A-Fa-f]{40}$" ]
24
+ * @property {string} logo - Logo of the blockchain
25
+ * @property {string} displayName - Display name for the blockchain
26
+ * @property {string} color - Suggested color for the blockchain
27
+ * @property {boolean} enabled - Is blockchain enabled or not
28
+ * @property {BlockchainExtraInfo} - Chain specific information for this blockchain
10
29
  *
11
30
  */
12
31
  export declare type BlockchainMeta = {
@@ -14,6 +33,11 @@ export declare type BlockchainMeta = {
14
33
  defaultDecimals: number;
15
34
  feeAssets: Asset[];
16
35
  addressPatterns: string[];
36
+ logo: string;
37
+ displayName: string;
38
+ color: string;
39
+ enabled: boolean;
40
+ info: BlockchainExtraInfo;
17
41
  };
18
42
  /**
19
43
  * 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;AAErC;;;;;;;;;GASG;AACH,oBAAY,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,eAAe,EAAE,MAAM,CAAA;IACvB,SAAS,EAAE,KAAK,EAAE,CAAA;IAClB,eAAe,EAAE,MAAM,EAAE,CAAA;CAC1B,CAAA;AAED;;GAEG;AACH,oBAAY,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,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;CA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AG,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.5",
3
+ "version": "0.0.6",
4
4
  "description": "Rango Exchange SDK for dApps",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib",