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

    Interface IProviderStakingClient

    interface IProviderStakingClient {
        getStake(providerId: string): Promise<any>;
        stake(
            quantity: string,
            additionaForwardedlTags?: Tags,
            actorId?: string,
        ): Promise<boolean>;
        stakeWithDetails(
            quantity: string,
            providerDetails?: ProviderDetails,
            actorId?: string,
        ): Promise<boolean>;
        unstake(data: string): Promise<boolean>;
        updateProviderActor(providerId: string, actorId: string): Promise<boolean>;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Methods

    • 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

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

      Parameters

      • quantity: string

        Amount of tokens to stake

      • OptionalproviderDetails: ProviderDetails

        Optional provider details to include

      • OptionalactorId: string

        Optional actor ID to authorize for the provider

      Returns Promise<boolean>

      Promise resolving to the boolean representation of staking success

    • Updates the provider actor for a staker

      Parameters

      • providerId: string

        The ID of the provider

      • actorId: string

        The ID of the actor being authorized

      Returns Promise<boolean>

      Promise resolving to a boolean indicating success