hermes-swap 0.0.1

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 ADDED
@@ -0,0 +1,24 @@
1
+ # hermes
2
+
3
+ [![NPM version](https://img.shields.io/npm/v/hermes.svg?style=flat)](https://npmjs.com/package/hermes)
4
+ [![NPM downloads](http://img.shields.io/npm/dm/hermes.svg?style=flat)](https://npmjs.com/package/hermes)
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ $ yarn install
10
+ ```
11
+
12
+ ```bash
13
+ $ npm run dev
14
+ $ npm run build
15
+ ```
16
+
17
+ ## Options
18
+
19
+ TODO
20
+
21
+ ## LICENSE
22
+
23
+ MIT
24
+ # hermes
@@ -0,0 +1,9 @@
1
+ import { IExpectParams, ISwapParams, IBridgeParams, ISwapAndBridgeParams, IReceipt } from './types';
2
+ declare class Hermes {
3
+ constructor();
4
+ expect(params: IExpectParams): Promise<bigint>;
5
+ swap(params: ISwapParams): Promise<IReceipt>;
6
+ bridge(params: IBridgeParams): Promise<IReceipt>;
7
+ swapAndBridge(params: ISwapAndBridgeParams): Promise<IReceipt>;
8
+ }
9
+ export default Hermes;
@@ -0,0 +1,52 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/index.ts
20
+ var src_exports = {};
21
+ __export(src_exports, {
22
+ default: () => src_default
23
+ });
24
+ module.exports = __toCommonJS(src_exports);
25
+ var Hermes = class {
26
+ constructor() {
27
+ }
28
+ expect(params) {
29
+ return Promise.resolve(BigInt(0));
30
+ }
31
+ swap(params) {
32
+ const receipt = {
33
+ fromToken: params.fromToken,
34
+ toToken: params.toToken,
35
+ amount: params.amount
36
+ };
37
+ return Promise.resolve(receipt);
38
+ }
39
+ bridge(params) {
40
+ const receipt = {
41
+ fromToken: params.fromToken,
42
+ toToken: params.toToken,
43
+ amount: params.amount
44
+ };
45
+ return Promise.resolve(receipt);
46
+ }
47
+ swapAndBridge(params) {
48
+ const receipt = {};
49
+ return Promise.resolve(receipt);
50
+ }
51
+ };
52
+ var src_default = Hermes;
@@ -0,0 +1,24 @@
1
+ export interface IExpectParams {
2
+ fromToken: string;
3
+ toToken: string;
4
+ amount: bigint;
5
+ }
6
+ export interface ISwapParams {
7
+ fromToken: string;
8
+ toToken: string;
9
+ amount: bigint;
10
+ }
11
+ export interface IBridgeParams {
12
+ fromToken: string;
13
+ toToken: string;
14
+ amount: bigint;
15
+ }
16
+ export interface ISwapAndBridgeParams {
17
+ swapParams: ISwapParams;
18
+ bridgeParams: IBridgeParams;
19
+ }
20
+ export interface IReceipt {
21
+ fromToken?: string;
22
+ toToken?: string;
23
+ amount?: bigint;
24
+ }
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // src/types.ts
16
+ var types_exports = {};
17
+ module.exports = __toCommonJS(types_exports);
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "hermes-swap",
3
+ "version": "0.0.1",
4
+ "description": "A TypeScript utility library for value guard operations",
5
+ "main": "dist/cjs/index.js",
6
+ "types": "dist/cjs/index.d.ts",
7
+ "scripts": {
8
+ "dev": "father dev",
9
+ "build": "father build",
10
+ "build:deps": "father prebundle",
11
+ "prepublishOnly": "father doctor && npm run build",
12
+ "test": "jest",
13
+ "test:watch": "jest --watch",
14
+ "test:coverage": "jest --coverage",
15
+ "publish": "npm run build && npm publish"
16
+ },
17
+ "keywords": [
18
+ "typescript",
19
+ "value-guard",
20
+ "utility",
21
+ "validation"
22
+ ],
23
+ "author": "a779387850",
24
+ "license": "MIT",
25
+ "files": [
26
+ "dist",
27
+ "compiled"
28
+ ],
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "devDependencies": {
33
+ "@types/jest": "^30.0.0",
34
+ "father": "^4.6.5",
35
+ "jest": "^30.1.3",
36
+ "ts-jest": "^29.4.4",
37
+ "typescript": "^5.9.2"
38
+ }
39
+ }