@chainrails/common 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.
@@ -18,7 +18,7 @@ class t {
18
18
  return t.app.env;
19
19
  }
20
20
  static getBaseUrl() {
21
- switch (this.app.env) {
21
+ switch (t.app.env) {
22
22
  case "production":
23
23
  return "https://api.chainrails.io/api/v1";
24
24
  case "staging":
@@ -18,7 +18,7 @@ class t {
18
18
  return t.app.env;
19
19
  }
20
20
  static getBaseUrl() {
21
- switch (this.app.env) {
21
+ switch (t.app.env) {
22
22
  case "production":
23
23
  return "https://api.chainrails.io/api/v1";
24
24
  case "staging":
@@ -1 +1 @@
1
- (function(t,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(t=typeof globalThis<"u"?globalThis:t||self,i(t.Chainrails={}))})(this,(function(t){"use strict";var i=(e=>(e.ARBITRUM="ARBITRUM_MAINNET",e.ARBITRUM_TESTNET="ARBITRUM_TESTNET",e.AVALANCHE="AVALANCHE_MAINNET",e.AVALANCHE_TESTNET="AVALANCHE_TESTNET",e.BASE="BASE_MAINNET",e.BASE_TESTNET="BASE_TESTNET",e.BSC="BSC_MAINNET",e.ETHEREUM="ETHEREUM_MAINNET",e.ETHEREUM_TESTNET="ETHEREUM_TESTNET",e.STARKNET="STARKNET_MAINNET",e))(i||{}),r=(e=>(e.USDC="USDC",e))(r||{}),n=(e=>(e.PRODUCTION="production",e.STAGING="staging",e))(n||{});class T{constructor({api_key:E,env:A}){this.api_key=E,this.env=A??n.PRODUCTION}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,E.env!==void 0&&(this.app.env=E.env)),T.app}static getApiKey(){return T.app.api_key}static getEnv(){return T.app.env}static getBaseUrl(){switch(this.app.env){case"production":return"https://api.chainrails.io/api/v1";case"staging":return"https://dev.chainrails.io/api/v1";case"internal":return"todo";default:return"https://api.chainrails.io/api/v1"}}}t.Chainrails=T,t.chains=i,t.environment=n,t.tokens=r,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(t,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(t=typeof globalThis<"u"?globalThis:t||self,i(t.Chainrails={}))})(this,(function(t){"use strict";var i=(e=>(e.ARBITRUM="ARBITRUM_MAINNET",e.ARBITRUM_TESTNET="ARBITRUM_TESTNET",e.AVALANCHE="AVALANCHE_MAINNET",e.AVALANCHE_TESTNET="AVALANCHE_TESTNET",e.BASE="BASE_MAINNET",e.BASE_TESTNET="BASE_TESTNET",e.BSC="BSC_MAINNET",e.ETHEREUM="ETHEREUM_MAINNET",e.ETHEREUM_TESTNET="ETHEREUM_TESTNET",e.STARKNET="STARKNET_MAINNET",e))(i||{}),A=(e=>(e.USDC="USDC",e))(A||{}),n=(e=>(e.PRODUCTION="production",e.STAGING="staging",e))(n||{});class T{constructor({api_key:E,env:r}){this.api_key=E,this.env=r??n.PRODUCTION}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,E.env!==void 0&&(this.app.env=E.env)),T.app}static getApiKey(){return T.app.api_key}static getEnv(){return T.app.env}static getBaseUrl(){switch(T.app.env){case"production":return"https://api.chainrails.io/api/v1";case"staging":return"https://dev.chainrails.io/api/v1";case"internal":return"todo";default:return"https://api.chainrails.io/api/v1"}}}t.Chainrails=T,t.chains=i,t.environment=n,t.tokens=A,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chainrails/common",
3
3
  "sideEffects": false,
4
- "version": "0.0.5",
4
+ "version": "0.0.6",
5
5
  "main": "./dist/chainrails-common.umd.js",
6
6
  "module": "./dist/chainrails-common.es.mjs",
7
7
  "license": "MIT",