Skip to content

Commit 4acd4fd

Browse files
committed
refactor(web-client,sdk-typescript): move msgpack to nautilus-wallet-client-core
This includes both the module and library dependency.
1 parent 25a7e5e commit 4acd4fd

File tree

9 files changed

+93
-31
lines changed

9 files changed

+93
-31
lines changed

web-client-workspace/package-lock.json

Lines changed: 17 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web-client-workspace/sdk-typescript/packages/nautilus-wallet-client-core/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@
1515
"prettier": "^2.5.1",
1616
"prettier-plugin-organize-imports": "^2.3.4",
1717
"typescript": "^4.5.4"
18+
},
19+
"dependencies": {
20+
"@msgpack/msgpack": "^2.7.1"
1821
}
1922
}

web-client-workspace/web-client/src/schema/msgpack.ts renamed to web-client-workspace/sdk-typescript/packages/nautilus-wallet-client-core/src/codec/msgpack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** MessagePack helper functions. */
22

33
import { Decoder, Encoder } from '@msgpack/msgpack';
4-
import { Bytes } from 'nautilus-wallet-client-core/schema/types';
4+
import { Bytes } from '../schema/types';
55

66
/// Enable for verbose from_msgpack / to_msgpack console debugging logs.
77
const LOG_DEBUG = false;

web-client-workspace/sdk-typescript/yarn.lock

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,67 @@
33

44
__metadata:
55
version: 5
6+
cacheKey: 8
7+
8+
"@msgpack/msgpack@npm:^2.7.1":
9+
version: 2.7.1
10+
resolution: "@msgpack/msgpack@npm:2.7.1"
11+
checksum: 29b4eb42aa8b300944165e1fe88c022662680b77905c108dcadba8350cc3496d56fb4de4e009d9660e7e84d5e35d206b3b829293f7d0d5944a48be60ee0ab278
12+
languageName: node
13+
linkType: hard
14+
15+
"nautilus-wallet-client-core@workspace:packages/nautilus-wallet-client-core":
16+
version: 0.0.0-use.local
17+
resolution: "nautilus-wallet-client-core@workspace:packages/nautilus-wallet-client-core"
18+
dependencies:
19+
"@msgpack/msgpack": ^2.7.1
20+
prettier: ^2.5.1
21+
prettier-plugin-organize-imports: ^2.3.4
22+
typescript: ^4.5.4
23+
languageName: unknown
24+
linkType: soft
25+
26+
"prettier-plugin-organize-imports@npm:^2.3.4":
27+
version: 2.3.4
28+
resolution: "prettier-plugin-organize-imports@npm:2.3.4"
29+
peerDependencies:
30+
prettier: ">=2.0"
31+
typescript: ">=2.9"
32+
checksum: 2298fcae0f16fd1a095cc3a33ba5d51b679b291518d404ad5eaca56fdcfbd55d35e26c5adffcb8664bfb45c2339b551b385cf03f48888c46d0348843d96024e1
33+
languageName: node
34+
linkType: hard
35+
36+
"prettier@npm:^2.5.1":
37+
version: 2.5.1
38+
resolution: "prettier@npm:2.5.1"
39+
bin:
40+
prettier: bin-prettier.js
41+
checksum: 21b9408476ea1c544b0e45d51ceb94a84789ff92095abb710942d780c862d0daebdb29972d47f6b4d0f7ebbfb0ffbf56cc2cfa3e3e9d1cca54864af185b15b66
42+
languageName: node
43+
linkType: hard
644

