@wharfkit/wallet-plugin-mock - v4.0.2
    Preparing search index...

    Class WalletPluginMock

    Hierarchy

    • AbstractWalletPlugin
      • WalletPluginMock

    Implements

    • WalletPlugin
    Index
    • A constructor for the mock wallet that's capable of overriding most of the default values.

      Parameters

      • Optionaloptions: WalletPluginMockOptions

        WalletPluginMockOptions

      Returns WalletPluginMock

    _data: WalletPluginData
    config: WalletPluginConfig = ...

    The logic configuration for the wallet plugin.

    id: string = 'wallet-plugin-mock'

    A unique string identifier for this wallet plugin.

    It's recommended this is all lower case, no spaces, and only URL-friendly special characters (dashes, underscores, etc)

    loginResponse: WalletPluginLoginResponse = ...

    A mock WalletPluginLoginResponse to be returned by the login method.

    metadata: WalletPluginMetadata = ...

    The metadata for the wallet plugin to be displayed in the user interface.

    signResponse: WalletPluginSignResponse = ...

    A mock WalletPluginSignResponse to be returned by the sign method.

    translations?: LocaleDefinitions

    Any translations this plugin requires

    • get data(): WalletPluginData

      A method to return the data that needs to persist for the plguin - Used in serialization

      Returns WalletPluginData

    • set data(data: WalletPluginData): void

      A method to return the data that needs to persist for the plguin - Used in serialization

      Parameters

      • data: WalletPluginData

      Returns void

    • Shallow copy with fresh data and metadata; every other field must be safe to share.

      Returns WalletPlugin

    • Performs the wallet logic required to login and return the chain and permission level to use.

      Parameters

      • context: LoginContext

      Returns Promise<WalletPluginLoginResponse>

      Promise

    • Serialize the [[WalletPlugin]] ID and data into a plain object.

      Returns SerializedWalletPlugin

    • Performs the wallet logic required to sign a transaction and return the signature.

      Returns Promise<WalletPluginSignResponse>

      Promise