diff --git a/src/backend/backend.did b/src/backend/backend.did index e9612209b0..9c0a9ab0b9 100644 --- a/src/backend/backend.did +++ b/src/backend/backend.did @@ -1,3 +1,12 @@ +type AddDappSettingsError = variant { + DappIdAlreadyHidden; + VersionMismatch; + UserNotFound; +}; +type AddHiddenDappIdRequest = record { + current_user_version : opt nat64; + dapp_id : text; +}; type AddUserCredentialError = variant { InvalidCredential; VersionMismatch; @@ -77,6 +86,8 @@ type CustomToken = record { version : opt nat64; enabled : bool; }; +type DappCarouselSettings = record { hidden_dapp_ids : vec text }; +type DappSettings = record { dapp_carousel : DappCarouselSettings }; type DefiniteCanisterSettingsArgs = record { controller : principal; freezing_threshold : nat; @@ -149,20 +160,21 @@ type OisyUser = record { type Outpoint = record { txid : blob; vout : nat32 }; type PendingTransaction = record { txid : blob; utxos : vec Utxo }; type Result = variant { Ok; Err : AddUserCredentialError }; -type Result_1 = variant { Ok; Err : AllowSigningError }; -type Result_2 = variant { Ok; Err : BtcAddPendingTransactionError }; -type Result_3 = variant { +type Result_1 = variant { Ok; Err : AddDappSettingsError }; +type Result_2 = variant { Ok; Err : AllowSigningError }; +type Result_3 = variant { Ok; Err : BtcAddPendingTransactionError }; +type Result_4 = variant { Ok : BtcGetPendingTransactionsReponse; Err : BtcAddPendingTransactionError; }; -type Result_4 = variant { +type Result_5 = variant { Ok : SelectedUtxosFeeResponse; Err : SelectedUtxosFeeError; }; -type Result_5 = variant { Ok : UserProfile; Err : GetUserProfileError }; -type Result_6 = variant { Ok : MigrationReport; Err : text }; -type Result_7 = variant { Ok; Err : text }; -type Result_8 = variant { +type Result_6 = variant { Ok : UserProfile; Err : GetUserProfileError }; +type Result_7 = variant { Ok : MigrationReport; Err : text }; +type Result_8 = variant { Ok; Err : text }; +type Result_9 = variant { Ok : TopUpCyclesLedgerResponse; Err : TopUpCyclesLedgerError; }; @@ -179,6 +191,7 @@ type SelectedUtxosFeeResponse = record { fee_satoshis : nat64; utxos : vec Utxo; }; +type Settings = record { dapp : DappSettings }; type Stats = record { user_profile_count : nat64; custom_token_count : nat64; @@ -219,6 +232,7 @@ type UserCredential = record { type UserProfile = record { credentials : vec UserCredential; version : opt nat64; + settings : Settings; created_timestamp : nat64; updated_timestamp : nat64; }; @@ -234,24 +248,25 @@ type UserTokenId = record { chain_id : nat64; contract_address : text }; type Utxo = record { height : nat32; value : nat64; outpoint : Outpoint }; service : (Arg) -> { add_user_credential : (AddUserCredentialRequest) -> (Result); - allow_signing : () -> (Result_1); - btc_add_pending_transaction : (BtcAddPendingTransactionRequest) -> (Result_2); + add_user_hidden_dapp_id : (AddHiddenDappIdRequest) -> (Result_1); + allow_signing : () -> (Result_2); + btc_add_pending_transaction : (BtcAddPendingTransactionRequest) -> (Result_3); btc_get_pending_transactions : (BtcGetPendingTransactionsRequest) -> ( - Result_3, + Result_4, ); - btc_select_user_utxos_fee : (SelectedUtxosFeeRequest) -> (Result_4); + btc_select_user_utxos_fee : (SelectedUtxosFeeRequest) -> (Result_5); bulk_up : (blob) -> (); config : () -> (Config) query; create_user_profile : () -> (UserProfile); get_canister_status : () -> (CanisterStatusResultV2); - get_user_profile : () -> (Result_5) query; + get_user_profile : () -> (Result_6) query; http_request : (HttpRequest) -> (HttpResponse) query; list_custom_tokens : () -> (vec CustomToken) query; list_user_tokens : () -> (vec UserToken) query; list_users : (ListUsersRequest) -> (ListUsersResponse) query; - migrate_user_data_to : (principal) -> (Result_6); + migrate_user_data_to : (principal) -> (Result_7); migration : () -> (opt MigrationReport) query; - migration_stop_timer : () -> (Result_7); + migration_stop_timer : () -> (Result_8); remove_user_token : (UserTokenId) -> (); set_custom_token : (CustomToken) -> (); set_guards : (Guards) -> (); @@ -260,5 +275,5 @@ service : (Arg) -> { set_user_token : (UserToken) -> (); stats : () -> (Stats) query; step_migration : () -> (); - top_up_cycles_ledger : (opt TopUpCyclesLedgerRequest) -> (Result_8); + top_up_cycles_ledger : (opt TopUpCyclesLedgerRequest) -> (Result_9); } diff --git a/src/declarations/backend/backend.did b/src/declarations/backend/backend.did index e9612209b0..9c0a9ab0b9 100644 --- a/src/declarations/backend/backend.did +++ b/src/declarations/backend/backend.did @@ -1,3 +1,12 @@ +type AddDappSettingsError = variant { + DappIdAlreadyHidden; + VersionMismatch; + UserNotFound; +}; +type AddHiddenDappIdRequest = record { + current_user_version : opt nat64; + dapp_id : text; +}; type AddUserCredentialError = variant { InvalidCredential; VersionMismatch; @@ -77,6 +86,8 @@ type CustomToken = record { version : opt nat64; enabled : bool; }; +type DappCarouselSettings = record { hidden_dapp_ids : vec text }; +type DappSettings = record { dapp_carousel : DappCarouselSettings }; type DefiniteCanisterSettingsArgs = record { controller : principal; freezing_threshold : nat; @@ -149,20 +160,21 @@ type OisyUser = record { type Outpoint = record { txid : blob; vout : nat32 }; type PendingTransaction = record { txid : blob; utxos : vec Utxo }; type Result = variant { Ok; Err : AddUserCredentialError }; -type Result_1 = variant { Ok; Err : AllowSigningError }; -type Result_2 = variant { Ok; Err : BtcAddPendingTransactionError }; -type Result_3 = variant { +type Result_1 = variant { Ok; Err : AddDappSettingsError }; +type Result_2 = variant { Ok; Err : AllowSigningError }; +type Result_3 = variant { Ok; Err : BtcAddPendingTransactionError }; +type Result_4 = variant { Ok : BtcGetPendingTransactionsReponse; Err : BtcAddPendingTransactionError; }; -type Result_4 = variant { +type Result_5 = variant { Ok : SelectedUtxosFeeResponse; Err : SelectedUtxosFeeError; }; -type Result_5 = variant { Ok : UserProfile; Err : GetUserProfileError }; -type Result_6 = variant { Ok : MigrationReport; Err : text }; -type Result_7 = variant { Ok; Err : text }; -type Result_8 = variant { +type Result_6 = variant { Ok : UserProfile; Err : GetUserProfileError }; +type Result_7 = variant { Ok : MigrationReport; Err : text }; +type Result_8 = variant { Ok; Err : text }; +type Result_9 = variant { Ok : TopUpCyclesLedgerResponse; Err : TopUpCyclesLedgerError; }; @@ -179,6 +191,7 @@ type SelectedUtxosFeeResponse = record { fee_satoshis : nat64; utxos : vec Utxo; }; +type Settings = record { dapp : DappSettings }; type Stats = record { user_profile_count : nat64; custom_token_count : nat64; @@ -219,6 +232,7 @@ type UserCredential = record { type UserProfile = record { credentials : vec UserCredential; version : opt nat64; + settings : Settings; created_timestamp : nat64; updated_timestamp : nat64; }; @@ -234,24 +248,25 @@ type UserTokenId = record { chain_id : nat64; contract_address : text }; type Utxo = record { height : nat32; value : nat64; outpoint : Outpoint }; service : (Arg) -> { add_user_credential : (AddUserCredentialRequest) -> (Result); - allow_signing : () -> (Result_1); - btc_add_pending_transaction : (BtcAddPendingTransactionRequest) -> (Result_2); + add_user_hidden_dapp_id : (AddHiddenDappIdRequest) -> (Result_1); + allow_signing : () -> (Result_2); + btc_add_pending_transaction : (BtcAddPendingTransactionRequest) -> (Result_3); btc_get_pending_transactions : (BtcGetPendingTransactionsRequest) -> ( - Result_3, + Result_4, ); - btc_select_user_utxos_fee : (SelectedUtxosFeeRequest) -> (Result_4); + btc_select_user_utxos_fee : (SelectedUtxosFeeRequest) -> (Result_5); bulk_up : (blob) -> (); config : () -> (Config) query; create_user_profile : () -> (UserProfile); get_canister_status : () -> (CanisterStatusResultV2); - get_user_profile : () -> (Result_5) query; + get_user_profile : () -> (Result_6) query; http_request : (HttpRequest) -> (HttpResponse) query; list_custom_tokens : () -> (vec CustomToken) query; list_user_tokens : () -> (vec UserToken) query; list_users : (ListUsersRequest) -> (ListUsersResponse) query; - migrate_user_data_to : (principal) -> (Result_6); + migrate_user_data_to : (principal) -> (Result_7); migration : () -> (opt MigrationReport) query; - migration_stop_timer : () -> (Result_7); + migration_stop_timer : () -> (Result_8); remove_user_token : (UserTokenId) -> (); set_custom_token : (CustomToken) -> (); set_guards : (Guards) -> (); @@ -260,5 +275,5 @@ service : (Arg) -> { set_user_token : (UserToken) -> (); stats : () -> (Stats) query; step_migration : () -> (); - top_up_cycles_ledger : (opt TopUpCyclesLedgerRequest) -> (Result_8); + top_up_cycles_ledger : (opt TopUpCyclesLedgerRequest) -> (Result_9); } diff --git a/src/declarations/backend/backend.did.d.ts b/src/declarations/backend/backend.did.d.ts index 54e3c3ca7b..529b540e1f 100644 --- a/src/declarations/backend/backend.did.d.ts +++ b/src/declarations/backend/backend.did.d.ts @@ -2,6 +2,14 @@ import type { ActorMethod } from '@dfinity/agent'; import type { IDL } from '@dfinity/candid'; import type { Principal } from '@dfinity/principal'; +export type AddDappSettingsError = + | { DappIdAlreadyHidden: null } + | { VersionMismatch: null } + | { UserNotFound: null }; +export interface AddHiddenDappIdRequest { + current_user_version: [] | [bigint]; + dapp_id: string; +} export type AddUserCredentialError = | { InvalidCredential: null } | { VersionMismatch: null } @@ -80,6 +88,12 @@ export interface CustomToken { version: [] | [bigint]; enabled: boolean; } +export interface DappCarouselSettings { + hidden_dapp_ids: Array; +} +export interface DappSettings { + dapp_carousel: DappCarouselSettings; +} export interface DefiniteCanisterSettingsArgs { controller: Principal; freezing_threshold: bigint; @@ -167,16 +181,17 @@ export interface PendingTransaction { utxos: Array; } export type Result = { Ok: null } | { Err: AddUserCredentialError }; -export type Result_1 = { Ok: null } | { Err: AllowSigningError }; -export type Result_2 = { Ok: null } | { Err: BtcAddPendingTransactionError }; -export type Result_3 = +export type Result_1 = { Ok: null } | { Err: AddDappSettingsError }; +export type Result_2 = { Ok: null } | { Err: AllowSigningError }; +export type Result_3 = { Ok: null } | { Err: BtcAddPendingTransactionError }; +export type Result_4 = | { Ok: BtcGetPendingTransactionsReponse } | { Err: BtcAddPendingTransactionError }; -export type Result_4 = { Ok: SelectedUtxosFeeResponse } | { Err: SelectedUtxosFeeError }; -export type Result_5 = { Ok: UserProfile } | { Err: GetUserProfileError }; -export type Result_6 = { Ok: MigrationReport } | { Err: string }; -export type Result_7 = { Ok: null } | { Err: string }; -export type Result_8 = { Ok: TopUpCyclesLedgerResponse } | { Err: TopUpCyclesLedgerError }; +export type Result_5 = { Ok: SelectedUtxosFeeResponse } | { Err: SelectedUtxosFeeError }; +export type Result_6 = { Ok: UserProfile } | { Err: GetUserProfileError }; +export type Result_7 = { Ok: MigrationReport } | { Err: string }; +export type Result_8 = { Ok: null } | { Err: string }; +export type Result_9 = { Ok: TopUpCyclesLedgerResponse } | { Err: TopUpCyclesLedgerError }; export type SelectedUtxosFeeError = | { PendingTransactions: null } | { InternalError: { msg: string } }; @@ -189,6 +204,9 @@ export interface SelectedUtxosFeeResponse { fee_satoshis: bigint; utxos: Array; } +export interface Settings { + dapp: DappSettings; +} export interface Stats { user_profile_count: bigint; custom_token_count: bigint; @@ -235,6 +253,7 @@ export interface UserCredential { export interface UserProfile { credentials: Array; version: [] | [bigint]; + settings: Settings; created_timestamp: bigint; updated_timestamp: bigint; } @@ -257,22 +276,23 @@ export interface Utxo { } export interface _SERVICE { add_user_credential: ActorMethod<[AddUserCredentialRequest], Result>; - allow_signing: ActorMethod<[], Result_1>; - btc_add_pending_transaction: ActorMethod<[BtcAddPendingTransactionRequest], Result_2>; - btc_get_pending_transactions: ActorMethod<[BtcGetPendingTransactionsRequest], Result_3>; - btc_select_user_utxos_fee: ActorMethod<[SelectedUtxosFeeRequest], Result_4>; + add_user_hidden_dapp_id: ActorMethod<[AddHiddenDappIdRequest], Result_1>; + allow_signing: ActorMethod<[], Result_2>; + btc_add_pending_transaction: ActorMethod<[BtcAddPendingTransactionRequest], Result_3>; + btc_get_pending_transactions: ActorMethod<[BtcGetPendingTransactionsRequest], Result_4>; + btc_select_user_utxos_fee: ActorMethod<[SelectedUtxosFeeRequest], Result_5>; bulk_up: ActorMethod<[Uint8Array | number[]], undefined>; config: ActorMethod<[], Config>; create_user_profile: ActorMethod<[], UserProfile>; get_canister_status: ActorMethod<[], CanisterStatusResultV2>; - get_user_profile: ActorMethod<[], Result_5>; + get_user_profile: ActorMethod<[], Result_6>; http_request: ActorMethod<[HttpRequest], HttpResponse>; list_custom_tokens: ActorMethod<[], Array>; list_user_tokens: ActorMethod<[], Array>; list_users: ActorMethod<[ListUsersRequest], ListUsersResponse>; - migrate_user_data_to: ActorMethod<[Principal], Result_6>; + migrate_user_data_to: ActorMethod<[Principal], Result_7>; migration: ActorMethod<[], [] | [MigrationReport]>; - migration_stop_timer: ActorMethod<[], Result_7>; + migration_stop_timer: ActorMethod<[], Result_8>; remove_user_token: ActorMethod<[UserTokenId], undefined>; set_custom_token: ActorMethod<[CustomToken], undefined>; set_guards: ActorMethod<[Guards], undefined>; @@ -281,7 +301,7 @@ export interface _SERVICE { set_user_token: ActorMethod<[UserToken], undefined>; stats: ActorMethod<[], Stats>; step_migration: ActorMethod<[], undefined>; - top_up_cycles_ledger: ActorMethod<[[] | [TopUpCyclesLedgerRequest]], Result_8>; + top_up_cycles_ledger: ActorMethod<[[] | [TopUpCyclesLedgerRequest]], Result_9>; } export declare const idlFactory: IDL.InterfaceFactory; export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[]; diff --git a/src/declarations/backend/backend.factory.certified.did.js b/src/declarations/backend/backend.factory.certified.did.js index cd864d28b9..0157fdc8e9 100644 --- a/src/declarations/backend/backend.factory.certified.did.js +++ b/src/declarations/backend/backend.factory.certified.did.js @@ -48,6 +48,19 @@ export const idlFactory = ({ IDL }) => { Ok: IDL.Null, Err: AddUserCredentialError }); + const AddHiddenDappIdRequest = IDL.Record({ + current_user_version: IDL.Opt(IDL.Nat64), + dapp_id: IDL.Text + }); + const AddDappSettingsError = IDL.Variant({ + DappIdAlreadyHidden: IDL.Null, + VersionMismatch: IDL.Null, + UserNotFound: IDL.Null + }); + const Result_1 = IDL.Variant({ + Ok: IDL.Null, + Err: AddDappSettingsError + }); const ApproveError = IDL.Variant({ GenericError: IDL.Record({ message: IDL.Text, @@ -67,7 +80,7 @@ export const idlFactory = ({ IDL }) => { Other: IDL.Text, FailedToContactCyclesLedger: IDL.Null }); - const Result_1 = IDL.Variant({ Ok: IDL.Null, Err: AllowSigningError }); + const Result_2 = IDL.Variant({ Ok: IDL.Null, Err: AllowSigningError }); const BitcoinNetwork = IDL.Variant({ mainnet: IDL.Null, regtest: IDL.Null, @@ -91,7 +104,7 @@ export const idlFactory = ({ IDL }) => { const BtcAddPendingTransactionError = IDL.Variant({ InternalError: IDL.Record({ msg: IDL.Text }) }); - const Result_2 = IDL.Variant({ + const Result_3 = IDL.Variant({ Ok: IDL.Null, Err: BtcAddPendingTransactionError }); @@ -106,7 +119,7 @@ export const idlFactory = ({ IDL }) => { const BtcGetPendingTransactionsReponse = IDL.Record({ transactions: IDL.Vec(PendingTransaction) }); - const Result_3 = IDL.Variant({ + const Result_4 = IDL.Variant({ Ok: BtcGetPendingTransactionsReponse, Err: BtcAddPendingTransactionError }); @@ -123,7 +136,7 @@ export const idlFactory = ({ IDL }) => { PendingTransactions: IDL.Null, InternalError: IDL.Record({ msg: IDL.Text }) }); - const Result_4 = IDL.Variant({ + const Result_5 = IDL.Variant({ Ok: SelectedUtxosFeeResponse, Err: SelectedUtxosFeeError }); @@ -141,9 +154,15 @@ export const idlFactory = ({ IDL }) => { verified_date_timestamp: IDL.Opt(IDL.Nat64), credential_type: CredentialType }); + const DappCarouselSettings = IDL.Record({ + hidden_dapp_ids: IDL.Vec(IDL.Text) + }); + const DappSettings = IDL.Record({ dapp_carousel: DappCarouselSettings }); + const Settings = IDL.Record({ dapp: DappSettings }); const UserProfile = IDL.Record({ credentials: IDL.Vec(UserCredential), version: IDL.Opt(IDL.Nat64), + settings: Settings, created_timestamp: IDL.Nat64, updated_timestamp: IDL.Nat64 }); @@ -171,7 +190,7 @@ export const idlFactory = ({ IDL }) => { module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)) }); const GetUserProfileError = IDL.Variant({ NotFound: IDL.Null }); - const Result_5 = IDL.Variant({ + const Result_6 = IDL.Variant({ Ok: UserProfile, Err: GetUserProfileError }); @@ -252,8 +271,8 @@ export const idlFactory = ({ IDL }) => { to: IDL.Principal, progress: MigrationProgress }); - const Result_6 = IDL.Variant({ Ok: MigrationReport, Err: IDL.Text }); - const Result_7 = IDL.Variant({ Ok: IDL.Null, Err: IDL.Text }); + const Result_7 = IDL.Variant({ Ok: MigrationReport, Err: IDL.Text }); + const Result_8 = IDL.Variant({ Ok: IDL.Null, Err: IDL.Text }); const UserTokenId = IDL.Record({ chain_id: IDL.Nat64, contract_address: IDL.Text @@ -279,28 +298,29 @@ export const idlFactory = ({ IDL }) => { available: IDL.Nat }) }); - const Result_8 = IDL.Variant({ + const Result_9 = IDL.Variant({ Ok: TopUpCyclesLedgerResponse, Err: TopUpCyclesLedgerError }); return IDL.Service({ add_user_credential: IDL.Func([AddUserCredentialRequest], [Result], []), - allow_signing: IDL.Func([], [Result_1], []), - btc_add_pending_transaction: IDL.Func([BtcAddPendingTransactionRequest], [Result_2], []), - btc_get_pending_transactions: IDL.Func([BtcGetPendingTransactionsRequest], [Result_3], []), - btc_select_user_utxos_fee: IDL.Func([SelectedUtxosFeeRequest], [Result_4], []), + add_user_hidden_dapp_id: IDL.Func([AddHiddenDappIdRequest], [Result_1], []), + allow_signing: IDL.Func([], [Result_2], []), + btc_add_pending_transaction: IDL.Func([BtcAddPendingTransactionRequest], [Result_3], []), + btc_get_pending_transactions: IDL.Func([BtcGetPendingTransactionsRequest], [Result_4], []), + btc_select_user_utxos_fee: IDL.Func([SelectedUtxosFeeRequest], [Result_5], []), bulk_up: IDL.Func([IDL.Vec(IDL.Nat8)], [], []), config: IDL.Func([], [Config]), create_user_profile: IDL.Func([], [UserProfile], []), get_canister_status: IDL.Func([], [CanisterStatusResultV2], []), - get_user_profile: IDL.Func([], [Result_5]), + get_user_profile: IDL.Func([], [Result_6]), http_request: IDL.Func([HttpRequest], [HttpResponse]), list_custom_tokens: IDL.Func([], [IDL.Vec(CustomToken)]), list_user_tokens: IDL.Func([], [IDL.Vec(UserToken)]), list_users: IDL.Func([ListUsersRequest], [ListUsersResponse]), - migrate_user_data_to: IDL.Func([IDL.Principal], [Result_6], []), + migrate_user_data_to: IDL.Func([IDL.Principal], [Result_7], []), migration: IDL.Func([], [IDL.Opt(MigrationReport)]), - migration_stop_timer: IDL.Func([], [Result_7], []), + migration_stop_timer: IDL.Func([], [Result_8], []), remove_user_token: IDL.Func([UserTokenId], [], []), set_custom_token: IDL.Func([CustomToken], [], []), set_guards: IDL.Func([Guards], [], []), @@ -309,7 +329,7 @@ export const idlFactory = ({ IDL }) => { set_user_token: IDL.Func([UserToken], [], []), stats: IDL.Func([], [Stats]), step_migration: IDL.Func([], [], []), - top_up_cycles_ledger: IDL.Func([IDL.Opt(TopUpCyclesLedgerRequest)], [Result_8], []) + top_up_cycles_ledger: IDL.Func([IDL.Opt(TopUpCyclesLedgerRequest)], [Result_9], []) }); }; // @ts-ignore diff --git a/src/declarations/backend/backend.factory.did.js b/src/declarations/backend/backend.factory.did.js index fda8a02f6c..0934455cb3 100644 --- a/src/declarations/backend/backend.factory.did.js +++ b/src/declarations/backend/backend.factory.did.js @@ -48,6 +48,19 @@ export const idlFactory = ({ IDL }) => { Ok: IDL.Null, Err: AddUserCredentialError }); + const AddHiddenDappIdRequest = IDL.Record({ + current_user_version: IDL.Opt(IDL.Nat64), + dapp_id: IDL.Text + }); + const AddDappSettingsError = IDL.Variant({ + DappIdAlreadyHidden: IDL.Null, + VersionMismatch: IDL.Null, + UserNotFound: IDL.Null + }); + const Result_1 = IDL.Variant({ + Ok: IDL.Null, + Err: AddDappSettingsError + }); const ApproveError = IDL.Variant({ GenericError: IDL.Record({ message: IDL.Text, @@ -67,7 +80,7 @@ export const idlFactory = ({ IDL }) => { Other: IDL.Text, FailedToContactCyclesLedger: IDL.Null }); - const Result_1 = IDL.Variant({ Ok: IDL.Null, Err: AllowSigningError }); + const Result_2 = IDL.Variant({ Ok: IDL.Null, Err: AllowSigningError }); const BitcoinNetwork = IDL.Variant({ mainnet: IDL.Null, regtest: IDL.Null, @@ -91,7 +104,7 @@ export const idlFactory = ({ IDL }) => { const BtcAddPendingTransactionError = IDL.Variant({ InternalError: IDL.Record({ msg: IDL.Text }) }); - const Result_2 = IDL.Variant({ + const Result_3 = IDL.Variant({ Ok: IDL.Null, Err: BtcAddPendingTransactionError }); @@ -106,7 +119,7 @@ export const idlFactory = ({ IDL }) => { const BtcGetPendingTransactionsReponse = IDL.Record({ transactions: IDL.Vec(PendingTransaction) }); - const Result_3 = IDL.Variant({ + const Result_4 = IDL.Variant({ Ok: BtcGetPendingTransactionsReponse, Err: BtcAddPendingTransactionError }); @@ -123,7 +136,7 @@ export const idlFactory = ({ IDL }) => { PendingTransactions: IDL.Null, InternalError: IDL.Record({ msg: IDL.Text }) }); - const Result_4 = IDL.Variant({ + const Result_5 = IDL.Variant({ Ok: SelectedUtxosFeeResponse, Err: SelectedUtxosFeeError }); @@ -141,9 +154,15 @@ export const idlFactory = ({ IDL }) => { verified_date_timestamp: IDL.Opt(IDL.Nat64), credential_type: CredentialType }); + const DappCarouselSettings = IDL.Record({ + hidden_dapp_ids: IDL.Vec(IDL.Text) + }); + const DappSettings = IDL.Record({ dapp_carousel: DappCarouselSettings }); + const Settings = IDL.Record({ dapp: DappSettings }); const UserProfile = IDL.Record({ credentials: IDL.Vec(UserCredential), version: IDL.Opt(IDL.Nat64), + settings: Settings, created_timestamp: IDL.Nat64, updated_timestamp: IDL.Nat64 }); @@ -171,7 +190,7 @@ export const idlFactory = ({ IDL }) => { module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)) }); const GetUserProfileError = IDL.Variant({ NotFound: IDL.Null }); - const Result_5 = IDL.Variant({ + const Result_6 = IDL.Variant({ Ok: UserProfile, Err: GetUserProfileError }); @@ -252,8 +271,8 @@ export const idlFactory = ({ IDL }) => { to: IDL.Principal, progress: MigrationProgress }); - const Result_6 = IDL.Variant({ Ok: MigrationReport, Err: IDL.Text }); - const Result_7 = IDL.Variant({ Ok: IDL.Null, Err: IDL.Text }); + const Result_7 = IDL.Variant({ Ok: MigrationReport, Err: IDL.Text }); + const Result_8 = IDL.Variant({ Ok: IDL.Null, Err: IDL.Text }); const UserTokenId = IDL.Record({ chain_id: IDL.Nat64, contract_address: IDL.Text @@ -279,28 +298,29 @@ export const idlFactory = ({ IDL }) => { available: IDL.Nat }) }); - const Result_8 = IDL.Variant({ + const Result_9 = IDL.Variant({ Ok: TopUpCyclesLedgerResponse, Err: TopUpCyclesLedgerError }); return IDL.Service({ add_user_credential: IDL.Func([AddUserCredentialRequest], [Result], []), - allow_signing: IDL.Func([], [Result_1], []), - btc_add_pending_transaction: IDL.Func([BtcAddPendingTransactionRequest], [Result_2], []), - btc_get_pending_transactions: IDL.Func([BtcGetPendingTransactionsRequest], [Result_3], []), - btc_select_user_utxos_fee: IDL.Func([SelectedUtxosFeeRequest], [Result_4], []), + add_user_hidden_dapp_id: IDL.Func([AddHiddenDappIdRequest], [Result_1], []), + allow_signing: IDL.Func([], [Result_2], []), + btc_add_pending_transaction: IDL.Func([BtcAddPendingTransactionRequest], [Result_3], []), + btc_get_pending_transactions: IDL.Func([BtcGetPendingTransactionsRequest], [Result_4], []), + btc_select_user_utxos_fee: IDL.Func([SelectedUtxosFeeRequest], [Result_5], []), bulk_up: IDL.Func([IDL.Vec(IDL.Nat8)], [], []), config: IDL.Func([], [Config], ['query']), create_user_profile: IDL.Func([], [UserProfile], []), get_canister_status: IDL.Func([], [CanisterStatusResultV2], []), - get_user_profile: IDL.Func([], [Result_5], ['query']), + get_user_profile: IDL.Func([], [Result_6], ['query']), http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']), list_custom_tokens: IDL.Func([], [IDL.Vec(CustomToken)], ['query']), list_user_tokens: IDL.Func([], [IDL.Vec(UserToken)], ['query']), list_users: IDL.Func([ListUsersRequest], [ListUsersResponse], ['query']), - migrate_user_data_to: IDL.Func([IDL.Principal], [Result_6], []), + migrate_user_data_to: IDL.Func([IDL.Principal], [Result_7], []), migration: IDL.Func([], [IDL.Opt(MigrationReport)], ['query']), - migration_stop_timer: IDL.Func([], [Result_7], []), + migration_stop_timer: IDL.Func([], [Result_8], []), remove_user_token: IDL.Func([UserTokenId], [], []), set_custom_token: IDL.Func([CustomToken], [], []), set_guards: IDL.Func([Guards], [], []), @@ -309,7 +329,7 @@ export const idlFactory = ({ IDL }) => { set_user_token: IDL.Func([UserToken], [], []), stats: IDL.Func([], [Stats], ['query']), step_migration: IDL.Func([], [], []), - top_up_cycles_ledger: IDL.Func([IDL.Opt(TopUpCyclesLedgerRequest)], [Result_8], []) + top_up_cycles_ledger: IDL.Func([IDL.Opt(TopUpCyclesLedgerRequest)], [Result_9], []) }); }; // @ts-ignore