API

Dc Auto Top SDK

Quick tip

If you are looking for a quick start guide, check out the Getting Started guide. We also have some react examples here.

Instructions

close_auto_top_off_v0

Accounts

NameMutabilitySignerDocs
authorityimmutno
auto_top_offimmutno
queue_authorityimmutno
task_queue_authorityimmutno
rent_refundimmutno
task_queueimmutno
next_taskimmutno
daoimmutno
hnt_mintimmutno
dca_mintimmutno
hnt_accountimmutno
authority_hnt_accountimmutno
dc_accountimmutno
dca_mint_accountimmutno
authority_dca_mint_accountimmutno
next_hnt_taskimmutno
associated_token_programimmutno
token_programimmutno
tuktuk_programimmutno
system_programimmutno

Args

NameTypeDocs

close_legacy_auto_top_off

Accounts

NameMutabilitySignerDocs
authorityimmutno
auto_top_offimmutno
delegated_data_creditsimmutno
hnt_accountimmutno
authority_hnt_accountimmutno
dc_accountimmutno
associated_token_programimmutno
token_programimmutno
system_programimmutno

Args

NameTypeDocs

initialize_auto_top_off_v0

Accounts

NameMutabilitySignerDocs
payerimmutno
authorityimmutno
auto_top_offimmutno
hnt_price_oracleimmutno
dca_input_price_oracleimmutno
daoimmutno
data_creditsimmutno
dc_mintimmutno
hnt_mintimmutno
delegated_data_creditsimmutno
dc_accountimmutno
hnt_accountimmutno
dca_mintimmutno
dca_mint_accountimmutno
sub_daoimmutno
task_queueimmutno
circuit_breakerimmutno
queue_authorityimmutno
system_programimmutno
associated_token_programimmutno
token_programimmutno

Args

NameTypeDocs
args[object Object]

schedule_task_v0

Accounts

NameMutabilitySignerDocs
payerimmutno
auto_top_offimmutno
next_taskimmutnoOnly allow one task to be scheduled at a time
next_hnt_taskimmutnoOnly allow one task to be scheduled at a time
queue_authorityimmutno
task_queue_authorityimmutno
task_queueimmutno
taskimmutno
hnt_taskimmutno
tuktuk_programimmutno
system_programimmutno

Args

NameTypeDocs
args[object Object]

top_off_dc_v0

Accounts

NameMutabilitySignerDocs
auto_top_offimmutno
task_queueimmutno
delegated_data_creditsimmutno
data_creditsimmutno
dc_mintimmutno
hnt_mintimmutno
daoimmutno
sub_daoimmutno
from_accountimmutno
from_hnt_accountimmutno
hnt_accountimmutno
hnt_price_oracleimmutno
escrow_accountimmutno
circuit_breakerimmutno
associated_token_programimmutno
token_programimmutno
system_programimmutno
circuit_breaker_programimmutno
data_credits_programimmutno
instruction_sysvarimmutnothe supplied Sysvar could be anything else. The Instruction Sysvar has not been implemented in the Anchor framework yet, so this is the safe approach.

Args

NameTypeDocs

top_off_hnt_v0

Accounts

NameMutabilitySignerDocs
auto_top_offimmutno
task_queueimmutno
hnt_accountimmutno
hnt_mintimmutno
dca_mintimmutno
dca_mint_accountimmutno
dca_input_price_oracleimmutno
hnt_price_oracleimmutno
dcaimmutno
dca_input_accountimmutno
dca_destination_token_accountimmutno
associated_token_programimmutno
token_programimmutno
system_programimmutno
tuktuk_dca_programimmutno
instruction_sysvarimmutnothe supplied Sysvar could be anything else. The Instruction Sysvar has not been implemented in the Anchor framework yet, so this is the safe approach.
dca_custom_signerimmutno

Args

NameTypeDocs

update_auto_top_off_v0

Accounts

NameMutabilitySignerDocs
authorityimmutno
payerimmutno
auto_top_offimmutno
queue_authorityimmutno
task_queue_authorityimmutno
task_queueimmutno
next_taskimmutno
next_hnt_taskimmutno
task_rent_refundimmutno
hnt_task_rent_refundimmutno
dca_mintimmutno
dca_mint_accountimmutno
tuktuk_programimmutno
system_programimmutno
token_programimmutno
associated_token_programimmutno

Args

NameTypeDocs
args[object Object]

Accounts

AutoTopOffV0

undefined

DaoV0

undefined

DataCreditsV0

undefined

DelegatedDataCreditsV0

undefined

MintWindowedCircuitBreakerV0

undefined

PriceUpdateV2

undefined

SubDaoV0

undefined

TaskQueueAuthorityV0

undefined

TaskQueueV0

undefined

Types

AutoTopOffV0

