Skip to content

Type error when using ethers Wallet with OrbisEVMAuth #4

@m0ar

Description

@m0ar

Following the documentation for did:pkh yields a type error, both for ethers@5 and ethers@6:

import { OrbisEVMAuth } from "@useorbis/db-sdk/auth"
import { Wallet } from "ethers"

const provider = new Wallet(process.env.PRIVATE_KEY)

// Argument of type 'Wallet' is not assignable to parameter of type 'IEVMProvider | IGenericSignerProvider'.
//  Type 'Wallet' is missing the following properties from type 'IGenericSignerProvider': genericSignerId, chain
const auth = new OrbisEVMAuth(provider)

It seems to be a type-only incompatibility, as I can create MIDs at runtime with this cast:

const auth = new OrbisEVMAuth(provider as unknown as IEVMProvider);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions