@dfinity/sns 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/candid/sns_governance.certified.idl.js +23 -0
  2. package/dist/candid/sns_governance.d.ts +24 -0
  3. package/dist/candid/sns_governance.did +19 -1
  4. package/dist/candid/sns_governance.idl.js +23 -0
  5. package/dist/candid/sns_governance_test.certified.idl.js +23 -0
  6. package/dist/candid/sns_governance_test.d.ts +24 -0
  7. package/dist/candid/sns_governance_test.did +19 -1
  8. package/dist/candid/sns_governance_test.idl.js +23 -0
  9. package/dist/candid/sns_root.certified.idl.js +6 -0
  10. package/dist/candid/sns_root.d.ts +3 -0
  11. package/dist/candid/sns_root.did +4 -1
  12. package/dist/candid/sns_root.idl.js +6 -0
  13. package/dist/candid/sns_swap.certified.idl.js +18 -33
  14. package/dist/candid/sns_swap.d.ts +11 -11
  15. package/dist/candid/sns_swap.did +14 -11
  16. package/dist/candid/sns_swap.idl.js +18 -33
  17. package/dist/cjs/index.cjs.js +1 -1
  18. package/dist/cjs/index.cjs.js.map +3 -3
  19. package/dist/esm/chunk-7CU6QPD4.js +2 -0
  20. package/dist/esm/chunk-7CU6QPD4.js.map +7 -0
  21. package/dist/esm/chunk-C7HBQQIL.js +2 -0
  22. package/dist/esm/chunk-C7HBQQIL.js.map +7 -0
  23. package/dist/esm/chunk-K2WYATWO.js +2 -0
  24. package/dist/esm/chunk-K2WYATWO.js.map +7 -0
  25. package/dist/esm/{chunk-R7I3KJ5Z.js → chunk-TVXJJLBF.js} +2 -2
  26. package/dist/esm/governance.canister.js +1 -1
  27. package/dist/esm/index.js +1 -1
  28. package/dist/esm/index.js.map +3 -3
  29. package/dist/esm/root.canister.js +1 -1
  30. package/dist/esm/sns.js +1 -1
  31. package/dist/esm/swap.canister.js +1 -1
  32. package/package.json +6 -6
  33. package/dist/esm/chunk-34CD4QJG.js +0 -2
  34. package/dist/esm/chunk-34CD4QJG.js.map +0 -7
  35. package/dist/esm/chunk-4GE7OJRF.js +0 -2
  36. package/dist/esm/chunk-4GE7OJRF.js.map +0 -7
  37. package/dist/esm/chunk-VUTJEPVF.js +0 -2
  38. package/dist/esm/chunk-VUTJEPVF.js.map +0 -7
  39. /package/dist/esm/{chunk-R7I3KJ5Z.js.map → chunk-TVXJJLBF.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-4GE7OJRF.js";export{a as SnsRootCanister};
1
+ import{a}from"./chunk-K2WYATWO.js";export{a as SnsRootCanister};
2
2
  //# sourceMappingURL=root.canister.js.map
package/dist/esm/sns.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-R7I3KJ5Z.js";import"./chunk-VUTJEPVF.js";import"./chunk-4GE7OJRF.js";import"./chunk-CQAJ2SZB.js";import"./chunk-4INNMFYU.js";import"./chunk-34CD4QJG.js";export{a as initSnsWrapper};
1
+ import{a}from"./chunk-TVXJJLBF.js";import"./chunk-7CU6QPD4.js";import"./chunk-K2WYATWO.js";import"./chunk-CQAJ2SZB.js";import"./chunk-4INNMFYU.js";import"./chunk-C7HBQQIL.js";export{a as initSnsWrapper};
2
2
  //# sourceMappingURL=sns.js.map
@@ -1,2 +1,2 @@
1
- import{d as a}from"./chunk-34CD4QJG.js";export{a as SnsSwapCanister};
1
+ import{d as a}from"./chunk-C7HBQQIL.js";export{a as SnsSwapCanister};
2
2
  //# sourceMappingURL=swap.canister.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfinity/sns",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "A library for interfacing with a Service Nervous System (SNS) project.",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/cjs/index.cjs.js",
@@ -36,11 +36,11 @@
36
36
  "sns"
37
37
  ],
38
38
  "peerDependencies": {
39
- "@dfinity/agent": "^1.4.0",
40
- "@dfinity/candid": "^1.4.0",
41
- "@dfinity/ledger-icrc": "^2.4.0",
42
- "@dfinity/principal": "^1.4.0",
43
- "@dfinity/utils": "^2.4.0"
39
+ "@dfinity/agent": "^2.0.0",
40
+ "@dfinity/candid": "^2.0.0",
41
+ "@dfinity/ledger-icrc": "^2.5.0",
42
+ "@dfinity/principal": "^2.0.0",
43
+ "@dfinity/utils": "^2.5.0"
44
44
  },
