@cfxlabsinc/b2b-services
    Preparing search index...

    Manage reward claims

    This model is not persisted outside its corresponding workflow so we cannot offer many of the methods you would typically see here

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    Methods

    • Create a reward claim

      Claims deduct from reward balance and deposit MOVEUSD into target wallets

      Parameters

      • __namedParameters: Pick<Reward, "amount" | "note" | "category"> & {
            customerId: string;
            entityId: string;
            idempotencyKey?: string;
            targetWallet: PublicKey;
        }

      Returns Promise<
          | { ok: true; value: RewardClaim }
          | {
              error:
                  | ServiceError<
                      | "INVALID_PHONE"
                      | "INVALID_ENTITY_TYPE"
                      | "ENTITY_NOT_FOUND"
                      | "IDEMPOTENCY_ERROR"
                      | "INVALID_AMOUNT",
                  >
                  | ServiceError<
                      "INSUFFICIENT_BALANCE",
                      {
                          balance: { amount: number; currency: "MOVEUSD" };
                          requested: { amount: number; currency: "MOVEUSD" };
                      },
                  >;
              ok: false;
          },
      >