- Preparing search index...
- The search index is not available
programs
Constructors
constructor
- new Campaigns(options?: Partial<ApiOptions>): Campaigns
-
Parameters
-
Optional
options: Partial<ApiOptions>
Properties
Private
Readonly
options
options: ApiOptions
Methods
createAdvertiser
- createAdvertiser(advertiser: {
description: string;
externalLink: string;
icon: string;
name: string;
twitter: undefined | string;
}, did: DID): Promise<TileDocument<{
description: string;
external_link: string;
icon: string;
name: string;
twitter: undefined | string;
}>>
-
Parameters
-
advertiser: {
description: string;
externalLink: string;
icon: string;
name: string;
twitter: undefined | string;
}
-
description: string
-
externalLink: string
-
icon: string
-
name: string
-
twitter: undefined | string
-
did: DID
Returns Promise<TileDocument<{
description: string;
external_link: string;
icon: string;
name: string;
twitter: undefined | string;
}>>
createCampaign
- createCampaign(campaign: {
advertiser: string;
chain: Chains;
details: string;
disableVerification: undefined | boolean;
events: ({ description?: string | undefined; nativeLimit?: number | undefined; perCommit?: number | undefined; contractAddress?: string | undefined; contractEvent?: string | undefined; strategy: CampaignStrategies; rate: number; })[];
id: undefined | string;
owner: undefined | string;
reward: { address?: string | undefined; name: string; type: RewardTypes; ticker: string; };
}, privateKey: string, options?: {
bundlrUrl?: string;
currency?: string;
}): Promise<any>
-
Parameters
-
campaign: {
advertiser: string;
chain: Chains;
details: string;
disableVerification: undefined | boolean;
events: ({ description?: string | undefined; nativeLimit?: number | undefined; perCommit?: number | undefined; contractAddress?: string | undefined; contractEvent?: string | undefined; strategy: CampaignStrategies; rate: number; })[];
id: undefined | string;
owner: undefined | string;
reward: { address?: string | undefined; name: string; type: RewardTypes; ticker: string; };
}
-
advertiser: string
-
chain: Chains
-
details: string
-
disableVerification: undefined | boolean
-
events: ({ description?: string | undefined; nativeLimit?: number | undefined; perCommit?: number | undefined; contractAddress?: string | undefined; contractEvent?: string | undefined; strategy: CampaignStrategies; rate: number; })[]
-
id: undefined | string
-
owner: undefined | string
-
reward: { address?: string | undefined; name: string; type: RewardTypes; ticker: string; }
-
privateKey: string
-
Optional
options: {
bundlrUrl?: string;
currency?: string;
}
-
Optional
bundlrUrl?: string
-
Optional
currency?: string
Returns Promise<any>
createCampaignDetails
- createCampaignDetails(campaignDetails: {
description: undefined | string;
destinationUrl: string;
externalLink: undefined | string;
image: undefined | string;
name: string;
}, did: DID): Promise<TileDocument<{
description: undefined | string;
destination_url: string;
external_link: undefined | string;
image: undefined | string;
name: string;
}>>
-
Parameters
-
campaignDetails: {
description: undefined | string;
destinationUrl: string;
externalLink: undefined | string;
image: undefined | string;
name: string;
}
-
description: undefined | string
-
destinationUrl: string
-
externalLink: undefined | string
-
image: undefined | string
-
name: string
-
did: DID
Returns Promise<TileDocument<{
description: undefined | string;
destination_url: string;
external_link: undefined | string;
image: undefined | string;
name: string;
}>>
getCampaigns
- getCampaigns(refs: CampaignReference[]): Promise<Campaign[]>
-
Parameters
-
refs: CampaignReference[]
Returns Promise<Campaign[]>
indexCampaign
- indexCampaign(transactionId: string): Promise<{
campaign: Campaign;
success: boolean;
}>
-
Returns Promise<{
campaign: Campaign;
success: boolean;
}>