Delete nonce from Torus nodes

Hey Web3Auth team,

how can I delete the nonce (in keys[].nonce_data.nonce) from Torus nodes?
I want to delete a key when a key obtained with SFA SDK has been imported with tKey.

Thanks
David

@david.hernando Thanks for reaching out.

Your request has been forwarded to our Dev team and we will get back with further updates.

When you import the sfa key to tkey ( migrate from sfa to mfa ) you need to provide the importKey and set the flags delete1OutOf1 to true during the tkey.initialize

// tkey function
  async initialize(params?: {
    withShare?: ShareStore;
    importKey?: BN;
    neverInitializeNewKey?: boolean;
    transitionMetadata?: Metadata;
    previouslyFetchedCloudMetadata?: Metadata;
    previousLocalMetadataTransitions?: LocalMetadataTransitions;
    delete1OutOf1?: boolean;
  }): Promise<KeyDetails> {

@cherngwoei thanks for you response. But the nonce is not deleted.
I see that for delete1OutOf1 I need also to set manualSync=true in the constructor. Then, I’m syncing the metadata calling tKey.syncLocalMetadataTransitions(); after tKey.initialize()`. But in the next authentication I see the Torus nodes still return the nonce…

Can you help please?

Is the user already migrated to tkey?
delete1Of1 will only valid for non migrated user.

if you really want to delete the nonce of the migrated user, you can try this
Use this cautiously

tkey.storageLayer.setMetadata( { input: {message: "__ONE_KEY_DELETE_NONCE__"} , privKey : tkey.serviceProvider.postboxKey } });

Hi @cherngwoei . The user is migrated with tKey.initialize({importKey: privKey, delete1OutOf1:true}), isn’t it?

For a migrated user, when I try:

tkey.storageLayer.setMetadata( { input: {message: "__ONE_KEY_DELETE_NONCE__"} , privKey : tkey.serviceProvider.postboxKey } });

I get the error:

{"error":"noncev2 namespace is a reserved namespace","success":false}

@cherngwoei what are the requisites for the delete nonce call to work?

If I try to set metadata with `“ONE_KEY_DELETE_NONCE” manually, I get the error “noncev2 namespace is a reserved namespace”

Is it expected to work on Sapphire mainnet? With a Custom verifier?

Thanks for your support`