This client is intended to be the primary and most convenient method of interaction for apps built on the holoom platform. It provides tools for:

  • Username registration and attestation with an authority
  • Management of a metadata for an agent
  • Binding Solana and Ethereum wallets to the user's AgentPubKey

Constructors

Properties

usernameAttestationProvider: Uint8Array

Methods

  • Retrieves an array of all EVM and Solana addresses under the user's control.

    It is possible for this information to be stale if the agent's conductor hasn't received gossip of the latest information - this is likely to happen when switching hosts on the holo network.

    Returns Promise<BoundWallet[]>

  • Retrieves a message to be signed by the specified EVM wallet in order to bind it to the user's agent.

    This signing message includes the agent's chain head and thus becomes stale if the user performs another action that progresses their chain before first submitting their binding signature.

    Parameters

    • evmAddress: `0x${string}`

    Returns Promise<string>

  • Retrieves the latest value (if any) of an item in the user's metadata K-V store.

    It is possible for this value to be stale (or null) if the agent's conductor hasn't received gossip of the latest information - this is likely to happen when switching hosts on the holo network.

    Parameters

    • name: string

    Returns Promise<null | string>

  • Retrieves a message to be signed by the specified Solana wallet in order to bind it to the user's agent.

    This signing message includes the agent's chain head and thus becomes stale if the user performs another action that progresses their chain before first submitting their binding signature.

    Parameters

    • solanaPublicKey: PublicKey

    Returns Promise<string>

  • Returns the user's username if they have registered one.

    Returning null doesn't guarantee that the user has never registered, as this can also happen if the holochain conductor hasn't yet received gossip of an existing registration - this is likely to happen when switching hosts on the holo network.

    Returns Promise<null | string>

  • Submits a username for registration.

    The user's conductor will sign the username and submit it to the authority agent, which checks the signature and attests the username's uniqueness.

    Parameters

    • username: string

    Returns Promise<void>

  • Sends a request to an EVM signer to sign over the result of the user's specified RecipeExecution given a pre-existing offer that was declared by the EVM signature provider.

    Parameters

    • recipeExecutionAh: Uint8Array

      The ActionHash of the RecipeExecution Record for which the user wishes to have the result signed over.

    • signingOfferAh: Uint8Array

      The ActionHash of the SigningOffer Record that specifies the Recipe for which the user has an RecipeExecution

    • opts: {
          retryDelay: number;
          timeoutMs: number;
      } = ...

      Options for changing the retry behaviour

      • retryDelay: number
      • timeoutMs: number

    Returns Promise<SignedEvmU256Array>

    The EVM-signed RecipeExecution result.

  • Sets a value for an item in the user's metadata key-value store.

    Each user has a public freeform (i.e. without specific validation) string-to-string K-V store, where K-V pairs are encoded into link tags on the agent in question.

    Parameters

    • name: string
    • value: string

    Returns Promise<void>

  • Creates a verifiable entry that shows that the user has control over the specified EVM wallet.

    The provided signature must be over the current binding message - see getEvmWalletBindingMessage.

    Parameters

    • evmAddress: `0x${string}`
    • evmSignature: `0x${string}`

    Returns Promise<void>

  • Creates a verifiable entry that shows that the user has control over the specified Solana wallet.

    The provided signature must be over the current binding message - see getSolanaWalletBindingMessage.

    Parameters

    • solanaPublicKey: PublicKey
    • solanaSignature: Uint8Array

    Returns Promise<void>

  • Returns a promise that resolves once the holoom happ is loaded and ready to use.

    Parameters

    • interval: number = 1000
    • timeout: number = 30_000

    Returns Promise<void>