File tree Expand file tree Collapse file tree 3 files changed +137
-134
lines changed Expand file tree Collapse file tree 3 files changed +137
-134
lines changed Original file line number Diff line number Diff line change 11// See https://dashplatform.readme.io/docs/tutorial-update-an-identity
22const Dash = require ( 'dash' ) ;
3- const IdentityPublicKey = require ( '@dashevo/dpp/lib/identity/IdentityPublicKey ' ) ;
3+ const { IdentityPublicKey, IdentityPublicKeyWithWitness } = require ( '@dashevo/wasm- dpp' ) ;
44const dotenv = require ( 'dotenv' ) ;
55dotenv . config ( ) ;
66
@@ -30,13 +30,14 @@ const updateIdentityAddKey = async () => {
3030
3131 const identityPublicKey = identityPrivateKey . toPublicKey ( ) . toBuffer ( ) ;
3232
33- const newPublicKey = new IdentityPublicKey ( {
33+ const newPublicKey = new IdentityPublicKeyWithWitness ( {
3434 id : newKeyId ,
3535 type : IdentityPublicKey . TYPES . ECDSA_SECP256K1 ,
36+ data : identityPublicKey ,
3637 purpose : IdentityPublicKey . PURPOSES . AUTHENTICATION ,
3738 securityLevel : IdentityPublicKey . SECURITY_LEVELS . HIGH ,
38- data : identityPublicKey ,
3939 readOnly : false ,
40+ signature : Buffer . alloc ( 0 ) ,
4041 } ) ;
4142
4243 const updateAdd = {
You can’t perform that action at this time.
0 commit comments