FieldType
authoritypubkey
data_creditspubkey
task_queuepubkey
sub_daopubkey
next_taskpubkey
next_hnt_taskpubkey
delegated_data_creditspubkey
dc_mintpubkey
hnt_mintpubkey
daopubkey
hnt_price_oraclepubkey
hnt_accountpubkey
dc_accountpubkey
escrow_accountpubkey
circuit_breakerpubkey
bumpu8
queue_authority_bumpu8
reserved[object Object]
thresholdu64
schedule[object Object]
dca_url[object Object]
dca_signerpubkey
hnt_thresholdu64
dca_mintpubkey
dca_mint_accountpubkey
dca_swap_amountu64
dca_interval_secondsu64
dca_input_price_oraclepubkey
dcapubkey

CompiledInstructionV0

FieldType
program_id_indexu8
accountsbytes
databytes

CompiledTransactionV0

FieldType
num_rw_signersu8
num_ro_signersu8
num_rwu8
accountspubkey
instructions[object Object]
signer_seedsbytes

DaoV0

FieldType
hnt_mintpubkey
dc_mintpubkey
authoritypubkey
registrarpubkey
hst_poolpubkey
net_emissions_capu64
num_sub_daosu32
emission_schedule[object Object]
hst_emission_schedule[object Object]
bump_seedu8
rewards_escrowpubkey
delegator_poolpubkey
delegator_rewards_percentu64
proposal_namespacepubkey
recent_proposals[object Object]

DataCreditsV0

FieldType
dc_mintpubkey
hnt_mintpubkey
authoritypubkey
hnt_price_oraclepubkey
data_credits_bumpu8
account_payerpubkey
account_payer_bumpu8

DelegatedDataCreditsV0

FieldType
data_creditspubkey
sub_daopubkey
escrow_accountpubkey
router_keystring
bumpu8

EmissionScheduleItem

FieldType
start_unix_timei64
emissions_per_epochu64

InitializeAutoTopOffArgsV0

FieldType
schedulestring
thresholdu64
router_keystring
hnt_thresholdu64
dca_swap_amountu64
dca_interval_secondsu64
dca_urlstring
dca_signerpubkey

MintWindowedCircuitBreakerV0

FieldType
mintpubkey
authoritypubkey
mint_authoritypubkey
config[object Object]
last_window[object Object]
bump_seedu8

PercentItem

FieldType
start_unix_timei64
percentu8

PriceFeedMessage

FieldType
feed_id[object Object]
pricei64
confu64
exponenti32
publish_timei64
prev_publish_timei64
ema_pricei64
ema_confu64

PriceUpdateV2

FieldType
write_authoritypubkey
verification_level[object Object]
price_message[object Object]
posted_slotu64

RecentProposal

FieldType
proposalpubkey
tsi64

RunTaskReturnV0

FieldType
tasks[object Object]
accountspubkey

ScheduleTaskArgsV0

FieldType
task_idu16
hnt_task_idu16

SubDaoV0

FieldType
daopubkey
dnt_mintpubkey
treasurypubkey
rewards_escrowpubkey
delegator_poolpubkey
vehnt_delegatedu128
vehnt_last_calculated_tsi64
vehnt_fall_rateu128
authoritypubkey
_deprecated_active_device_aggregatorpubkey
dc_burn_authoritypubkey
onboarding_dc_feeu64
emission_schedule[object Object]
bump_seedu8
registrarpubkey
_deprecated_delegator_rewards_percentu64
onboarding_data_only_dc_feeu64
dc_onboarding_fees_paidu64
active_device_authoritypubkey

TaskQueueAuthorityV0

FieldType
task_queuepubkey
queue_authoritypubkey
bump_seedu8

TaskQueueV0

FieldType
tuktuk_configpubkey
idu32
update_authoritypubkey
reservedpubkey
min_crank_rewardu64
uncollected_protocol_feesu64
capacityu16
created_ati64
updated_ati64
bump_seedu8
task_bitmapbytes
namestring
lookup_tablespubkey
num_queue_authoritiesu16
stale_task_ageu32

TaskReturnV0

FieldType
trigger[object Object]
transaction[object Object]
crank_rewardu64
free_tasksu8
descriptionstring

ThresholdType

VariantFields
Percent
Absolute

TransactionSourceV0

VariantFields
CompiledV0undefined: undefined
RemoteV0url: string, signer: pubkey

TriggerV0

VariantFields
Now
Timestampundefined: undefined

UpdateAutoTopOffArgsV0

FieldType
schedulestring
thresholdu64
hnt_price_oraclepubkey
hnt_thresholdu64
dca_swap_amountu64
dca_interval_secondsu64
dca_input_price_oraclepubkey

VerificationLevel

VariantFields
Partialnum_signatures: u8
Full

WindowV0

FieldType
last_aggregated_valueu64
last_unix_timestampi64

WindowedCircuitBreakerConfigV0

FieldType
window_size_secondsu64
threshold_type[object Object]
thresholdu64
Previous