TypedDistributor

@torque-labs/sdk


@torque-labs/sdk / TypedDistributor

Type Alias: TypedDistributor

type TypedDistributor = {
  closeTxSignature: string | null;
  conversions: number | null;
  crankerStatus: "IDLE" | "RUNNING" | "STOPPED";
  crankGuard: {
     activation:   | {
        type: "OFFER_START";
       }
        | {
        type: "OFFER_CONCLUSION";
       }
        | {
        type: "CONVERSION_COUNT";
       }
        | {
        amount: number;
        oracle:   | "TORQUE"
           | "SOLANA_TX"
           | "CUSTOM_EVENT_PROVIDER"
           | "PYTH_MKT_CAP"
           | "PYTH_MKT_VOLUME"
           | "MESSAGE_SIGNATURE"
           | "SOCIAL_MEDIA";
        type: "EVENT";
       }
        | {
        date: Date;
        type: "DATE";
       } & {
        requiredConversionCount: number;
       };
     availability:   | {
        maxConversionsPerRecipient: number | null;
        maxTotalConversions: number | null;
        recipientConversionPeriod: ... | null;
       }
        | null;
     distributionFunctionInput:   | {
        type: "CONVERSION_INDEX";
       }
        | {
        max: number | null;
        min: number | null;
        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:   | 
        | number
        | string
        | {
        d: number[];
        e: number;
        s: number;
       }
        | null;
     curveWidth:   | 
        | number
        | string
        | {
        d: number[];
        e: number;
        s: number;
       }
        | null;
     id: string;
     slope:   | 
        | number
        | string
        | {
        d: number[];
        e: number;
        s: number;
       }
        | null;
     tiers: any | null;
     trend: "NEGATIVE" | "POSITIVE" | null;
     type: "CONSTANT" | "LINEAR" | "STEP" | "EXPONENTIAL";
     updatedAt: Date;
     yIntercept:   | 
        | number
        | string
        | {
        d: number[];
        e: number;
        s: number;
       }
        | 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";
};

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

Properties

closeTxSignature?

optional closeTxSignature: string | null;

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


conversions?

optional conversions: number | null;

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


crankerStatus

crankerStatus: "IDLE" | "RUNNING" | "STOPPED";

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


crankGuard?

optional crankGuard: {
  activation:   | {
     type: "OFFER_START";
    }
     | {
     type: "OFFER_CONCLUSION";
    }
     | {
     type: "CONVERSION_COUNT";
    }
     | {
     amount: number;
     oracle:   | "TORQUE"
        | "SOLANA_TX"
        | "CUSTOM_EVENT_PROVIDER"
        | "PYTH_MKT_CAP"
        | "PYTH_MKT_VOLUME"
        | "MESSAGE_SIGNATURE"
        | "SOCIAL_MEDIA";
     type: "EVENT";
    }
     | {
     date: Date;
     type: "DATE";
    } & {
     requiredConversionCount: number;
    };
  availability:   | {
     maxConversionsPerRecipient: number | null;
     maxTotalConversions: number | null;
     recipientConversionPeriod: ... | null;
    }
     | null;
  distributionFunctionInput:   | {
     type: "CONVERSION_INDEX";
    }
     | {
     max: number | null;
     min: number | null;
     type: "CONVERSION_DATA";
    }
     | {
     aggregationType: "BUY_VOLUME" | "BUY_AVERAGE";
     type: "AGGREGATION";
    };
  recipient: "USER" | "PUBLISHER" | "BOTH" | "NONE";
};

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

Name
Type

activation

| { type: "OFFER_START"; } | { type: "OFFER_CONCLUSION"; } | { type: "CONVERSION_COUNT"; } | { amount: number; oracle: | "TORQUE" | "SOLANA_TX" | "CUSTOM_EVENT_PROVIDER" | "PYTH_MKT_CAP" | "PYTH_MKT_VOLUME" | "MESSAGE_SIGNATURE" | "SOCIAL_MEDIA"; type: "EVENT"; } | { date: Date; type: "DATE"; } & { requiredConversionCount: number; }

availability?

| { maxConversionsPerRecipient: number | null; maxTotalConversions: number | null; recipientConversionPeriod: ... | null; } | null

distributionFunctionInput

| { type: "CONVERSION_INDEX"; } | { max: number | null; min: number | null; type: "CONVERSION_DATA"; } | { aggregationType: "BUY_VOLUME" | "BUY_AVERAGE"; type: "AGGREGATION"; }

recipient

"USER" | "PUBLISHER" | "BOTH" | "NONE"


currentBlockHash?

optional currentBlockHash: string | null;

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


deployTxSignature?

optional deployTxSignature: string | null;

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


distributionFunction?

optional distributionFunction: {
  createdAt: Date;
  curveDepth:   | 
     | number
     | string
     | {
     d: number[];
     e: number;
     s: number;
    }
     | null;
  curveWidth:   | 
     | number
     | string
     | {
     d: number[];
     e: number;
     s: number;
    }
     | null;
  id: string;
  slope:   | 
     | number
     | string
     | {
     d: number[];
     e: number;
     s: number;
    }
     | null;
  tiers: any | null;
  trend: "NEGATIVE" | "POSITIVE" | null;
  type: "CONSTANT" | "LINEAR" | "STEP" | "EXPONENTIAL";
  updatedAt: Date;
  yIntercept:   | 
     | number
     | string
     | {
     d: number[];
     e: number;
     s: number;
    }
     | null;
};

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

Name
Type

createdAt?

Date

curveDepth?

| | number | string | { d: number[]; e: number; s: number; } | null

curveWidth?

| | number | string | { d: number[]; e: number; s: number; } | null

id

string

slope?

| | number | string | { d: number[]; e: number; s: number; } | null

tiers?

any | null

trend?

"NEGATIVE" | "POSITIVE" | null

type

"CONSTANT" | "LINEAR" | "STEP" | "EXPONENTIAL"

updatedAt

Date

yIntercept?

| | number | string | { d: number[]; e: number; s: number; } | null


emissionType

emissionType: "SOL" | "TOKENS" | "NFT" | "POINTS";

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


index

index: number;

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


pubkey

pubkey: string;

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


serializedDeployTx?

optional serializedDeployTx: string | null;

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


status

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

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


tokenAddress?

optional tokenAddress: string | null;

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


tokenDecimals?

optional tokenDecimals: number;

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


totalFundAmount

totalFundAmount: 
  | number
  | string
  | {
  d: number[];
  e: number;
  s: number;
};

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


type

type: "CONVERSION" | "ASYMMETRIC";

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

Last updated