@heliofi/common-fe 0.2.276

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,3 @@
1
+ # @heliofi/common-fe
2
+
3
+ See https://docs.hel.io
@@ -0,0 +1,64 @@
1
+ //#region ../common/src/domain/model/blockchain/constants/BlockchainSymbol.d.ts
2
+ declare enum BlockchainSymbol {
3
+ SOL = "SOL",
4
+ ETH = "ETH",
5
+ POLYGON = "POLYGON",
6
+ BASE = "BASE",
7
+ BITCOIN = "BITCOIN",
8
+ ARBITRUM = "ARBITRUM",
9
+ BSC = "BSC",
10
+ TRON = "TRON",
11
+ DOGE = "DOGE",
12
+ }
13
+ //#endregion
14
+ //#region ../common/src/domain/model/blockchainEngine/constants/BlockchainEngineType.d.ts
15
+ declare enum BlockchainEngineType {
16
+ EVM = "EVM",
17
+ SOL = "SOL",
18
+ BTC = "BTC",
19
+ TRON = "TRON",
20
+ HYPERCORE = "HYPERCORE",
21
+ DOGE = "DOGE",
22
+ }
23
+ //#endregion
24
+ //#region ../common/src/domain/constants/platform.d.ts
25
+ declare enum Platform {
26
+ HELIO = "HELIO",
27
+ MAGIC_EDEN = "MAGIC_EDEN",
28
+ }
29
+ //#endregion
30
+ //#region ../common/src/domain/model/withdraw/constants/WithdrawalFeature.d.ts
31
+ declare enum WithdrawalFeature {
32
+ IRON = "iron",
33
+ MP_SELL = "mp_sell",
34
+ }
35
+ //#endregion
36
+ //#region ../common/src/domain/model/withdraw/constants/WithdrawalState.d.ts
37
+ declare enum WithdrawalState {
38
+ QUOTED = "QUOTED",
39
+ SUBMITTING = "SUBMITTING",
40
+ SUBMITTED = "SUBMITTED",
41
+ BRIDGING = "BRIDGING",
42
+ COMPLETED = "COMPLETED",
43
+ FAILED = "FAILED",
44
+ FAILED_EXPIRED = "FAILED_EXPIRED",
45
+ EXPIRED = "EXPIRED",
46
+ REFUNDED_BY_PROVIDER = "REFUNDED_BY_PROVIDER",
47
+ }
48
+ //#endregion
49
+ //#region ../common/src/domain/model/withdraw/constants/BroadcastAck.d.ts
50
+ declare enum BroadcastAck {
51
+ ACKNOWLEDGED = "acknowledged",
52
+ UNACKNOWLEDGED = "unacknowledged",
53
+ REJECTED = "rejected",
54
+ }
55
+ //#endregion
56
+ //#region ../common/src/domain/model/broadcast/constants/SignedTransactionKind.d.ts
57
+ declare enum SignedTransactionKind {
58
+ RAW = "raw",
59
+ USER_OP = "userop",
60
+ POLYMARKET_WALLET = "polymarket_wallet",
61
+ HYPERCORE = "hypercore",
62
+ }
63
+ //#endregion
64
+ export { BlockchainEngineType, BlockchainSymbol, BroadcastAck, Platform, SignedTransactionKind, WithdrawalFeature, WithdrawalState };
@@ -0,0 +1,64 @@
1
+ //#region ../common/src/domain/model/blockchain/constants/BlockchainSymbol.d.ts
2
+ declare enum BlockchainSymbol {
3
+ SOL = "SOL",
4
+ ETH = "ETH",
5
+ POLYGON = "POLYGON",
6
+ BASE = "BASE",
7
+ BITCOIN = "BITCOIN",
8
+ ARBITRUM = "ARBITRUM",
9
+ BSC = "BSC",
10
+ TRON = "TRON",
11
+ DOGE = "DOGE",
12
+ }
13
+ //#endregion
14
+ //#region ../common/src/domain/model/blockchainEngine/constants/BlockchainEngineType.d.ts
15
+ declare enum BlockchainEngineType {
16
+ EVM = "EVM",
17
+ SOL = "SOL",
18
+ BTC = "BTC",
19
+ TRON = "TRON",
20
+ HYPERCORE = "HYPERCORE",
21
+ DOGE = "DOGE",
22
+ }
23
+ //#endregion
24
+ //#region ../common/src/domain/constants/platform.d.ts
25
+ declare enum Platform {
26
+ HELIO = "HELIO",
27
+ MAGIC_EDEN = "MAGIC_EDEN",
28
+ }
29
+ //#endregion
30
+ //#region ../common/src/domain/model/withdraw/constants/WithdrawalFeature.d.ts
31
+ declare enum WithdrawalFeature {
32
+ IRON = "iron",
33
+ MP_SELL = "mp_sell",
34
+ }
35
+ //#endregion
36
+ //#region ../common/src/domain/model/withdraw/constants/WithdrawalState.d.ts
37
+ declare enum WithdrawalState {
38
+ QUOTED = "QUOTED",
39
+ SUBMITTING = "SUBMITTING",
40
+ SUBMITTED = "SUBMITTED",
41
+ BRIDGING = "BRIDGING",
42
+ COMPLETED = "COMPLETED",
43
+ FAILED = "FAILED",
44
+ FAILED_EXPIRED = "FAILED_EXPIRED",
45
+ EXPIRED = "EXPIRED",
46
+ REFUNDED_BY_PROVIDER = "REFUNDED_BY_PROVIDER",
47
+ }
48
+ //#endregion
49
+ //#region ../common/src/domain/model/withdraw/constants/BroadcastAck.d.ts
50
+ declare enum BroadcastAck {
51
+ ACKNOWLEDGED = "acknowledged",
52
+ UNACKNOWLEDGED = "unacknowledged",
53
+ REJECTED = "rejected",
54
+ }
55
+ //#endregion
56
+ //#region ../common/src/domain/model/broadcast/constants/SignedTransactionKind.d.ts
57
+ declare enum SignedTransactionKind {
58
+ RAW = "raw",
59
+ USER_OP = "userop",
60
+ POLYMARKET_WALLET = "polymarket_wallet",
61
+ HYPERCORE = "hypercore",
62
+ }
63
+ //#endregion
64
+ export { BlockchainEngineType, BlockchainSymbol, BroadcastAck, Platform, SignedTransactionKind, WithdrawalFeature, WithdrawalState };
package/dist/index.js ADDED
@@ -0,0 +1,96 @@
1
+
2
+ //#region ../common/src/domain/model/blockchain/constants/BlockchainSymbol.ts
3
+ let BlockchainSymbol = /* @__PURE__ */ function(BlockchainSymbol$1) {
4
+ BlockchainSymbol$1["SOL"] = "SOL";
5
+ BlockchainSymbol$1["ETH"] = "ETH";
6
+ BlockchainSymbol$1["POLYGON"] = "POLYGON";
7
+ BlockchainSymbol$1["BASE"] = "BASE";
8
+ BlockchainSymbol$1["BITCOIN"] = "BITCOIN";
9
+ BlockchainSymbol$1["ARBITRUM"] = "ARBITRUM";
10
+ BlockchainSymbol$1["BSC"] = "BSC";
11
+ BlockchainSymbol$1["TRON"] = "TRON";
12
+ BlockchainSymbol$1["DOGE"] = "DOGE";
13
+ return BlockchainSymbol$1;
14
+ }({});
15
+
16
+ //#endregion
17
+ //#region ../common/src/domain/model/blockchainEngine/constants/BlockchainEngineType.ts
18
+ let BlockchainEngineType = /* @__PURE__ */ function(BlockchainEngineType$1) {
19
+ BlockchainEngineType$1["EVM"] = "EVM";
20
+ BlockchainEngineType$1["SOL"] = "SOL";
21
+ BlockchainEngineType$1["BTC"] = "BTC";
22
+ BlockchainEngineType$1["TRON"] = "TRON";
23
+ BlockchainEngineType$1["HYPERCORE"] = "HYPERCORE";
24
+ BlockchainEngineType$1["DOGE"] = "DOGE";
25
+ return BlockchainEngineType$1;
26
+ }({});
27
+
28
+ //#endregion
29
+ //#region ../common/src/domain/constants/platform.ts
30
+ let Platform = /* @__PURE__ */ function(Platform$1) {
31
+ Platform$1["HELIO"] = "HELIO";
32
+ Platform$1["MAGIC_EDEN"] = "MAGIC_EDEN";
33
+ return Platform$1;
34
+ }({});
35
+
36
+ //#endregion
37
+ //#region ../common/src/domain/model/withdraw/constants/WithdrawalFeature.ts
38
+ let WithdrawalFeature = /* @__PURE__ */ function(WithdrawalFeature$1) {
39
+ WithdrawalFeature$1["IRON"] = "iron";
40
+ WithdrawalFeature$1["MP_SELL"] = "mp_sell";
41
+ return WithdrawalFeature$1;
42
+ }({});
43
+
44
+ //#endregion
45
+ //#region ../common/src/domain/model/withdraw/constants/WithdrawalState.ts
46
+ let WithdrawalState = /* @__PURE__ */ function(WithdrawalState$1) {
47
+ WithdrawalState$1["QUOTED"] = "QUOTED";
48
+ WithdrawalState$1["SUBMITTING"] = "SUBMITTING";
49
+ WithdrawalState$1["SUBMITTED"] = "SUBMITTED";
50
+ WithdrawalState$1["BRIDGING"] = "BRIDGING";
51
+ WithdrawalState$1["COMPLETED"] = "COMPLETED";
52
+ WithdrawalState$1["FAILED"] = "FAILED";
53
+ WithdrawalState$1["FAILED_EXPIRED"] = "FAILED_EXPIRED";
54
+ WithdrawalState$1["EXPIRED"] = "EXPIRED";
55
+ WithdrawalState$1["REFUNDED_BY_PROVIDER"] = "REFUNDED_BY_PROVIDER";
56
+ return WithdrawalState$1;
57
+ }({});
58
+
59
+ //#endregion
60
+ //#region ../common/src/domain/model/withdraw/constants/BroadcastAck.ts
61
+ let BroadcastAck = /* @__PURE__ */ function(BroadcastAck$1) {
62
+ BroadcastAck$1["ACKNOWLEDGED"] = "acknowledged";
63
+ BroadcastAck$1["UNACKNOWLEDGED"] = "unacknowledged";
64
+ BroadcastAck$1["REJECTED"] = "rejected";
65
+ return BroadcastAck$1;
66
+ }({});
67
+
68
+ //#endregion
69
+ //#region ../common/src/domain/model/broadcast/constants/SignedTransactionKind.ts
70
+ /**
71
+ * Lane discriminator shared by the prepare and submit sides. On submit it
72
+ * routes a `SignedTransaction` to a BroadcastAdapter; on prepare it tags a
73
+ * `PreparedTransaction` with what the merchant must sign for that lane:
74
+ *
75
+ * RAW → EVM raw RPC adapter (eth_sendRawTransaction)
76
+ * or Solana raw adapter (sendRawTransaction)
77
+ * USER_OP → 4337 bundler adapter (Alchemy default, D23)
78
+ * POLYMARKET_WALLET → PolymarketRelayerAdapter (D30)
79
+ * HYPERCORE → HypercoreBroadcastAdapter (HyperCore /exchange relayer)
80
+ */
81
+ let SignedTransactionKind = /* @__PURE__ */ function(SignedTransactionKind$1) {
82
+ SignedTransactionKind$1["RAW"] = "raw";
83
+ SignedTransactionKind$1["USER_OP"] = "userop";
84
+ SignedTransactionKind$1["POLYMARKET_WALLET"] = "polymarket_wallet";
85
+ SignedTransactionKind$1["HYPERCORE"] = "hypercore";
86
+ return SignedTransactionKind$1;
87
+ }({});
88
+
89
+ //#endregion
90
+ exports.BlockchainEngineType = BlockchainEngineType;
91
+ exports.BlockchainSymbol = BlockchainSymbol;
92
+ exports.BroadcastAck = BroadcastAck;
93
+ exports.Platform = Platform;
94
+ exports.SignedTransactionKind = SignedTransactionKind;
95
+ exports.WithdrawalFeature = WithdrawalFeature;
96
+ exports.WithdrawalState = WithdrawalState;
package/dist/index.mjs ADDED
@@ -0,0 +1,89 @@
1
+ //#region ../common/src/domain/model/blockchain/constants/BlockchainSymbol.ts
2
+ let BlockchainSymbol = /* @__PURE__ */ function(BlockchainSymbol$1) {
3
+ BlockchainSymbol$1["SOL"] = "SOL";
4
+ BlockchainSymbol$1["ETH"] = "ETH";
5
+ BlockchainSymbol$1["POLYGON"] = "POLYGON";
6
+ BlockchainSymbol$1["BASE"] = "BASE";
7
+ BlockchainSymbol$1["BITCOIN"] = "BITCOIN";
8
+ BlockchainSymbol$1["ARBITRUM"] = "ARBITRUM";
9
+ BlockchainSymbol$1["BSC"] = "BSC";
10
+ BlockchainSymbol$1["TRON"] = "TRON";
11
+ BlockchainSymbol$1["DOGE"] = "DOGE";
12
+ return BlockchainSymbol$1;
13
+ }({});
14
+
15
+ //#endregion
16
+ //#region ../common/src/domain/model/blockchainEngine/constants/BlockchainEngineType.ts
17
+ let BlockchainEngineType = /* @__PURE__ */ function(BlockchainEngineType$1) {
18
+ BlockchainEngineType$1["EVM"] = "EVM";
19
+ BlockchainEngineType$1["SOL"] = "SOL";
20
+ BlockchainEngineType$1["BTC"] = "BTC";
21
+ BlockchainEngineType$1["TRON"] = "TRON";
22
+ BlockchainEngineType$1["HYPERCORE"] = "HYPERCORE";
23
+ BlockchainEngineType$1["DOGE"] = "DOGE";
24
+ return BlockchainEngineType$1;
25
+ }({});
26
+
27
+ //#endregion
28
+ //#region ../common/src/domain/constants/platform.ts
29
+ let Platform = /* @__PURE__ */ function(Platform$1) {
30
+ Platform$1["HELIO"] = "HELIO";
31
+ Platform$1["MAGIC_EDEN"] = "MAGIC_EDEN";
32
+ return Platform$1;
33
+ }({});
34
+
35
+ //#endregion
36
+ //#region ../common/src/domain/model/withdraw/constants/WithdrawalFeature.ts
37
+ let WithdrawalFeature = /* @__PURE__ */ function(WithdrawalFeature$1) {
38
+ WithdrawalFeature$1["IRON"] = "iron";
39
+ WithdrawalFeature$1["MP_SELL"] = "mp_sell";
40
+ return WithdrawalFeature$1;
41
+ }({});
42
+
43
+ //#endregion
44
+ //#region ../common/src/domain/model/withdraw/constants/WithdrawalState.ts
45
+ let WithdrawalState = /* @__PURE__ */ function(WithdrawalState$1) {
46
+ WithdrawalState$1["QUOTED"] = "QUOTED";
47
+ WithdrawalState$1["SUBMITTING"] = "SUBMITTING";
48
+ WithdrawalState$1["SUBMITTED"] = "SUBMITTED";
49
+ WithdrawalState$1["BRIDGING"] = "BRIDGING";
50
+ WithdrawalState$1["COMPLETED"] = "COMPLETED";
51
+ WithdrawalState$1["FAILED"] = "FAILED";
52
+ WithdrawalState$1["FAILED_EXPIRED"] = "FAILED_EXPIRED";
53
+ WithdrawalState$1["EXPIRED"] = "EXPIRED";
54
+ WithdrawalState$1["REFUNDED_BY_PROVIDER"] = "REFUNDED_BY_PROVIDER";
55
+ return WithdrawalState$1;
56
+ }({});
57
+
58
+ //#endregion
59
+ //#region ../common/src/domain/model/withdraw/constants/BroadcastAck.ts
60
+ let BroadcastAck = /* @__PURE__ */ function(BroadcastAck$1) {
61
+ BroadcastAck$1["ACKNOWLEDGED"] = "acknowledged";
62
+ BroadcastAck$1["UNACKNOWLEDGED"] = "unacknowledged";
63
+ BroadcastAck$1["REJECTED"] = "rejected";
64
+ return BroadcastAck$1;
65
+ }({});
66
+
67
+ //#endregion
68
+ //#region ../common/src/domain/model/broadcast/constants/SignedTransactionKind.ts
69
+ /**
70
+ * Lane discriminator shared by the prepare and submit sides. On submit it
71
+ * routes a `SignedTransaction` to a BroadcastAdapter; on prepare it tags a
72
+ * `PreparedTransaction` with what the merchant must sign for that lane:
73
+ *
74
+ * RAW → EVM raw RPC adapter (eth_sendRawTransaction)
75
+ * or Solana raw adapter (sendRawTransaction)
76
+ * USER_OP → 4337 bundler adapter (Alchemy default, D23)
77
+ * POLYMARKET_WALLET → PolymarketRelayerAdapter (D30)
78
+ * HYPERCORE → HypercoreBroadcastAdapter (HyperCore /exchange relayer)
79
+ */
80
+ let SignedTransactionKind = /* @__PURE__ */ function(SignedTransactionKind$1) {
81
+ SignedTransactionKind$1["RAW"] = "raw";
82
+ SignedTransactionKind$1["USER_OP"] = "userop";
83
+ SignedTransactionKind$1["POLYMARKET_WALLET"] = "polymarket_wallet";
84
+ SignedTransactionKind$1["HYPERCORE"] = "hypercore";
85
+ return SignedTransactionKind$1;
86
+ }({});
87
+
88
+ //#endregion
89
+ export { BlockchainEngineType, BlockchainSymbol, BroadcastAck, Platform, SignedTransactionKind, WithdrawalFeature, WithdrawalState };
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@heliofi/common-fe",
3
+ "version": "0.2.276",
4
+ "private": false,
5
+ "description": "Zero-dependency, frontend-safe shared enums (and, later, DTO type shapes) for Helio consumers. No class-validator / reflect-metadata / heavy blockchain deps.",
6
+ "license": "ISC",
7
+ "main": "dist/index.js",
8
+ "module": "dist/index.mjs",
9
+ "types": "dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": {
13
+ "types": "./dist/index.d.mts",
14
+ "default": "./dist/index.mjs"
15
+ },
16
+ "require": {
17
+ "types": "./dist/index.d.ts",
18
+ "default": "./dist/index.js"
19
+ }
20
+ }
21
+ },
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "scripts": {
29
+ "build": "tsdown"
30
+ },
31
+ "devDependencies": {
32
+ "tsdown": "0.15.6"
33
+ },
34
+ "peerDependencies": {
35
+ "typescript": "5.*"
36
+ }
37
+ }