LogoLogo
  • Basics
    • Introduction
    • Decentralized Identifiers
    • Veramo
    • Roadmap
    • FAQs
  • Identify Snap
    • Snap Architecture
    • Snap Account
    • Snap RPC APIs
      • Basic APIs
        • hello
      • Snap APIs
        • togglePopups
      • Account APIs
        • getAccountInfo
      • DID APIs
        • getAvailableDIDMethods
        • getCurrentDIDMethod
        • switchMethod
        • resolveDID
      • Verifiable Credentials APIs
        • createVC
        • saveVC
        • getVCs
        • syncGoogleVCs
        • verifyVC
        • removeVC
        • deleteAllVCs
        • createVP
        • verifyVP
      • Google Drive APIs
        • configureGoogleAccount
    • Snap Plugins
    • Snap Permissions
  • Getting Started
    • Introduction
    • Application Setup
    • Hello World
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Identify Snap

Snap RPC APIs

Connecting to a non-metamask(external) account

Users can connect to both metamask accounts and non-metamask accounts with Identify Snap. For connecting to metamask accounts, everything is handled automatically as snap has direct access to Metamask APIs however for connecting to non-metamask accounts, some additional flags must be passed so the snap recognizes that the user is trying to connect to an external account.

The flag for an external flag is as follows:

const externalAccountParams = {
  externalAccount: {
    accountIdOrEvmAddress: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
    curve?: 'ECDSA_SECP256K1' | 'ED25519'
  }
}

In addition to Hedera EVM accounts, Identify Snap also lets users connect to Hedera Accounts with account Ids directly.

For that, the flag for an external flag is as follows:

const externalAccountParams = {
  externalAccount: {
    accountIdOrEvmAddress: '0.0.12345',
    curve?: 'ECDSA_SECP256K1' | 'ED25519'
  }
}

Identify Snap lets users connect to their Hedera accounts that were created using the following curves:

PreviousSnap AccountNextBasic APIs

Last updated 3 months ago

Was this helpful?

: A cryptographic algorithm used for data integrity and widely used in cryptocurrencies. In this term, "secp256k1" refers to the specific parameters of the elliptic curve used, making it efficient for computations. Hedera supports this signature scheme for generating cryptographic keys and signing transactions.

: In the context of Hedera, Ed25519 is one of the signature schemes supported for the creation and verification of digital signatures. It's often used for signing transactions, as it provides a strong level of security while still being efficient to compute.

ECDSA_SECP256K1
ED25519