DistributorInput

@torque-labs/sdk


@torque-labs/sdk / DistributorInput

Type Alias: DistributorInput

type DistributorInput = {
  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";
    };
  distributionFunction:   | {
     type: "CONSTANT";
     yIntercept: number;
    }
     | {
     slope: number;
     trend: "NEGATIVE" | "POSITIVE";
     type: "LINEAR";
     yIntercept: number;
    }
     | {
     tiers: {
        input: number;
        output: number;
       }[];
     type: "STEP";
    }
     | {
     curveDepth: number;
     curveWidth: number;
     type: "EXPONENTIAL";
     yIntercept: number;
    };
  emissionType: "SOL" | "TOKENS" | "NFT" | "POINTS";
  pointId: string | null;
  tokenAddress: string | null;
  tokenDecimals: number;
  totalFundAmount: number;
  type: "CONVERSION" | "ASYMMETRIC";
};

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

Properties

crankGuard

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:695

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"


distributionFunction

distributionFunction: 
  | {
  type: "CONSTANT";
  yIntercept: number;
 }
  | {
  slope: number;
  trend: "NEGATIVE" | "POSITIVE";
  type: "LINEAR";
  yIntercept: number;
 }
  | {
  tiers: {
     input: number;
     output: number;
    }[];
  type: "STEP";
 }
  | {
  curveDepth: number;
  curveWidth: number;
  type: "EXPONENTIAL";
  yIntercept: number;
};

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


emissionType

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

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


pointId?

optional pointId: string | null;

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


tokenAddress?

optional tokenAddress: string | null;

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


tokenDecimals?

optional tokenDecimals: number;

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


totalFundAmount

totalFundAmount: number;

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


type

type: "CONVERSION" | "ASYMMETRIC";

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

Last updated