lib/account.js
function () {
        if (utils.isNull(this.address)) {

            var pubKey = this.getPublicKey();
            if (pubKey.length !== 64) {
                pubKey = cryptoUtils.secp256k1.publicKeyConvert(pubKey, false).slice(1);
            }

            // The uncompressed form consists of a 0x04 (in analogy to the DER OCTET STRING tag) plus
            // the concatenation of the binary representation of the X coordinate plus the binary
            // representation of the y coordinate of the public point.
            pubKey = Buffer.concat([cryptoUtils.toBuffer(4), pubKey]);

            // Only take the lower 160bits of the hash
            var content = cryptoUtils.sha3(pubKey);
            content = cryptoUtils.ripemd160(content);
            // content = AddressPrefix + NormalType + content(local address only use normal type)
            content = Buffer.concat([cryptoUtils.toBuffer(AddressPrefix), cryptoUtils.toBuffer(NormalType), content]);
            var checksum = cryptoUtils.sha3(content).slice(0, 4);
            this.address = Buffer.concat([content, checksum]);
        }
        return this.address;
    }
function () {
        if (utils.isNull(this.address)) {

            var pubKey = this.getPublicKey();
            if (pubKey.length !== 64) {
                pubKey = cryptoUtils.secp256k1.publicKeyConvert(pubKey, false).slice(1);
            }

            // The uncompressed form consists of a 0x04 (in analogy to the DER OCTET STRING tag) plus
            // the concatenation of the binary representation of the X coordinate plus the binary
            // representation of the y coordinate of the public point.
            pubKey = Buffer.concat([cryptoUtils.toBuffer(4), pubKey]);

            // Only take the lower 160bits of the hash
            var content = cryptoUtils.sha3(pubKey);
            content = cryptoUtils.ripemd160(content);
            // content = AddressPrefix + NormalType + content(local address only use normal type)
            content = Buffer.concat([cryptoUtils.toBuffer(AddressPrefix), cryptoUtils.toBuffer(NormalType), content]);
            var checksum = cryptoUtils.sha3(content).slice(0, 4);
            this.address = Buffer.concat([content, checksum]);
        }
        return this.address;
    }
function ( ) { if ( utils . isNull ( this . address ) ) { var pubKey = this . getPublicKey ( ) ; if ( pubKey . length !== 64 ) { pubKey = cryptoUtils . secp256k1 . publicKeyConvert ( pubKey , false ) . slice ( 1 ) ; } // The uncompressed form consists of a 0x04 (in analogy to the DER OCTET STRING tag) plus // the concatenation of the binary representation of the X coordinate plus the binary // representation of the y coordinate of the public point. pubKey = Buffer . concat ( [ cryptoUtils . toBuffer ( 4 ) , pubKey ] ) ; // Only take the lower 160bits of the hash var content = cryptoUtils . sha3 ( pubKey ) ; content = cryptoUtils . ripemd160 ( content ) ; // content = AddressPrefix + NormalType + content(local address only use normal type) content = Buffer . concat ( [ cryptoUtils . toBuffer ( AddressPrefix ) , cryptoUtils . toBuffer ( NormalType ) , content ] ) ; var checksum = cryptoUtils . sha3 ( content ) . slice ( 0 , 4 ) ; this . address = Buffer . concat ( [ content , checksum ] ) ; } return this . address ; }
Accaunt address getter.

@return {Buffer} Account address.

@example var publicKey = account.getAddress();
//<Buffer 7f 87 83 58 46 96 12 7d 1a c0 57 1a 42 87 c6 25 36 08 ff 32 61 36 51 7c>
Accaunt address getter .