745
"sdk-typescript@workspace:.":
846
version: 0.0.0-use.local
947
resolution: "sdk-typescript@workspace:."
1048
languageName: unknown
1149
linkType: soft
50+
51+
"typescript@npm:^4.5.4":
52+
version: 4.5.4
53+
resolution: "typescript@npm:4.5.4"
54+
bin:
55+
tsc: bin/tsc
56+
tsserver: bin/tsserver
57+
checksum: 59f3243f9cd6fe3161e6150ff6bf795fc843b4234a655dbd938a310515e0d61afd1ac942799e7415e4334255e41c2c49b7dd5d9fd38a17acd25a6779ca7e0961
58+
languageName: node
59+
linkType: hard
60+
61+
"typescript@patch:typescript@^4.5.4#~builtin<compat/typescript>":
62+
version: 4.5.4
63+
resolution: "typescript@patch:typescript@npm%3A4.5.4#~builtin<compat/typescript>::version=4.5.4&hash=493e53"
64+
bin:
65+
tsc: bin/tsc
66+
tsserver: bin/tsserver
67+
checksum: 2e488dde7d2c4a2fa2e79cf2470600f8ce81bc0563c276b72df8ff412d74456ae532ba824650ae936ce207440c79720ddcfaa25e3cb4477572b8534fa4e34d49
68+
languageName: node
69+
linkType: hard

web-client-workspace/web-client/package-lock.json

Lines changed: 4 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web-client-workspace/web-client/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"@fortawesome/free-solid-svg-icons": "^5.15.4",
4949
"@ionic/angular": "^6.0.0",
5050
"@ionic/pwa-elements": "^3.1.0",
51-
"@msgpack/msgpack": "^2.7.1",
5251
"@ngneat/input-mask": "^3.0.4",
5352
"@ngneat/transloco": "^3.1.1",
5453
"@sentry/angular": "^6.16.1",

web-client-workspace/web-client/src/app/services/enclave/enclave.service.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ import {
33
HttpTestingController,
44
} from '@angular/common/http/testing';
55
import { TestBed } from '@angular/core/testing';
6+
import {
7+
from_msgpack_as,
8+
to_msgpack_as,
9+
} from 'nautilus-wallet-client-core/codec/msgpack';
610
import {
711
CreateWallet,
812
CreateWalletResult,
@@ -16,7 +20,6 @@ import {
1620
import { environment } from 'src/environments/environment';
1721
import { AttestationReport } from 'src/schema/attestation';
1822
import { TweetNaClCrypto } from 'src/schema/crypto';
19-
import { from_msgpack_as, to_msgpack_as } from 'src/schema/msgpack';
2023
import {
2124
SealedMessage,
2225
seal_msgpack_as,

web-client-workspace/web-client/src/app/services/enclave/enclave.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { HttpClient } from '@angular/common/http';
22
import { Injectable } from '@angular/core';
33
import algosdk from 'algosdk';
4+
import { from_msgpack_as } from 'nautilus-wallet-client-core/codec/msgpack';
45
import {
56
CreateWallet,
67
CreateWalletResult,
@@ -17,7 +18,6 @@ import {
1718
} from 'src/schema/algorand.helpers';
1819
import { AttestationReport } from 'src/schema/attestation';
1920
import { PublicKey, TweetNaClCrypto } from 'src/schema/crypto';
20-
import { from_msgpack_as } from 'src/schema/msgpack';
2121
import { seal_msgpack_as, unseal_msgpack_as } from 'src/schema/sealing';
2222
import { TransactionConfirmation, waitForConfirmation } from '../algosdk.utils';
2323

web-client-workspace/web-client/src/schema/sealing.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
/** [`SealedMessage`] sealing and unsealing. */
22

3+
import {
4+
from_msgpack,
5+
from_msgpack_as,
6+
to_msgpack,
7+
} from 'nautilus-wallet-client-core/codec/msgpack';
38
import { Bytes } from 'nautilus-wallet-client-core/schema/types';
49
import { Nonce, PublicKey, TweetNaClCrypto } from './crypto';
5-
import { from_msgpack, from_msgpack_as, to_msgpack } from './msgpack';
610

711
/** A sealed message */
812
export type SealedMessage = {

0 commit comments

Comments
 (0)