How to use the jayson/promise.Client function in jayson

To help you get started, we’ve selected a few jayson examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nayutaco / ptarmigan / ptarmapi / src / bitcoin / bitcoin.service.ts View on Github external
constructor(
        private readonly config: ConfigService,
    ) {
        this.config = config;
        this.port = Number.parseInt(this.config.get('ptarmigan.bitcoindPort')),
        this.host = this.config.get('ptarmigan.bitcoindHost'),
        this.username = this.config.get('ptarmigan.bitcoindUser'),
        this.password = this.config.get('ptarmigan.bitcoindPassword')

        this.client = jayson.Client.http({
            port: this.port,
            host: this.host,
            auth: this.username + ':' + this.password
        });
    }
github nayutaco / ptarmigan / ptarmapi / src / ptarmigan / ptarmigan.service.ts View on Github external
constructor(
        private readonly config: ConfigService,
    ) {
        this.config = config;
        this.port = Number.parseInt(this.config.get('ptarmigan.ptarmdRpcPort'), 10),
            this.host = this.config.get('ptarmigan.ptarmdHost'),
            this.path = this.config.get('ptarmigan.ptarmdPath'),
            this.nodePath = this.config.get('ptarmigan.ptarmdNodePath'),
            this.client = jayson.Client.tcp({
                port: this.port,
                host: this.host,
            });
    }