lib/auth/request-pq.js
function requestPQ(callback, channel) {
    // Create a nonce for the client
    var clientNonce = utility.createNonce(16);
    mtproto.service.req_pq({
        props: {
            nonce: clientNonce
        },
        channel: channel,
        callback: function (ex, resPQ) {
            if (clientNonce === resPQ.nonce) {
                var context = {
                    resPQ: resPQ,
                    channel: channel
                };
                callback(null, context);
            } else {
                callback(createError('Nonce mismatch.', 'ENONCE'));
            }
        }
    });
}
function requestPQ(callback, channel) {
    // Create a nonce for the client
    var clientNonce = utility.createNonce(16);
    mtproto.service.req_pq({
        props: {
            nonce: clientNonce
        },
        channel: channel,
        callback: function (ex, resPQ) {
            if (clientNonce === resPQ.nonce) {
                var context = {
                    resPQ: resPQ,
                    channel: channel
                };
                callback(null, context);
            } else {
                callback(createError('Nonce mismatch.', 'ENONCE'));
            }
        }
    });
}
function requestPQ ( callback , channel ) { // Create a nonce for the client var clientNonce = utility . createNonce ( 16 ) ; mtproto . service . req_pq ( { props : { nonce : clientNonce } , channel : channel , callback : function ( ex , resPQ ) { if ( clientNonce === resPQ . nonce ) { var context = { resPQ : resPQ , channel : channel } ; callback ( null , context ) ; } else { callback ( createError ( 'Nonce mismatch.' , 'ENONCE' ) ) ; } } } ) ; }
Request a PQ pair number
Request a PQ pair number