ao-js-sdk - v0.4.0
    Preparing search index...

    Class ProviderStakingClient

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    baseConfig: BaseClientConfig
    tokenClient: TokenClient

    Methods

    • Parameters

      • data: any = ''
      • tags: Tags = []
      • Optionalanchor: string
      • Optionalid: string
      • Optionalowner: string

      Returns Promise<DryRunResult>

    • Protected

      Parameters

      • data: any = ''
      • tags: Tags = []
      • Optionalanchor: string
      • Optionalid: string
      • Optionalowner: string

      Returns Promise<DryRunResult>

    • Retrieves the transaction that created this process. This transaction contains the initial state and configuration of the process in its tags.

      Returns Promise<Partial<FullArweaveTransaction>>

      Promise resolving to the transaction data containing process creation details

      ArweaveGraphQLError if there is an error retrieving the transaction

    • Gets the wallet address associated with the client synchronously. Uses the hasher and JWK to derive the wallet address without async operations.

      Returns string

      The wallet address string

      Error if client is in read-only mode or if synchronous hashing is not supported

    • A Readonly Client can only perform dry run and result operations, however does not require a wallet to be used. If a wallet is specified on instantiation the client will additionally be able to use write operations (messages).

      Returns boolean

      Boolean indicating whether or not the client is for read operations only.

    • Protected

      Parameters

      • data: string = ''
      • tags: Tags = []
      • Optionalanchor: string

      Returns Promise<string>

    • Parameters

      • data: string = ''
      • tags: Tags = []
      • Optionalanchor: string

      Returns Promise<MessageResult>

    • Protected

      Parameters

      • Optionalfrom: string
      • Optionalto: string
      • limit: number = 25
      • sort: SortOrder = SortOrder.ASCENDING

      Returns Promise<ResultsResponse>

    • Controls whether dryrun executes as a message or simulation.

      Parameters

      • enabled: boolean

        When true, dryrun will execute as a real message. When false (default), executes as a simulation.

      Returns void

    • Sets the wallet being used for this client. If the client is readonly it will now have write abilities.

      Parameters

      • wallet: any

        the wallet to use with this client.

      Returns void

    • Stakes tokens by transferring them with an X-Stake tag

      Parameters

      • quantity: string

        Amount of tokens to stake

      • OptionaladditionaForwardedlTags: Tags

        Additional tags to forward with the stake

      • OptionalactorId: string

        Optional actor ID to authorize for the provider

      Returns Promise<boolean>

      Promise resolving to the boolean representation of staking success