checkInput() {
        // Check if `libccurl` is available
        if (!this.libccurl.hasOwnProperty('ccurl_pow')) {
            return new Error('Hashing not available');
        }

        // Check if valid `trunkTransaction` was passed
        if (!this.iota.valid.isHash(this.trunkTransaction)) {
            return new Error('Invalid trunkTransaction');
        }

        // Check if valid `branchTransaction` was passed
        if (!this.iota.valid.isHash(this.branchTransaction)) {
            return new Error('Invalid branchTransaction');
        }

        // Check if a valid `minWeightMagnitude` was passed
        if (!this.iota.valid.isValue(this.minWeightMagnitude)) {
            return new Error('Invalid minWeightMagnitude');
        }

        // Check if the passed trytes are valid
        if (!this.iota.valid.isArrayOfTrytes(this.trytes)) {
            return new Error('Invalid trytes supplied');
        }
    }
/**
     * Checks the inputs into the class object for correctness.
     */
Checks the inputs into the class object for correctness.
Checks the inputs into the class object for correctness .
checkInput() {
        if (!this.libccurl.hasOwnProperty('ccurl_pow')) {
            return new Error('Hashing not available');
        }
        if (!this.iota.valid.isHash(this.trunkTransaction)) {
            return new Error('Invalid trunkTransaction');
        }
        if (!this.iota.valid.isHash(this.branchTransaction)) {
            return new Error('Invalid branchTransaction');
        }
        if (!this.iota.valid.isValue(this.minWeightMagnitude)) {
            return new Error('Invalid minWeightMagnitude');
        }
        if (!this.iota.valid.isArrayOfTrytes(this.trytes)) {
            return new Error('Invalid trytes supplied');
        }
    }
checkInput ( ) { if ( ! this . libccurl . hasOwnProperty ( 'ccurl_pow' ) ) { return new Error ( 'Hashing not available' ) ; } if ( ! this . iota . valid . isHash ( this . trunkTransaction ) ) { return new Error ( 'Invalid trunkTransaction' ) ; } if ( ! this . iota . valid . isHash ( this . branchTransaction ) ) { return new Error ( 'Invalid branchTransaction' ) ; } if ( ! this . iota . valid . isValue ( this . minWeightMagnitude ) ) { return new Error ( 'Invalid minWeightMagnitude' ) ; } if ( ! this . iota . valid . isArrayOfTrytes ( this . trytes ) ) { return new Error ( 'Invalid trytes supplied' ) ; } }
Checks the inputs into the class object for correctness.
Checks the inputs into the class object for correctness .
// Check if `libccurl` is available // Check if valid `trunkTransaction` was passed // Check if valid `branchTransaction` was passed // Check if a valid `minWeightMagnitude` was passed // Check if the passed trytes are valid