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?

optional 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;

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


createdAt?

optional createdAt: Date;

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


distributors

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;
 }[];

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


endTime

endTime: Date;

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


id

id: string;

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


metadata

metadata: {
  backgroundColor: string | null;
  backgroundImage: string | null;
  colorMode: "light" | "dark" | null;
  description: string | null;
  image: string | null;
  title: string;
  url: string | null;
};

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

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;
 }[];

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

startTime: Date;

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


status

status: "DRAFT" | "ACTIVE" | "CLOSED";

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


updatedAt

updatedAt: Date;

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

Last updated