Hierarchy (view full)

Constructors

Properties

chainId: string = ""
connected: boolean = false
name: string = ""
provider: INetworkProvider
rpc_url: string = ""
signer: any = null
wallet: UserSigner | ExtensionProvider

Methods

  • Connects to a wallet using a private key

    Parameters

    • privateKey: string

      The private key of the wallet

    • options: {
          password: string;
      }
      • password: string

    Returns Promise<UserSigner>

    The wallet object

  • Alias

    Creates a signed transaction to transfer default chain currency

    Parameters

    • address: string
    • amount: string

      The amount to transfer

    Returns Promise<IPlainTransactionObject>

    The signed transaction

    prepareTransfer

  • Creates a list of signed transactions to transfer default chain currency

    Parameters

    Returns Promise<IPlainTransactionObject[]>

    An ordered list of signed transactions

  • Creates a signed transaction to transfer default chain currency

    Type Parameters

    Parameters

    • this: T
    • receiver: string

      The receiver's address

    • amount: string

      The amount to transfer

    • Optionaloptions: Options

      Options

    Returns Promise<Awaited<ReturnType<T["preparePays"]>>[number]>

    The signed transaction

  • Creatthis.provider = new JsonRpcProvider(this.rpc_url)es a list of signed transactions to transfer default chain currency

    Type Parameters

    Parameters

    Returns Promise<Awaited<ReturnType<T["preparePays"]>>>

    An ordered list of signed transactions

  • Signs a message using the connected wallet

    Parameters

    • message: string

      The message to sign

    • Optionaloptions: {
          privateKey?: string;
      }

      Options

      • OptionalprivateKey?: string

    Returns Promise<string>

    The signed message

  • Signs a single transaction. Calls signTransactions with a single transaction and returns the first element of the result.

    Parameters

    Returns Promise<IPlainTransactionObject>

    The signed transaction as a plain object

  • Verifies a message using the connected wallet

    Parameters

    • message: string

      The message to verify

    • signature: string

      The signature to verify

    • publicKey: string

    Returns Promise<boolean>

    A boolean indicating if the message was verified