@nevermined-io/payments
    Preparing search index...

    Class DelegationAPI

    API for managing payment methods and delegations (card and crypto).

    Hierarchy

    • BasePaymentsAPI
      • DelegationAPI
    Index

    Constructors

    Properties

    accountAddress: string
    appId?: string
    environment: EnvironmentInfo
    environmentName: EnvironmentName
    heliconeApiKey: string
    isBrowserInstance: boolean = true
    nvmApiKey: string
    returnUrl: string
    version?: string

    Methods

    • It returns the account address associated with the NVM API Key used to initialize the Payments Library instance.

      Returns string | undefined

      The account address extracted from the NVM API Key

    • Internal

      Returns the HTTP options required to query the backend.

      Parameters

      • method: string

        HTTP method.

      • Optionalbody: any

        Optional request body.

      Returns any

      HTTP options object.

    • Internal

      Get HTTP options for public backend requests (no authorization header). Converts body keys from snake_case to camelCase for consistency.

      Parameters

      • method: string

        HTTP method

      • Optionalbody: any

        Optional request body (keys will be converted to camelCase)

      Returns {
          body?: string;
          headers: { Accept: string; "Content-Type": string };
          method: string;
      }

      HTTP options object

    • Parses the NVM API Key to extract the account address.

      Returns { accountAddress: string; heliconeApiKey: string }

      PaymentsError if the API key is invalid.