node_modules/binance/lib/util/BaseRestClient.js
/**
     * @private sign request and set recv window
     */
@private sign request and set recv window
@private sign request and set recv window
signRequest(data) {
        return __awaiter(this, void 0, void 0, function* () {
            const params = Object.assign(Object.assign({}, data), { 
                timestamp: Date.now() + (this.timeOffset || 0) });
            if (this.options.recvWindow && !params.recvWindow) {
                params.recvWindow = this.options.recvWindow;
            }
            if (this.key && this.secret) {
                const serialisedParams = requestUtils_1.serialiseParams(params, this.options.strictParamValidation);
                params.signature = yield node_support_1.signMessage(serialisedParams, this.secret);
            }
            return params;
        });
    }
signRequest ( data ) { return __awaiter ( this , void 0 , void 0 , function * ( ) { const params = Object . assign ( Object . assign ( { } , data ) , { timestamp : Date . now ( ) + ( this . timeOffset || 0 ) } ) ; if ( this . options . recvWindow && ! params . recvWindow ) { params . recvWindow = this . options . recvWindow ; } if ( this . key && this . secret ) { const serialisedParams = requestUtils_1 . serialiseParams ( params , this . options . strictParamValidation ) ; params . signature = yield node_support_1 . signMessage ( serialisedParams , this . secret ) ; } return params ; } ) ; }
@private sign request and set recv window
@private sign request and set recv window
// api_key: this.key, // Optional, set to 5000 by default. Increase if timestamp/recvWindow errors are seen.