async _createAdminIdentity() {
        const { publicKey, privateKey, certificate } = CertificateUtil.generate({ commonName: 'admin' });
        const certificateObj = new Certificate(certificate);
        const identifier = certificateObj.getIdentifier();
        const name = certificateObj.getName();
        const issuer = certificateObj.getIssuer();
        const identity = {
            identifier,
            name,
            issuer,
            secret: 'adminpw',
            certificate,
            publicKey,
            privateKey,
            imported: false,
            options: {
                issuer: true
            }
        };
        const identities = await this.getIdentities();
        await identities.add('admin', identity);
        await identities.add(identifier, identity);
        return identity;
    }
/**
     * Create the default admin identity.
     * @return {Promise} A promise that is resolved with the admin identity when complete,
     * or rejected with an error.
     */
Create the default admin identity.
@return {Promise} A promise that is resolved with the admin identity when complete,
or rejected with an error.
Create the default admin identity . @return { Promise } A promise that is resolved with the admin identity when complete or rejected with an error .
async _createAdminIdentity() {
        const { publicKey, privateKey, certificate } = CertificateUtil.generate({ commonName: 'admin' });
        const certificateObj = new Certificate(certificate);
        const identifier = certificateObj.getIdentifier();
        const name = certificateObj.getName();
        const issuer = certificateObj.getIssuer();
        const identity = {
            identifier,
            name,
            issuer,
            secret: 'adminpw',
            certificate,
            publicKey,
            privateKey,
            imported: false,
            options: {
                issuer: true
            }
        };
        const identities = await this.getIdentities();
        await identities.add('admin', identity);
        await identities.add(identifier, identity);
        return identity;
    }
async _createAdminIdentity ( ) { const { publicKey , privateKey , certificate } = CertificateUtil . generate ( { commonName : 'admin' } ) ; const certificateObj = new Certificate ( certificate ) ; const identifier = certificateObj . getIdentifier ( ) ; const name = certificateObj . getName ( ) ; const issuer = certificateObj . getIssuer ( ) ; const identity = { identifier , name , issuer , secret : 'adminpw' , certificate , publicKey , privateKey , imported : false , options : { issuer : true } } ; const identities = await this . getIdentities ( ) ; await identities . add ( 'admin' , identity ) ; await identities . add ( identifier , identity ) ; return identity ; }
Create the default admin identity.
Create the default admin identity .