OfferResponse

@torque-labs/sdk


@torque-labs/sdk / OfferResponse

Type Alias: OfferResponse

type OfferResponse = {
  audience:   | {
     address: string | null;
     amount:   | 
        | number
        | string
        | {
        d: ...;
        e: ...;
        s: ...;
       }
        | null;
     createdAt: Date;
     id: string;
     name: string;
     tokenGateType: "NFT" | "SPL" | null;
     type: "ALLOWLIST" | "DENYLIST" | "TOKEN_GATE";
     updatedAt: Date;
    }
     | null;
  createdAt: Date;
  distributors: {
     closeTxSignature: string | null;
     conversions: number | null;
     crankerStatus: "IDLE" | "RUNNING" | "STOPPED";
     crankGuard: {
        activation:   | {
           type: ...;
          }
           | {
           type: ...;
          }
           | {
           type: ...;
          }
           | {
           amount: ...;
           oracle: ...;
           type: ...;
          }
           | {
           date: ...;
           type: ...;
          } & {
           requiredConversionCount: number;
          };
        availability:   | {
           maxConversionsPerRecipient: ...;
           maxTotalConversions: ...;
           recipientConversionPeriod: ...;
          }
           | null;
        distributionFunctionInput:   | {
           type: "CONVERSION_INDEX";
          }
           | {
           max: ...;
           min: ...;
           type: "CONVERSION_DATA";
          }
           | {
           aggregationType: "BUY_VOLUME" | "BUY_AVERAGE";
           type: "AGGREGATION";
          };
        recipient: "USER" | "PUBLISHER" | "BOTH" | "NONE";
       };
     currentBlockHash: string | null;
     deployTxSignature: string | null;
     distributionFunction: {
        createdAt: Date;
        curveDepth: ... | null;
        curveWidth: ... | null;
        id: string;
        slope: ... | null;
        tiers: any | null;
        trend: ... | null;
        type: "CONSTANT" | "LINEAR" | "STEP" | "EXPONENTIAL";
        updatedAt: Date;
        yIntercept: ... | null;
       };
     emissionType: "SOL" | "TOKENS" | "NFT" | "POINTS";
     index: number;
     pubkey: string;
     serializedDeployTx: string | null;
     status: "DRAFT" | "ACTIVE" | "CLOSED";
     tokenAddress: string | null;
     tokenDecimals: number;
     totalFundAmount:   | number
        | string
        | {
        d: number[];
        e: number;
        s: number;
       };
     type: "CONVERSION" | "ASYMMETRIC";
    } & {
     createdAt: Date;
     id: string;
     updatedAt: Date;
    }[];
  endTime: Date;
  id: string;
  metadata: {
     backgroundColor: string | null;
     backgroundImage: string | null;
     colorMode: "light" | "dark" | null;
     description: string | null;
     image: string | null;
     title: string;
     url: string | null;
    };
  offerRequirements: {
     actionUrl: string | null;
     config: any;
     createdAt: Date;
     id: string;
     oracle:   | "TORQUE"
        | "SOLANA_TX"
        | "CUSTOM_EVENT_PROVIDER"
        | "PYTH_MKT_CAP"
        | "PYTH_MKT_VOLUME"
        | "MESSAGE_SIGNATURE"
        | "SOCIAL_MEDIA";
     type: string;
     updatedAt: Date;
    }[];
  startTime: Date;
  status: "DRAFT" | "ACTIVE" | "CLOSED";
  updatedAt: Date;
};

Defined in: sdk/src/types/schemaTypes.ts:1603

Properties

audience?

Defined in: sdk/src/types/schemaTypes.ts:1619


createdAt?

Defined in: sdk/src/types/schemaTypes.ts:1617


distributors

Defined in: sdk/src/types/schemaTypes.ts:1660


endTime

Defined in: sdk/src/types/schemaTypes.ts:1607


id

Defined in: sdk/src/types/schemaTypes.ts:1604


metadata

Defined in: sdk/src/types/schemaTypes.ts:1608

Name
Type

backgroundColor?

string | null

backgroundImage?

string | null

colorMode?

"light" | "dark" | null

description?

string | null

image?

string | null

title

string

url?

string | null


offerRequirements

Defined in: sdk/src/types/schemaTypes.ts:1644

Name
Type

actionUrl?

string | null

config?

any

createdAt?

Date

id

string

oracle

| "TORQUE" | "SOLANA_TX" | "CUSTOM_EVENT_PROVIDER" | "PYTH_MKT_CAP" | "PYTH_MKT_VOLUME" | "MESSAGE_SIGNATURE" | "SOCIAL_MEDIA"

type

string

updatedAt

Date


startTime

Defined in: sdk/src/types/schemaTypes.ts:1606


status

Defined in: sdk/src/types/schemaTypes.ts:1605


updatedAt

Defined in: sdk/src/types/schemaTypes.ts:1618

Last updated