Open Beta
Discover Snaps

Nocturne

@nocturne-xyz/snap


Category

Interoperability

Version

0.11.0

Developer

Nocturne

Description by Nocturne

During the Nocturne onboarding flow, the user derives an alternative private key called their Nocturne spending key. This key controls the user's funds within Nocturne. The Nocturne MetaMask Snap stores and manages this spending key. Nocturne Spending Key Derivation During the first user onboarding flow, the user is prompted to sign a fixed message. The produced signature serves as the user's spending key and is stored in the Nocturne Snap. After being stored, the key never leaves the Nocturne Snap and is only accessed by the Snap for producing signatures. Registering Your Canonical Address A canonical Nocturne address is a public address that can be used to generate more Nocturne stealth addresses that belong to the owner of the corresponding Nocturne spending key. One of the last steps in the user-onboarding flow is for the user to register their canonical Nocturne address against their public Ethereum address to facilitate a convenient mapping. The Nocturne Snap will prompt the user to sign a message proving that they own the canonical Nocturne address. After that, the user generates a ZKP of the signature and then submits it to the canonical address registry contract to link their Nocturne address to their public wallet. Signing Operations All operations that spend private funds, (transferring ETH to a fresh address, performing a private swap, etc) must be authorized from your Nocturne spending key. When a user wants to perform an operation, the Nocturne Snap will prompt the user to confirm they would like to authorize the operation. If the user hits 'Confirm,' the Snap will sign the operation with the user's spending key, authorizing the operation.


Source Code

GitHub

Description by Nocturne

During the Nocturne onboarding flow, the user derives an alternative private key called their Nocturne spending key. This key controls the user's funds within Nocturne. The Nocturne MetaMask Snap stores and manages this spending key. Nocturne Spending Key Derivation During the first user onboarding flow, the user is prompted to sign a fixed message. The produced signature serves as the user's spending key and is stored in the Nocturne Snap. After being stored, the key never leaves the Nocturne Snap and is only accessed by the Snap for producing signatures. Registering Your Canonical Address A canonical Nocturne address is a public address that can be used to generate more Nocturne stealth addresses that belong to the owner of the corresponding Nocturne spending key. One of the last steps in the user-onboarding flow is for the user to register their canonical Nocturne address against their public Ethereum address to facilitate a convenient mapping. The Nocturne Snap will prompt the user to sign a message proving that they own the canonical Nocturne address. After that, the user generates a ZKP of the signature and then submits it to the canonical address registry contract to link their Nocturne address to their public wallet. Signing Operations All operations that spend private funds, (transferring ETH to a fresh address, performing a private swap, etc) must be authorized from your Nocturne spending key. When a user wants to perform an operation, the Nocturne Snap will prompt the user to confirm they would like to authorize the operation. If the user hits 'Confirm,' the Snap will sign the operation with the user's spending key, authorizing the operation.

Start exploring blockchain applications in seconds. Trusted by over 30 million users worldwide.

About

  • Website
  • Developer Docs

You acknowledge that any Snap that you install is a Third Party Service, unless otherwise identified, as defined in the Consensys Terms of Use. Your use of Third Party Services is governed by separate terms and conditions set forth by the Third Party Service provider. Consensys does not recommend the use of any Snap by any particular person for any particular reason. You access, rely upon or use the Third Party Service at your own risk. Consensys disclaims all responsibility and liability for any losses on account of your use of Third Party Services. Any information you share with Third Party Services will be collected directly by those Third Party Services in accordance with their privacy policies. Please refer to their privacy policies for more information. Consensys has no access to information you share with Third Party Services.

©2023 MetaMask. All rights reserved. Privacy Policy & Terms of Use