45
45
  "dependencies": {
46
46
  "@noble/hashes": "^1.3.2"
@@ -1,2 +0,0 @@
1
- import{Canister as Ct,createServices as Bt,fromDefinedNullable as x,fromNullable as f}from"@dfinity/utils";var ht=({IDL:t})=>{let i=t.Record({dissolve_delay_interval_seconds:t.Nat64,count:t.Nat64}),e=t.Record({slope_numerator:t.Opt(t.Nat64),intercept_icp_e8s:t.Opt(t.Nat64),from_direct_participation_icp_e8s:t.Opt(t.Nat64),slope_denominator:t.Opt(t.Nat64),to_direct_participation_icp_e8s:t.Opt(t.Nat64)}),n=t.Record({serialized_representation:t.Opt(t.Text)}),s=t.Record({coefficient_intervals:t.Vec(e),max_neurons_fund_participation_icp_e8s:t.Opt(t.Nat64),min_direct_participation_threshold_icp_e8s:t.Opt(t.Nat64),ideal_matched_participation_function:t.Opt(n)}),r=t.Record({has_created_neuron_recipes:t.Opt(t.Bool),nns_neuron_id:t.Nat64,amount_icp_e8s:t.Nat64}),a=t.Record({hotkey_principal:t.Text,cf_neurons:t.Vec(r)}),l=t.Record({cf_participants:t.Vec(a)}),S=t.Record({iso_codes:t.Vec(t.Text)}),O=t.Record({nns_proposal_id:t.Opt(t.Nat64),sns_root_canister_id:t.Text,neurons_fund_participation:t.Opt(t.Bool),min_participant_icp_e8s:t.Opt(t.Nat64),neuron_basket_construction_parameters:t.Opt(i),fallback_controller_principal_ids:t.Vec(t.Text),max_icp_e8s:t.Opt(t.Nat64),neuron_minimum_stake_e8s:t.Opt(t.Nat64),confirmation_text:t.Opt(t.Text),swap_start_timestamp_seconds:t.Opt(t.Nat64),swap_due_timestamp_seconds:t.Opt(t.Nat64),min_participants:t.Opt(t.Nat32),sns_token_e8s:t.Opt(t.Nat64),nns_governance_canister_id:t.Text,transaction_fee_e8s:t.Opt(t.Nat64),icp_ledger_canister_id:t.Text,sns_ledger_canister_id:t.Text,neurons_fund_participation_constraints:t.Opt(s),neurons_fund_participants:t.Opt(l),should_auto_finalize:t.Opt(t.Bool),max_participant_icp_e8s:t.Opt(t.Nat64),sns_governance_canister_id:t.Text,min_direct_participation_icp_e8s:t.Opt(t.Nat64),restricted_countries:t.Opt(S),min_icp_e8s:t.Opt(t.Nat64),max_direct_participation_icp_e8s:t.Opt(t.Nat64)}),g=t.Record({source_principal_id:t.Opt(t.Principal)}),w=t.Record({block_height:t.Opt(t.Nat64)}),h=t.Record({description:t.Opt(t.Text),error_type:t.Opt(t.Int32)}),P=t.Variant({Ok:w,Err:h}),b=t.Record({result:t.Opt(P)}),o=t.Record({code:t.Opt(t.Int32),description:t.Text}),F=t.Record({err:t.Opt(o),dapp_canister_id:t.Opt(t.Principal)}),v=t.Record({failed_updates:t.Vec(F)}),V=t.Variant({Ok:v,Err:o}),C=t.Record({possibility:t.Opt(V)}),c=t.Record({failure:t.Nat32,skipped:t.Nat32,invalid:t.Nat32,success:t.Nat32,global_failures:t.Nat32}),B=t.Record({error_message:t.Text,error_type:t.Int32}),z=t.Record({governance_error:t.Opt(B)}),E=t.Variant({Ok:z,Err:o}),q=t.Record({possibility:t.Opt(E)}),G=t.Record({neurons_fund_participation_icp_e8s:t.Opt(t.Nat64),neurons_fund_neurons_count:t.Opt(t.Nat64)}),A=t.Record({message:t.Opt(t.Text)}),U=t.Variant({Ok:G,Err:A}),M=t.Record({possibility:t.Opt(U)}),Q=t.Variant({Ok:t.Record({}),Err:o}),j=t.Record({possibility:t.Opt(Q)}),p=t.Record({set_dapp_controllers_call_result:t.Opt(C),create_sns_neuron_recipes_result:t.Opt(c),settle_community_fund_participation_result:t.Opt(q),error_message:t.Opt(t.Text),settle_neurons_fund_participation_result:t.Opt(M),set_mode_call_result:t.Opt(j),sweep_icp_result:t.Opt(c),claim_neuron_result:t.Opt(c),sweep_sns_result:t.Opt(c)}),H=t.Record({auto_finalize_swap_response:t.Opt(p),has_auto_finalize_been_attempted:t.Opt(t.Bool),is_auto_finalize_enabled:t.Opt(t.Bool)}),J=t.Record({principal_id:t.Opt(t.Principal)}),m=t.Record({transfer_fee_paid_e8s:t.Opt(t.Nat64),transfer_start_timestamp_seconds:t.Nat64,amount_e8s:t.Nat64,amount_transferred_e8s:t.Opt(t.Nat64),transfer_success_timestamp_seconds:t.Nat64}),_=t.Record({icp:t.Opt(m),has_created_neuron_recipes:t.Opt(t.Bool)}),K=t.Record({buyer_state:t.Opt(_)}),W=t.Record({buyers_total:t.Nat64}),X=t.Variant({stopped:t.Null,stopping:t.Null,running:t.Null}),Y=t.Record({freezing_threshold:t.Nat,controllers:t.Vec(t.Principal),memory_allocation:t.Nat,compute_allocation:t.Nat}),Z=t.Record({status:X,memory_size:t.Nat,cycles:t.Nat,settings:Y,idle_cycles_burned_per_day:t.Nat,module_hash:t.Opt(t.Vec(t.Nat8))}),$=t.Record({sns_tokens_per_icp:t.Opt(t.Float64),buyer_total_icp_e8s:t.Opt(t.Nat64),cf_participant_count:t.Opt(t.Nat64),neurons_fund_participation_icp_e8s:t.Opt(t.Nat64),direct_participation_icp_e8s:t.Opt(t.Nat64),direct_participant_count:t.Opt(t.Nat64),cf_neuron_count:t.Opt(t.Nat64)}),I=t.Record({init:t.Opt(O)}),D=t.Record({decentralization_sale_open_timestamp_seconds:t.Opt(t.Nat64),lifecycle:t.Opt(t.Int32),decentralization_swap_termination_timestamp_seconds:t.Opt(t.Nat64)}),L=t.Record({owner:t.Opt(t.Principal),subaccount:t.Opt(t.Vec(t.Nat8))}),N=t.Record({creation_time:t.Nat64,ticket_id:t.Nat64,account:t.Opt(L),amount_icp_e8s:t.Nat64}),d=t.Record({ticket:t.Opt(N)}),tt=t.Record({error_type:t.Opt(t.Int32)}),et=t.Variant({Ok:d,Err:tt}),nt=t.Record({result:t.Opt(et)}),u=t.Record({min_participant_icp_e8s:t.Nat64,neuron_basket_construction_parameters:t.Opt(i),max_icp_e8s:t.Nat64,swap_due_timestamp_seconds:t.Nat64,min_participants:t.Nat32,sns_token_e8s:t.Nat64,sale_delay_seconds:t.Opt(t.Nat64),max_participant_icp_e8s:t.Nat64,min_direct_participation_icp_e8s:t.Opt(t.Nat64),min_icp_e8s:t.Nat64,max_direct_participation_icp_e8s:t.Opt(t.Nat64)}),it=t.Record({params:t.Opt(u)}),st=t.Record({id:t.Vec(t.Nat8)}),rt=t.Record({dissolve_delay_seconds:t.Nat64,memo:t.Nat64,followees:t.Vec(st)}),at=t.Record({hotkey_principal:t.Text,nns_neuron_id:t.Nat64}),ot=t.Record({buyer_principal:t.Text}),ct=t.Variant({CommunityFund:at,Direct:ot}),R=t.Record({sns:t.Opt(m),claimed_status:t.Opt(t.Int32),neuron_attributes:t.Opt(rt),investor:t.Opt(ct)}),pt=t.Record({auto_finalize_swap_response:t.Opt(p),neuron_recipes:t.Vec(R),next_ticket_id:t.Opt(t.Nat64),decentralization_sale_open_timestamp_seconds:t.Opt(t.Nat64),finalize_swap_in_progress:t.Opt(t.Bool),cf_participants:t.Vec(a),init:t.Opt(O),already_tried_to_auto_finalize:t.Opt(t.Bool),neurons_fund_participation_icp_e8s:t.Opt(t.Nat64),purge_old_tickets_last_completion_timestamp_nanoseconds:t.Opt(t.Nat64),direct_participation_icp_e8s:t.Opt(t.Nat64),lifecycle:t.Int32,purge_old_tickets_next_principal:t.Opt(t.Vec(t.Nat8)),decentralization_swap_termination_timestamp_seconds:t.Opt(t.Nat64),buyers:t.Vec(t.Tuple(t.Text,_)),params:t.Opt(u),open_sns_token_swap_proposal_id:t.Opt(t.Nat64)}),_t=t.Record({sns_tokens_per_icp:t.Float32,buyer_total_icp_e8s:t.Nat64,cf_participant_count:t.Opt(t.Nat64),neurons_fund_participation_icp_e8s:t.Opt(t.Nat64),direct_participation_icp_e8s:t.Opt(t.Nat64),direct_participant_count:t.Opt(t.Nat64),cf_neuron_count:t.Opt(t.Nat64)}),dt=t.Record({swap:t.Opt(pt),derived:t.Opt(_t)}),ut=t.Record({offset:t.Opt(t.Nat64),limit:t.Opt(t.Nat32)}),lt=t.Record({offset:t.Opt(t.Nat32),limit:t.Opt(t.Nat32)}),Ot=t.Record({participation:t.Opt(_),participant_id:t.Opt(t.Principal)}),mt=t.Record({participants:t.Vec(Ot)}),Nt=t.Record({offset:t.Opt(t.Nat64),limit:t.Opt(t.Nat32)}),Rt=t.Record({sns_neuron_recipes:t.Vec(R)}),ft=t.Record({subaccount:t.Opt(t.Vec(t.Nat8)),amount_icp_e8s:t.Nat64}),yt=t.Record({min_amount_icp_e8s_included:t.Nat64,max_amount_icp_e8s_included:t.Nat64}),kt=t.Record({invalid_user_amount:t.Opt(yt),existing_ticket:t.Opt(N),error_type:t.Int32}),Tt=t.Variant({Ok:d,Err:kt}),xt=t.Record({result:t.Opt(Tt)}),St=t.Record({cf_participants:t.Vec(a),params:t.Opt(u),open_sns_token_swap_proposal_id:t.Opt(t.Nat64)}),gt=t.Record({confirmation_text:t.Opt(t.Text),buyer:t.Text}),wt=t.Record({icp_accepted_participation_e8s:t.Nat64,icp_ledger_account_balance_e8s:t.Nat64});return t.Service({error_refund_icp:t.Func([g],[b],[]),finalize_swap:t.Func([t.Record({})],[p],[]),get_auto_finalization_status:t.Func([t.Record({})],[H],[]),get_buyer_state:t.Func([J],[K],[]),get_buyers_total:t.Func([t.Record({})],[W],[]),get_canister_status:t.Func([t.Record({})],[Z],[]),get_derived_state:t.Func([t.Record({})],[$],[]),get_init:t.Func([t.Record({})],[I],[]),get_lifecycle:t.Func([t.Record({})],[D],[]),get_open_ticket:t.Func([t.Record({})],[nt],[]),get_sale_parameters:t.Func([t.Record({})],[it],[]),get_state:t.Func([t.Record({})],[dt],[]),list_community_fund_participants:t.Func([ut],[l],[]),list_direct_participants:t.Func([lt],[mt],[]),list_sns_neuron_recipes:t.Func([Nt],[Rt],[]),new_sale_ticket:t.Func([ft],[xt],[]),notify_payment_failure:t.Func([t.Record({})],[d],[]),open:t.Func([St],[t.Record({})],[]),refresh_buyer_tokens:t.Func([gt],[wt],[])})};var Pt=({IDL:t})=>{let i=t.Record({dissolve_delay_interval_seconds:t.Nat64,count:t.Nat64}),e=t.Record({slope_numerator:t.Opt(t.Nat64),intercept_icp_e8s:t.Opt(t.Nat64),from_direct_participation_icp_e8s:t.Opt(t.Nat64),slope_denominator:t.Opt(t.Nat64),to_direct_participation_icp_e8s:t.Opt(t.Nat64)}),n=t.Record({serialized_representation:t.Opt(t.Text)}),s=t.Record({coefficient_intervals:t.Vec(e),max_neurons_fund_participation_icp_e8s:t.Opt(t.Nat64),min_direct_participation_threshold_icp_e8s:t.Opt(t.Nat64),ideal_matched_participation_function:t.Opt(n)}),r=t.Record({has_created_neuron_recipes:t.Opt(t.Bool),nns_neuron_id:t.Nat64,amount_icp_e8s:t.Nat64}),a=t.Record({hotkey_principal:t.Text,cf_neurons:t.Vec(r)}),l=t.Record({cf_participants:t.Vec(a)}),S=t.Record({iso_codes:t.Vec(t.Text)}),O=t.Record({nns_proposal_id:t.Opt(t.Nat64),sns_root_canister_id:t.Text,neurons_fund_participation:t.Opt(t.Bool),min_participant_icp_e8s:t.Opt(t.Nat64),neuron_basket_construction_parameters:t.Opt(i),fallback_controller_principal_ids:t.Vec(t.Text),max_icp_e8s:t.Opt(t.Nat64),neuron_minimum_stake_e8s:t.Opt(t.Nat64),confirmation_text:t.Opt(t.Text),swap_start_timestamp_seconds:t.Opt(t.Nat64),swap_due_timestamp_seconds:t.Opt(t.Nat64),min_participants:t.Opt(t.Nat32),sns_token_e8s:t.Opt(t.Nat64),nns_governance_canister_id:t.Text,transaction_fee_e8s:t.Opt(t.Nat64),icp_ledger_canister_id:t.Text,sns_ledger_canister_id:t.Text,neurons_fund_participation_constraints:t.Opt(s),neurons_fund_participants:t.Opt(l),should_auto_finalize:t.Opt(t.Bool),max_participant_icp_e8s:t.Opt(t.Nat64),sns_governance_canister_id:t.Text,min_direct_participation_icp_e8s:t.Opt(t.Nat64),restricted_countries:t.Opt(S),min_icp_e8s:t.Opt(t.Nat64),max_direct_participation_icp_e8s:t.Opt(t.Nat64)}),g=t.Record({source_principal_id:t.Opt(t.Principal)}),w=t.Record({block_height:t.Opt(t.Nat64)}),h=t.Record({description:t.Opt(t.Text),error_type:t.Opt(t.Int32)}),P=t.Variant({Ok:w,Err:h}),b=t.Record({result:t.Opt(P)}),o=t.Record({code:t.Opt(t.Int32),description:t.Text}),F=t.Record({err:t.Opt(o),dapp_canister_id:t.Opt(t.Principal)}),v=t.Record({failed_updates:t.Vec(F)}),V=t.Variant({Ok:v,Err:o}),C=t.Record({possibility:t.Opt(V)}),c=t.Record({failure:t.Nat32,skipped:t.Nat32,invalid:t.Nat32,success:t.Nat32,global_failures:t.Nat32}),B=t.Record({error_message:t.Text,error_type:t.Int32}),z=t.Record({governance_error:t.Opt(B)}),E=t.Variant({Ok:z,Err:o}),q=t.Record({possibility:t.Opt(E)}),G=t.Record({neurons_fund_participation_icp_e8s:t.Opt(t.Nat64),neurons_fund_neurons_count:t.Opt(t.Nat64)}),A=t.Record({message:t.Opt(t.Text)}),U=t.Variant({Ok:G,Err:A}),M=t.Record({possibility:t.Opt(U)}),Q=t.Variant({Ok:t.Record({}),Err:o}),j=t.Record({possibility:t.Opt(Q)}),p=t.Record({set_dapp_controllers_call_result:t.Opt(C),create_sns_neuron_recipes_result:t.Opt(c),settle_community_fund_participation_result:t.Opt(q),error_message:t.Opt(t.Text),settle_neurons_fund_participation_result:t.Opt(M),set_mode_call_result:t.Opt(j),sweep_icp_result:t.Opt(c),claim_neuron_result:t.Opt(c),sweep_sns_result:t.Opt(c)}),H=t.Record({auto_finalize_swap_response:t.Opt(p),has_auto_finalize_been_attempted:t.Opt(t.Bool),is_auto_finalize_enabled:t.Opt(t.Bool)}),J=t.Record({principal_id:t.Opt(t.Principal)}),m=t.Record({transfer_fee_paid_e8s:t.Opt(t.Nat64),transfer_start_timestamp_seconds:t.Nat64,amount_e8s:t.Nat64,amount_transferred_e8s:t.Opt(t.Nat64),transfer_success_timestamp_seconds:t.Nat64}),_=t.Record({icp:t.Opt(m),has_created_neuron_recipes:t.Opt(t.Bool)}),K=t.Record({buyer_state:t.Opt(_)}),W=t.Record({buyers_total:t.Nat64}),X=t.Variant({stopped:t.Null,stopping:t.Null,running:t.Null}),Y=t.Record({freezing_threshold:t.Nat,controllers:t.Vec(t.Principal),memory_allocation:t.Nat,compute_allocation:t.Nat}),Z=t.Record({status:X,memory_size:t.Nat,cycles:t.Nat,settings:Y,idle_cycles_burned_per_day:t.Nat,module_hash:t.Opt(t.Vec(t.Nat8))}),$=t.Record({sns_tokens_per_icp:t.Opt(t.Float64),buyer_total_icp_e8s:t.Opt(t.Nat64),cf_participant_count:t.Opt(t.Nat64),neurons_fund_participation_icp_e8s:t.Opt(t.Nat64),direct_participation_icp_e8s:t.Opt(t.Nat64),direct_participant_count:t.Opt(t.Nat64),cf_neuron_count:t.Opt(t.Nat64)}),I=t.Record({init:t.Opt(O)}),D=t.Record({decentralization_sale_open_timestamp_seconds:t.Opt(t.Nat64),lifecycle:t.Opt(t.Int32),decentralization_swap_termination_timestamp_seconds:t.Opt(t.Nat64)}),L=t.Record({owner:t.Opt(t.Principal),subaccount:t.Opt(t.Vec(t.Nat8))}),N=t.Record({creation_time:t.Nat64,ticket_id:t.Nat64,account:t.Opt(L),amount_icp_e8s:t.Nat64}),d=t.Record({ticket:t.Opt(N)}),tt=t.Record({error_type:t.Opt(t.Int32)}),et=t.Variant({Ok:d,Err:tt}),nt=t.Record({result:t.Opt(et)}),u=t.Record({min_participant_icp_e8s:t.Nat64,neuron_basket_construction_parameters:t.Opt(i),max_icp_e8s:t.Nat64,swap_due_timestamp_seconds:t.Nat64,min_participants:t.Nat32,sns_token_e8s:t.Nat64,sale_delay_seconds:t.Opt(t.Nat64),max_participant_icp_e8s:t.Nat64,min_direct_participation_icp_e8s:t.Opt(t.Nat64),min_icp_e8s:t.Nat64,max_direct_participation_icp_e8s:t.Opt(t.Nat64)}),it=t.Record({params:t.Opt(u)}),st=t.Record({id:t.Vec(t.Nat8)}),rt=t.Record({dissolve_delay_seconds:t.Nat64,memo:t.Nat64,followees:t.Vec(st)}),at=t.Record({hotkey_principal:t.Text,nns_neuron_id:t.Nat64}),ot=t.Record({buyer_principal:t.Text}),ct=t.Variant({CommunityFund:at,Direct:ot}),R=t.Record({sns:t.Opt(m),claimed_status:t.Opt(t.Int32),neuron_attributes:t.Opt(rt),investor:t.Opt(ct)}),pt=t.Record({auto_finalize_swap_response:t.Opt(p),neuron_recipes:t.Vec(R),next_ticket_id:t.Opt(t.Nat64),decentralization_sale_open_timestamp_seconds:t.Opt(t.Nat64),finalize_swap_in_progress:t.Opt(t.Bool),cf_participants:t.Vec(a),init:t.Opt(O),already_tried_to_auto_finalize:t.Opt(t.Bool),neurons_fund_participation_icp_e8s:t.Opt(t.Nat64),purge_old_tickets_last_completion_timestamp_nanoseconds:t.Opt(t.Nat64),direct_participation_icp_e8s:t.Opt(t.Nat64),lifecycle:t.Int32,purge_old_tickets_next_principal:t.Opt(t.Vec(t.Nat8)),decentralization_swap_termination_timestamp_seconds:t.Opt(t.Nat64),buyers:t.Vec(t.Tuple(t.Text,_)),params:t.Opt(u),open_sns_token_swap_proposal_id:t.Opt(t.Nat64)}),_t=t.Record({sns_tokens_per_icp:t.Float32,buyer_total_icp_e8s:t.Nat64,cf_participant_count:t.Opt(t.Nat64),neurons_fund_participation_icp_e8s:t.Opt(t.Nat64),direct_participation_icp_e8s:t.Opt(t.Nat64),direct_participant_count:t.Opt(t.Nat64),cf_neuron_count:t.Opt(t.Nat64)}),dt=t.Record({swap:t.Opt(pt),derived:t.Opt(_t)}),ut=t.Record({offset:t.Opt(t.Nat64),limit:t.Opt(t.Nat32)}),lt=t.Record({offset:t.Opt(t.Nat32),limit:t.Opt(t.Nat32)}),Ot=t.Record({participation:t.Opt(_),participant_id:t.Opt(t.Principal)}),mt=t.Record({participants:t.Vec(Ot)}),Nt=t.Record({offset:t.Opt(t.Nat64),limit:t.Opt(t.Nat32)}),Rt=t.Record({sns_neuron_recipes:t.Vec(R)}),ft=t.Record({subaccount:t.Opt(t.Vec(t.Nat8)),amount_icp_e8s:t.Nat64}),yt=t.Record({min_amount_icp_e8s_included:t.Nat64,max_amount_icp_e8s_included:t.Nat64}),kt=t.Record({invalid_user_amount:t.Opt(yt),existing_ticket:t.Opt(N),error_type:t.Int32}),Tt=t.Variant({Ok:d,Err:kt}),xt=t.Record({result:t.Opt(Tt)}),St=t.Record({cf_participants:t.Vec(a),params:t.Opt(u),open_sns_token_swap_proposal_id:t.Opt(t.Nat64)}),gt=t.Record({confirmation_text:t.Opt(t.Text),buyer:t.Text}),wt=t.Record({icp_accepted_participation_e8s:t.Nat64,icp_ledger_account_balance_e8s:t.Nat64});return t.Service({error_refund_icp:t.Func([g],[b],[]),finalize_swap:t.Func([t.Record({})],[p],[]),get_auto_finalization_status:t.Func([t.Record({})],[H],["query"]),get_buyer_state:t.Func([J],[K],["query"]),get_buyers_total:t.Func([t.Record({})],[W],[]),get_canister_status:t.Func([t.Record({})],[Z],[]),get_derived_state:t.Func([t.Record({})],[$],["query"]),get_init:t.Func([t.Record({})],[I],["query"]),get_lifecycle:t.Func([t.Record({})],[D],["query"]),get_open_ticket:t.Func([t.Record({})],[nt],["query"]),get_sale_parameters:t.Func([t.Record({})],[it],["query"]),get_state:t.Func([t.Record({})],[dt],["query"]),list_community_fund_participants:t.Func([ut],[l],["query"]),list_direct_participants:t.Func([lt],[mt],["query"]),list_sns_neuron_recipes:t.Func([Nt],[Rt],["query"]),new_sale_ticket:t.Func([ft],[xt],[]),notify_payment_failure:t.Func([t.Record({})],[d],[]),open:t.Func([St],[t.Record({})],[]),refresh_buyer_tokens:t.Func([gt],[wt],[])})};var bt=({subaccount:t,amount_icp_e8s:i})=>({subaccount:t===void 0?[]:[t],amount_icp_e8s:i});var y=class extends Error{constructor(e){super();this.methodName=e}};var k=class extends Error{constructor({errorType:i,invalidUserAmount:e,existingTicket:n}){super(),this.errorType=i,this.invalidUserAmount=e,this.existingTicket=n}},T=class extends Error{constructor(e){super();this.errorType=e}};import{nonNullish as Vt}from"@dfinity/utils";var Ft=t=>{if(typeof t=="object"&&Vt(t)&&"message"in t){let i=t.message;return i.includes("has no update method")||i.includes("has no query method")}return!1};var vt=class t extends Ct{constructor(){super(...arguments);this.state=e=>this.caller(e).get_state({});this.notifyPaymentFailure=async()=>{let{ticket:e}=await this.caller({certified:!0}).notify_payment_failure({});return f(e)};this.notifyParticipation=async e=>await this.caller({certified:!0}).refresh_buyer_tokens(e);this.getUserCommitment=async e=>{let{buyer_state:n}=await this.caller({certified:e.certified}).get_buyer_state({principal_id:e.principal_id});return f(n)};this.getDerivedState=async({certified:e})=>this.caller({certified:e}).get_derived_state({});this.getSaleParameters=async({certified:e})=>this.caller({certified:e}).get_sale_parameters({});this.getOpenTicket=async e=>{let{result:n}=await this.caller({certified:e.certified}).get_open_ticket({}),s=x(n);if("Ok"in s)return f(s.Ok.ticket);let r=x(s?.Err?.error_type);throw new T(r)};this.newSaleTicket=async e=>{let n=bt(e),{result:s}=await this.caller({certified:!0}).new_sale_ticket(n),r=x(s);if("Ok"in r)return x(r.Ok.ticket);let a=r.Err;throw new k({errorType:a.error_type,invalidUserAmount:f(a.invalid_user_amount??[]),existingTicket:f(a.existing_ticket??[])})};this.getLifecycle=async e=>this.caller(e).get_lifecycle({});this.getFinalizationStatus=async e=>{try{return await this.caller(e).get_auto_finalization_status({})}catch(n){throw Ft(n)?new y("getFinalizationStatus"):n}}}static create(e){let{service:n,certifiedService:s,canisterId:r}=Bt({options:e,idlFactory:Pt,certifiedIdlFactory:ht});return new t(r,n,s)}};export{y as a,k as b,T as c,vt as d};
2
- //# sourceMappingURL=chunk-34CD4QJG.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/swap.canister.ts", "../../candid/sns_swap.certified.idl.js", "../../candid/sns_swap.idl.js", "../../src/converters/swap.converters.ts", "../../src/errors/common.errors.ts", "../../src/errors/swap.errors.ts", "../../src/utils/error.utils.ts"],
4
- "sourcesContent": ["import type { QueryParams } from \"@dfinity/utils\";\nimport {\n Canister,\n createServices,\n fromDefinedNullable,\n fromNullable,\n} from \"@dfinity/utils\";\nimport type {\n BuyerState,\n GetAutoFinalizationStatusResponse,\n GetBuyerStateRequest,\n GetDerivedStateResponse,\n GetLifecycleResponse,\n GetSaleParametersResponse,\n GetStateResponse,\n RefreshBuyerTokensRequest,\n RefreshBuyerTokensResponse,\n _SERVICE as SnsSwapService,\n Ticket,\n} from \"../candid/sns_swap\";\nimport { idlFactory as certifiedIdlFactory } from \"../candid/sns_swap.certified.idl\";\nimport { idlFactory } from \"../candid/sns_swap.idl\";\nimport { toNewSaleTicketRequest } from \"./converters/swap.converters\";\nimport { UnsupportedMethodError } from \"./errors/common.errors\";\nimport {\n SnsSwapGetOpenTicketError,\n SnsSwapNewTicketError,\n} from \"./errors/swap.errors\";\nimport type { SnsCanisterOptions } from \"./types/canister.options\";\nimport type { NewSaleTicketParams } from \"./types/swap.params\";\nimport { isMethodNotSupportedError } from \"./utils/error.utils\";\n\nexport class SnsSwapCanister extends Canister<SnsSwapService> {\n static create(options: SnsCanisterOptions<SnsSwapService>) {\n const { service, certifiedService, canisterId } =\n createServices<SnsSwapService>({\n options,\n idlFactory,\n certifiedIdlFactory,\n });\n\n return new SnsSwapCanister(canisterId, service, certifiedService);\n }\n\n /**\n * Get the state of the swap\n */\n state = (params: QueryParams): Promise<GetStateResponse> =>\n this.caller(params).get_state({});\n\n /**\n * Notify of the payment failure to remove the ticket\n */\n notifyPaymentFailure = async (): Promise<Ticket | undefined> => {\n const { ticket } = await this.caller({\n certified: true,\n }).notify_payment_failure({});\n return fromNullable(ticket);\n };\n\n /**\n * Notify of the user participating in the swap\n */\n notifyParticipation = async (\n params: RefreshBuyerTokensRequest,\n ): Promise<RefreshBuyerTokensResponse> =>\n await this.caller({ certified: true }).refresh_buyer_tokens(params);\n\n /**\n * Get user commitment\n */\n getUserCommitment = async (\n params: GetBuyerStateRequest & QueryParams,\n ): Promise<BuyerState | undefined> => {\n const { buyer_state } = await this.caller({\n certified: params.certified,\n }).get_buyer_state({ principal_id: params.principal_id });\n return fromNullable(buyer_state);\n };\n\n /**\n * Get sale buyers state\n */\n getDerivedState = async ({\n certified,\n }: QueryParams): Promise<GetDerivedStateResponse> => {\n return this.caller({ certified }).get_derived_state({});\n };\n\n /**\n * Get sale parameters\n */\n getSaleParameters = async ({\n certified,\n }: QueryParams): Promise<GetSaleParametersResponse> => {\n return this.caller({ certified }).get_sale_parameters({});\n };\n\n /**\n * Return a sale ticket if created and not yet removed (payment flow)\n */\n getOpenTicket = async (params: QueryParams): Promise<Ticket | undefined> => {\n const { result: response } = await this.caller({\n certified: params.certified,\n }).get_open_ticket({});\n const result = fromDefinedNullable(response);\n\n if (\"Ok\" in result) {\n return fromNullable(result.Ok.ticket);\n }\n\n const errorType = fromDefinedNullable(result?.Err?.error_type);\n throw new SnsSwapGetOpenTicketError(errorType);\n };\n\n /**\n * Create a sale ticket (payment flow)\n */\n newSaleTicket = async (params: NewSaleTicketParams): Promise<Ticket> => {\n const request = toNewSaleTicketRequest(params);\n const { result: response } = await this.caller({\n certified: true,\n }).new_sale_ticket(request);\n\n const result = fromDefinedNullable(response);\n\n if (\"Ok\" in result) {\n return fromDefinedNullable(result.Ok.ticket);\n }\n\n const errorData = result.Err;\n const error = new SnsSwapNewTicketError({\n errorType: errorData.error_type,\n invalidUserAmount: fromNullable(errorData.invalid_user_amount ?? []),\n existingTicket: fromNullable(errorData.existing_ticket ?? []),\n });\n\n throw error;\n };\n\n /**\n * Get sale lifecycle state\n */\n getLifecycle = async (params: QueryParams): Promise<GetLifecycleResponse> => {\n return this.caller(params).get_lifecycle({});\n };\n\n /**\n * Get sale lifecycle state\n */\n getFinalizationStatus = async (\n params: QueryParams,\n ): Promise<GetAutoFinalizationStatusResponse> => {\n try {\n return await this.caller(params).get_auto_finalization_status({});\n } catch (error) {\n // Throw a custom error if the method is not supported by the canister\n if (isMethodNotSupportedError(error)) {\n throw new UnsupportedMethodError(\"getFinalizationStatus\");\n }\n throw error;\n }\n };\n}\n", "/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_swap.did */\nexport const idlFactory = ({ IDL }) => {\n const NeuronBasketConstructionParameters = IDL.Record({\n 'dissolve_delay_interval_seconds' : IDL.Nat64,\n 'count' : IDL.Nat64,\n });\n const LinearScalingCoefficient = IDL.Record({\n 'slope_numerator' : IDL.Opt(IDL.Nat64),\n 'intercept_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'from_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'slope_denominator' : IDL.Opt(IDL.Nat64),\n 'to_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n });\n const IdealMatchedParticipationFunction = IDL.Record({\n 'serialized_representation' : IDL.Opt(IDL.Text),\n });\n const NeuronsFundParticipationConstraints = IDL.Record({\n 'coefficient_intervals' : IDL.Vec(LinearScalingCoefficient),\n 'max_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'min_direct_participation_threshold_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'ideal_matched_participation_function' : IDL.Opt(\n IdealMatchedParticipationFunction\n ),\n });\n const CfNeuron = IDL.Record({\n 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),\n 'nns_neuron_id' : IDL.Nat64,\n 'amount_icp_e8s' : IDL.Nat64,\n });\n const CfParticipant = IDL.Record({\n 'hotkey_principal' : IDL.Text,\n 'cf_neurons' : IDL.Vec(CfNeuron),\n });\n const NeuronsFundParticipants = IDL.Record({\n 'cf_participants' : IDL.Vec(CfParticipant),\n });\n const Countries = IDL.Record({ 'iso_codes' : IDL.Vec(IDL.Text) });\n const Init = IDL.Record({\n 'nns_proposal_id' : IDL.Opt(IDL.Nat64),\n 'sns_root_canister_id' : IDL.Text,\n 'neurons_fund_participation' : IDL.Opt(IDL.Bool),\n 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neuron_basket_construction_parameters' : IDL.Opt(\n NeuronBasketConstructionParameters\n ),\n 'fallback_controller_principal_ids' : IDL.Vec(IDL.Text),\n 'max_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),\n 'confirmation_text' : IDL.Opt(IDL.Text),\n 'swap_start_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'swap_due_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'min_participants' : IDL.Opt(IDL.Nat32),\n 'sns_token_e8s' : IDL.Opt(IDL.Nat64),\n 'nns_governance_canister_id' : IDL.Text,\n 'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),\n 'icp_ledger_canister_id' : IDL.Text,\n 'sns_ledger_canister_id' : IDL.Text,\n 'neurons_fund_participation_constraints' : IDL.Opt(\n NeuronsFundParticipationConstraints\n ),\n 'neurons_fund_participants' : IDL.Opt(NeuronsFundParticipants),\n 'should_auto_finalize' : IDL.Opt(IDL.Bool),\n 'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'sns_governance_canister_id' : IDL.Text,\n 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'restricted_countries' : IDL.Opt(Countries),\n 'min_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n });\n const ErrorRefundIcpRequest = IDL.Record({\n 'source_principal_id' : IDL.Opt(IDL.Principal),\n });\n const Ok = IDL.Record({ 'block_height' : IDL.Opt(IDL.Nat64) });\n const Err = IDL.Record({\n 'description' : IDL.Opt(IDL.Text),\n 'error_type' : IDL.Opt(IDL.Int32),\n });\n const Result = IDL.Variant({ 'Ok' : Ok, 'Err' : Err });\n const ErrorRefundIcpResponse = IDL.Record({ 'result' : IDL.Opt(Result) });\n const CanisterCallError = IDL.Record({\n 'code' : IDL.Opt(IDL.Int32),\n 'description' : IDL.Text,\n });\n const FailedUpdate = IDL.Record({\n 'err' : IDL.Opt(CanisterCallError),\n 'dapp_canister_id' : IDL.Opt(IDL.Principal),\n });\n const SetDappControllersResponse = IDL.Record({\n 'failed_updates' : IDL.Vec(FailedUpdate),\n });\n const Possibility = IDL.Variant({\n 'Ok' : SetDappControllersResponse,\n 'Err' : CanisterCallError,\n });\n const SetDappControllersCallResult = IDL.Record({\n 'possibility' : IDL.Opt(Possibility),\n });\n const SweepResult = IDL.Record({\n 'failure' : IDL.Nat32,\n 'skipped' : IDL.Nat32,\n 'invalid' : IDL.Nat32,\n 'success' : IDL.Nat32,\n 'global_failures' : IDL.Nat32,\n });\n const GovernanceError = IDL.Record({\n 'error_message' : IDL.Text,\n 'error_type' : IDL.Int32,\n });\n const Response = IDL.Record({\n 'governance_error' : IDL.Opt(GovernanceError),\n });\n const Possibility_1 = IDL.Variant({\n 'Ok' : Response,\n 'Err' : CanisterCallError,\n });\n const SettleCommunityFundParticipationResult = IDL.Record({\n 'possibility' : IDL.Opt(Possibility_1),\n });\n const Ok_1 = IDL.Record({\n 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neurons_fund_neurons_count' : IDL.Opt(IDL.Nat64),\n });\n const Error = IDL.Record({ 'message' : IDL.Opt(IDL.Text) });\n const Possibility_2 = IDL.Variant({ 'Ok' : Ok_1, 'Err' : Error });\n const SettleNeuronsFundParticipationResult = IDL.Record({\n 'possibility' : IDL.Opt(Possibility_2),\n });\n const Possibility_3 = IDL.Variant({\n 'Ok' : IDL.Record({}),\n 'Err' : CanisterCallError,\n });\n const SetModeCallResult = IDL.Record({\n 'possibility' : IDL.Opt(Possibility_3),\n });\n const FinalizeSwapResponse = IDL.Record({\n 'set_dapp_controllers_call_result' : IDL.Opt(SetDappControllersCallResult),\n 'create_sns_neuron_recipes_result' : IDL.Opt(SweepResult),\n 'settle_community_fund_participation_result' : IDL.Opt(\n SettleCommunityFundParticipationResult\n ),\n 'error_message' : IDL.Opt(IDL.Text),\n 'settle_neurons_fund_participation_result' : IDL.Opt(\n SettleNeuronsFundParticipationResult\n ),\n 'set_mode_call_result' : IDL.Opt(SetModeCallResult),\n 'sweep_icp_result' : IDL.Opt(SweepResult),\n 'claim_neuron_result' : IDL.Opt(SweepResult),\n 'sweep_sns_result' : IDL.Opt(SweepResult),\n });\n const GetAutoFinalizationStatusResponse = IDL.Record({\n 'auto_finalize_swap_response' : IDL.Opt(FinalizeSwapResponse),\n 'has_auto_finalize_been_attempted' : IDL.Opt(IDL.Bool),\n 'is_auto_finalize_enabled' : IDL.Opt(IDL.Bool),\n });\n const GetBuyerStateRequest = IDL.Record({\n 'principal_id' : IDL.Opt(IDL.Principal),\n });\n const TransferableAmount = IDL.Record({\n 'transfer_fee_paid_e8s' : IDL.Opt(IDL.Nat64),\n 'transfer_start_timestamp_seconds' : IDL.Nat64,\n 'amount_e8s' : IDL.Nat64,\n 'amount_transferred_e8s' : IDL.Opt(IDL.Nat64),\n 'transfer_success_timestamp_seconds' : IDL.Nat64,\n });\n const BuyerState = IDL.Record({\n 'icp' : IDL.Opt(TransferableAmount),\n 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),\n });\n const GetBuyerStateResponse = IDL.Record({\n 'buyer_state' : IDL.Opt(BuyerState),\n });\n const GetBuyersTotalResponse = IDL.Record({ 'buyers_total' : IDL.Nat64 });\n const CanisterStatusType = IDL.Variant({\n 'stopped' : IDL.Null,\n 'stopping' : IDL.Null,\n 'running' : IDL.Null,\n });\n const DefiniteCanisterSettingsArgs = IDL.Record({\n 'freezing_threshold' : IDL.Nat,\n 'controllers' : IDL.Vec(IDL.Principal),\n 'memory_allocation' : IDL.Nat,\n 'compute_allocation' : IDL.Nat,\n });\n const CanisterStatusResultV2 = IDL.Record({\n 'status' : CanisterStatusType,\n 'memory_size' : IDL.Nat,\n 'cycles' : IDL.Nat,\n 'settings' : DefiniteCanisterSettingsArgs,\n 'idle_cycles_burned_per_day' : IDL.Nat,\n 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n });\n const GetDerivedStateResponse = IDL.Record({\n 'sns_tokens_per_icp' : IDL.Opt(IDL.Float64),\n 'buyer_total_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'cf_participant_count' : IDL.Opt(IDL.Nat64),\n 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'direct_participant_count' : IDL.Opt(IDL.Nat64),\n 'cf_neuron_count' : IDL.Opt(IDL.Nat64),\n });\n const GetInitResponse = IDL.Record({ 'init' : IDL.Opt(Init) });\n const GetLifecycleResponse = IDL.Record({\n 'decentralization_sale_open_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'lifecycle' : IDL.Opt(IDL.Int32),\n 'decentralization_swap_termination_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n });\n const Icrc1Account = IDL.Record({\n 'owner' : IDL.Opt(IDL.Principal),\n 'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n });\n const Ticket = IDL.Record({\n 'creation_time' : IDL.Nat64,\n 'ticket_id' : IDL.Nat64,\n 'account' : IDL.Opt(Icrc1Account),\n 'amount_icp_e8s' : IDL.Nat64,\n });\n const Ok_2 = IDL.Record({ 'ticket' : IDL.Opt(Ticket) });\n const Err_1 = IDL.Record({ 'error_type' : IDL.Opt(IDL.Int32) });\n const Result_1 = IDL.Variant({ 'Ok' : Ok_2, 'Err' : Err_1 });\n const GetOpenTicketResponse = IDL.Record({ 'result' : IDL.Opt(Result_1) });\n const Params = IDL.Record({\n 'min_participant_icp_e8s' : IDL.Nat64,\n 'neuron_basket_construction_parameters' : IDL.Opt(\n NeuronBasketConstructionParameters\n ),\n 'max_icp_e8s' : IDL.Nat64,\n 'swap_due_timestamp_seconds' : IDL.Nat64,\n 'min_participants' : IDL.Nat32,\n 'sns_token_e8s' : IDL.Nat64,\n 'sale_delay_seconds' : IDL.Opt(IDL.Nat64),\n 'max_participant_icp_e8s' : IDL.Nat64,\n 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'min_icp_e8s' : IDL.Nat64,\n 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n });\n const GetSaleParametersResponse = IDL.Record({ 'params' : IDL.Opt(Params) });\n const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });\n const NeuronAttributes = IDL.Record({\n 'dissolve_delay_seconds' : IDL.Nat64,\n 'memo' : IDL.Nat64,\n 'followees' : IDL.Vec(NeuronId),\n });\n const CfInvestment = IDL.Record({\n 'hotkey_principal' : IDL.Text,\n 'nns_neuron_id' : IDL.Nat64,\n });\n const DirectInvestment = IDL.Record({ 'buyer_principal' : IDL.Text });\n const Investor = IDL.Variant({\n 'CommunityFund' : CfInvestment,\n 'Direct' : DirectInvestment,\n });\n const SnsNeuronRecipe = IDL.Record({\n 'sns' : IDL.Opt(TransferableAmount),\n 'claimed_status' : IDL.Opt(IDL.Int32),\n 'neuron_attributes' : IDL.Opt(NeuronAttributes),\n 'investor' : IDL.Opt(Investor),\n });\n const Swap = IDL.Record({\n 'auto_finalize_swap_response' : IDL.Opt(FinalizeSwapResponse),\n 'neuron_recipes' : IDL.Vec(SnsNeuronRecipe),\n 'next_ticket_id' : IDL.Opt(IDL.Nat64),\n 'decentralization_sale_open_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'finalize_swap_in_progress' : IDL.Opt(IDL.Bool),\n 'cf_participants' : IDL.Vec(CfParticipant),\n 'init' : IDL.Opt(Init),\n 'already_tried_to_auto_finalize' : IDL.Opt(IDL.Bool),\n 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'purge_old_tickets_last_completion_timestamp_nanoseconds' : IDL.Opt(\n IDL.Nat64\n ),\n 'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'lifecycle' : IDL.Int32,\n 'purge_old_tickets_next_principal' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n 'decentralization_swap_termination_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'buyers' : IDL.Vec(IDL.Tuple(IDL.Text, BuyerState)),\n 'params' : IDL.Opt(Params),\n 'open_sns_token_swap_proposal_id' : IDL.Opt(IDL.Nat64),\n });\n const DerivedState = IDL.Record({\n 'sns_tokens_per_icp' : IDL.Float32,\n 'buyer_total_icp_e8s' : IDL.Nat64,\n 'cf_participant_count' : IDL.Opt(IDL.Nat64),\n 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'direct_participant_count' : IDL.Opt(IDL.Nat64),\n 'cf_neuron_count' : IDL.Opt(IDL.Nat64),\n });\n const GetStateResponse = IDL.Record({\n 'swap' : IDL.Opt(Swap),\n 'derived' : IDL.Opt(DerivedState),\n });\n const ListCommunityFundParticipantsRequest = IDL.Record({\n 'offset' : IDL.Opt(IDL.Nat64),\n 'limit' : IDL.Opt(IDL.Nat32),\n });\n const ListDirectParticipantsRequest = IDL.Record({\n 'offset' : IDL.Opt(IDL.Nat32),\n 'limit' : IDL.Opt(IDL.Nat32),\n });\n const Participant = IDL.Record({\n 'participation' : IDL.Opt(BuyerState),\n 'participant_id' : IDL.Opt(IDL.Principal),\n });\n const ListDirectParticipantsResponse = IDL.Record({\n 'participants' : IDL.Vec(Participant),\n });\n const ListSnsNeuronRecipesRequest = IDL.Record({\n 'offset' : IDL.Opt(IDL.Nat64),\n 'limit' : IDL.Opt(IDL.Nat32),\n });\n const ListSnsNeuronRecipesResponse = IDL.Record({\n 'sns_neuron_recipes' : IDL.Vec(SnsNeuronRecipe),\n });\n const NewSaleTicketRequest = IDL.Record({\n 'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n 'amount_icp_e8s' : IDL.Nat64,\n });\n const InvalidUserAmount = IDL.Record({\n 'min_amount_icp_e8s_included' : IDL.Nat64,\n 'max_amount_icp_e8s_included' : IDL.Nat64,\n });\n const Err_2 = IDL.Record({\n 'invalid_user_amount' : IDL.Opt(InvalidUserAmount),\n 'existing_ticket' : IDL.Opt(Ticket),\n 'error_type' : IDL.Int32,\n });\n const Result_2 = IDL.Variant({ 'Ok' : Ok_2, 'Err' : Err_2 });\n const NewSaleTicketResponse = IDL.Record({ 'result' : IDL.Opt(Result_2) });\n const OpenRequest = IDL.Record({\n 'cf_participants' : IDL.Vec(CfParticipant),\n 'params' : IDL.Opt(Params),\n 'open_sns_token_swap_proposal_id' : IDL.Opt(IDL.Nat64),\n });\n const RefreshBuyerTokensRequest = IDL.Record({\n 'confirmation_text' : IDL.Opt(IDL.Text),\n 'buyer' : IDL.Text,\n });\n const RefreshBuyerTokensResponse = IDL.Record({\n 'icp_accepted_participation_e8s' : IDL.Nat64,\n 'icp_ledger_account_balance_e8s' : IDL.Nat64,\n });\n return IDL.Service({\n 'error_refund_icp' : IDL.Func(\n [ErrorRefundIcpRequest],\n [ErrorRefundIcpResponse],\n [],\n ),\n 'finalize_swap' : IDL.Func([IDL.Record({})], [FinalizeSwapResponse], []),\n 'get_auto_finalization_status' : IDL.Func(\n [IDL.Record({})],\n [GetAutoFinalizationStatusResponse],\n [],\n ),\n 'get_buyer_state' : IDL.Func(\n [GetBuyerStateRequest],\n [GetBuyerStateResponse],\n [],\n ),\n 'get_buyers_total' : IDL.Func(\n [IDL.Record({})],\n [GetBuyersTotalResponse],\n [],\n ),\n 'get_canister_status' : IDL.Func(\n [IDL.Record({})],\n [CanisterStatusResultV2],\n [],\n ),\n 'get_derived_state' : IDL.Func(\n [IDL.Record({})],\n [GetDerivedStateResponse],\n [],\n ),\n 'get_init' : IDL.Func([IDL.Record({})], [GetInitResponse], []),\n 'get_lifecycle' : IDL.Func([IDL.Record({})], [GetLifecycleResponse], []),\n 'get_open_ticket' : IDL.Func([IDL.Record({})], [GetOpenTicketResponse], []),\n 'get_sale_parameters' : IDL.Func(\n [IDL.Record({})],\n [GetSaleParametersResponse],\n [],\n ),\n 'get_state' : IDL.Func([IDL.Record({})], [GetStateResponse], []),\n 'list_community_fund_participants' : IDL.Func(\n [ListCommunityFundParticipantsRequest],\n [NeuronsFundParticipants],\n [],\n ),\n 'list_direct_participants' : IDL.Func(\n [ListDirectParticipantsRequest],\n [ListDirectParticipantsResponse],\n [],\n ),\n 'list_sns_neuron_recipes' : IDL.Func(\n [ListSnsNeuronRecipesRequest],\n [ListSnsNeuronRecipesResponse],\n [],\n ),\n 'new_sale_ticket' : IDL.Func(\n [NewSaleTicketRequest],\n [NewSaleTicketResponse],\n [],\n ),\n 'notify_payment_failure' : IDL.Func([IDL.Record({})], [Ok_2], []),\n 'open' : IDL.Func([OpenRequest], [IDL.Record({})], []),\n 'refresh_buyer_tokens' : IDL.Func(\n [RefreshBuyerTokensRequest],\n [RefreshBuyerTokensResponse],\n [],\n ),\n });\n};\nexport const init = ({ IDL }) => {\n const NeuronBasketConstructionParameters = IDL.Record({\n 'dissolve_delay_interval_seconds' : IDL.Nat64,\n 'count' : IDL.Nat64,\n });\n const LinearScalingCoefficient = IDL.Record({\n 'slope_numerator' : IDL.Opt(IDL.Nat64),\n 'intercept_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'from_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'slope_denominator' : IDL.Opt(IDL.Nat64),\n 'to_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n });\n const IdealMatchedParticipationFunction = IDL.Record({\n 'serialized_representation' : IDL.Opt(IDL.Text),\n });\n const NeuronsFundParticipationConstraints = IDL.Record({\n 'coefficient_intervals' : IDL.Vec(LinearScalingCoefficient),\n 'max_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'min_direct_participation_threshold_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'ideal_matched_participation_function' : IDL.Opt(\n IdealMatchedParticipationFunction\n ),\n });\n const CfNeuron = IDL.Record({\n 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),\n 'nns_neuron_id' : IDL.Nat64,\n 'amount_icp_e8s' : IDL.Nat64,\n });\n const CfParticipant = IDL.Record({\n 'hotkey_principal' : IDL.Text,\n 'cf_neurons' : IDL.Vec(CfNeuron),\n });\n const NeuronsFundParticipants = IDL.Record({\n 'cf_participants' : IDL.Vec(CfParticipant),\n });\n const Countries = IDL.Record({ 'iso_codes' : IDL.Vec(IDL.Text) });\n const Init = IDL.Record({\n 'nns_proposal_id' : IDL.Opt(IDL.Nat64),\n 'sns_root_canister_id' : IDL.Text,\n 'neurons_fund_participation' : IDL.Opt(IDL.Bool),\n 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neuron_basket_construction_parameters' : IDL.Opt(\n NeuronBasketConstructionParameters\n ),\n 'fallback_controller_principal_ids' : IDL.Vec(IDL.Text),\n 'max_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),\n 'confirmation_text' : IDL.Opt(IDL.Text),\n 'swap_start_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'swap_due_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'min_participants' : IDL.Opt(IDL.Nat32),\n 'sns_token_e8s' : IDL.Opt(IDL.Nat64),\n 'nns_governance_canister_id' : IDL.Text,\n 'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),\n 'icp_ledger_canister_id' : IDL.Text,\n 'sns_ledger_canister_id' : IDL.Text,\n 'neurons_fund_participation_constraints' : IDL.Opt(\n NeuronsFundParticipationConstraints\n ),\n 'neurons_fund_participants' : IDL.Opt(NeuronsFundParticipants),\n 'should_auto_finalize' : IDL.Opt(IDL.Bool),\n 'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'sns_governance_canister_id' : IDL.Text,\n 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'restricted_countries' : IDL.Opt(Countries),\n 'min_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n });\n return [Init];\n};\n", "/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_swap.did */\nexport const idlFactory = ({ IDL }) => {\n const NeuronBasketConstructionParameters = IDL.Record({\n 'dissolve_delay_interval_seconds' : IDL.Nat64,\n 'count' : IDL.Nat64,\n });\n const LinearScalingCoefficient = IDL.Record({\n 'slope_numerator' : IDL.Opt(IDL.Nat64),\n 'intercept_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'from_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'slope_denominator' : IDL.Opt(IDL.Nat64),\n 'to_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n });\n const IdealMatchedParticipationFunction = IDL.Record({\n 'serialized_representation' : IDL.Opt(IDL.Text),\n });\n const NeuronsFundParticipationConstraints = IDL.Record({\n 'coefficient_intervals' : IDL.Vec(LinearScalingCoefficient),\n 'max_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'min_direct_participation_threshold_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'ideal_matched_participation_function' : IDL.Opt(\n IdealMatchedParticipationFunction\n ),\n });\n const CfNeuron = IDL.Record({\n 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),\n 'nns_neuron_id' : IDL.Nat64,\n 'amount_icp_e8s' : IDL.Nat64,\n });\n const CfParticipant = IDL.Record({\n 'hotkey_principal' : IDL.Text,\n 'cf_neurons' : IDL.Vec(CfNeuron),\n });\n const NeuronsFundParticipants = IDL.Record({\n 'cf_participants' : IDL.Vec(CfParticipant),\n });\n const Countries = IDL.Record({ 'iso_codes' : IDL.Vec(IDL.Text) });\n const Init = IDL.Record({\n 'nns_proposal_id' : IDL.Opt(IDL.Nat64),\n 'sns_root_canister_id' : IDL.Text,\n 'neurons_fund_participation' : IDL.Opt(IDL.Bool),\n 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neuron_basket_construction_parameters' : IDL.Opt(\n NeuronBasketConstructionParameters\n ),\n 'fallback_controller_principal_ids' : IDL.Vec(IDL.Text),\n 'max_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),\n 'confirmation_text' : IDL.Opt(IDL.Text),\n 'swap_start_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'swap_due_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'min_participants' : IDL.Opt(IDL.Nat32),\n 'sns_token_e8s' : IDL.Opt(IDL.Nat64),\n 'nns_governance_canister_id' : IDL.Text,\n 'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),\n 'icp_ledger_canister_id' : IDL.Text,\n 'sns_ledger_canister_id' : IDL.Text,\n 'neurons_fund_participation_constraints' : IDL.Opt(\n NeuronsFundParticipationConstraints\n ),\n 'neurons_fund_participants' : IDL.Opt(NeuronsFundParticipants),\n 'should_auto_finalize' : IDL.Opt(IDL.Bool),\n 'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'sns_governance_canister_id' : IDL.Text,\n 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'restricted_countries' : IDL.Opt(Countries),\n 'min_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n });\n const ErrorRefundIcpRequest = IDL.Record({\n 'source_principal_id' : IDL.Opt(IDL.Principal),\n });\n const Ok = IDL.Record({ 'block_height' : IDL.Opt(IDL.Nat64) });\n const Err = IDL.Record({\n 'description' : IDL.Opt(IDL.Text),\n 'error_type' : IDL.Opt(IDL.Int32),\n });\n const Result = IDL.Variant({ 'Ok' : Ok, 'Err' : Err });\n const ErrorRefundIcpResponse = IDL.Record({ 'result' : IDL.Opt(Result) });\n const CanisterCallError = IDL.Record({\n 'code' : IDL.Opt(IDL.Int32),\n 'description' : IDL.Text,\n });\n const FailedUpdate = IDL.Record({\n 'err' : IDL.Opt(CanisterCallError),\n 'dapp_canister_id' : IDL.Opt(IDL.Principal),\n });\n const SetDappControllersResponse = IDL.Record({\n 'failed_updates' : IDL.Vec(FailedUpdate),\n });\n const Possibility = IDL.Variant({\n 'Ok' : SetDappControllersResponse,\n 'Err' : CanisterCallError,\n });\n const SetDappControllersCallResult = IDL.Record({\n 'possibility' : IDL.Opt(Possibility),\n });\n const SweepResult = IDL.Record({\n 'failure' : IDL.Nat32,\n 'skipped' : IDL.Nat32,\n 'invalid' : IDL.Nat32,\n 'success' : IDL.Nat32,\n 'global_failures' : IDL.Nat32,\n });\n const GovernanceError = IDL.Record({\n 'error_message' : IDL.Text,\n 'error_type' : IDL.Int32,\n });\n const Response = IDL.Record({\n 'governance_error' : IDL.Opt(GovernanceError),\n });\n const Possibility_1 = IDL.Variant({\n 'Ok' : Response,\n 'Err' : CanisterCallError,\n });\n const SettleCommunityFundParticipationResult = IDL.Record({\n 'possibility' : IDL.Opt(Possibility_1),\n });\n const Ok_1 = IDL.Record({\n 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neurons_fund_neurons_count' : IDL.Opt(IDL.Nat64),\n });\n const Error = IDL.Record({ 'message' : IDL.Opt(IDL.Text) });\n const Possibility_2 = IDL.Variant({ 'Ok' : Ok_1, 'Err' : Error });\n const SettleNeuronsFundParticipationResult = IDL.Record({\n 'possibility' : IDL.Opt(Possibility_2),\n });\n const Possibility_3 = IDL.Variant({\n 'Ok' : IDL.Record({}),\n 'Err' : CanisterCallError,\n });\n const SetModeCallResult = IDL.Record({\n 'possibility' : IDL.Opt(Possibility_3),\n });\n const FinalizeSwapResponse = IDL.Record({\n 'set_dapp_controllers_call_result' : IDL.Opt(SetDappControllersCallResult),\n 'create_sns_neuron_recipes_result' : IDL.Opt(SweepResult),\n 'settle_community_fund_participation_result' : IDL.Opt(\n SettleCommunityFundParticipationResult\n ),\n 'error_message' : IDL.Opt(IDL.Text),\n 'settle_neurons_fund_participation_result' : IDL.Opt(\n SettleNeuronsFundParticipationResult\n ),\n 'set_mode_call_result' : IDL.Opt(SetModeCallResult),\n 'sweep_icp_result' : IDL.Opt(SweepResult),\n 'claim_neuron_result' : IDL.Opt(SweepResult),\n 'sweep_sns_result' : IDL.Opt(SweepResult),\n });\n const GetAutoFinalizationStatusResponse = IDL.Record({\n 'auto_finalize_swap_response' : IDL.Opt(FinalizeSwapResponse),\n 'has_auto_finalize_been_attempted' : IDL.Opt(IDL.Bool),\n 'is_auto_finalize_enabled' : IDL.Opt(IDL.Bool),\n });\n const GetBuyerStateRequest = IDL.Record({\n 'principal_id' : IDL.Opt(IDL.Principal),\n });\n const TransferableAmount = IDL.Record({\n 'transfer_fee_paid_e8s' : IDL.Opt(IDL.Nat64),\n 'transfer_start_timestamp_seconds' : IDL.Nat64,\n 'amount_e8s' : IDL.Nat64,\n 'amount_transferred_e8s' : IDL.Opt(IDL.Nat64),\n 'transfer_success_timestamp_seconds' : IDL.Nat64,\n });\n const BuyerState = IDL.Record({\n 'icp' : IDL.Opt(TransferableAmount),\n 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),\n });\n const GetBuyerStateResponse = IDL.Record({\n 'buyer_state' : IDL.Opt(BuyerState),\n });\n const GetBuyersTotalResponse = IDL.Record({ 'buyers_total' : IDL.Nat64 });\n const CanisterStatusType = IDL.Variant({\n 'stopped' : IDL.Null,\n 'stopping' : IDL.Null,\n 'running' : IDL.Null,\n });\n const DefiniteCanisterSettingsArgs = IDL.Record({\n 'freezing_threshold' : IDL.Nat,\n 'controllers' : IDL.Vec(IDL.Principal),\n 'memory_allocation' : IDL.Nat,\n 'compute_allocation' : IDL.Nat,\n });\n const CanisterStatusResultV2 = IDL.Record({\n 'status' : CanisterStatusType,\n 'memory_size' : IDL.Nat,\n 'cycles' : IDL.Nat,\n 'settings' : DefiniteCanisterSettingsArgs,\n 'idle_cycles_burned_per_day' : IDL.Nat,\n 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n });\n const GetDerivedStateResponse = IDL.Record({\n 'sns_tokens_per_icp' : IDL.Opt(IDL.Float64),\n 'buyer_total_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'cf_participant_count' : IDL.Opt(IDL.Nat64),\n 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'direct_participant_count' : IDL.Opt(IDL.Nat64),\n 'cf_neuron_count' : IDL.Opt(IDL.Nat64),\n });\n const GetInitResponse = IDL.Record({ 'init' : IDL.Opt(Init) });\n const GetLifecycleResponse = IDL.Record({\n 'decentralization_sale_open_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'lifecycle' : IDL.Opt(IDL.Int32),\n 'decentralization_swap_termination_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n });\n const Icrc1Account = IDL.Record({\n 'owner' : IDL.Opt(IDL.Principal),\n 'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n });\n const Ticket = IDL.Record({\n 'creation_time' : IDL.Nat64,\n 'ticket_id' : IDL.Nat64,\n 'account' : IDL.Opt(Icrc1Account),\n 'amount_icp_e8s' : IDL.Nat64,\n });\n const Ok_2 = IDL.Record({ 'ticket' : IDL.Opt(Ticket) });\n const Err_1 = IDL.Record({ 'error_type' : IDL.Opt(IDL.Int32) });\n const Result_1 = IDL.Variant({ 'Ok' : Ok_2, 'Err' : Err_1 });\n const GetOpenTicketResponse = IDL.Record({ 'result' : IDL.Opt(Result_1) });\n const Params = IDL.Record({\n 'min_participant_icp_e8s' : IDL.Nat64,\n 'neuron_basket_construction_parameters' : IDL.Opt(\n NeuronBasketConstructionParameters\n ),\n 'max_icp_e8s' : IDL.Nat64,\n 'swap_due_timestamp_seconds' : IDL.Nat64,\n 'min_participants' : IDL.Nat32,\n 'sns_token_e8s' : IDL.Nat64,\n 'sale_delay_seconds' : IDL.Opt(IDL.Nat64),\n 'max_participant_icp_e8s' : IDL.Nat64,\n 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'min_icp_e8s' : IDL.Nat64,\n 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n });\n const GetSaleParametersResponse = IDL.Record({ 'params' : IDL.Opt(Params) });\n const NeuronId = IDL.Record({ 'id' : IDL.Vec(IDL.Nat8) });\n const NeuronAttributes = IDL.Record({\n 'dissolve_delay_seconds' : IDL.Nat64,\n 'memo' : IDL.Nat64,\n 'followees' : IDL.Vec(NeuronId),\n });\n const CfInvestment = IDL.Record({\n 'hotkey_principal' : IDL.Text,\n 'nns_neuron_id' : IDL.Nat64,\n });\n const DirectInvestment = IDL.Record({ 'buyer_principal' : IDL.Text });\n const Investor = IDL.Variant({\n 'CommunityFund' : CfInvestment,\n 'Direct' : DirectInvestment,\n });\n const SnsNeuronRecipe = IDL.Record({\n 'sns' : IDL.Opt(TransferableAmount),\n 'claimed_status' : IDL.Opt(IDL.Int32),\n 'neuron_attributes' : IDL.Opt(NeuronAttributes),\n 'investor' : IDL.Opt(Investor),\n });\n const Swap = IDL.Record({\n 'auto_finalize_swap_response' : IDL.Opt(FinalizeSwapResponse),\n 'neuron_recipes' : IDL.Vec(SnsNeuronRecipe),\n 'next_ticket_id' : IDL.Opt(IDL.Nat64),\n 'decentralization_sale_open_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'finalize_swap_in_progress' : IDL.Opt(IDL.Bool),\n 'cf_participants' : IDL.Vec(CfParticipant),\n 'init' : IDL.Opt(Init),\n 'already_tried_to_auto_finalize' : IDL.Opt(IDL.Bool),\n 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'purge_old_tickets_last_completion_timestamp_nanoseconds' : IDL.Opt(\n IDL.Nat64\n ),\n 'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'lifecycle' : IDL.Int32,\n 'purge_old_tickets_next_principal' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n 'decentralization_swap_termination_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'buyers' : IDL.Vec(IDL.Tuple(IDL.Text, BuyerState)),\n 'params' : IDL.Opt(Params),\n 'open_sns_token_swap_proposal_id' : IDL.Opt(IDL.Nat64),\n });\n const DerivedState = IDL.Record({\n 'sns_tokens_per_icp' : IDL.Float32,\n 'buyer_total_icp_e8s' : IDL.Nat64,\n 'cf_participant_count' : IDL.Opt(IDL.Nat64),\n 'neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'direct_participant_count' : IDL.Opt(IDL.Nat64),\n 'cf_neuron_count' : IDL.Opt(IDL.Nat64),\n });\n const GetStateResponse = IDL.Record({\n 'swap' : IDL.Opt(Swap),\n 'derived' : IDL.Opt(DerivedState),\n });\n const ListCommunityFundParticipantsRequest = IDL.Record({\n 'offset' : IDL.Opt(IDL.Nat64),\n 'limit' : IDL.Opt(IDL.Nat32),\n });\n const ListDirectParticipantsRequest = IDL.Record({\n 'offset' : IDL.Opt(IDL.Nat32),\n 'limit' : IDL.Opt(IDL.Nat32),\n });\n const Participant = IDL.Record({\n 'participation' : IDL.Opt(BuyerState),\n 'participant_id' : IDL.Opt(IDL.Principal),\n });\n const ListDirectParticipantsResponse = IDL.Record({\n 'participants' : IDL.Vec(Participant),\n });\n const ListSnsNeuronRecipesRequest = IDL.Record({\n 'offset' : IDL.Opt(IDL.Nat64),\n 'limit' : IDL.Opt(IDL.Nat32),\n });\n const ListSnsNeuronRecipesResponse = IDL.Record({\n 'sns_neuron_recipes' : IDL.Vec(SnsNeuronRecipe),\n });\n const NewSaleTicketRequest = IDL.Record({\n 'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n 'amount_icp_e8s' : IDL.Nat64,\n });\n const InvalidUserAmount = IDL.Record({\n 'min_amount_icp_e8s_included' : IDL.Nat64,\n 'max_amount_icp_e8s_included' : IDL.Nat64,\n });\n const Err_2 = IDL.Record({\n 'invalid_user_amount' : IDL.Opt(InvalidUserAmount),\n 'existing_ticket' : IDL.Opt(Ticket),\n 'error_type' : IDL.Int32,\n });\n const Result_2 = IDL.Variant({ 'Ok' : Ok_2, 'Err' : Err_2 });\n const NewSaleTicketResponse = IDL.Record({ 'result' : IDL.Opt(Result_2) });\n const OpenRequest = IDL.Record({\n 'cf_participants' : IDL.Vec(CfParticipant),\n 'params' : IDL.Opt(Params),\n 'open_sns_token_swap_proposal_id' : IDL.Opt(IDL.Nat64),\n });\n const RefreshBuyerTokensRequest = IDL.Record({\n 'confirmation_text' : IDL.Opt(IDL.Text),\n 'buyer' : IDL.Text,\n });\n const RefreshBuyerTokensResponse = IDL.Record({\n 'icp_accepted_participation_e8s' : IDL.Nat64,\n 'icp_ledger_account_balance_e8s' : IDL.Nat64,\n });\n return IDL.Service({\n 'error_refund_icp' : IDL.Func(\n [ErrorRefundIcpRequest],\n [ErrorRefundIcpResponse],\n [],\n ),\n 'finalize_swap' : IDL.Func([IDL.Record({})], [FinalizeSwapResponse], []),\n 'get_auto_finalization_status' : IDL.Func(\n [IDL.Record({})],\n [GetAutoFinalizationStatusResponse],\n ['query'],\n ),\n 'get_buyer_state' : IDL.Func(\n [GetBuyerStateRequest],\n [GetBuyerStateResponse],\n ['query'],\n ),\n 'get_buyers_total' : IDL.Func(\n [IDL.Record({})],\n [GetBuyersTotalResponse],\n [],\n ),\n 'get_canister_status' : IDL.Func(\n [IDL.Record({})],\n [CanisterStatusResultV2],\n [],\n ),\n 'get_derived_state' : IDL.Func(\n [IDL.Record({})],\n [GetDerivedStateResponse],\n ['query'],\n ),\n 'get_init' : IDL.Func([IDL.Record({})], [GetInitResponse], ['query']),\n 'get_lifecycle' : IDL.Func(\n [IDL.Record({})],\n [GetLifecycleResponse],\n ['query'],\n ),\n 'get_open_ticket' : IDL.Func(\n [IDL.Record({})],\n [GetOpenTicketResponse],\n ['query'],\n ),\n 'get_sale_parameters' : IDL.Func(\n [IDL.Record({})],\n [GetSaleParametersResponse],\n ['query'],\n ),\n 'get_state' : IDL.Func([IDL.Record({})], [GetStateResponse], ['query']),\n 'list_community_fund_participants' : IDL.Func(\n [ListCommunityFundParticipantsRequest],\n [NeuronsFundParticipants],\n ['query'],\n ),\n 'list_direct_participants' : IDL.Func(\n [ListDirectParticipantsRequest],\n [ListDirectParticipantsResponse],\n ['query'],\n ),\n 'list_sns_neuron_recipes' : IDL.Func(\n [ListSnsNeuronRecipesRequest],\n [ListSnsNeuronRecipesResponse],\n ['query'],\n ),\n 'new_sale_ticket' : IDL.Func(\n [NewSaleTicketRequest],\n [NewSaleTicketResponse],\n [],\n ),\n 'notify_payment_failure' : IDL.Func([IDL.Record({})], [Ok_2], []),\n 'open' : IDL.Func([OpenRequest], [IDL.Record({})], []),\n 'refresh_buyer_tokens' : IDL.Func(\n [RefreshBuyerTokensRequest],\n [RefreshBuyerTokensResponse],\n [],\n ),\n });\n};\nexport const init = ({ IDL }) => {\n const NeuronBasketConstructionParameters = IDL.Record({\n 'dissolve_delay_interval_seconds' : IDL.Nat64,\n 'count' : IDL.Nat64,\n });\n const LinearScalingCoefficient = IDL.Record({\n 'slope_numerator' : IDL.Opt(IDL.Nat64),\n 'intercept_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'from_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'slope_denominator' : IDL.Opt(IDL.Nat64),\n 'to_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n });\n const IdealMatchedParticipationFunction = IDL.Record({\n 'serialized_representation' : IDL.Opt(IDL.Text),\n });\n const NeuronsFundParticipationConstraints = IDL.Record({\n 'coefficient_intervals' : IDL.Vec(LinearScalingCoefficient),\n 'max_neurons_fund_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'min_direct_participation_threshold_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'ideal_matched_participation_function' : IDL.Opt(\n IdealMatchedParticipationFunction\n ),\n });\n const CfNeuron = IDL.Record({\n 'has_created_neuron_recipes' : IDL.Opt(IDL.Bool),\n 'nns_neuron_id' : IDL.Nat64,\n 'amount_icp_e8s' : IDL.Nat64,\n });\n const CfParticipant = IDL.Record({\n 'hotkey_principal' : IDL.Text,\n 'cf_neurons' : IDL.Vec(CfNeuron),\n });\n const NeuronsFundParticipants = IDL.Record({\n 'cf_participants' : IDL.Vec(CfParticipant),\n });\n const Countries = IDL.Record({ 'iso_codes' : IDL.Vec(IDL.Text) });\n const Init = IDL.Record({\n 'nns_proposal_id' : IDL.Opt(IDL.Nat64),\n 'sns_root_canister_id' : IDL.Text,\n 'neurons_fund_participation' : IDL.Opt(IDL.Bool),\n 'min_participant_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neuron_basket_construction_parameters' : IDL.Opt(\n NeuronBasketConstructionParameters\n ),\n 'fallback_controller_principal_ids' : IDL.Vec(IDL.Text),\n 'max_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'neuron_minimum_stake_e8s' : IDL.Opt(IDL.Nat64),\n 'confirmation_text' : IDL.Opt(IDL.Text),\n 'swap_start_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'swap_due_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'min_participants' : IDL.Opt(IDL.Nat32),\n 'sns_token_e8s' : IDL.Opt(IDL.Nat64),\n 'nns_governance_canister_id' : IDL.Text,\n 'transaction_fee_e8s' : IDL.Opt(IDL.Nat64),\n 'icp_ledger_canister_id' : IDL.Text,\n 'sns_ledger_canister_id' : IDL.Text,\n 'neurons_fund_participation_constraints' : IDL.Opt(\n NeuronsFundParticipationConstraints\n ),\n 'neurons_fund_participants' : IDL.Opt(NeuronsFundParticipants),\n 'should_auto_finalize' : IDL.Opt(IDL.Bool),\n 'max_participant_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'sns_governance_canister_id' : IDL.Text,\n 'min_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'restricted_countries' : IDL.Opt(Countries),\n 'min_icp_e8s' : IDL.Opt(IDL.Nat64),\n 'max_direct_participation_icp_e8s' : IDL.Opt(IDL.Nat64),\n });\n return [Init];\n};\n", "import type { NewSaleTicketRequest } from \"../../candid/sns_swap\";\nimport type { NewSaleTicketParams } from \"../types/swap.params\";\n\n// Helper for building `NewSaleTicketRequest` structure\nexport const toNewSaleTicketRequest = ({\n subaccount,\n amount_icp_e8s,\n}: NewSaleTicketParams): NewSaleTicketRequest => ({\n subaccount: subaccount === undefined ? [] : [subaccount],\n amount_icp_e8s,\n});\n", "// This is possible specially in SNS projects/\n// Because they share the same canisters but in different versions.\nexport class UnsupportedMethodError extends Error {\n constructor(public readonly methodName: string) {\n super();\n }\n}\n", "import type { InvalidUserAmount, Ticket } from \"../../candid/sns_swap\";\nimport type {\n GetOpenTicketErrorType,\n NewSaleTicketResponseErrorType,\n} from \"../enums/swap.enums\";\n\nexport class SnsSwapNewTicketError extends Error {\n public errorType: NewSaleTicketResponseErrorType;\n public invalidUserAmount?: InvalidUserAmount;\n public existingTicket?: Ticket;\n\n constructor({\n errorType,\n invalidUserAmount,\n existingTicket,\n }: {\n errorType: NewSaleTicketResponseErrorType;\n invalidUserAmount?: InvalidUserAmount;\n existingTicket?: Ticket;\n }) {\n super();\n this.errorType = errorType;\n this.invalidUserAmount = invalidUserAmount;\n this.existingTicket = existingTicket;\n }\n}\n\nexport class SnsSwapGetOpenTicketError extends Error {\n constructor(public errorType: GetOpenTicketErrorType) {\n super();\n }\n}\n", "import { nonNullish } from \"@dfinity/utils\";\n\n/**\n * Identifies errors of method not being present in the canister.\n *\n * This is useful because SNS projects have different versions of SNS canisters.\n * Therefore, what works in the latest version might not work in the previous one.\n *\n * Error message example: \"Call was rejected:\n * Request ID: 3a6ef904b35fd19721c95c3df2b0b00b8abefba7f0ad188f5c472809b772c914\n * Reject code: 3\n * Reject text: Canister 75ffu-oaaaa-aaaaa-aabbq-cai has no update method 'get_auto_finalization_status'\"\n */\nexport const isMethodNotSupportedError = (err: unknown): boolean => {\n if (typeof err === \"object\" && nonNullish(err) && \"message\" in err) {\n const message = err.message as string;\n return (\n message.includes(\"has no update method\") ||\n message.includes(\"has no query method\")\n );\n }\n return false;\n};\n"],
5
- "mappings": "AACA,OACE,YAAAA,GACA,kBAAAC,GACA,uBAAAC,EACA,gBAAAC,MACK,iBCLA,IAAMC,GAAa,CAAC,CAAE,IAAAC,CAAI,IAAM,CACrC,IAAMC,EAAqCD,EAAI,OAAO,CACpD,gCAAoCA,EAAI,MACxC,MAAUA,EAAI,KAChB,CAAC,EACKE,EAA2BF,EAAI,OAAO,CAC1C,gBAAoBA,EAAI,IAAIA,EAAI,KAAK,EACrC,kBAAsBA,EAAI,IAAIA,EAAI,KAAK,EACvC,kCAAsCA,EAAI,IAAIA,EAAI,KAAK,EACvD,kBAAsBA,EAAI,IAAIA,EAAI,KAAK,EACvC,gCAAoCA,EAAI,IAAIA,EAAI,KAAK,CACvD,CAAC,EACKG,EAAoCH,EAAI,OAAO,CACnD,0BAA8BA,EAAI,IAAIA,EAAI,IAAI,CAChD,CAAC,EACKI,EAAsCJ,EAAI,OAAO,CACrD,sBAA0BA,EAAI,IAAIE,CAAwB,EAC1D,uCAA2CF,EAAI,IAAIA,EAAI,KAAK,EAC5D,2CAA+CA,EAAI,IAAIA,EAAI,KAAK,EAChE,qCAAyCA,EAAI,IAC3CG,CACF,CACF,CAAC,EACKE,EAAWL,EAAI,OAAO,CAC1B,2BAA+BA,EAAI,IAAIA,EAAI,IAAI,EAC/C,cAAkBA,EAAI,MACtB,eAAmBA,EAAI,KACzB,CAAC,EACKM,EAAgBN,EAAI,OAAO,CAC/B,iBAAqBA,EAAI,KACzB,WAAeA,EAAI,IAAIK,CAAQ,CACjC,CAAC,EACKE,EAA0BP,EAAI,OAAO,CACzC,gBAAoBA,EAAI,IAAIM,CAAa,CAC3C,CAAC,EACKE,EAAYR,EAAI,OAAO,CAAE,UAAcA,EAAI,IAAIA,EAAI,IAAI,CAAE,CAAC,EAC1DS,EAAOT,EAAI,OAAO,CACtB,gBAAoBA,E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AAI,MAAM,KAAK,OAAO,CAC7C,UAAW,EACb,CAAC,EAAE,gBAAgBK,CAAO,EAEpBJ,EAASC,EAAoBF,CAAQ,EAE3C,GAAI,OAAQC,EACV,OAAOC,EAAoBD,EAAO,GAAG,MAAM,EAG7C,IAAMM,EAAYN,EAAO,IAOzB,MANc,IAAIO,EAAsB,CACtC,UAAWD,EAAU,WACrB,kBAAmBV,EAAaU,EAAU,qBAAuB,CAAC,CAAC,EACnE,eAAgBV,EAAaU,EAAU,iBAAmB,CAAC,CAAC,CAC9D,CAAC,CAGH,EAKA,kBAAe,MAAOZ,GACb,KAAK,OAAOA,CAAM,EAAE,cAAc,CAAC,CAAC,EAM7C,2BAAwB,MACtBA,GAC+C,CAC/C,GAAI,CACF,OAAO,MAAM,KAAK,OAAOA,CAAM,EAAE,6BAA6B,CAAC,CAAC,CAClE,OAASc,EAAO,CAEd,MAAIC,GAA0BD,CAAK,EAC3B,IAAIE,EAAuB,uBAAuB,EAEpDF,CACR,CACF,EAjIA,OAAO,OAAOG,EAA6C,CACzD,GAAM,CAAE,QAAAC,EAAS,iBAAAC,EAAkB,WAAAC,CAAW,EAC5CC,GAA+B,CAC7B,QAAAJ,EACA,WAAAK,GACA,oBAAAA,EACF,CAAC,EAEH,OAAO,IAAIxB,EAAgBsB,EAAYF,EAASC,CAAgB,CAClE,CAyHF",
6
- "names": ["Canister", "createServices", "fromDefinedNullable", "fromNullable", "idlFactory", "IDL", "NeuronBasketConstructionParameters", "LinearScalingCoefficient", "IdealMatchedParticipationFunction", "NeuronsFundParticipationConstraints", "CfNeuron", "CfParticipant", "NeuronsFundParticipants", "Countries", "Init", "ErrorRefundIcpRequest", "Ok", "Err", "Result", "ErrorRefundIcpResponse", "CanisterCallError", "FailedUpdate", "SetDappControllersResponse", "Possibility", "SetDappControllersCallResult", "SweepResult", "GovernanceError", "Response", "Possibility_1", "SettleCommunityFundParticipationResult", "Ok_1", "Error", "Possibility_2", "SettleNeuronsFundParticipationResult", "Possibility_3", "SetModeCallResult", "FinalizeSwapResponse", "GetAutoFinalizationStatusResponse", "GetBuyerStateRequest", "TransferableAmount", "BuyerState", "GetBuyerStateResponse", "GetBuyersTotalResponse", "CanisterStatusType", "DefiniteCanisterSettingsArgs", "CanisterStatusResultV2", "GetDerivedStateResponse", "GetInitResponse", "GetLifecycleResponse", "Icrc1Account", "Ticket", "Ok_2", "Err_1", "Result_1", "GetOpenTicketResponse", "Params", "GetSaleParametersResponse", "NeuronId", "NeuronAttributes", "CfInvestment", "DirectInvestment", "Investor", "SnsNeuronRecipe", "Swap", "DerivedState", "GetStateResponse", "ListCommunityFundParticipantsRequest", "ListDirectParticipantsRequest", "Participant", "ListDirectParticipantsResponse", "ListSnsNeuronRecipesRequest", "ListSnsNeuronRecipesResponse", "NewSaleTicketRequest", "InvalidUserAmount", "Err_2", "Result_2", "NewSaleTicketResponse", "OpenRequest", "RefreshBuyerTokensRequest", "RefreshBuyerTokensResponse", "idlFactory", "IDL", "NeuronBasketConstructionParameters", "LinearScalingCoefficient", "IdealMatchedParticipationFunction", "NeuronsFundParticipationConstraints", "CfNeuron", "CfParticipant", "NeuronsFundParticipants", "Countries", "Init", "ErrorRefundIcpRequest", "Ok", "Err", "Result", "ErrorRefundIcpResponse", "CanisterCallError", "FailedUpdate", "SetDappControllersResponse", "Possibility", "SetDappControllersCallResult", "SweepResult", "GovernanceError", "Response", "Possibility_1", "SettleCommunityFundParticipationResult", "Ok_1", "Error", "Possibility_2", "SettleNeuronsFundParticipationResult", "Possibility_3", "SetModeCallResult", "FinalizeSwapResponse", "GetAutoFinalizationStatusResponse", "GetBuyerStateRequest", "TransferableAmount", "BuyerState", "GetBuyerStateResponse", "GetBuyersTotalResponse", "CanisterStatusType", "DefiniteCanisterSettingsArgs", "CanisterStatusResultV2", "GetDerivedStateResponse", "GetInitResponse", "GetLifecycleResponse", "Icrc1Account", "Ticket", "Ok_2", "Err_1", "Result_1", "GetOpenTicketResponse", "Params", "GetSaleParametersResponse", "NeuronId", "NeuronAttributes", "CfInvestment", "DirectInvestment", "Investor", "SnsNeuronRecipe", "Swap", "DerivedState", "GetStateResponse", "ListCommunityFundParticipantsRequest", "ListDirectParticipantsRequest", "Participant", "ListDirectParticipantsResponse", "ListSnsNeuronRecipesRequest", "ListSnsNeuronRecipesResponse", "NewSaleTicketRequest", "InvalidUserAmount", "Err_2", "Result_2", "NewSaleTicketResponse", "OpenRequest", "RefreshBuyerTokensRequest", "RefreshBuyerTokensResponse", "toNewSaleTicketRequest", "subaccount", "amount_icp_e8s", "UnsupportedMethodError", "methodName", "SnsSwapNewTicketError", "errorType", "invalidUserAmount", "existingTicket", "SnsSwapGetOpenTicketError", "nonNullish", "isMethodNotSupportedError", "err", "message", "SnsSwapCanister", "_SnsSwapCanister", "Canister", "params", "ticket", "fromNullable", "buyer_state", "certified", "response", "result", "fromDefinedNullable", "errorType", "SnsSwapGetOpenTicketError", "request", "toNewSaleTicketRequest", "errorData", "SnsSwapNewTicketError", "error", "isMethodNotSupportedError", "UnsupportedMethodError", "options", "service", "certifiedService", "canisterId", "createServices", "idlFactory"]
7
- }
@@ -1,2 +0,0 @@
1
- import{Canister as v,createServices as f}from"@dfinity/utils";var S=({IDL:t})=>{let C=t.Record({dapp_canister_ids:t.Vec(t.Principal),testflight:t.Bool,latest_ledger_archive_poll_timestamp_seconds:t.Opt(t.Nat64),archive_canister_ids:t.Vec(t.Principal),governance_canister_id:t.Opt(t.Principal),index_canister_id:t.Opt(t.Principal),swap_canister_id:t.Opt(t.Principal),ledger_canister_id:t.Opt(t.Principal)}),i=t.Record({canister_id:t.Principal}),s=t.Variant({stopped:t.Null,stopping:t.Null,running:t.Null}),a=t.Record({freezing_threshold:t.Opt(t.Nat),controllers:t.Vec(t.Principal),reserved_cycles_limit:t.Opt(t.Nat),memory_allocation:t.Opt(t.Nat),compute_allocation:t.Opt(t.Nat)}),r=t.Record({status:s,memory_size:t.Nat,cycles:t.Nat,settings:a,idle_cycles_burned_per_day:t.Opt(t.Nat),module_hash:t.Opt(t.Vec(t.Nat8)),reserved_cycles:t.Opt(t.Nat)}),c=t.Variant({reinstall:t.Null,upgrade:t.Null,install:t.Null}),o=t.Record({arg:t.Vec(t.Nat8),wasm_module:t.Vec(t.Nat8),stop_before_installing:t.Bool,mode:c,canister_id:t.Principal,memory_allocation:t.Opt(t.Nat),compute_allocation:t.Opt(t.Nat)}),p=t.Record({update_canister_list:t.Opt(t.Bool)}),l=t.Record({freezing_threshold:t.Nat,controllers:t.Vec(t.Principal),memory_allocation:t.Nat,compute_allocation:t.Nat}),_=t.Record({status:s,memory_size:t.Nat,cycles:t.Nat,settings:l,idle_cycles_burned_per_day:t.Nat,module_hash:t.Opt(t.Vec(t.Nat8))}),e=t.Record({status:t.Opt(_),canister_id:t.Opt(t.Principal)}),d=t.Record({root:t.Opt(e),swap:t.Opt(e),ledger:t.Opt(e),index:t.Opt(e),governance:t.Opt(e),dapps:t.Vec(e),archives:t.Vec(e)}),u=t.Record({root:t.Opt(t.Principal),swap:t.Opt(t.Principal),ledger:t.Opt(t.Principal),index:t.Opt(t.Principal),governance:t.Opt(t.Principal),dapps:t.Vec(t.Principal),archives:t.Vec(t.Principal)}),m=t.Record({freezing_threshold:t.Opt(t.Nat64),canister_ids:t.Vec(t.Principal),reserved_cycles_limit:t.Opt(t.Nat64),log_visibility:t.Opt(t.Int32),wasm_memory_limit:t.Opt(t.Nat64),memory_allocation:t.Opt(t.Nat64),compute_allocation:t.Opt(t.Nat64)}),O=t.Record({failure_reason:t.Opt(t.Text)}),R=t.Record({canister_id:t.Opt(t.Principal)}),n=t.Record({canister_ids:t.Vec(t.Principal)}),g=t.Record({canister_ids:t.Opt(n),controller_principal_ids:t.Vec(t.Principal)}),N=t.Record({code:t.Opt(t.Int32),description:t.Text}),P=t.Record({err:t.Opt(N),dapp_canister_id:t.Opt(t.Principal)}),y=t.Record({failed_updates:t.Vec(P)});return t.Service({canister_status:t.Func([i],[r],[]),change_canister:t.Func([o],[],[]),get_build_metadata:t.Func([],[t.Text],[]),get_sns_canisters_summary:t.Func([p],[d],[]),list_sns_canisters:t.Func([t.Record({})],[u],[]),manage_dapp_canister_settings:t.Func([m],[O],[]),register_dapp_canister:t.Func([R],[t.Record({})],[]),register_dapp_canisters:t.Func([n],[t.Record({})],[]),set_dapp_controllers:t.Func([g],[y],[])})};var V=({IDL:t})=>{let C=t.Record({dapp_canister_ids:t.Vec(t.Principal),testflight:t.Bool,latest_ledger_archive_poll_timestamp_seconds:t.Opt(t.Nat64),archive_canister_ids:t.Vec(t.Principal),governance_canister_id:t.Opt(t.Principal),index_canister_id:t.Opt(t.Principal),swap_canister_id:t.Opt(t.Principal),ledger_canister_id:t.Opt(t.Principal)}),i=t.Record({canister_id:t.Principal}),s=t.Variant({stopped:t.Null,stopping:t.Null,running:t.Null}),a=t.Record({freezing_threshold:t.Opt(t.Nat),controllers:t.Vec(t.Principal),reserved_cycles_limit:t.Opt(t.Nat),memory_allocation:t.Opt(t.Nat),compute_allocation:t.Opt(t.Nat)}),r=t.Record({status:s,memory_size:t.Nat,cycles:t.Nat,settings:a,idle_cycles_burned_per_day:t.Opt(t.Nat),module_hash:t.Opt(t.Vec(t.Nat8)),reserved_cycles:t.Opt(t.Nat)}),c=t.Variant({reinstall:t.Null,upgrade:t.Null,install:t.Null}),o=t.Record({arg:t.Vec(t.Nat8),wasm_module:t.Vec(t.Nat8),stop_before_installing:t.Bool,mode:c,canister_id:t.Principal,memory_allocation:t.Opt(t.Nat),compute_allocation:t.Opt(t.Nat)}),p=t.Record({update_canister_list:t.Opt(t.Bool)}),l=t.Record({freezing_threshold:t.Nat,controllers:t.Vec(t.Principal),memory_allocation:t.Nat,compute_allocation:t.Nat}),_=t.Record({status:s,memory_size:t.Nat,cycles:t.Nat,settings:l,idle_cycles_burned_per_day:t.Nat,module_hash:t.Opt(t.Vec(t.Nat8))}),e=t.Record({status:t.Opt(_),canister_id:t.Opt(t.Principal)}),d=t.Record({root:t.Opt(e),swap:t.Opt(e),ledger:t.Opt(e),index:t.Opt(e),governance:t.Opt(e),dapps:t.Vec(e),archives:t.Vec(e)}),u=t.Record({root:t.Opt(t.Principal),swap:t.Opt(t.Principal),ledger:t.Opt(t.Principal),index:t.Opt(t.Principal),governance:t.Opt(t.Principal),dapps:t.Vec(t.Principal),archives:t.Vec(t.Principal)}),m=t.Record({freezing_threshold:t.Opt(t.Nat64),canister_ids:t.Vec(t.Principal),reserved_cycles_limit:t.Opt(t.Nat64),log_visibility:t.Opt(t.Int32),wasm_memory_limit:t.Opt(t.Nat64),memory_allocation:t.Opt(t.Nat64),compute_allocation:t.Opt(t.Nat64)}),O=t.Record({failure_reason:t.Opt(t.Text)}),R=t.Record({canister_id:t.Opt(t.Principal)}),n=t.Record({canister_ids:t.Vec(t.Principal)}),g=t.Record({canister_ids:t.Opt(n),controller_principal_ids:t.Vec(t.Principal)}),N=t.Record({code:t.Opt(t.Int32),description:t.Text}),P=t.Record({err:t.Opt(N),dapp_canister_id:t.Opt(t.Principal)}),y=t.Record({failed_updates:t.Vec(P)});return t.Service({canister_status:t.Func([i],[r],[]),change_canister:t.Func([o],[],[]),get_build_metadata:t.Func([],[t.Text],["query"]),get_sns_canisters_summary:t.Func([p],[d],[]),list_sns_canisters:t.Func([t.Record({})],[u],["query"]),manage_dapp_canister_settings:t.Func([m],[O],[]),register_dapp_canister:t.Func([R],[t.Record({})],[]),register_dapp_canisters:t.Func([n],[t.Record({})],[]),set_dapp_controllers:t.Func([g],[y],[])})};var h=class t extends v{constructor(){super(...arguments);this.listSnsCanisters=async({certified:i=!0})=>this.caller({certified:i}).list_sns_canisters({})}static create(i){let{service:s,certifiedService:a,canisterId:r}=f({options:i,idlFactory:V,certifiedIdlFactory:S});return new t(r,s,a)}};export{h as a};
2
- //# sourceMappingURL=chunk-4GE7OJRF.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/root.canister.ts", "../../candid/sns_root.certified.idl.js", "../../candid/sns_root.idl.js"],
4
- "sourcesContent": ["import { Canister, createServices } from \"@dfinity/utils\";\nimport type {\n ListSnsCanistersResponse,\n _SERVICE as SnsRootService,\n} from \"../candid/sns_root\";\nimport { idlFactory as certifiedIdlFactory } from \"../candid/sns_root.certified.idl\";\nimport { idlFactory } from \"../candid/sns_root.idl\";\nimport type { SnsCanisterOptions } from \"./types/canister.options\";\n\nexport class SnsRootCanister extends Canister<SnsRootService> {\n static create(options: SnsCanisterOptions<SnsRootService>) {\n const { service, certifiedService, canisterId } =\n createServices<SnsRootService>({\n options,\n idlFactory,\n certifiedIdlFactory,\n });\n\n return new SnsRootCanister(canisterId, service, certifiedService);\n }\n\n /**\n * List the canisters that are part of the Sns.\n *\n * Source code: https://github.com/dfinity/ic/blob/master/rs/sns/root/src/lib.rs\n *\n * @param {Object} params\n * @param {boolean} [params.certified=true] - Query or update calls\n *\n * @returns {ListSnsCanistersResponse} - A list of canisters ('root' | 'governance' | 'ledger' | 'dapps' | 'swap' | 'archives')\n */\n listSnsCanisters = async ({\n certified = true,\n }: {\n certified?: boolean;\n }): Promise<ListSnsCanistersResponse> => {\n return this.caller({ certified }).list_sns_canisters({});\n };\n}\n", "/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_root.did */\nexport const idlFactory = ({ IDL }) => {\n const SnsRootCanister = IDL.Record({\n 'dapp_canister_ids' : IDL.Vec(IDL.Principal),\n 'testflight' : IDL.Bool,\n 'latest_ledger_archive_poll_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'archive_canister_ids' : IDL.Vec(IDL.Principal),\n 'governance_canister_id' : IDL.Opt(IDL.Principal),\n 'index_canister_id' : IDL.Opt(IDL.Principal),\n 'swap_canister_id' : IDL.Opt(IDL.Principal),\n 'ledger_canister_id' : IDL.Opt(IDL.Principal),\n });\n const CanisterIdRecord = IDL.Record({ 'canister_id' : IDL.Principal });\n const CanisterStatusType = IDL.Variant({\n 'stopped' : IDL.Null,\n 'stopping' : IDL.Null,\n 'running' : IDL.Null,\n });\n const DefiniteCanisterSettings = IDL.Record({\n 'freezing_threshold' : IDL.Opt(IDL.Nat),\n 'controllers' : IDL.Vec(IDL.Principal),\n 'reserved_cycles_limit' : IDL.Opt(IDL.Nat),\n 'memory_allocation' : IDL.Opt(IDL.Nat),\n 'compute_allocation' : IDL.Opt(IDL.Nat),\n });\n const CanisterStatusResult = IDL.Record({\n 'status' : CanisterStatusType,\n 'memory_size' : IDL.Nat,\n 'cycles' : IDL.Nat,\n 'settings' : DefiniteCanisterSettings,\n 'idle_cycles_burned_per_day' : IDL.Opt(IDL.Nat),\n 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n 'reserved_cycles' : IDL.Opt(IDL.Nat),\n });\n const CanisterInstallMode = IDL.Variant({\n 'reinstall' : IDL.Null,\n 'upgrade' : IDL.Null,\n 'install' : IDL.Null,\n });\n const ChangeCanisterRequest = IDL.Record({\n 'arg' : IDL.Vec(IDL.Nat8),\n 'wasm_module' : IDL.Vec(IDL.Nat8),\n 'stop_before_installing' : IDL.Bool,\n 'mode' : CanisterInstallMode,\n 'canister_id' : IDL.Principal,\n 'memory_allocation' : IDL.Opt(IDL.Nat),\n 'compute_allocation' : IDL.Opt(IDL.Nat),\n });\n const GetSnsCanistersSummaryRequest = IDL.Record({\n 'update_canister_list' : IDL.Opt(IDL.Bool),\n });\n const DefiniteCanisterSettingsArgs = IDL.Record({\n 'freezing_threshold' : IDL.Nat,\n 'controllers' : IDL.Vec(IDL.Principal),\n 'memory_allocation' : IDL.Nat,\n 'compute_allocation' : IDL.Nat,\n });\n const CanisterStatusResultV2 = IDL.Record({\n 'status' : CanisterStatusType,\n 'memory_size' : IDL.Nat,\n 'cycles' : IDL.Nat,\n 'settings' : DefiniteCanisterSettingsArgs,\n 'idle_cycles_burned_per_day' : IDL.Nat,\n 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n });\n const CanisterSummary = IDL.Record({\n 'status' : IDL.Opt(CanisterStatusResultV2),\n 'canister_id' : IDL.Opt(IDL.Principal),\n });\n const GetSnsCanistersSummaryResponse = IDL.Record({\n 'root' : IDL.Opt(CanisterSummary),\n 'swap' : IDL.Opt(CanisterSummary),\n 'ledger' : IDL.Opt(CanisterSummary),\n 'index' : IDL.Opt(CanisterSummary),\n 'governance' : IDL.Opt(CanisterSummary),\n 'dapps' : IDL.Vec(CanisterSummary),\n 'archives' : IDL.Vec(CanisterSummary),\n });\n const ListSnsCanistersResponse = IDL.Record({\n 'root' : IDL.Opt(IDL.Principal),\n 'swap' : IDL.Opt(IDL.Principal),\n 'ledger' : IDL.Opt(IDL.Principal),\n 'index' : IDL.Opt(IDL.Principal),\n 'governance' : IDL.Opt(IDL.Principal),\n 'dapps' : IDL.Vec(IDL.Principal),\n 'archives' : IDL.Vec(IDL.Principal),\n });\n const ManageDappCanisterSettingsRequest = IDL.Record({\n 'freezing_threshold' : IDL.Opt(IDL.Nat64),\n 'canister_ids' : IDL.Vec(IDL.Principal),\n 'reserved_cycles_limit' : IDL.Opt(IDL.Nat64),\n 'log_visibility' : IDL.Opt(IDL.Int32),\n 'wasm_memory_limit' : IDL.Opt(IDL.Nat64),\n 'memory_allocation' : IDL.Opt(IDL.Nat64),\n 'compute_allocation' : IDL.Opt(IDL.Nat64),\n });\n const ManageDappCanisterSettingsResponse = IDL.Record({\n 'failure_reason' : IDL.Opt(IDL.Text),\n });\n const RegisterDappCanisterRequest = IDL.Record({\n 'canister_id' : IDL.Opt(IDL.Principal),\n });\n const RegisterDappCanistersRequest = IDL.Record({\n 'canister_ids' : IDL.Vec(IDL.Principal),\n });\n const SetDappControllersRequest = IDL.Record({\n 'canister_ids' : IDL.Opt(RegisterDappCanistersRequest),\n 'controller_principal_ids' : IDL.Vec(IDL.Principal),\n });\n const CanisterCallError = IDL.Record({\n 'code' : IDL.Opt(IDL.Int32),\n 'description' : IDL.Text,\n });\n const FailedUpdate = IDL.Record({\n 'err' : IDL.Opt(CanisterCallError),\n 'dapp_canister_id' : IDL.Opt(IDL.Principal),\n });\n const SetDappControllersResponse = IDL.Record({\n 'failed_updates' : IDL.Vec(FailedUpdate),\n });\n return IDL.Service({\n 'canister_status' : IDL.Func(\n [CanisterIdRecord],\n [CanisterStatusResult],\n [],\n ),\n 'change_canister' : IDL.Func([ChangeCanisterRequest], [], []),\n 'get_build_metadata' : IDL.Func([], [IDL.Text], []),\n 'get_sns_canisters_summary' : IDL.Func(\n [GetSnsCanistersSummaryRequest],\n [GetSnsCanistersSummaryResponse],\n [],\n ),\n 'list_sns_canisters' : IDL.Func(\n [IDL.Record({})],\n [ListSnsCanistersResponse],\n [],\n ),\n 'manage_dapp_canister_settings' : IDL.Func(\n [ManageDappCanisterSettingsRequest],\n [ManageDappCanisterSettingsResponse],\n [],\n ),\n 'register_dapp_canister' : IDL.Func(\n [RegisterDappCanisterRequest],\n [IDL.Record({})],\n [],\n ),\n 'register_dapp_canisters' : IDL.Func(\n [RegisterDappCanistersRequest],\n [IDL.Record({})],\n [],\n ),\n 'set_dapp_controllers' : IDL.Func(\n [SetDappControllersRequest],\n [SetDappControllersResponse],\n [],\n ),\n });\n};\nexport const init = ({ IDL }) => {\n const SnsRootCanister = IDL.Record({\n 'dapp_canister_ids' : IDL.Vec(IDL.Principal),\n 'testflight' : IDL.Bool,\n 'latest_ledger_archive_poll_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'archive_canister_ids' : IDL.Vec(IDL.Principal),\n 'governance_canister_id' : IDL.Opt(IDL.Principal),\n 'index_canister_id' : IDL.Opt(IDL.Principal),\n 'swap_canister_id' : IDL.Opt(IDL.Principal),\n 'ledger_canister_id' : IDL.Opt(IDL.Principal),\n });\n return [SnsRootCanister];\n};\n", "/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/sns/candid/sns_root.did */\nexport const idlFactory = ({ IDL }) => {\n const SnsRootCanister = IDL.Record({\n 'dapp_canister_ids' : IDL.Vec(IDL.Principal),\n 'testflight' : IDL.Bool,\n 'latest_ledger_archive_poll_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'archive_canister_ids' : IDL.Vec(IDL.Principal),\n 'governance_canister_id' : IDL.Opt(IDL.Principal),\n 'index_canister_id' : IDL.Opt(IDL.Principal),\n 'swap_canister_id' : IDL.Opt(IDL.Principal),\n 'ledger_canister_id' : IDL.Opt(IDL.Principal),\n });\n const CanisterIdRecord = IDL.Record({ 'canister_id' : IDL.Principal });\n const CanisterStatusType = IDL.Variant({\n 'stopped' : IDL.Null,\n 'stopping' : IDL.Null,\n 'running' : IDL.Null,\n });\n const DefiniteCanisterSettings = IDL.Record({\n 'freezing_threshold' : IDL.Opt(IDL.Nat),\n 'controllers' : IDL.Vec(IDL.Principal),\n 'reserved_cycles_limit' : IDL.Opt(IDL.Nat),\n 'memory_allocation' : IDL.Opt(IDL.Nat),\n 'compute_allocation' : IDL.Opt(IDL.Nat),\n });\n const CanisterStatusResult = IDL.Record({\n 'status' : CanisterStatusType,\n 'memory_size' : IDL.Nat,\n 'cycles' : IDL.Nat,\n 'settings' : DefiniteCanisterSettings,\n 'idle_cycles_burned_per_day' : IDL.Opt(IDL.Nat),\n 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n 'reserved_cycles' : IDL.Opt(IDL.Nat),\n });\n const CanisterInstallMode = IDL.Variant({\n 'reinstall' : IDL.Null,\n 'upgrade' : IDL.Null,\n 'install' : IDL.Null,\n });\n const ChangeCanisterRequest = IDL.Record({\n 'arg' : IDL.Vec(IDL.Nat8),\n 'wasm_module' : IDL.Vec(IDL.Nat8),\n 'stop_before_installing' : IDL.Bool,\n 'mode' : CanisterInstallMode,\n 'canister_id' : IDL.Principal,\n 'memory_allocation' : IDL.Opt(IDL.Nat),\n 'compute_allocation' : IDL.Opt(IDL.Nat),\n });\n const GetSnsCanistersSummaryRequest = IDL.Record({\n 'update_canister_list' : IDL.Opt(IDL.Bool),\n });\n const DefiniteCanisterSettingsArgs = IDL.Record({\n 'freezing_threshold' : IDL.Nat,\n 'controllers' : IDL.Vec(IDL.Principal),\n 'memory_allocation' : IDL.Nat,\n 'compute_allocation' : IDL.Nat,\n });\n const CanisterStatusResultV2 = IDL.Record({\n 'status' : CanisterStatusType,\n 'memory_size' : IDL.Nat,\n 'cycles' : IDL.Nat,\n 'settings' : DefiniteCanisterSettingsArgs,\n 'idle_cycles_burned_per_day' : IDL.Nat,\n 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),\n });\n const CanisterSummary = IDL.Record({\n 'status' : IDL.Opt(CanisterStatusResultV2),\n 'canister_id' : IDL.Opt(IDL.Principal),\n });\n const GetSnsCanistersSummaryResponse = IDL.Record({\n 'root' : IDL.Opt(CanisterSummary),\n 'swap' : IDL.Opt(CanisterSummary),\n 'ledger' : IDL.Opt(CanisterSummary),\n 'index' : IDL.Opt(CanisterSummary),\n 'governance' : IDL.Opt(CanisterSummary),\n 'dapps' : IDL.Vec(CanisterSummary),\n 'archives' : IDL.Vec(CanisterSummary),\n });\n const ListSnsCanistersResponse = IDL.Record({\n 'root' : IDL.Opt(IDL.Principal),\n 'swap' : IDL.Opt(IDL.Principal),\n 'ledger' : IDL.Opt(IDL.Principal),\n 'index' : IDL.Opt(IDL.Principal),\n 'governance' : IDL.Opt(IDL.Principal),\n 'dapps' : IDL.Vec(IDL.Principal),\n 'archives' : IDL.Vec(IDL.Principal),\n });\n const ManageDappCanisterSettingsRequest = IDL.Record({\n 'freezing_threshold' : IDL.Opt(IDL.Nat64),\n 'canister_ids' : IDL.Vec(IDL.Principal),\n 'reserved_cycles_limit' : IDL.Opt(IDL.Nat64),\n 'log_visibility' : IDL.Opt(IDL.Int32),\n 'wasm_memory_limit' : IDL.Opt(IDL.Nat64),\n 'memory_allocation' : IDL.Opt(IDL.Nat64),\n 'compute_allocation' : IDL.Opt(IDL.Nat64),\n });\n const ManageDappCanisterSettingsResponse = IDL.Record({\n 'failure_reason' : IDL.Opt(IDL.Text),\n });\n const RegisterDappCanisterRequest = IDL.Record({\n 'canister_id' : IDL.Opt(IDL.Principal),\n });\n const RegisterDappCanistersRequest = IDL.Record({\n 'canister_ids' : IDL.Vec(IDL.Principal),\n });\n const SetDappControllersRequest = IDL.Record({\n 'canister_ids' : IDL.Opt(RegisterDappCanistersRequest),\n 'controller_principal_ids' : IDL.Vec(IDL.Principal),\n });\n const CanisterCallError = IDL.Record({\n 'code' : IDL.Opt(IDL.Int32),\n 'description' : IDL.Text,\n });\n const FailedUpdate = IDL.Record({\n 'err' : IDL.Opt(CanisterCallError),\n 'dapp_canister_id' : IDL.Opt(IDL.Principal),\n });\n const SetDappControllersResponse = IDL.Record({\n 'failed_updates' : IDL.Vec(FailedUpdate),\n });\n return IDL.Service({\n 'canister_status' : IDL.Func(\n [CanisterIdRecord],\n [CanisterStatusResult],\n [],\n ),\n 'change_canister' : IDL.Func([ChangeCanisterRequest], [], []),\n 'get_build_metadata' : IDL.Func([], [IDL.Text], ['query']),\n 'get_sns_canisters_summary' : IDL.Func(\n [GetSnsCanistersSummaryRequest],\n [GetSnsCanistersSummaryResponse],\n [],\n ),\n 'list_sns_canisters' : IDL.Func(\n [IDL.Record({})],\n [ListSnsCanistersResponse],\n ['query'],\n ),\n 'manage_dapp_canister_settings' : IDL.Func(\n [ManageDappCanisterSettingsRequest],\n [ManageDappCanisterSettingsResponse],\n [],\n ),\n 'register_dapp_canister' : IDL.Func(\n [RegisterDappCanisterRequest],\n [IDL.Record({})],\n [],\n ),\n 'register_dapp_canisters' : IDL.Func(\n [RegisterDappCanistersRequest],\n [IDL.Record({})],\n [],\n ),\n 'set_dapp_controllers' : IDL.Func(\n [SetDappControllersRequest],\n [SetDappControllersResponse],\n [],\n ),\n });\n};\nexport const init = ({ IDL }) => {\n const SnsRootCanister = IDL.Record({\n 'dapp_canister_ids' : IDL.Vec(IDL.Principal),\n 'testflight' : IDL.Bool,\n 'latest_ledger_archive_poll_timestamp_seconds' : IDL.Opt(IDL.Nat64),\n 'archive_canister_ids' : IDL.Vec(IDL.Principal),\n 'governance_canister_id' : IDL.Opt(IDL.Principal),\n 'index_canister_id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B,EAC7B,CAACjB,EAAI,OAAO,CAAC,CAAC,CAAC,EACf,CAAC,CACH,EACF,qBAAyBA,EAAI,KACzB,CAACkB,CAAyB,EAC1B,CAACG,CAA0B,EAC3B,CAAC,CACH,CACJ,CAAC,CACH,EFtJO,IAAMC,EAAN,MAAMC,UAAwBC,CAAyB,CAAvD,kCAsBL,sBAAmB,MAAO,CACxB,UAAAC,EAAY,EACd,IAGS,KAAK,OAAO,CAAE,UAAAA,CAAU,CAAC,EAAE,mBAAmB,CAAC,CAAC,EA1BzD,OAAO,OAAOC,EAA6C,CACzD,GAAM,CAAE,QAAAC,EAAS,iBAAAC,EAAkB,WAAAC,CAAW,EAC5CC,EAA+B,CAC7B,QAAAJ,EACA,WAAAK,EACA,oBAAAA,CACF,CAAC,EAEH,OAAO,IAAIR,EAAgBM,EAAYF,EAASC,CAAgB,CAClE,CAmBF",
6
- "names": ["Canister", "createServices", "idlFactory", "IDL", "SnsRootCanister", "CanisterIdRecord", "CanisterStatusType", "DefiniteCanisterSettings", "CanisterStatusResult", "CanisterInstallMode", "ChangeCanisterRequest", "GetSnsCanistersSummaryRequest", "DefiniteCanisterSettingsArgs", "CanisterStatusResultV2", "CanisterSummary", "GetSnsCanistersSummaryResponse", "ListSnsCanistersResponse", "ManageDappCanisterSettingsRequest", "ManageDappCanisterSettingsResponse", "RegisterDappCanisterRequest", "RegisterDappCanistersRequest", "SetDappControllersRequest", "CanisterCallError", "FailedUpdate", "SetDappControllersResponse", "idlFactory", "IDL", "SnsRootCanister", "CanisterIdRecord", "CanisterStatusType", "DefiniteCanisterSettings", "CanisterStatusResult", "CanisterInstallMode", "ChangeCanisterRequest", "GetSnsCanistersSummaryRequest", "DefiniteCanisterSettingsArgs", "CanisterStatusResultV2", "CanisterSummary", "GetSnsCanistersSummaryResponse", "ListSnsCanistersResponse", "ManageDappCanisterSettingsRequest", "ManageDappCanisterSettingsResponse", "RegisterDappCanisterRequest", "RegisterDappCanistersRequest", "SetDappControllersRequest", "CanisterCallError", "FailedUpdate", "SetDappControllersResponse", "SnsRootCanister", "_SnsRootCanister", "Canister", "certified", "options", "service", "certifiedService", "canisterId", "createServices", "idlFactory"]
7
- }
@@ -1,2 +0,0 @@
1
- import{a as u}from"./chunk-4INNMFYU.js";import{assertPercentageNumber as vt,Canister as kt,createServices as At,fromNullable as P,toNullable as Q}from"@dfinity/utils";var ot=({IDL:e})=>{let o=e.Record({validator_canister_id:e.Opt(e.Principal),target_canister_id:e.Opt(e.Principal),validator_method_name:e.Opt(e.Text),target_method_name:e.Opt(e.Text)}),t=e.Variant({NativeNervousSystemFunction:e.Record({}),GenericNervousSystemFunction:o}),s=e.Record({id:e.Nat64,name:e.Text,description:e.Opt(e.Text),function_type:e.Opt(t)}),i=e.Record({not_dissolving_neurons_e8s_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),garbage_collectable_neurons_count:e.Nat64,neurons_with_invalid_stake_count:e.Nat64,not_dissolving_neurons_count_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),neurons_with_less_than_6_months_dissolve_delay_count:e.Nat64,dissolved_neurons_count:e.Nat64,total_staked_e8s:e.Nat64,total_supply_governance_tokens:e.Nat64,not_dissolving_neurons_count:e.Nat64,dissolved_neurons_e8s:e.Nat64,neurons_with_less_than_6_months_dissolve_delay_e8s:e.Nat64,dissolving_neurons_count_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),dissolving_neurons_count:e.Nat64,dissolving_neurons_e8s_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),timestamp_seconds:e.Nat64}),r=e.Record({current_basis_points:e.Opt(e.Int32),updated_at_timestamp_seconds:e.Opt(e.Nat64)}),a=e.Record({id:e.Vec(e.Nat8)}),c=e.Record({followees:e.Vec(a)}),p=e.Record({followees:e.Vec(e.Tuple(e.Nat64,c))}),l=e.Record({permissions:e.Vec(e.Int32)}),W=e.Record({final_reward_rate_basis_points:e.Opt(e.Nat64),initial_reward_rate_basis_points:e.Opt(e.Nat64),reward_rate_transition_duration_seconds:e.Opt(e.Nat64),round_duration_seconds:e.Opt(e.Nat64)}),N=e.Record({default_followees:e.Opt(p),max_dissolve_delay_seconds:e.Opt(e.Nat64),max_dissolve_delay_bonus_percentage:e.Opt(e.Nat64),max_followees_per_function:e.Opt(e.Nat64),neuron_claimer_permissions:e.Opt(l),neuron_minimum_stake_e8s:e.Opt(e.Nat64),max_neuron_age_for_age_bonus:e.Opt(e.Nat64),initial_voting_period_seconds:e.Opt(e.Nat64),neuron_minimum_dissolve_delay_to_vote_seconds:e.Opt(e.Nat64),reject_cost_e8s:e.Opt(e.Nat64),max_proposals_to_keep_per_action:e.Opt(e.Nat32),wait_for_quiet_deadline_increase_seconds:e.Opt(e.Nat64),max_number_of_neurons:e.Opt(e.Nat64),transaction_fee_e8s:e.Opt(e.Nat64),max_number_of_proposals_with_ballots:e.Opt(e.Nat64),max_age_bonus_percentage:e.Opt(e.Nat64),neuron_grantable_permissions:e.Opt(l),voting_rewards_parameters:e.Opt(W),maturity_modulation_disabled:e.Opt(e.Bool),max_number_of_principals_per_neuron:e.Opt(e.Nat64)}),g=e.Record({archive_wasm_hash:e.Vec(e.Nat8),root_wasm_hash:e.Vec(e.Nat8),swap_wasm_hash:e.Vec(e.Nat8),ledger_wasm_hash:e.Vec(e.Nat8),governance_wasm_hash:e.Vec(e.Nat8),index_wasm_hash:e.Vec(e.Nat8)}),_=e.Record({id:e.Nat64}),w=e.Record({rounds_since_last_distribution:e.Opt(e.Nat64),actual_timestamp_seconds:e.Nat64,end_timestamp_seconds:e.Opt(e.Nat64),total_available_e8s_equivalent:e.Opt(e.Nat64),distributed_e8s_equivalent:e.Nat64,round:e.Nat64,settled_proposals:e.Vec(_)}),b=e.Record({mark_failed_at_seconds:e.Nat64,checking_upgrade_lock:e.Nat64,proposal_id:e.Nat64,target_version:e.Opt(g)}),m=e.Record({error_message:e.Text,error_type:e.Int32}),O=e.Record({subaccount:e.Vec(e.Nat8)}),d=e.Record({owner:e.Opt(e.Principal),subaccount:e.Opt(O)}),M=e.Record({human_readable:e.Opt(e.Text)}),$=e.Record({e8s:e.Opt(e.Nat64)}),J=e.Record({xdrs_per_icp:e.Opt(M),icps_per_token:e.Opt(M),tokens:e.Opt($)}),X=e.Record({token:e.Opt(e.Int32),account:e.Opt(d),valuation_factors:e.Opt(J),timestamp_seconds:e.Opt(e.Nat64)}),T=e.Record({valuation:e.Opt(X)}),H=e.Variant({TransferSnsTreasuryFunds:T,MintSnsTokens:T}),K=e.Record({vote:e.Int32,cast_timestamp_seconds:e.Nat64,voting_power:e.Nat64}),V=e.Record({basis_points:e.Opt(e.Nat64)}),Y=e.Record({no:e.Nat64,yes:e.Nat64,total:e.Nat64,timestamp_seconds:e.Nat64}),Z=e.Record({freezing_threshold:e.Opt(e.Nat64),canister_ids:e.Vec(e.Principal),reserved_cycles_limit:e.Opt(e.Nat64),log_visibility:e.Opt(e.Int32),wasm_memory_limit:e.Opt(e.Nat64),memory_allocation:e.Opt(e.Nat64),compute_allocation:e.Opt(e.Nat64)}),D=e.Record({canister_ids:e.Vec(e.Principal)}),I=e.Record({from_treasury:e.Int32,to_principal:e.Opt(e.Principal),to_subaccount:e.Opt(O),memo:e.Opt(e.Nat64),amount_e8s:e.Nat64}),L=e.Record({new_canister_wasm:e.Vec(e.Nat8),mode:e.Opt(e.Int32),canister_id:e.Opt(e.Principal),canister_upgrade_arg:e.Opt(e.Vec(e.Nat8))}),ee=e.Record({canister_ids:e.Vec(e.Principal),new_controllers:e.Vec(e.Principal)}),te=e.Record({to_principal:e.Opt(e.Principal),to_subaccount:e.Opt(O),memo:e.Opt(e.Nat64),amount_e8s:e.Opt(e.Nat64)}),x=e.Record({url:e.Opt(e.Text),logo:e.Opt(e.Text),name:e.Opt(e.Text),description:e.Opt(e.Text)}),se=e.Record({function_id:e.Nat64,payload:e.Vec(e.Nat8)}),oe=e.Record({token_symbol:e.Opt(e.Text),transfer_fee:e.Opt(e.Nat64),token_logo:e.Opt(e.Text),token_name:e.Opt(e.Text)}),ne=e.Record({motion_text:e.Text}),ae=e.Variant({ManageNervousSystemParameters:N,AddGenericNervousSystemFunction:s,ManageDappCanisterSettings:Z,RemoveGenericNervousSystemFunction:e.Nat64,UpgradeSnsToNextVersion:e.Record({}),RegisterDappCanisters:D,TransferSnsTreasuryFunds:I,UpgradeSnsControlledCanister:L,DeregisterDappCanisters:ee,MintSnsTokens:te,Unspecified:e.Record({}),ManageSnsMetadata:x,ExecuteGenericNervousSystemFunction:se,ManageLedgerParameters:oe,Motion:ne}),R=e.Record({url:e.Text,title:e.Text,action:e.Opt(ae),summary:e.Text}),re=e.Record({current_deadline_timestamp_seconds:e.Nat64}),y=e.Record({id:e.Opt(_),payload_text_rendering:e.Opt(e.Text),action:e.Nat64,failure_reason:e.Opt(m),action_auxiliary:e.Opt(H),ballots:e.Vec(e.Tuple(e.Text,K)),minimum_yes_proportion_of_total:e.Opt(V),reward_event_round:e.Nat64,failed_timestamp_seconds:e.Nat64,reward_event_end_timestamp_seconds:e.Opt(e.Nat64),proposal_creation_timestamp_seconds:e.Nat64,initial_voting_period_seconds:e.Nat64,reject_cost_e8s:e.Nat64,latest_tally:e.Opt(Y),wait_for_quiet_deadline_increase_seconds:e.Nat64,decided_timestamp_seconds:e.Nat64,proposal:e.Opt(R),proposer:e.Opt(a),wait_for_quiet_state:e.Opt(re),minimum_yes_proportion_of_exercised:e.Opt(V),is_eligible_for_rewards:e.Bool,executed_timestamp_seconds:e.Nat64}),h=e.Record({memo:e.Nat64,amount_e8s:e.Nat64}),F=e.Record({function_id:e.Nat64,followees:e.Vec(a)}),C=e.Record({to_account:e.Opt(d),percentage_to_disburse:e.Nat32}),ie=e.Record({requested_setting_for_auto_stake_maturity:e.Bool}),ce=e.Record({additional_dissolve_delay_seconds:e.Nat32}),_e=e.Record({dissolve_timestamp_seconds:e.Nat64}),de=e.Variant({ChangeAutoStakeMaturity:ie,StopDissolving:e.Record({}),StartDissolving:e.Record({}),IncreaseDissolveDelay:ce,SetDissolveTimestamp:_e}),k=e.Record({operation:e.Opt(de)}),A=e.Record({vote:e.Int32,proposal:e.Opt(_)}),ue=e.Record({amount_to_be_disbursed_e8s:e.Nat64,to_account:e.Opt(d)}),pe=e.Record({controller:e.Opt(e.Principal),memo:e.Nat64}),le=e.Variant({MemoAndController:pe,NeuronId:e.Record({})}),q=e.Record({by:e.Opt(le)}),G=e.Record({permissions_to_remove:e.Opt(l),principal_id:e.Opt(e.Principal)}),E=e.Record({permissions_to_add:e.Opt(l),principal_id:e.Opt(e.Principal)}),U=e.Record({percentage_to_merge:e.Nat32}),me=e.Record({e8s:e.Nat64}),z=e.Record({to_account:e.Opt(d),amount:e.Opt(me)}),Ne=e.Variant({Split:h,Follow:F,DisburseMaturity:C,Configure:k,RegisterVote:A,SyncCommand:e.Record({}),MakeProposal:R,FinalizeDisburseMaturity:ue,ClaimOrRefreshNeuron:q,RemoveNeuronPermissions:G,AddNeuronPermissions:E,MergeMaturity:U,Disburse:z}),ge=e.Record({command:e.Opt(Ne),timestamp:e.Nat64}),Oe=e.Record({principal:e.Opt(e.Principal),permission_type:e.Vec(e.Int32)}),Re=e.Variant({DissolveDelaySeconds:e.Nat64,WhenDissolvedTimestampSeconds:e.Nat64}),ye=e.Record({timestamp_of_disbursement_seconds:e.Nat64,amount_e8s:e.Nat64,account_to_disburse_to:e.Opt(d),finalize_disbursement_timestamp_seconds:e.Opt(e.Nat64)}),v=e.Record({id:e.Opt(a),staked_maturity_e8s_equivalent:e.Opt(e.Nat64),permissions:e.Vec(Oe),maturity_e8s_equivalent:e.Nat64,cached_neuron_stake_e8s:e.Nat64,created_timestamp_seconds:e.Nat64,source_nns_neuron_id:e.Opt(e.Nat64),auto_stake_maturity:e.Opt(e.Bool),aging_since_timestamp_seconds:e.Nat64,dissolve_state:e.Opt(Re),voting_power_percentage_multiplier:e.Nat64,vesting_period_seconds:e.Opt(e.Nat64),disburse_maturity_in_progress:e.Vec(ye),followees:e.Vec(e.Tuple(e.Nat64,c)),neuron_fees_e8s:e.Nat64}),ft=e.Record({root_canister_id:e.Opt(e.Principal),id_to_nervous_system_functions:e.Vec(e.Tuple(e.Nat64,s)),metrics:e.Opt(i),maturity_modulation:e.Opt(r),mode:e.Int32,parameters:e.Opt(N),is_finalizing_disburse_maturity:e.Opt(e.Bool),deployed_version:e.Opt(g),sns_initialization_parameters:e.Text,latest_reward_event:e.Opt(w),pending_version:e.Opt(b),swap_canister_id:e.Opt(e.Principal),ledger_canister_id:e.Opt(e.Principal),proposals:e.Vec(e.Tuple(e.Nat64,y)),in_flight_commands:e.Vec(e.Tuple(e.Text,ge)),sns_metadata:e.Opt(x),neurons:e.Vec(e.Tuple(e.Text,v)),genesis_timestamp_seconds:e.Nat64}),ve=e.Record({controller:e.Opt(e.Principal),dissolve_delay_seconds:e.Opt(e.Nat64),source_nns_neuron_id:e.Opt(e.Nat64),stake_e8s:e.Opt(e.Nat64),followees:e.Vec(a),hotkey:e.Opt(e.Principal),neuron_id:e.Opt(a)}),Se=e.Record({neuron_parameters:e.Vec(ve)}),fe=e.Record({id:e.Opt(a),status:e.Int32}),Pe=e.Record({swap_neurons:e.Vec(fe)}),we=e.Variant({Ok:Pe,Err:e.Int32}),be=e.Record({claim_swap_neurons_result:e.Opt(we)}),Me=e.Record({maturity_modulation:e.Opt(r)}),Te=e.Record({url:e.Opt(e.Text),logo:e.Opt(e.Text),name:e.Opt(e.Text),description:e.Opt(e.Text)}),Ve=e.Record({mode:e.Opt(e.Int32)}),xe=e.Record({neuron_id:e.Opt(a)}),he=e.Variant({Error:m,Neuron:v}),Fe=e.Record({result:e.Opt(he)}),B=e.Record({proposal_id:e.Opt(_)}),Ce=e.Variant({Error:m,Proposal:y}),ke=e.Record({result:e.Opt(Ce)}),Ae=e.Variant({stopped:e.Null,stopping:e.Null,running:e.Null}),qe=e.Record({freezing_threshold:e.Nat,controllers:e.Vec(e.Principal),memory_allocation:e.Nat,compute_allocation:e.Nat}),Ge=e.Record({status:Ae,memory_size:e.Nat,cycles:e.Nat,settings:qe,idle_cycles_burned_per_day:e.Nat,module_hash:e.Opt(e.Vec(e.Nat8))}),Ee=e.Record({deployed_version:e.Opt(g),pending_version:e.Opt(b)}),Ue=e.Record({sns_initialization_parameters:e.Text}),ze=e.Record({reserved_ids:e.Vec(e.Nat64),functions:e.Vec(s)}),Be=e.Record({of_principal:e.Opt(e.Principal),limit:e.Nat32,start_page_at:e.Opt(a)}),je=e.Record({neurons:e.Vec(v)}),Qe=e.Record({include_reward_status:e.Vec(e.Int32),before_proposal:e.Opt(_),limit:e.Nat32,exclude_type:e.Vec(e.Nat64),include_status:e.Vec(e.Int32)}),We=e.Record({include_ballots_by_caller:e.Opt(e.Bool),proposals:e.Vec(y)}),$e=e.Record({percentage_to_stake:e.Opt(e.Nat32)}),Je=e.Variant({Split:h,Follow:F,DisburseMaturity:C,ClaimOrRefresh:q,Configure:k,RegisterVote:A,MakeProposal:R,StakeMaturity:$e,RemoveNeuronPermissions:G,AddNeuronPermissions:E,MergeMaturity:U,Disburse:z}),Xe=e.Record({subaccount:e.Vec(e.Nat8),command:e.Opt(Je)}),He=e.Record({created_neuron_id:e.Opt(a)}),Ke=e.Record({amount_disbursed_e8s:e.Nat64,amount_deducted_e8s:e.Opt(e.Nat64)}),Ye=e.Record({refreshed_neuron_id:e.Opt(a)}),Ze=e.Record({maturity_e8s:e.Nat64,staked_maturity_e8s:e.Nat64}),De=e.Record({merged_maturity_e8s:e.Nat64,new_stake_e8s:e.Nat64}),Ie=e.Record({transfer_block_height:e.Nat64}),Le=e.Variant({Error:m,Split:He,Follow:e.Record({}),DisburseMaturity:Ke,ClaimOrRefresh:Ye,Configure:e.Record({}),RegisterVote:e.Record({}),MakeProposal:B,RemoveNeuronPermission:e.Record({}),StakeMaturity:Ze,MergeMaturity:De,Disburse:Ie,AddNeuronPermission:e.Record({})}),et=e.Record({command:e.Opt(Le)}),tt=e.Record({mode:e.Int32});return e.Service({claim_swap_neurons:e.Func([Se],[be],[]),fail_stuck_upgrade_in_progress:e.Func([e.Record({})],[e.Record({})],[]),get_build_metadata:e.Func([],[e.Text],[]),get_latest_reward_event:e.Func([],[w],[]),get_maturity_modulation:e.Func([e.Record({})],[Me],[]),get_metadata:e.Func([e.Record({})],[Te],[]),get_mode:e.Func([e.Record({})],[Ve],[]),get_nervous_system_parameters:e.Func([e.Null],[N],[]),get_neuron:e.Func([xe],[Fe],[]),get_proposal:e.Func([B],[ke],[]),get_root_canister_status:e.Func([e.Null],[Ge],[]),get_running_sns_version:e.Func([e.Record({})],[Ee],[]),get_sns_initialization_parameters:e.Func([e.Record({})],[Ue],[]),list_nervous_system_functions:e.Func([],[ze],[]),list_neurons:e.Func([Be],[je],[]),list_proposals:e.Func([Qe],[We],[]),manage_neuron:e.Func([Xe],[et],[]),set_mode:e.Func([tt],[e.Record({})],[])})};var nt=({IDL:e})=>{let o=e.Record({validator_canister_id:e.Opt(e.Principal),target_canister_id:e.Opt(e.Principal),validator_method_name:e.Opt(e.Text),target_method_name:e.Opt(e.Text)}),t=e.Variant({NativeNervousSystemFunction:e.Record({}),GenericNervousSystemFunction:o}),s=e.Record({id:e.Nat64,name:e.Text,description:e.Opt(e.Text),function_type:e.Opt(t)}),i=e.Record({not_dissolving_neurons_e8s_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),garbage_collectable_neurons_count:e.Nat64,neurons_with_invalid_stake_count:e.Nat64,not_dissolving_neurons_count_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),neurons_with_less_than_6_months_dissolve_delay_count:e.Nat64,dissolved_neurons_count:e.Nat64,total_staked_e8s:e.Nat64,total_supply_governance_tokens:e.Nat64,not_dissolving_neurons_count:e.Nat64,dissolved_neurons_e8s:e.Nat64,neurons_with_less_than_6_months_dissolve_delay_e8s:e.Nat64,dissolving_neurons_count_buckets:e.Vec(e.Tuple(e.Nat64,e.Nat64)),dissolving_neurons_count:e.Nat64,dissolving_neurons_e8s_buckets:e.Vec(e.Tuple(e.Nat64,e.Float64)),timestamp_seconds:e.Nat64}),r=e.Record({current_basis_points:e.Opt(e.Int32),updated_at_timestamp_seconds:e.Opt(e.Nat64)}),a=e.Record({id:e.Vec(e.Nat8)}),c=e.Record({followees:e.Vec(a)}),p=e.Record({followees:e.Vec(e.Tuple(e.Nat64,c))}),l=e.Record({permissions:e.Vec(e.Int32)}),W=e.Record({final_reward_rate_basis_points:e.Opt(e.Nat64),initial_reward_rate_basis_points:e.Opt(e.Nat64),reward_rate_transition_duration_seconds:e.Opt(e.Nat64),round_duration_seconds:e.Opt(e.Nat64)}),N=e.Record({default_followees:e.Opt(p),max_dissolve_delay_seconds:e.Opt(e.Nat64),max_dissolve_delay_bonus_percentage:e.Opt(e.Nat64),max_followees_per_function:e.Opt(e.Nat64),neuron_claimer_permissions:e.Opt(l),neuron_minimum_stake_e8s:e.Opt(e.Nat64),max_neuron_age_for_age_bonus:e.Opt(e.Nat64),initial_voting_period_seconds:e.Opt(e.Nat64),neuron_minimum_dissolve_delay_to_vote_seconds:e.Opt(e.Nat64),reject_cost_e8s:e.Opt(e.Nat64),max_proposals_to_keep_per_action:e.Opt(e.Nat32),wait_for_quiet_deadline_increase_seconds:e.Opt(e.Nat64),max_number_of_neurons:e.Opt(e.Nat64),transaction_fee_e8s:e.Opt(e.Nat64),max_number_of_proposals_with_ballots:e.Opt(e.Nat64),max_age_bonus_percentage:e.Opt(e.Nat64),neuron_grantable_permissions:e.Opt(l),voting_rewards_parameters:e.Opt(W),maturity_modulation_disabled:e.Opt(e.Bool),max_number_of_principals_per_neuron:e.Opt(e.Nat64)}),g=e.Record({archive_wasm_hash:e.Vec(e.Nat8),root_wasm_hash:e.Vec(e.Nat8),swap_wasm_hash:e.Vec(e.Nat8),ledger_wasm_hash:e.Vec(e.Nat8),governance_wasm_hash:e.Vec(e.Nat8),index_wasm_hash:e.Vec(e.Nat8)}),_=e.Record({id:e.Nat64}),w=e.Record({rounds_since_last_distribution:e.Opt(e.Nat64),actual_timestamp_seconds:e.Nat64,end_timestamp_seconds:e.Opt(e.Nat64),total_available_e8s_equivalent:e.Opt(e.Nat64),distributed_e8s_equivalent:e.Nat64,round:e.Nat64,settled_proposals:e.Vec(_)}),b=e.Record({mark_failed_at_seconds:e.Nat64,checking_upgrade_lock:e.Nat64,proposal_id:e.Nat64,target_version:e.Opt(g)}),m=e.Record({error_message:e.Text,error_type:e.Int32}),O=e.Record({subaccount:e.Vec(e.Nat8)}),d=e.Record({owner:e.Opt(e.Principal),subaccount:e.Opt(O)}),M=e.Record({human_readable:e.Opt(e.Text)}),$=e.Record({e8s:e.Opt(e.Nat64)}),J=e.Record({xdrs_per_icp:e.Opt(M),icps_per_token:e.Opt(M),tokens:e.Opt($)}),X=e.Record({token:e.Opt(e.Int32),account:e.Opt(d),valuation_factors:e.Opt(J),timestamp_seconds:e.Opt(e.Nat64)}),T=e.Record({valuation:e.Opt(X)}),H=e.Variant({TransferSnsTreasuryFunds:T,MintSnsTokens:T}),K=e.Record({vote:e.Int32,cast_timestamp_seconds:e.Nat64,voting_power:e.Nat64}),V=e.Record({basis_points:e.Opt(e.Nat64)}),Y=e.Record({no:e.Nat64,yes:e.Nat64,total:e.Nat64,timestamp_seconds:e.Nat64}),Z=e.Record({freezing_threshold:e.Opt(e.Nat64),canister_ids:e.Vec(e.Principal),reserved_cycles_limit:e.Opt(e.Nat64),log_visibility:e.Opt(e.Int32),wasm_memory_limit:e.Opt(e.Nat64),memory_allocation:e.Opt(e.Nat64),compute_allocation:e.Opt(e.Nat64)}),D=e.Record({canister_ids:e.Vec(e.Principal)}),I=e.Record({from_treasury:e.Int32,to_principal:e.Opt(e.Principal),to_subaccount:e.Opt(O),memo:e.Opt(e.Nat64),amount_e8s:e.Nat64}),L=e.Record({new_canister_wasm:e.Vec(e.Nat8),mode:e.Opt(e.Int32),canister_id:e.Opt(e.Principal),canister_upgrade_arg:e.Opt(e.Vec(e.Nat8))}),ee=e.Record({canister_ids:e.Vec(e.Principal),new_controllers:e.Vec(e.Principal)}),te=e.Record({to_principal:e.Opt(e.Principal),to_subaccount:e.Opt(O),memo:e.Opt(e.Nat64),amount_e8s:e.Opt(e.Nat64)}),x=e.Record({url:e.Opt(e.Text),logo:e.Opt(e.Text),name:e.Opt(e.Text),description:e.Opt(e.Text)}),se=e.Record({function_id:e.Nat64,payload:e.Vec(e.Nat8)}),oe=e.Record({token_symbol:e.Opt(e.Text),transfer_fee:e.Opt(e.Nat64),token_logo:e.Opt(e.Text),token_name:e.Opt(e.Text)}),ne=e.Record({motion_text:e.Text}),ae=e.Variant({ManageNervousSystemParameters:N,AddGenericNervousSystemFunction:s,ManageDappCanisterSettings:Z,RemoveGenericNervousSystemFunction:e.Nat64,UpgradeSnsToNextVersion:e.Record({}),RegisterDappCanisters:D,TransferSnsTreasuryFunds:I,UpgradeSnsControlledCanister:L,DeregisterDappCanisters:ee,MintSnsTokens:te,Unspecified:e.Record({}),ManageSnsMetadata:x,ExecuteGenericNervousSystemFunction:se,ManageLedgerParameters:oe,Motion:ne}),R=e.Record({url:e.Text,title:e.Text,action:e.Opt(ae),summary:e.Text}),re=e.Record({current_deadline_timestamp_seconds:e.Nat64}),y=e.Record({id:e.Opt(_),payload_text_rendering:e.Opt(e.Text),action:e.Nat64,failure_reason:e.Opt(m),action_auxiliary:e.Opt(H),ballots:e.Vec(e.Tuple(e.Text,K)),minimum_yes_proportion_of_total:e.Opt(V),reward_event_round:e.Nat64,failed_timestamp_seconds:e.Nat64,reward_event_end_timestamp_seconds:e.Opt(e.Nat64),proposal_creation_timestamp_seconds:e.Nat64,initial_voting_period_seconds:e.Nat64,reject_cost_e8s:e.Nat64,latest_tally:e.Opt(Y),wait_for_quiet_deadline_increase_seconds:e.Nat64,decided_timestamp_seconds:e.Nat64,proposal:e.Opt(R),proposer:e.Opt(a),wait_for_quiet_state:e.Opt(re),minimum_yes_proportion_of_exercised:e.Opt(V),is_eligible_for_rewards:e.Bool,executed_timestamp_seconds:e.Nat64}),h=e.Record({memo:e.Nat64,amount_e8s:e.Nat64}),F=e.Record({function_id:e.Nat64,followees:e.Vec(a)}),C=e.Record({to_account:e.Opt(d),percentage_to_disburse:e.Nat32}),ie=e.Record({requested_setting_for_auto_stake_maturity:e.Bool}),ce=e.Record({additional_dissolve_delay_seconds:e.Nat32}),_e=e.Record({dissolve_timestamp_seconds:e.Nat64}),de=e.Variant({ChangeAutoStakeMaturity:ie,StopDissolving:e.Record({}),StartDissolving:e.Record({}),IncreaseDissolveDelay:ce,SetDissolveTimestamp:_e}),k=e.Record({operation:e.Opt(de)}),A=e.Record({vote:e.Int32,proposal:e.Opt(_)}),ue=e.Record({amount_to_be_disbursed_e8s:e.Nat64,to_account:e.Opt(d)}),pe=e.Record({controller:e.Opt(e.Principal),memo:e.Nat64}),le=e.Variant({MemoAndController:pe,NeuronId:e.Record({})}),q=e.Record({by:e.Opt(le)}),G=e.Record({permissions_to_remove:e.Opt(l),principal_id:e.Opt(e.Principal)}),E=e.Record({permissions_to_add:e.Opt(l),principal_id:e.Opt(e.Principal)}),U=e.Record({percentage_to_merge:e.Nat32}),me=e.Record({e8s:e.Nat64}),z=e.Record({to_account:e.Opt(d),amount:e.Opt(me)}),Ne=e.Variant({Split:h,Follow:F,DisburseMaturity:C,Configure:k,RegisterVote:A,SyncCommand:e.Record({}),MakeProposal:R,FinalizeDisburseMaturity:ue,ClaimOrRefreshNeuron:q,RemoveNeuronPermissions:G,AddNeuronPermissions:E,MergeMaturity:U,Disburse:z}),ge=e.Record({command:e.Opt(Ne),timestamp:e.Nat64}),Oe=e.Record({principal:e.Opt(e.Principal),permission_type:e.Vec(e.Int32)}),Re=e.Variant({DissolveDelaySeconds:e.Nat64,WhenDissolvedTimestampSeconds:e.Nat64}),ye=e.Record({timestamp_of_disbursement_seconds:e.Nat64,amount_e8s:e.Nat64,account_to_disburse_to:e.Opt(d),finalize_disbursement_timestamp_seconds:e.Opt(e.Nat64)}),v=e.Record({id:e.Opt(a),staked_maturity_e8s_equivalent:e.Opt(e.Nat64),permissions:e.Vec(Oe),maturity_e8s_equivalent:e.Nat64,cached_neuron_stake_e8s:e.Nat64,created_timestamp_seconds:e.Nat64,source_nns_neuron_id:e.Opt(e.Nat64),auto_stake_maturity:e.Opt(e.Bool),aging_since_timestamp_seconds:e.Nat64,dissolve_state:e.Opt(Re),voting_power_percentage_multiplier:e.Nat64,vesting_period_seconds:e.Opt(e.Nat64),disburse_maturity_in_progress:e.Vec(ye),followees:e.Vec(e.Tuple(e.Nat64,c)),neuron_fees_e8s:e.Nat64}),ft=e.Record({root_canister_id:e.Opt(e.Principal),id_to_nervous_system_functions:e.Vec(e.Tuple(e.Nat64,s)),metrics:e.Opt(i),maturity_modulation:e.Opt(r),mode:e.Int32,parameters:e.Opt(N),is_finalizing_disburse_maturity:e.Opt(e.Bool),deployed_version:e.Opt(g),sns_initialization_parameters:e.Text,latest_reward_event:e.Opt(w),pending_version:e.Opt(b),swap_canister_id:e.Opt(e.Principal),ledger_canister_id:e.Opt(e.Principal),proposals:e.Vec(e.Tuple(e.Nat64,y)),in_flight_commands:e.Vec(e.Tuple(e.Text,ge)),sns_metadata:e.Opt(x),neurons:e.Vec(e.Tuple(e.Text,v)),genesis_timestamp_seconds:e.Nat64}),ve=e.Record({controller:e.Opt(e.Principal),dissolve_delay_seconds:e.Opt(e.Nat64),source_nns_neuron_id:e.Opt(e.Nat64),stake_e8s:e.Opt(e.Nat64),followees:e.Vec(a),hotkey:e.Opt(e.Principal),neuron_id:e.Opt(a)}),Se=e.Record({neuron_parameters:e.Vec(ve)}),fe=e.Record({id:e.Opt(a),status:e.Int32}),Pe=e.Record({swap_neurons:e.Vec(fe)}),we=e.Variant({Ok:Pe,Err:e.Int32}),be=e.Record({claim_swap_neurons_result:e.Opt(we)}),Me=e.Record({maturity_modulation:e.Opt(r)}),Te=e.Record({url:e.Opt(e.Text),logo:e.Opt(e.Text),name:e.Opt(e.Text),description:e.Opt(e.Text)}),Ve=e.Record({mode:e.Opt(e.Int32)}),xe=e.Record({neuron_id:e.Opt(a)}),he=e.Variant({Error:m,Neuron:v}),Fe=e.Record({result:e.Opt(he)}),B=e.Record({proposal_id:e.Opt(_)}),Ce=e.Variant({Error:m,Proposal:y}),ke=e.Record({result:e.Opt(Ce)}),Ae=e.Variant({stopped:e.Null,stopping:e.Null,running:e.Null}),qe=e.Record({freezing_threshold:e.Nat,controllers:e.Vec(e.Principal),memory_allocation:e.Nat,compute_allocation:e.Nat}),Ge=e.Record({status:Ae,memory_size:e.Nat,cycles:e.Nat,settings:qe,idle_cycles_burned_per_day:e.Nat,module_hash:e.Opt(e.Vec(e.Nat8))}),Ee=e.Record({deployed_version:e.Opt(g),pending_version:e.Opt(b)}),Ue=e.Record({sns_initialization_parameters:e.Text}),ze=e.Record({reserved_ids:e.Vec(e.Nat64),functions:e.Vec(s)}),Be=e.Record({of_principal:e.Opt(e.Principal),limit:e.Nat32,start_page_at:e.Opt(a)}),je=e.Record({neurons:e.Vec(v)}),Qe=e.Record({include_reward_status:e.Vec(e.Int32),before_proposal:e.Opt(_),limit:e.Nat32,exclude_type:e.Vec(e.Nat64),include_status:e.Vec(e.Int32)}),We=e.Record({include_ballots_by_caller:e.Opt(e.Bool),proposals:e.Vec(y)}),$e=e.Record({percentage_to_stake:e.Opt(e.Nat32)}),Je=e.Variant({Split:h,Follow:F,DisburseMaturity:C,ClaimOrRefresh:q,Configure:k,RegisterVote:A,MakeProposal:R,StakeMaturity:$e,RemoveNeuronPermissions:G,AddNeuronPermissions:E,MergeMaturity:U,Disburse:z}),Xe=e.Record({subaccount:e.Vec(e.Nat8),command:e.Opt(Je)}),He=e.Record({created_neuron_id:e.Opt(a)}),Ke=e.Record({amount_disbursed_e8s:e.Nat64,amount_deducted_e8s:e.Opt(e.Nat64)}),Ye=e.Record({refreshed_neuron_id:e.Opt(a)}),Ze=e.Record({maturity_e8s:e.Nat64,staked_maturity_e8s:e.Nat64}),De=e.Record({merged_maturity_e8s:e.Nat64,new_stake_e8s:e.Nat64}),Ie=e.Record({transfer_block_height:e.Nat64}),Le=e.Variant({Error:m,Split:He,Follow:e.Record({}),DisburseMaturity:Ke,ClaimOrRefresh:Ye,Configure:e.Record({}),RegisterVote:e.Record({}),MakeProposal:B,RemoveNeuronPermission:e.Record({}),StakeMaturity:Ze,MergeMaturity:De,Disburse:Ie,AddNeuronPermission:e.Record({})}),et=e.Record({command:e.Opt(Le)}),tt=e.Record({mode:e.Int32});return e.Service({claim_swap_neurons:e.Func([Se],[be],[]),fail_stuck_upgrade_in_progress:e.Func([e.Record({})],[e.Record({})],[]),get_build_metadata:e.Func([],[e.Text],["query"]),get_latest_reward_event:e.Func([],[w],["query"]),get_maturity_modulation:e.Func([e.Record({})],[Me],[]),get_metadata:e.Func([e.Record({})],[Te],["query"]),get_mode:e.Func([e.Record({})],[Ve],["query"]),get_nervous_system_parameters:e.Func([e.Null],[N],["query"]),get_neuron:e.Func([xe],[Fe],["query"]),get_proposal:e.Func([B],[ke],["query"]),get_root_canister_status:e.Func([e.Null],[Ge],[]),get_running_sns_version:e.Func([e.Record({})],[Ee],["query"]),get_sns_initialization_parameters:e.Func([e.Record({})],[Ue],["query"]),list_nervous_system_functions:e.Func([],[ze],["query"]),list_neurons:e.Func([Be],[je],["query"]),list_proposals:e.Func([Qe],[We],["query"]),manage_neuron:e.Func([Xe],[et],[]),set_mode:e.Func([tt],[e.Record({})],[])})};import{fromNullable as n,toNullable as S}from"@dfinity/utils";var f=({neuronId:{id:e},command:o})=>({subaccount:e,command:[o]}),j=({neuronId:e,operation:o})=>f({neuronId:e,command:{Configure:{operation:[o]}}}),at=({owner:e,subaccount:o})=>({owner:S(e),subaccount:o===void 0?[]:S({subaccount:o})}),rt=({neuronId:e,permissions:o,principal:t})=>f({neuronId:e,command:{AddNeuronPermissions:{permissions_to_add:[{permissions:Int32Array.from(o)}],principal_id:[t]}}}),it=({neuronId:e,permissions:o,principal:t})=>f({neuronId:e,command:{RemoveNeuronPermissions:{permissions_to_remove:[{permissions:Int32Array.from(o)}],principal_id:[t]}}}),ct=({neuronId:e,memo:o,amount:t})=>f({neuronId:e,command:{Split:{memo:o,amount_e8s:t}}}),_t=({neuronId:e,amount:o,toAccount:t})=>f({neuronId:e,command:{Disburse:{to_account:t===void 0?[]:S(at(t)),amount:o===void 0?[]:[{e8s:o}]}}}),dt=e=>j({neuronId:e,operation:{StartDissolving:{}}}),ut=e=>j({neuronId:e,operation:{StopDissolving:{}}}),pt=({neuronId:e,percentageToStake:o})=>f({neuronId:e,command:{StakeMaturity:{percentage_to_stake:S(o)}}}),lt=({neuronId:e,percentageToDisburse:o,toAccount:t})=>f({neuronId:e,command:{DisburseMaturity:{to_account:t===void 0?[]:S(at(t)),percentage_to_disburse:o}}}),mt=({neuronId:e,autoStake:o})=>j({neuronId:e,operation:{ChangeAutoStakeMaturity:{requested_setting_for_auto_stake_maturity:o}}}),Nt=({neuronId:e,dissolveTimestampSeconds:o})=>j({neuronId:e,operation:{SetDissolveTimestamp:{dissolve_timestamp_seconds:o}}}),gt=({neuronId:e,additionalDissolveDelaySeconds:o})=>j({neuronId:e,operation:{IncreaseDissolveDelay:{additional_dissolve_delay_seconds:o}}}),Ot=({neuronId:e,functionId:o,followees:t})=>({subaccount:e.id,command:[{Follow:{function_id:o,followees:t}}]}),Rt=({neuronId:e,proposalId:o,vote:t})=>({subaccount:e.id,command:[{RegisterVote:{vote:t,proposal:[o]}}]}),st=({subaccount:e,memo:o,controller:t})=>({subaccount:e,command:[{ClaimOrRefresh:{by:[o===void 0?{NeuronId:{}}:{MemoAndController:{memo:o,controller:S(t)}}]}}]}),yt=({excludeType:e,beforeProposal:o,includeRewardStatus:t,includeStatus:s,limit:i})=>({exclude_type:BigUint64Array.from(e??[]),before_proposal:S(o),include_reward_status:Int32Array.from(t??[]),include_status:Int32Array.from(s??[]),limit:i??10}),zt=e=>{if("ManageNervousSystemParameters"in e)return{ManageNervousSystemParameters:Ft(e.ManageNervousSystemParameters)};if("AddGenericNervousSystemFunction"in e)return{AddGenericNervousSystemFunction:xt(e.AddGenericNervousSystemFunction)};if("RemoveGenericNervousSystemFunction"in e)return{RemoveGenericNervousSystemFunction:e.RemoveGenericNervousSystemFunction};if("UpgradeSnsToNextVersion"in e)return{UpgradeSnsToNextVersion:e.UpgradeSnsToNextVersion};if("RegisterDappCanisters"in e)return{RegisterDappCanisters:e.RegisterDappCanisters};if("TransferSnsTreasuryFunds"in e)return{TransferSnsTreasuryFunds:Mt(e.TransferSnsTreasuryFunds)};if("UpgradeSnsControlledCanister"in e)return{UpgradeSnsControlledCanister:bt(e.UpgradeSnsControlledCanister)};if("DeregisterDappCanisters"in e)return{DeregisterDappCanisters:e.DeregisterDappCanisters};if("Unspecified"in e)return{Unspecified:e.Unspecified};if("ManageSnsMetadata"in e)return{ManageSnsMetadata:wt(e.ManageSnsMetadata)};if("ExecuteGenericNervousSystemFunction"in e)return{ExecuteGenericNervousSystemFunction:e.ExecuteGenericNervousSystemFunction};if("Motion"in e)return{Motion:e.Motion};throw new Error(`Unknown action type ${JSON.stringify(e)}`)},wt=e=>({url:n(e.url),logo:n(e.logo),name:n(e.name),description:n(e.description)}),bt=e=>({new_canister_wasm:e.new_canister_wasm,canister_id:n(e.canister_id),canister_upgrade_arg:n(e.canister_upgrade_arg),mode:n(e.mode)}),Mt=e=>({from_treasury:e.from_treasury,to_principal:n(e.to_principal),to_subaccount:n(e.to_subaccount),memo:n(e.memo),amount_e8s:e.amount_e8s}),Tt=e=>({validator_canister_id:n(e.validator_canister_id),target_canister_id:n(e.target_canister_id),validator_method_name:n(e.validator_method_name),target_method_name:n(e.target_method_name)}),Vt=e=>{if(e!==void 0){if("NativeNervousSystemFunction"in e)return{NativeNervousSystemFunction:e.NativeNervousSystemFunction};if("GenericNervousSystemFunction"in e)return{GenericNervousSystemFunction:Tt(e.GenericNervousSystemFunction)};throw new Error(`Unknown FunctionType ${JSON.stringify(e)}`)}},xt=e=>({id:e.id,name:e.name,description:n(e.description),function_type:Vt(n(e.function_type))}),ht=e=>e&&{final_reward_rate_basis_points:n(e.final_reward_rate_basis_points),initial_reward_rate_basis_points:n(e.initial_reward_rate_basis_points),reward_rate_transition_duration_seconds:n(e.reward_rate_transition_duration_seconds),round_duration_seconds:n(e.round_duration_seconds)},Ft=e=>({default_followees:n(e.default_followees),max_dissolve_delay_seconds:n(e.max_dissolve_delay_seconds),max_dissolve_delay_bonus_percentage:n(e.max_dissolve_delay_bonus_percentage),max_followees_per_function:n(e.max_followees_per_function),neuron_claimer_permissions:n(e.neuron_claimer_permissions),neuron_minimum_stake_e8s:n(e.neuron_minimum_stake_e8s),max_neuron_age_for_age_bonus:n(e.max_neuron_age_for_age_bonus),initial_voting_period_seconds:n(e.initial_voting_period_seconds),neuron_minimum_dissolve_delay_to_vote_seconds:n(e.neuron_minimum_dissolve_delay_to_vote_seconds),reject_cost_e8s:n(e.reject_cost_e8s),max_proposals_to_keep_per_action:n(e.max_proposals_to_keep_per_action),wait_for_quiet_deadline_increase_seconds:n(e.wait_for_quiet_deadline_increase_seconds),max_number_of_neurons:n(e.max_number_of_neurons),transaction_fee_e8s:n(e.transaction_fee_e8s),max_number_of_proposals_with_ballots:n(e.max_number_of_proposals_with_ballots),max_age_bonus_percentage:n(e.max_age_bonus_percentage),neuron_grantable_permissions:n(e.neuron_grantable_permissions),voting_rewards_parameters:ht(n(e.voting_rewards_parameters)),max_number_of_principals_per_neuron:n(e.max_number_of_principals_per_neuron)});var St=class e extends kt{constructor(){super(...arguments);this.listNeurons=async t=>{let{principal:s,limit:i,beforeNeuronId:r}=t,{neurons:a}=await this.caller(t).list_neurons({of_principal:Q(s),limit:i??100,start_page_at:Q(r)});return a};this.listProposals=async t=>{let{certified:s}=t;return await this.caller({certified:s}).list_proposals(yt(t))};this.getProposal=async t=>{let{proposalId:s}=t,{result:i}=await this.caller(t).get_proposal({proposal_id:Q(s)}),r=P(i);if(r===void 0||"Error"in r)throw new u(r?.Error.error_message??"Response type not supported");return r.Proposal};this.listNervousSystemFunctions=async t=>this.caller(t).list_nervous_system_functions();this.metadata=t=>this.caller(t).get_metadata({});this.nervousSystemParameters=t=>this.caller(t).get_nervous_system_parameters(null);this.getNeuron=async t=>{let{neuronId:s}=t,{result:i}=await this.caller(t).get_neuron({neuron_id:Q(s)}),r=P(i);if(r===void 0||"Error"in r)throw new u(r?.Error.error_message??"Response type not supported");return r.Neuron};this.queryNeuron=async t=>{try{return await this.getNeuron(t)}catch(s){if(s instanceof Error&&s.message.includes("No neuron for given NeuronId"))return;throw s}};this.manageNeuron=async t=>{let s=await this.caller({certified:!0}).manage_neuron(t);return this.assertManageNeuronError(s),s};this.addNeuronPermissions=async t=>{let s=rt(t);await this.manageNeuron(s)};this.removeNeuronPermissions=async t=>{let s=it(t);await this.manageNeuron(s)};this.splitNeuron=async t=>{let s=ct(t),{command:i}=await this.manageNeuron(s),r=P(i),a=c=>`Split neuron failed (${c})`;if(r===void 0)throw new u(a("no response"));if("Split"in r){let c=r.Split,p=P(c.created_neuron_id);if(p!==void 0)return p;throw new u(a("no id"))}throw new u(a("unknown"))};this.disburse=async t=>{let s=_t(t);await this.manageNeuron(s)};this.startDissolving=async t=>{let s=dt(t);await this.manageNeuron(s)};this.stopDissolving=async t=>{let s=ut(t);await this.manageNeuron(s)};this.stakeMaturity=async({neuronId:t,percentageToStake:s})=>{vt(s??100);let i=pt({neuronId:t,percentageToStake:s});await this.manageNeuron(i)};this.disburseMaturity=async t=>{vt(t.percentageToDisburse);let s=lt(t);await this.manageNeuron(s)};this.autoStakeMaturity=async t=>{let s=mt(t);await this.manageNeuron(s)};this.setDissolveTimestamp=async t=>{let s=Nt(t);await this.manageNeuron(s)};this.increaseDissolveDelay=async t=>{let s=gt(t);await this.manageNeuron(s)};this.setTopicFollowees=async t=>{let s=Ot(t);await this.manageNeuron(s)};this.registerVote=async t=>{let s=Rt(t);await this.manageNeuron(s)};this.refreshNeuron=async t=>{let s=st({subaccount:t.id});await this.manageNeuron(s)};this.claimNeuron=async({memo:t,controller:s,subaccount:i})=>{let r=st({subaccount:i,memo:t,controller:s}),{command:a}=await this.manageNeuron(r),c=P(a);if(c===void 0)throw new u("Claim neuron failed");if("ClaimOrRefresh"in c){let p=P(c.ClaimOrRefresh.refreshed_neuron_id);if(p===void 0)throw new u("Claim neuron failed");return p}throw new u("Claim neuron failed")};this.assertManageNeuronError=({command:t})=>{let s=t[0];if(s!==void 0&&"Error"in s)throw new u(s.Error.error_message)}}static create(t){let{service:s,certifiedService:i,canisterId:r}=At({options:t,idlFactory:nt,certifiedIdlFactory:ot});return new e(r,s,i)}};export{zt as a,St as b};
2
- //# sourceMappingURL=chunk-VUTJEPVF.js.map