This is an implementation of {AuthProvider} for the Tezos network. It uses the Tezos RPC client to get the active account's address and sign the message with the active account's address.

Param

the provider to use signing the link proof and getting the active account's address

Hierarchy

  • TezosAuthProvider

Implements

Constructors

Properties

isAuthProvider: true = true

Methods

  • (Required) Authenticate function consumes both a message (human readable string) and accountId (often a hex address). It is strictly required that for any given set of {message, accountId} this function deterministically returns a unique 32 - 64 byte hex string of entropy. This will allow this external account to continue to access 3ID in the future and for it be added as an auth method.

    For most implementations this will be signing the message with an account/wallet from your blockchain account provider and returning a fixed length string of the signature by hashing it. This function does not need to consume accountId/address if your provider knows that value at later point of the interaction. But should still map to a unique output for any given message and accountId pair.

    For your given network/blockchain you should be able to find an authenticate function in https://github.com/ceramicnetwork/js-3id-blockchain-utils, if you are using the standard account signing interface in your network/blockchain. If you are using a standard interface and it doesn't exist in js-3id-blockchain-utils, please open an issue there, so we can add shared support for your network.

    Returns

    A 32-64 bytes hex string

    Parameters

    • message: string

      A human readable string

    Returns Promise<string>