summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/backup/export.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/backup/export.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/backup/export.ts54
1 files changed, 45 insertions, 9 deletions
diff --git a/packages/taler-wallet-core/src/operations/backup/export.ts b/packages/taler-wallet-core/src/operations/backup/export.ts
index c6e24289f..07c7b9ece 100644
--- a/packages/taler-wallet-core/src/operations/backup/export.ts
+++ b/packages/taler-wallet-core/src/operations/backup/export.ts
@@ -14,15 +14,6 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-import { hash } from "../../crypto/primitives/nacl-fast";
-import { WalletBackupContentV1, BackupExchange, BackupCoin, BackupDenomination, BackupReserve, BackupPurchase, BackupProposal, BackupRefreshGroup, BackupBackupProvider, BackupTip, BackupRecoupGroup, BackupWithdrawalGroup, BackupBackupProviderTerms, BackupCoinSource, BackupCoinSourceType, BackupExchangeWireFee, BackupRefundItem, BackupRefundState, BackupProposalStatus, BackupRefreshOldCoin, BackupRefreshSession } from "@gnu-taler/taler-util";
-import { canonicalizeBaseUrl, canonicalJson } from "../../util/helpers";
-import { InternalWalletState } from "../state";
-import { provideBackupState, getWalletBackupState, WALLET_BACKUP_STATE_KEY } from "./state";
-import { Amounts, getTimestampNow } from "@gnu-taler/taler-util";
-import { Stores, CoinSourceType, CoinStatus, RefundState, AbortStatus, ProposalStatus } from "../../db.js";
-import { encodeCrock, stringToBytes, getRandomBytes } from "../../index.js";
-
/**
* Implementation of wallet backups (export/import/upload) and sync
* server management.
@@ -30,6 +21,51 @@ import { encodeCrock, stringToBytes, getRandomBytes } from "../../index.js";
* @author Florian Dold <dold@taler.net>
*/
+/**
+ * Imports.
+ */
+import { hash } from "../../crypto/primitives/nacl-fast";
+import {
+ WalletBackupContentV1,
+ BackupExchange,
+ BackupCoin,
+ BackupDenomination,
+ BackupReserve,
+ BackupPurchase,
+ BackupProposal,
+ BackupRefreshGroup,
+ BackupBackupProvider,
+ BackupTip,
+ BackupRecoupGroup,
+ BackupWithdrawalGroup,
+ BackupBackupProviderTerms,
+ BackupCoinSource,
+ BackupCoinSourceType,
+ BackupExchangeWireFee,
+ BackupRefundItem,
+ BackupRefundState,
+ BackupProposalStatus,
+ BackupRefreshOldCoin,
+ BackupRefreshSession,
+} from "@gnu-taler/taler-util";
+import { InternalWalletState } from "../state";
+import {
+ provideBackupState,
+ getWalletBackupState,
+ WALLET_BACKUP_STATE_KEY,
+} from "./state";
+import { Amounts, getTimestampNow } from "@gnu-taler/taler-util";
+import {
+ Stores,
+ CoinSourceType,
+ CoinStatus,
+ RefundState,
+ AbortStatus,
+ ProposalStatus,
+} from "../../db.js";
+import { encodeCrock, stringToBytes, getRandomBytes } from "../../index.js";
+import { canonicalizeBaseUrl, canonicalJson } from "@gnu-taler/taler-util";
+
export async function exportBackup(
ws: InternalWalletState,
): Promise<WalletBackupContentV1> {