@reyaxyz/sdk 0.14.0 → 0.15.0

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.js CHANGED
@@ -19,4 +19,5 @@ __exportStar(require("./services/margin-accounts"), exports);
19
19
  __exportStar(require("./services/money-flows"), exports);
20
20
  __exportStar(require("./services/orders"), exports);
21
21
  __exportStar(require("./services/token"), exports);
22
+ __exportStar(require("./utils/network"), exports);
22
23
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,6DAA2C;AAC3C,yDAAuC;AACvC,oDAAkC;AAClC,mDAAiC","sourcesContent":["export * from './services/lp';\nexport * from './services/margin-accounts';\nexport * from './services/money-flows';\nexport * from './services/orders';\nexport * from './services/token';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,6DAA2C;AAC3C,yDAAuC;AACvC,oDAAkC;AAClC,mDAAiC;AACjC,kDAAgC","sourcesContent":["export * from './services/lp';\nexport * from './services/margin-accounts';\nexport * from './services/money-flows';\nexport * from './services/orders';\nexport * from './services/token';\nexport * from './utils/network';\n"]}
@@ -3,4 +3,5 @@ export * from './services/margin-accounts';
3
3
  export * from './services/money-flows';
4
4
  export * from './services/orders';
5
5
  export * from './services/token';
6
+ export * from './utils/network';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ReyaChainId } from '@reyaxyz/common';
2
+ export declare function getReyaNetwork(env: 'production' | 'test'): ReyaChainId;
3
+ //# sourceMappingURL=network.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network.d.ts","sourceRoot":"/","sources":["utils/network.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,wBAAgB,cAAc,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,GAAG,WAAW,CAKtE"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getReyaNetwork = void 0;
4
+ var common_1 = require("@reyaxyz/common");
5
+ function getReyaNetwork(env) {
6
+ if (env === 'production')
7
+ return common_1.ReyaChainId.reyaNetwork;
8
+ if (env === 'test')
9
+ return common_1.ReyaChainId.reyaCronos;
10
+ throw new Error('Unknown error passed');
11
+ }
12
+ exports.getReyaNetwork = getReyaNetwork;
13
+ //# sourceMappingURL=network.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network.js","sourceRoot":"/","sources":["utils/network.ts"],"names":[],"mappings":";;;AAAA,0CAA8C;AAE9C,SAAgB,cAAc,CAAC,GAA0B;IACvD,IAAI,GAAG,KAAK,YAAY;QAAE,OAAO,oBAAW,CAAC,WAAW,CAAC;IACzD,IAAI,GAAG,KAAK,MAAM;QAAE,OAAO,oBAAW,CAAC,UAAU,CAAC;IAElD,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAC1C,CAAC;AALD,wCAKC","sourcesContent":["import { ReyaChainId } from '@reyaxyz/common';\n\nexport function getReyaNetwork(env: 'production' | 'test'): ReyaChainId {\n if (env === 'production') return ReyaChainId.reyaNetwork;\n if (env === 'test') return ReyaChainId.reyaCronos;\n\n throw new Error('Unknown error passed');\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reyaxyz/sdk",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -29,10 +29,10 @@
29
29
  "generate:coverage-badges": "npx istanbul-badges-readme --silent"
30
30
  },
31
31
  "dependencies": {
32
- "@reyaxyz/common": "0.3.0",
32
+ "@reyaxyz/common": "0.4.0",
33
33
  "bignumber.js": "^9.1.2",
34
34
  "ethers": "6.9.0"
35
35
  },
36
36
  "packageManager": "pnpm@8.10.4",
37
- "gitHead": "037cbc040faa91d6148afb21e36a739a017cef89"
37
+ "gitHead": "97ba4c6bdb6da053613cdc311179c442a8dbb487"
38
38
  }
package/src/index.ts CHANGED
@@ -3,3 +3,4 @@ export * from './services/margin-accounts';
3
3
  export * from './services/money-flows';
4
4
  export * from './services/orders';
5
5
  export * from './services/token';
6
+ export * from './utils/network';
@@ -0,0 +1,8 @@
1
+ import { ReyaChainId } from '@reyaxyz/common';
2
+
3
+ export function getReyaNetwork(env: 'production' | 'test'): ReyaChainId {
4
+ if (env === 'production') return ReyaChainId.reyaNetwork;
5
+ if (env === 'test') return ReyaChainId.reyaCronos;
6
+
7
+ throw new Error('Unknown error passed');
8
+ }