Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

candle.bot

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

candle.bot - npm Package Compare versions

Comparing version 0.3.8 to 0.4.0

25

candle.bot.d.ts

@@ -44,10 +44,19 @@ import { TimeFrame, Market, BithumbCC, BitfinexCC } from 'cryptocurrency-crawler.client';

}
export declare class CandleMasterBot extends BaseBot {
readonly host: BotHost;
constructor(host: BotHost);
open(): Promise<void>;
ids(name?: string): Promise<string[]>;
beBot(name: string): Promise<boolean>;
getBot(name: string): Promise<CandleBot>;
newBot(name: string, config?: CandleBotConfig): Promise<CandleBot>;
export declare class CandleMasterBot {
private static _host;
private static _socket;
private static _ack;
static init(host: BotHost): Promise<void>;
static readonly host: BotHost;
static readonly socket: SocketIOClient.Socket;
static readonly id: string;
static readonly connected: boolean;
static readonly disconnected: boolean;
static close(): void;
static on(event: string, fn: Function): SocketIOClient.Emitter;
static once(event: string, fn: Function): SocketIOClient.Emitter;
static ids(name?: string): Promise<string[]>;
static beBot(name: string): Promise<boolean>;
static getBot(name: string): Promise<CandleBot>;
static newBot(name: string, config?: CandleBotConfig): Promise<CandleBot>;
}

@@ -54,0 +63,0 @@ export declare class CandleBot extends BaseBot {

@@ -84,11 +84,37 @@ "use strict";

}
class CandleMasterBot extends BaseBot {
constructor(host) {
super('master', newSocket(host));
this.host = host;
class CandleMasterBot {
static init(host) {
return __awaiter(this, void 0, void 0, function* () {
const socket = newSocket(host);
yield openSocket(socket, 'master');
this._host = host;
this._socket = socket;
this._ack = fourdollar_promisify_1.default(socket.emit, socket);
});
}
open() {
return openSocket(this.socket, 'master');
static get host() {
return this._host;
}
ids(name) {
static get socket() {
return this._socket;
}
static get id() {
return this.socket.id;
}
static get connected() {
return this.socket.connected;
}
static get disconnected() {
return this.socket.disconnected;
}
static close() {
this.socket.close();
}
static on(event, fn) {
return this.socket.on(event, fn);
}
static once(event, fn) {
return this.socket.on(event, fn);
}
static ids(name) {
return __awaiter(this, void 0, void 0, function* () {

@@ -98,3 +124,3 @@ return this._ack(':ids', name);

}
beBot(name) {
static beBot(name) {
return __awaiter(this, void 0, void 0, function* () {

@@ -104,3 +130,3 @@ return this._ack(':be.bot', name);

}
getBot(name) {
static getBot(name) {
return __awaiter(this, void 0, void 0, function* () {

@@ -110,3 +136,3 @@ return this.newBot(name);

}
newBot(name, config) {
static newBot(name, config) {
return __awaiter(this, void 0, void 0, function* () {

@@ -113,0 +139,0 @@ if (name === 'master') {

{
"name": "candle.bot",
"version": "0.3.8",
"version": "0.4.0",
"description": "Cryptocurrency Candle Bot",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc