Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

Protected api

Methods

createRateAndCommentOperation

  • Create a rate and comment content operation.

    Parameters

    • uri: string

      a uri of the content

    • consumer: ChainObject

      object id of the account, 1.2.*

    • rating: 1 | 2 | 3 | 4 | 5

      1-5 stars

    • comment: string

      max 100 chars

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<LeaveRatingAndCommentOperation>

    a rate and comment content operation

findAll

  • Search consumer open and history purchases.

    Parameters

    • consumer: ChainObject

      object id of the account, 1.2.*

    • term: string

      search term

    • Default value from: ChainObject = ObjectType.Null.genericId()

      object id of the history object to start from, use {@link ObjectType.Null.genericId} to ignore

    • Default value order: SearchPurchasesOrder = SearchPurchasesOrder.PurchasedDesc

      order defined by SearchPurchasesOrder

    • Default value limit: number = 100

      number of entries, max 100

    Returns Observable<Purchase[]>

    list of purchases

findAllForFeedback

  • findAllForFeedback(uri: string, user?: undefined | string, count?: number, startId?: ChainObject): Observable<Purchase[]>
  • Search for feedback.

    Parameters

    • uri: string

      content URI

    • Optional user: undefined | string

      feedback author account name

    • Default value count: number = 100

      maximum number of feedback objects to fetch

    • Default value startId: ChainObject = ObjectType.Null.genericId()

      the id of purchase object to start searching from

    Returns Observable<Purchase[]>

    a list of purchase objects

get

getAllHistory

getAllOpen

getAllOpenByAccount

getAllOpenByUri

  • getAllOpenByUri(uri: string): Observable<Purchase[]>
  • Get a list of open purchases for content URI.

    Parameters

    • uri: string

      content uri

    Returns Observable<Purchase[]>

    a list of open purchases

rateAndComment

  • Rate and comment content operation.

    Parameters

    • credentials: Credentials

      account credentials

    • uri: string

      a uri of the content

    • rating: 1 | 2 | 3 | 4 | 5

      1-5 stars

    • comment: string

      max 100 chars

    • Optional fee: Fee

      fee for the operation or asset id, if left undefined the fee will be computed in DCT asset. When set, the request might fail if the asset is not convertible to DCT or conversion pool is not large enough

    Returns Observable<TransactionConfirmation>

    a rate and comment content operation

Protected request

restoreEncryptionKey

  • restoreEncryptionKey(elGamalPrivate: PubKey, purchaseId: ChainObject): Observable<string>
  • Restores encryption key from key parts stored in buying object.

    Parameters

    • elGamalPrivate: PubKey

      the private El Gamal key

    • purchaseId: ChainObject

      the purchase object

    Returns Observable<string>

    AES encryption key

Generated using TypeDoc