@axxel/event-bus 1.0.2 → 1.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.
- package/dist/config/kafka.d.ts +3 -0
- package/dist/config/kafka.d.ts.map +1 -0
- package/dist/config/kafka.js +15 -0
- package/dist/consumers/index.d.ts +3 -0
- package/dist/consumers/index.d.ts.map +1 -0
- package/dist/consumers/index.js +18 -0
- package/dist/consumers/tokenPriceConsumer.d.ts +8 -0
- package/dist/consumers/tokenPriceConsumer.d.ts.map +1 -0
- package/dist/consumers/tokenPriceConsumer.js +27 -0
- package/dist/consumers/walletTransactionConsumer.d.ts +8 -0
- package/dist/consumers/walletTransactionConsumer.d.ts.map +1 -0
- package/dist/consumers/walletTransactionConsumer.js +27 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/producers/index.d.ts +3 -0
- package/dist/producers/index.d.ts.map +1 -0
- package/dist/producers/index.js +18 -0
- package/dist/producers/tokenPriceProducer.d.ts +3 -0
- package/dist/producers/tokenPriceProducer.d.ts.map +1 -0
- package/dist/producers/tokenPriceProducer.js +31 -0
- package/dist/producers/walletTransactionProducer.d.ts +3 -0
- package/dist/producers/walletTransactionProducer.d.ts.map +1 -0
- package/dist/producers/walletTransactionProducer.js +21 -0
- package/dist/topics.d.ts +6 -0
- package/dist/topics.d.ts.map +1 -0
- package/dist/topics.js +7 -0
- package/dist/types/TokenPriceEvent.d.ts +15 -0
- package/dist/types/TokenPriceEvent.d.ts.map +1 -0
- package/dist/types/TokenPriceEvent.js +2 -0
- package/dist/types/WalletTransactionEvent.d.ts +18 -0
- package/dist/types/WalletTransactionEvent.d.ts.map +1 -0
- package/dist/types/WalletTransactionEvent.js +2 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +18 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kafka.d.ts","sourceRoot":"","sources":["../../src/config/kafka.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAKhC,eAAO,MAAM,KAAK,OAIhB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.kafka = void 0;
|
|
7
|
+
const kafkajs_1 = require("kafkajs");
|
|
8
|
+
const dotenv_1 = __importDefault(require("dotenv"));
|
|
9
|
+
dotenv_1.default.config();
|
|
10
|
+
exports.kafka = new kafkajs_1.Kafka({
|
|
11
|
+
clientId: process.env.KAFKA_CLIENT_ID || 'axxel-event-bus',
|
|
12
|
+
brokers: process.env.KAFKA_BROKERS?.split(',') || [],
|
|
13
|
+
ssl: false,
|
|
14
|
+
});
|
|
15
|
+
console.log('Kafka brokers:', process.env.KAFKA_BROKERS);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/consumers/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./tokenPriceConsumer"), exports);
|
|
18
|
+
__exportStar(require("./walletTransactionConsumer"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TokenPriceEvent } from '../types/TokenPriceEvent';
|
|
2
|
+
/**
|
|
3
|
+
* Start consuming token price updates.
|
|
4
|
+
* @param groupId - unique consumer group ID (e.g., 'limit-orders' or 'ai-engine')
|
|
5
|
+
* @param handler - function that processes each TokenPriceEvent
|
|
6
|
+
*/
|
|
7
|
+
export declare function startTokenPriceConsumer(groupId: string, handler: (event: TokenPriceEvent) => Promise<void> | void): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=tokenPriceConsumer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokenPriceConsumer.d.ts","sourceRoot":"","sources":["../../src/consumers/tokenPriceConsumer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,iBAkB1D"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.startTokenPriceConsumer = startTokenPriceConsumer;
|
|
4
|
+
const kafka_1 = require("../config/kafka");
|
|
5
|
+
const topics_1 = require("../topics");
|
|
6
|
+
/**
|
|
7
|
+
* Start consuming token price updates.
|
|
8
|
+
* @param groupId - unique consumer group ID (e.g., 'limit-orders' or 'ai-engine')
|
|
9
|
+
* @param handler - function that processes each TokenPriceEvent
|
|
10
|
+
*/
|
|
11
|
+
async function startTokenPriceConsumer(groupId, handler) {
|
|
12
|
+
const consumer = kafka_1.kafka.consumer({ groupId });
|
|
13
|
+
await consumer.connect();
|
|
14
|
+
await consumer.subscribe({
|
|
15
|
+
topic: topics_1.TOPICS.TOKEN_PRICES,
|
|
16
|
+
fromBeginning: false,
|
|
17
|
+
});
|
|
18
|
+
await consumer.run({
|
|
19
|
+
eachMessage: async ({ message }) => {
|
|
20
|
+
if (!message.value)
|
|
21
|
+
return;
|
|
22
|
+
const event = JSON.parse(message.value.toString());
|
|
23
|
+
await handler(event);
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
console.log(`📡 Listening for token price updates (group: ${groupId})`);
|
|
27
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { WalletTransactionEvent } from '../types/WalletTransactionEvent';
|
|
2
|
+
/**
|
|
3
|
+
* Start consuming wallet transaction events.
|
|
4
|
+
* @param groupId - unique consumer group ID (e.g., 'analytics' or 'wallet-tracker')
|
|
5
|
+
* @param handler - function that processes each WalletTransactionEvent
|
|
6
|
+
*/
|
|
7
|
+
export declare function startWalletTransactionConsumer(groupId: string, handler: (event: WalletTransactionEvent) => Promise<void> | void): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=walletTransactionConsumer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walletTransactionConsumer.d.ts","sourceRoot":"","sources":["../../src/consumers/walletTransactionConsumer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAE9E;;;;GAIG;AACH,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,iBAoBjE"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.startWalletTransactionConsumer = startWalletTransactionConsumer;
|
|
4
|
+
const kafka_1 = require("../config/kafka");
|
|
5
|
+
const topics_1 = require("../topics");
|
|
6
|
+
/**
|
|
7
|
+
* Start consuming wallet transaction events.
|
|
8
|
+
* @param groupId - unique consumer group ID (e.g., 'analytics' or 'wallet-tracker')
|
|
9
|
+
* @param handler - function that processes each WalletTransactionEvent
|
|
10
|
+
*/
|
|
11
|
+
async function startWalletTransactionConsumer(groupId, handler) {
|
|
12
|
+
const consumer = kafka_1.kafka.consumer({ groupId });
|
|
13
|
+
await consumer.connect();
|
|
14
|
+
await consumer.subscribe({
|
|
15
|
+
topic: topics_1.TOPICS.WALLET_TRANSACTIONS,
|
|
16
|
+
fromBeginning: false,
|
|
17
|
+
});
|
|
18
|
+
await consumer.run({
|
|
19
|
+
eachMessage: async ({ message }) => {
|
|
20
|
+
if (!message.value)
|
|
21
|
+
return;
|
|
22
|
+
const event = JSON.parse(message.value.toString());
|
|
23
|
+
await handler(event);
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
console.log(`📡 Listening for wallet transactions (group: ${groupId})`);
|
|
27
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './config/kafka';
|
|
2
|
+
export * from './topics';
|
|
3
|
+
export * from './types';
|
|
4
|
+
export * from './producers/tokenPriceProducer';
|
|
5
|
+
export * from './producers/walletTransactionProducer';
|
|
6
|
+
export * from './consumers/tokenPriceConsumer';
|
|
7
|
+
export * from './consumers/walletTransactionConsumer';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AAExB,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AAEtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./config/kafka"), exports);
|
|
18
|
+
__exportStar(require("./topics"), exports);
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
20
|
+
__exportStar(require("./producers/tokenPriceProducer"), exports);
|
|
21
|
+
__exportStar(require("./producers/walletTransactionProducer"), exports);
|
|
22
|
+
__exportStar(require("./consumers/tokenPriceConsumer"), exports);
|
|
23
|
+
__exportStar(require("./consumers/walletTransactionConsumer"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/producers/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./tokenPriceProducer"), exports);
|
|
18
|
+
__exportStar(require("./walletTransactionProducer"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokenPriceProducer.d.ts","sourceRoot":"","sources":["../../src/producers/tokenPriceProducer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,eAAe,EAChB,MAAM,0BAA0B,CAAC;AAWlC,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,eAAe,iBAwB7D"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.produceTokenPrice = produceTokenPrice;
|
|
4
|
+
const kafka_1 = require("../config/kafka");
|
|
5
|
+
const topics_1 = require("../topics");
|
|
6
|
+
function normalizePriceMap(price) {
|
|
7
|
+
if (price instanceof Map) {
|
|
8
|
+
return Object.fromEntries(price.entries());
|
|
9
|
+
}
|
|
10
|
+
return price;
|
|
11
|
+
}
|
|
12
|
+
async function produceTokenPrice(event) {
|
|
13
|
+
const producer = kafka_1.kafka.producer();
|
|
14
|
+
await producer.connect();
|
|
15
|
+
const key = `${event.chainId}:${event.tokenAddress}`;
|
|
16
|
+
const serializedEvent = {
|
|
17
|
+
...event,
|
|
18
|
+
price: normalizePriceMap(event.price),
|
|
19
|
+
};
|
|
20
|
+
await producer.send({
|
|
21
|
+
topic: topics_1.TOPICS.TOKEN_PRICES,
|
|
22
|
+
messages: [
|
|
23
|
+
{
|
|
24
|
+
key,
|
|
25
|
+
value: JSON.stringify(serializedEvent),
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
});
|
|
29
|
+
await producer.disconnect();
|
|
30
|
+
console.log(`✅ Sent token price update for ${event.symbol ?? event.tokenAddress} (chain ${event.chainId})`);
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walletTransactionProducer.d.ts","sourceRoot":"","sources":["../../src/producers/walletTransactionProducer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAE9E,wBAAsB,wBAAwB,CAAC,KAAK,EAAE,sBAAsB,iBAoB3E"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.produceWalletTransaction = produceWalletTransaction;
|
|
4
|
+
const kafka_1 = require("../config/kafka");
|
|
5
|
+
const topics_1 = require("../topics");
|
|
6
|
+
async function produceWalletTransaction(event) {
|
|
7
|
+
const producer = kafka_1.kafka.producer();
|
|
8
|
+
await producer.connect();
|
|
9
|
+
const key = `${event.chainId}:${event.walletAddress}`;
|
|
10
|
+
await producer.send({
|
|
11
|
+
topic: topics_1.TOPICS.WALLET_TRANSACTIONS,
|
|
12
|
+
messages: [
|
|
13
|
+
{
|
|
14
|
+
key,
|
|
15
|
+
value: JSON.stringify(event),
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
});
|
|
19
|
+
await producer.disconnect();
|
|
20
|
+
console.log(`✅ Sent wallet transaction for ${event.walletAddress} (${event.type})`);
|
|
21
|
+
}
|
package/dist/topics.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topics.d.ts","sourceRoot":"","sources":["../src/topics.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;CAGT,CAAC;AAEX,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,CAAC"}
|
package/dist/topics.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type PriceInfo = {
|
|
2
|
+
price: number;
|
|
3
|
+
exchange: string;
|
|
4
|
+
liquidity: number;
|
|
5
|
+
};
|
|
6
|
+
export interface TokenPriceEvent {
|
|
7
|
+
chainId: number;
|
|
8
|
+
tokenAddress: string;
|
|
9
|
+
blockNumber: number;
|
|
10
|
+
price: Record<string, PriceInfo> | Map<string, PriceInfo>;
|
|
11
|
+
marketcap?: number | null;
|
|
12
|
+
symbol?: string | null;
|
|
13
|
+
updatedAt?: number;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=TokenPriceEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TokenPriceEvent.d.ts","sourceRoot":"","sources":["../../src/types/TokenPriceEvent.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IAEpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC1D,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface WalletTransactionEvent {
|
|
2
|
+
chainId: number;
|
|
3
|
+
walletAddress: string;
|
|
4
|
+
type: string;
|
|
5
|
+
pool?: string | null;
|
|
6
|
+
txHash: string;
|
|
7
|
+
baseAmount: string;
|
|
8
|
+
quoteAmount: string;
|
|
9
|
+
baseTokenAddress: string;
|
|
10
|
+
baseTokenSymbol: string;
|
|
11
|
+
quoteTokenAddress: string;
|
|
12
|
+
quoteTokenSymbol: string;
|
|
13
|
+
blockTimestamp: number;
|
|
14
|
+
liquidity?: number | null;
|
|
15
|
+
marketcap?: number | null;
|
|
16
|
+
totalSupply?: number | null;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=WalletTransactionEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalletTransactionEvent.d.ts","sourceRoot":"","sources":["../../src/types/WalletTransactionEvent.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IAEf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IAEvB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./TokenPriceEvent"), exports);
|
|
18
|
+
__exportStar(require("./WalletTransactionEvent"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axxel/event-bus",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Axxel Kafka Event Bus SDK",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"dev": "tsx example/demo.ts",
|
|
15
|
-
"build": "tsc",
|
|
15
|
+
"build": "tsc -p tsconfig.build.json",
|
|
16
16
|
"start": "node dist/index.js",
|
|
17
17
|
"lint": "eslint . --ext .ts",
|
|
18
18
|
"format": "prettier --write .",
|