Hierarchy

  • Web3Wallet
    • HederaWeb3Wallet

Implements

Constructors

Properties

approveSession: ((params) => Promise<Struct>)

Type declaration

    • (params): Promise<Struct>
    • Parameters

      • params: {
            id: number;
            namespaces: Record<string, BaseNamespace>;
            relayProtocol?: string;
        }
        • id: number
        • namespaces: Record<string, BaseNamespace>
        • Optional relayProtocol?: string

      Returns Promise<Struct>

chains: string[] | HederaChainId[] = ...
core: ICore
disconnectSession: ((params) => Promise<void>)

Type declaration

    • (params): Promise<void>
    • Parameters

      • params: {
            reason: ErrorResponse;
            topic: string;
        }
        • reason: ErrorResponse
        • topic: string

      Returns Promise<void>

emitSessionEvent: ((params) => Promise<void>)

Type declaration

    • (params): Promise<void>
    • Parameters

      • params: {
            chainId: string;
            event: any;
            topic: string;
        }
        • chainId: string
        • event: any
        • topic: string

      Returns Promise<void>

engine: IWeb3WalletEngine
events: EventEmitter
extendSession: ((params) => Promise<void>)

Type declaration

    • (params): Promise<void>
    • Parameters

      • params: {
            topic: string;
        }
        • topic: string

      Returns Promise<void>

formatMessage: ((payload, iss) => string)

Type declaration

    • (payload, iss): string
    • Parameters

      • payload: CacaoRequestPayload
      • iss: string

      Returns string

getActiveSessions: (() => Record<string, Struct>)

Type declaration

    • (): Record<string, Struct>
    • Returns Record<string, Struct>

getPendingAuthRequests: (() => Record<number, PendingRequest>)

Type declaration

    • (): Record<number, PendingRequest>
    • Returns Record<number, PendingRequest>

getPendingSessionProposals: (() => Record<number, Struct>)

Type declaration

    • (): Record<number, Struct>
    • Returns Record<number, Struct>

getPendingSessionRequests: (() => Struct[])

Type declaration

    • (): Struct[]
    • Returns Struct[]

logger: Logger
metadata: Metadata
methods: string[] = ...
name: string
off: (<E>(event, listener) => EventEmitter)

Type declaration

    • <E>(event, listener): EventEmitter
    • Type Parameters

      • E extends Event

      Parameters

      • event: E
      • listener: ((args) => void)
          • (args): void
          • Parameters

            • args: EventArguments[E]

            Returns void

      Returns EventEmitter

on: (<E>(event, listener) => EventEmitter)

Type declaration

    • <E>(event, listener): EventEmitter
    • Type Parameters

      • E extends Event

      Parameters

      • event: E
      • listener: ((args) => void)
          • (args): void
          • Parameters

            • args: EventArguments[E]

            Returns void

      Returns EventEmitter

once: (<E>(event, listener) => EventEmitter)

Type declaration

    • <E>(event, listener): EventEmitter
    • Type Parameters

      • E extends Event

      Parameters

      • event: E
      • listener: ((args) => void)
          • (args): void
          • Parameters

            • args: EventArguments[E]

            Returns void

      Returns EventEmitter

opts: Options
pair: ((params) => Promise<void>)

Type declaration

    • (params): Promise<void>
    • Parameters

      • params: {
            activatePairing?: boolean;
            uri: string;
        }
        • Optional activatePairing?: boolean
        • uri: string

      Returns Promise<void>

rejectSession: ((params) => Promise<void>)

Type declaration

    • (params): Promise<void>
    • Parameters

      • params: {
            id: number;
            reason: ErrorResponse;
        }
        • id: number
        • reason: ErrorResponse

      Returns Promise<void>

removeListener: (<E>(event, listener) => EventEmitter)

Type declaration

    • <E>(event, listener): EventEmitter
    • Type Parameters

      • E extends Event

      Parameters

      • event: E
      • listener: ((args) => void)
          • (args): void
          • Parameters

            • args: EventArguments[E]

            Returns void

      Returns EventEmitter

respondAuthRequest: ((params, iss) => Promise<void>)

Type declaration

    • (params, iss): Promise<void>
    • Parameters

      • params: RespondParams
      • iss: string

      Returns Promise<void>

respondSessionRequest: ((params) => Promise<void>)

Type declaration

    • (params): Promise<void>
    • Parameters

      • params: {
            response: JsonRpcResponse;
            topic: string;
        }
        • response: JsonRpcResponse
        • topic: string

      Returns Promise<void>

sessionEvents: string[] | HederaSessionEvent[] = ...
updateSession: ((params) => Promise<void>)

Type declaration

    • (params): Promise<void>
    • Parameters

      • params: {
            namespaces: Namespaces;
            topic: string;
        }
        • namespaces: Namespaces
        • topic: string

      Returns Promise<void>

Methods

  • Parameters

    • accounts: string[]
    • __namedParameters: SessionProposal

    Returns Promise<Struct>

  • Parameters

    • event: SessionRequest
    • hederaWallet: default

    Returns Promise<void>

  • Parameters

    Returns default

  • Parameters

    • id: number
    • topic: string
    • body: default
    • signer: default

    Returns Promise<void>

  • Parameters

    • id: number
    • topic: string
    • _: any
    • signer: default

    Returns Promise<void>

  • Parameters

    • id: number
    • topic: string
    • body: default<any>
    • signer: default

    Returns Promise<void>

  • Parameters

    • id: number
    • topic: string
    • body: default
    • signer: default

    Returns Promise<void>

  • Parameters

    • id: number
    • topic: string
    • body: string
    • signer: default

    Returns Promise<void>

  • Parameters

    • id: number
    • topic: string
    • body: Uint8Array
    • signer: default

    Returns Promise<void>

  • Parameters

    • event: SessionRequest
    • shouldThrow: boolean = true

    Returns {
        accountId?: default;
        body?: string | default | Uint8Array | default<any>;
        chainId: HederaChainId;
        id: number;
        method: HederaJsonRpcMethod;
        topic: string;
    }

    • Optional accountId?: default
    • Optional body?: string | default | Uint8Array | default<any>
    • chainId: HederaChainId
    • id: number
    • method: HederaJsonRpcMethod
    • topic: string
  • Parameters

    • event: SessionRequest
    • error: {
          code: number;
          message: string;
      }
      • code: number
      • message: string

    Returns Promise<void>

  • Parameters

    • name: string
    • value: any
    • expectedType: string

    Returns void

  • Parameters

    Returns Promise<HederaWeb3Wallet>

  • Parameters

    • opts: Options

    Returns Promise<Web3Wallet>

Generated using TypeDoc