Class: TorqueAdminClient
Last updated
Last updated
@torque-labs/torque-ts-sdk • Docs
@torque-labs/torque-ts-sdk / TorqueAdminClient
The TorqueAdminClient class is used to manage admin actions in the Torque API.
Create a new instance of the TorqueAdminClient class with the provided API key.
Parameters
Parameter | Type | Description |
---|---|---|
Returns
Defined in
Create a new campaign with the provided data.
Parameters
Returns
Promise
<SignatureField
>
A promise that resolves with the signature of the transaction.
Defined in
Delete an existing audience.
Parameters
Returns
Promise
<{ audienceId
: string
; }>
A promise that resolves to the deleted audience.
Throws
If the client is not initialized or if there was an error deleting the audience.
Defined in
End a campaign using the provided campaign ID.
Parameters
Returns
Promise
<SignatureField
>
A promise that resolves to the signature of the transaction.
Throws
Throws an error if the client is not initialized or if there is an error ending the campaign.
Defined in
Get a list of all currently active campaigns.
Parameters
Returns
Promise
<{ campaigns
: ApiCampaign
[]; }>
A promise that resolves to an array of ApiCampaign objects.
Throws
If the client is not initialized or there was an error getting the list of campaigns.
Defined in
Get an audience by ID.
Parameters
Returns
Promise
<ApiAudience
>
A promise that resolves to an array of Audiences.
Throws
If the client is not initialized or there was an error getting the audience.
Defined in
Get a list of the user's saved audiences.
Returns
Promise
<{ audiences
: ApiAudience
[]; }>
A promise that resolves to an array of Audiences.
Throws
If the client is not initialized or there was an error getting the audiences.
Defined in
Get the details of a specific campaign.
Parameters
Returns
Promise
<ApiCampaign
>
A Promise that resolves to the campaign data.
Throws
Throws an error if a fetching a campaign failed.
Defined in
Get the analytics data for a specific campaign.
Parameters
Returns
Promise
<CampaignAnalytics
>
A Promise that resolves to the analytics data for the campaign.
Throws
Throws an error if a fetching a campaign failed.
Defined in
Parameters
Returns
Promise
<{ campaigns
: ApiCampaign
[]; }>
Defined in
Get a list of all historic campaigns.
Parameters
Returns
Promise
<{ campaigns
: ApiCampaign
[]; }>
A promise that resolves to an array of ApiCampaign objects.
Throws
If the client is not initialized or there was an error getting the list of campaigns.
Defined in
Get the leaderboard for a specific campaign.
Parameters
Returns
Promise
<ApiCampaignLeaderboard
>
A Promise that resolves to the leaderboard data for the campaign.
Throws
Throws an error if the client is not initialized or if there is an error getting the leaderboard.
Defined in
Initialize a publisher account for the current user.
Returns
Promise
<string
>
A promise that resolves to the signature of the transaction.
Throws
Throws an error if there was an error creating the publisher.
Defined in
Returns
Promise
<void
>
Defined in
Process a publisher payout for the current user, if eligible.
Parameters
Returns
Promise
<string
>
A promise that resolves to the signature of the transaction.
Throws
Throws an error if there was an error paying out the publisher.
Defined in
Get the raffle rewards for a specific campaign.
Parameters
Returns
Promise
<ApiRaffleRewards
>
Throws
Throws an error if the client is not initialized or if there is an error getting the raffle rewards.
Defined in
Save an audience to the user's account.
Parameters
Returns
Promise
<{ audienceId
: string
; }>
A promise that resolves to the id of the saved audience.
Throws
If the client is not initialized or there was an error saving the audience.
Defined in
Update an existing audience with the provided configuration.
Parameters
Returns
Promise
<{ audienceId
: string
; }>
A promise that resolves to the updated audience.
Throws
If the client is not initialized or if there was an error updating the audience.
Defined in
Retrieves the list of safe tokens from the Jupiter ag.
Parameters
Returns
Promise
<SafeToken
[]>
A promise that resolves to an array of SafeToken objects.
Throws
If the client is not initialized or there was an error fetching the safe token list.
Defined in
Property | Type |
---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Name | Type |
---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type |
---|---|
Name | Type |
---|---|
Parameter | Type | Description |
---|---|---|
Name | Type |
---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type |
---|---|
Name | Type |
---|---|
Parameter | Type |
---|---|
Name | Type |
---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type |
---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Name | Type |
---|---|
Parameter | Type | Description |
---|---|---|
Name | Type |
---|---|
Parameter | Type | Description |
---|---|---|