@chainrails/common 0.0.1 → 0.0.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(t,A){typeof exports=="object"&&typeof module<"u"?A(exports):typeof define=="function"&&define.amd?define(["exports"],A):(t=typeof globalThis<"u"?globalThis:t||self,A(t.Chainrails={}))})(this,(function(t){"use strict";var A=(e=>(e.ARBITRUM="ARBITRUM_MAINNET",e.ARBITRUM_TESTNET="ARBITRUM_TESTNET",e.BASE="BASE_MAINNET",e.BASE_TESTNET="BASE_TESTNET",e.AVALANCHE="AVALANCHE_MAINNET",e.AVALANCHE_TESTNET="AVALANCHE_TESTNET",e))(A||{}),i=(e=>(e.USDC="USDC",e))(i||{});class T{constructor({api_key:E}){this.api_key=E}static config(E){if(!T.app){if(!E)throw new Error("Please provide an api_key");T.app=new T(E)}return E&&(this.app.api_key=E.api_key),T.app}static getApiKey(){return T.app.api_key}}t.
|
|
1
|
+
(function(t,A){typeof exports=="object"&&typeof module<"u"?A(exports):typeof define=="function"&&define.amd?define(["exports"],A):(t=typeof globalThis<"u"?globalThis:t||self,A(t.Chainrails={}))})(this,(function(t){"use strict";var A=(e=>(e.ARBITRUM="ARBITRUM_MAINNET",e.ARBITRUM_TESTNET="ARBITRUM_TESTNET",e.BASE="BASE_MAINNET",e.BASE_TESTNET="BASE_TESTNET",e.AVALANCHE="AVALANCHE_MAINNET",e.AVALANCHE_TESTNET="AVALANCHE_TESTNET",e))(A||{}),i=(e=>(e.USDC="USDC",e))(i||{});class T{constructor({api_key:E}){this.api_key=E}static config(E){if(!T.app){if(!E)throw new Error("Please provide an api_key");T.app=new T(E)}return E&&(this.app.api_key=E.api_key),T.app}static getApiKey(){return T.app.api_key}}t.Chainrails=T,t.chains=A,t.tokens=i,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/index.d.ts
CHANGED
package/dist/src/app/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
interface
|
|
1
|
+
interface ChainrailsConfig {
|
|
2
2
|
api_key: string;
|
|
3
3
|
}
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class Chainrails {
|
|
5
5
|
private static app;
|
|
6
6
|
api_key: string;
|
|
7
7
|
private constructor();
|
|
8
|
-
static config(props?:
|
|
8
|
+
static config(props?: ChainrailsConfig): Chainrails;
|
|
9
9
|
static getApiKey(): string;
|
|
10
10
|
}
|
|
11
11
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainrails/common",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"main": "./dist/chainrails-common.umd.js",
|
|
6
6
|
"module": "./dist/chainrails-common.es.mjs",
|
|
7
7
|
"license": "MIT",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"exports": {
|
|
26
26
|
".": {
|
|
27
|
-
"types": "./dist/
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
28
|
"import": "./dist/chainrails-common.es.mjs",
|
|
29
29
|
"require": "./dist/chainrails-common.umd.js"
|
|
30
30
|
},
|