summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-10-07 12:01:40 +0200
committerFlorian Dold <florian@dold.me>2021-10-07 12:01:40 +0200
commite2fe2d6db16b422ee6d69ef03f1393e1f0f42749 (patch)
tree7016f657b08b284afd62a55752baeab69d7be946 /packages/taler-wallet-core/src/operations
parent2c3456608e8e87a86a5b2f62301b4ea78a2cb00d (diff)
downloadwallet-core-e2fe2d6db16b422ee6d69ef03f1393e1f0f42749.tar.gz
wallet-core-e2fe2d6db16b422ee6d69ef03f1393e1f0f42749.tar.bz2
wallet-core-e2fe2d6db16b422ee6d69ef03f1393e1f0f42749.zip
add anastasis skeleton, put crypto in taler-util
Diffstat (limited to 'packages/taler-wallet-core/src/operations')
-rw-r--r--packages/taler-wallet-core/src/operations/backup/export.ts8
-rw-r--r--packages/taler-wallet-core/src/operations/backup/index.ts6
-rw-r--r--packages/taler-wallet-core/src/operations/backup/state.ts2
-rw-r--r--packages/taler-wallet-core/src/operations/deposits.ts4
-rw-r--r--packages/taler-wallet-core/src/operations/exchanges.ts2
-rw-r--r--packages/taler-wallet-core/src/operations/pay.ts2
-rw-r--r--packages/taler-wallet-core/src/operations/recoup.ts2
-rw-r--r--packages/taler-wallet-core/src/operations/refresh.ts2
-rw-r--r--packages/taler-wallet-core/src/operations/reserves.ts4
-rw-r--r--packages/taler-wallet-core/src/operations/tip.ts2
10 files changed, 16 insertions, 18 deletions
diff --git a/packages/taler-wallet-core/src/operations/backup/export.ts b/packages/taler-wallet-core/src/operations/backup/export.ts
index 0410ab3af..a66bc2e84 100644
--- a/packages/taler-wallet-core/src/operations/backup/export.ts
+++ b/packages/taler-wallet-core/src/operations/backup/export.ts
@@ -53,14 +53,12 @@ import {
Logger,
timestampToIsoString,
WalletBackupContentV1,
-} from "@gnu-taler/taler-util";
-import { InternalWalletState } from "../../common.js";
-import { hash } from "../../crypto/primitives/nacl-fast.js";
-import {
+ hash,
encodeCrock,
getRandomBytes,
stringToBytes,
-} from "../../crypto/talerCrypto.js";
+} from "@gnu-taler/taler-util";
+import { InternalWalletState } from "../../common.js";
import {
AbortStatus,
CoinSourceType,
diff --git a/packages/taler-wallet-core/src/operations/backup/index.ts b/packages/taler-wallet-core/src/operations/backup/index.ts
index b3b98fe1b..913ffcb2e 100644
--- a/packages/taler-wallet-core/src/operations/backup/index.ts
+++ b/packages/taler-wallet-core/src/operations/backup/index.ts
@@ -55,11 +55,11 @@ import {
} from "@gnu-taler/taler-util";
import { gunzipSync, gzipSync } from "fflate";
import { InternalWalletState } from "../../common.js";
-import { kdf } from "../../crypto/primitives/kdf.js";
+import { kdf } from "@gnu-taler/taler-util";
import {
secretbox,
secretbox_open,
-} from "../../crypto/primitives/nacl-fast.js";
+} from "@gnu-taler/taler-util";
import {
bytesToString,
decodeCrock,
@@ -70,7 +70,7 @@ import {
hash,
rsaBlind,
stringToBytes,
-} from "../../crypto/talerCrypto.js";
+} from "@gnu-taler/taler-util";
import { CryptoApi } from "../../crypto/workers/cryptoApi.js";
import {
BackupProviderRecord,
diff --git a/packages/taler-wallet-core/src/operations/backup/state.ts b/packages/taler-wallet-core/src/operations/backup/state.ts
index 3a7311d14..dc89c3d99 100644
--- a/packages/taler-wallet-core/src/operations/backup/state.ts
+++ b/packages/taler-wallet-core/src/operations/backup/state.ts
@@ -14,7 +14,7 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-import { encodeCrock, getRandomBytes } from "../../crypto/talerCrypto.js";
+import { encodeCrock, getRandomBytes } from "@gnu-taler/taler-util";
import {
ConfigRecord,
WalletBackupConfState,
diff --git a/packages/taler-wallet-core/src/operations/deposits.ts b/packages/taler-wallet-core/src/operations/deposits.ts
index c6c80ce9f..740242050 100644
--- a/packages/taler-wallet-core/src/operations/deposits.ts
+++ b/packages/taler-wallet-core/src/operations/deposits.ts
@@ -39,12 +39,12 @@ import {
URL,
} from "@gnu-taler/taler-util";
import { InternalWalletState } from "../common.js";
-import { kdf } from "../crypto/primitives/kdf.js";
+import { kdf } from "@gnu-taler/taler-util";
import {
encodeCrock,
getRandomBytes,
stringToBytes,
-} from "../crypto/talerCrypto.js";
+} from "@gnu-taler/taler-util";
import { DepositGroupRecord } from "../db.js";
import { guardOperationException } from "../errors.js";
import { selectPayCoins } from "../util/coinSelection.js";
diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts b/packages/taler-wallet-core/src/operations/exchanges.ts
index 9cd20c673..fc776c81f 100644
--- a/packages/taler-wallet-core/src/operations/exchanges.ts
+++ b/packages/taler-wallet-core/src/operations/exchanges.ts
@@ -40,7 +40,7 @@ import {
TalerErrorDetails,
Timestamp,
} from "@gnu-taler/taler-util";
-import { decodeCrock, encodeCrock, hash } from "../crypto/talerCrypto.js";
+import { decodeCrock, encodeCrock, hash } from "@gnu-taler/taler-util";
import { CryptoApi } from "../crypto/workers/cryptoApi.js";
import {
DenominationRecord,
diff --git a/packages/taler-wallet-core/src/operations/pay.ts b/packages/taler-wallet-core/src/operations/pay.ts
index 91268400a..079ffcd9a 100644
--- a/packages/taler-wallet-core/src/operations/pay.ts
+++ b/packages/taler-wallet-core/src/operations/pay.ts
@@ -54,7 +54,7 @@ import {
URL,
getDurationRemaining,
} from "@gnu-taler/taler-util";
-import { encodeCrock, getRandomBytes } from "../crypto/talerCrypto.js";
+import { encodeCrock, getRandomBytes } from "@gnu-taler/taler-util";
import {
PayCoinSelection,
CoinCandidateSelection,
diff --git a/packages/taler-wallet-core/src/operations/recoup.ts b/packages/taler-wallet-core/src/operations/recoup.ts
index 634469923..b1f46e4ba 100644
--- a/packages/taler-wallet-core/src/operations/recoup.ts
+++ b/packages/taler-wallet-core/src/operations/recoup.ts
@@ -32,7 +32,7 @@ import {
RefreshReason,
TalerErrorDetails,
} from "@gnu-taler/taler-util";
-import { encodeCrock, getRandomBytes } from "../crypto/talerCrypto.js";
+import { encodeCrock, getRandomBytes } from "@gnu-taler/taler-util";
import {
CoinRecord,
CoinSourceType,
diff --git a/packages/taler-wallet-core/src/operations/refresh.ts b/packages/taler-wallet-core/src/operations/refresh.ts
index a7b64f5d3..85de813dc 100644
--- a/packages/taler-wallet-core/src/operations/refresh.ts
+++ b/packages/taler-wallet-core/src/operations/refresh.ts
@@ -14,7 +14,7 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-import { encodeCrock, getRandomBytes } from "../crypto/talerCrypto.js";
+import { encodeCrock, getRandomBytes } from "@gnu-taler/taler-util";
import {
CoinRecord,
CoinSourceType,
diff --git a/packages/taler-wallet-core/src/operations/reserves.ts b/packages/taler-wallet-core/src/operations/reserves.ts
index 4cbb9b9b5..4b5862bef 100644
--- a/packages/taler-wallet-core/src/operations/reserves.ts
+++ b/packages/taler-wallet-core/src/operations/reserves.ts
@@ -32,7 +32,7 @@ import {
TalerErrorCode,
addPaytoQueryParams,
} from "@gnu-taler/taler-util";
-import { randomBytes } from "../crypto/primitives/nacl-fast.js";
+import { randomBytes } from "@gnu-taler/taler-util";
import {
ReserveRecordStatus,
ReserveBankInfo,
@@ -63,7 +63,7 @@ import {
processWithdrawGroup,
getBankWithdrawalInfo,
} from "./withdraw.js";
-import { encodeCrock, getRandomBytes } from "../crypto/talerCrypto.js";
+import { encodeCrock, getRandomBytes } from "@gnu-taler/taler-util";
import { Logger, URL } from "@gnu-taler/taler-util";
import {
readSuccessResponseJsonOrErrorCode,
diff --git a/packages/taler-wallet-core/src/operations/tip.ts b/packages/taler-wallet-core/src/operations/tip.ts
index 29eeb8d59..a90e5270f 100644
--- a/packages/taler-wallet-core/src/operations/tip.ts
+++ b/packages/taler-wallet-core/src/operations/tip.ts
@@ -55,7 +55,7 @@ import {
getHttpResponseErrorDetails,
readSuccessResponseJsonOrThrow,
} from "../util/http.js";
-import { encodeCrock, getRandomBytes } from "../crypto/talerCrypto.js";
+import { encodeCrock, getRandomBytes } from "@gnu-taler/taler-util";
const logger = new Logger("operations/tip.ts");