Skip to content

Commit 6491844

Browse files
authored
Merge pull request #81 from windingtree/fix/level-entries
Fix/level entries
2 parents aff7154 + e1bf932 commit 6491844

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+11062
-5033
lines changed

examples/client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
"react": "^18.2.0",
2222
"react-dom": "^18.2.0",
2323
"typescript": "^5.1.6",
24-
"viem": "^1.3.0",
24+
"viem": "^1.19.13",
2525
"@libp2p/interface": "^0.1.3",
2626
"luxon": "^3.3.0"
2727
},
2828
"dependencies": {
29-
"superjson": "^1.13.1"
29+
"superjson": "^2.2.1"
3030
},
3131
"eslintConfig": {
3232
"extends": [

examples/client/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"allowSyntheticDefaultImports": true,
1010
"strict": true,
1111
"forceConsistentCasingInFileNames": true,
12-
"module": "ESNext",
12+
"module": "NodeNext",
1313
"moduleResolution": "NodeNext",
1414
"resolveJsonModule": true,
1515
"isolatedModules": true,

examples/client/tsconfig.node.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"composite": true,
4-
"module": "ESNext",
4+
"module": "NodeNext",
55
"moduleResolution": "Node",
66
"allowSyntheticDefaultImports": true
77
},

examples/e2e-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@libp2p/peer-id": "^2.0.4",
3333
"@multiformats/multiaddr": "^12.1.3",
3434
"luxon": "^3.3.0",
35-
"viem": "^1.3.0"
35+
"viem": "^1.19.13"
3636
},
3737
"scripts": {
3838
"build": "echo \"no build specified\" && exit 0",

examples/e2e-tests/test/examples/node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class NodeExample {
6969
constructor() {
7070
const mnemonic = generateMnemonic();
7171
const signer = mnemonicToAccount(mnemonic);
72-
const supplierId = spId(randomSalt(), signer.address);
72+
const supplierId = spId(signer.address, randomSalt());
7373

7474
const options: NodeOptions = {
7575
topics: ['hello'],

examples/manager/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
"react": "^18.2.0",
2121
"react-dom": "^18.2.0",
2222
"typescript": "^5.1.6",
23-
"viem": "^1.3.0",
23+
"viem": "^1.19.13",
2424
"luxon": "^3.3.0"
2525
},
2626
"dependencies": {
2727
"@windingtree/contracts": "^1.0.0",
2828
"@windingtree/sdk-types": "workspace:*",
2929
"@windingtree/sdk-utils": "workspace:*",
30-
"superjson": "^1.13.1"
30+
"superjson": "^2.2.1"
3131
},
3232
"eslintConfig": {
3333
"extends": [

examples/manager/src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { App } from './App.js';
44
import {
55
AppConfig,
66
ConfigProvider,
7-
NodeProvider,
87
WalletProvider,
98
ContractsProvider,
9+
NodeProvider,
1010
} from '@windingtree/sdk-react/providers';
1111
import { hardhat, polygonZkEvmTestnet } from 'viem/chains';
1212
import { contractsConfig } from 'wtmp-examples-shared-files/dist/index.js';

examples/manager/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"allowSyntheticDefaultImports": true,
1010
"strict": true,
1111
"forceConsistentCasingInFileNames": true,
12-
"module": "ESNext",
12+
"module": "NodeNext",
1313
"moduleResolution": "NodeNext",
1414
"resolveJsonModule": true,
1515
"isolatedModules": true,

examples/node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@windingtree/sdk-utils": "workspace:*",
4242
"dotenv": "^16.3.1",
4343
"luxon": "^3.3.0",
44-
"viem": "^1.3.0",
44+
"viem": "^1.19.13",
4545
"wtmp-examples-shared-files": "workspace:*"
4646
}
4747
}

examples/node/src/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,16 @@ const main = async (): Promise<void> => {
280280
})();
281281

282282
const apiServer = new NodeApiServer({
283-
usersStorage,
284-
dealsStorage,
283+
storage: {
284+
users: usersStorage,
285+
deals: dealsStorage,
286+
},
285287
prefix: 'test',
286288
port: 3456,
287289
secret: 'secret',
288290
ownerAccount: entityOwnerAddress,
289291
protocolContracts: contractsManager,
292+
cors: ['http://localhost:5173'],
290293
});
291294

292295
apiServer.start(appRouter);

examples/shared/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@
2222
"lint": "eslint . --ext .ts --ignore-path ../../.lintignore",
2323
"lint:fix": "eslint . --ext .ts --ignore-path ../../.lintignore --fix && prettier --ignore-path ../../.lintignore --write ."
2424
},
25+
"devDependencies": {
26+
"@types/node": "^20.10.4"
27+
},
2528
"dependencies": {
26-
"viem": "^1.3.0",
29+
"viem": "^1.19.13",
2730
"@windingtree/sdk-types": "workspace:*"
2831
}
2932
}

package.json

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,28 @@
2929
},
3030
"type": "module",
3131
"devDependencies": {
32-
"@commitlint/cli": "^17.6.7",
33-
"@commitlint/config-conventional": "^17.6.7",
32+
"@commitlint/cli": "^18.4.3",
33+
"@commitlint/config-conventional": "^18.4.3",
3434
"@libp2p/crypto": "^1.0.17",
35-
"@typescript-eslint/eslint-plugin": "^6.1.0",
36-
"@typescript-eslint/parser": "^6.1.0",
37-
"@vitest/coverage-v8": "^0.33.0",
38-
"@vitest/ui": "^0.34.3",
39-
"eslint": "^8.45.0",
40-
"eslint-config-prettier": "^8.8.0",
41-
"eslint-plugin-prettier": "^5.0.0",
35+
"@types/node": "^20.10.5",
36+
"@typescript-eslint/eslint-plugin": "^6.15.0",
37+
"@typescript-eslint/parser": "^6.15.0",
38+
"@vitest/coverage-v8": "^1.1.0",
39+
"@vitest/ui": "^1.1.0",
40+
"eslint": "^8.56.0",
41+
"eslint-config-prettier": "^9.1.0",
42+
"eslint-plugin-prettier": "^5.1.1",
4243
"git-cz": "^4.9.0",
4344
"husky": "^8.0.3",
44-
"lerna": "^7.1.4",
45-
"prettier": "^3.0.0",
46-
"tsup": "^7.1.0",
47-
"typescript": "^5.1.6",
48-
"uint8arrays": "^4.0.4",
49-
"vite": "^4.4.4",
50-
"vite-plugin-dts": "^3.3.1",
51-
"vite-plugin-node-polyfills": "^0.9.0",
52-
"vitest": "^0.33.0"
45+
"lerna": "^7.4.2",
46+
"prettier": "^3.1.1",
47+
"tsup": "^8.0.1",
48+
"typescript": "^5.3.3",
49+
"uint8arrays": "^5.0.0",
50+
"vite": "^5.0.10",
51+
"vite-plugin-dts": "^3.6.4",
52+
"vite-plugin-node-polyfills": "^0.17.0",
53+
"vitest": "^1.1.0"
5354
},
5455
"scripts": {
5556
"prepare": "husky install",

packages/client/CHANGELOG.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,44 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6-
# [1.2.0-beta.1](https://github.com/windingtree/sdk/compare/@windingtree/sdk-client@1.2.0-beta.0...@windingtree/sdk-client@1.2.0-beta.1) (2023-10-25)
6+
## [1.3.2](https://github.com/windingtree/sdk/compare/@windingtree/sdk-client@1.3.1...@windingtree/sdk-client@1.3.2) (2023-12-22)
7+
8+
**Note:** Version bump only for package @windingtree/sdk-client
9+
10+
## [1.3.1](https://github.com/windingtree/sdk/compare/@windingtree/sdk-client@1.3.0...@windingtree/sdk-client@1.3.1) (2023-12-11)
711

12+
### Bug Fixes
13+
14+
- 🐛 Fixed wrong arguments order in the supplierId utility ([904ee70](https://github.com/windingtree/sdk/commit/904ee70f7e906b68ae01f86de7d08d956fbf7688))
15+
16+
# [1.3.0](https://github.com/windingtree/sdk/compare/@windingtree/sdk-client@1.2.2...@windingtree/sdk-client@1.3.0) (2023-11-29)
817

918
### Features
1019

11-
* add force param to subscribe method in requests manager ([ab77a45](https://github.com/windingtree/sdk/commit/ab77a45712c9dd7ce98ff4fccdea56cf1682137d))
12-
* move renew subscribe flow to request manager ([90009e2](https://github.com/windingtree/sdk/commit/90009e2c20ef8b9a472cb3d5978b844280e928fc))
13-
* update libp2p ([71daad4](https://github.com/windingtree/sdk/commit/71daad41838ae6b2833c76aa36b5b2071a041e92))
14-
* update reconnect flow, update e2e tests ([73da6f9](https://github.com/windingtree/sdk/commit/73da6f97656592b03851c95f45bcb955937e2a8d))
20+
- update superjson ([1a83a91](https://github.com/windingtree/sdk/commit/1a83a91e8467c6cddbb15c67d08cbe30fb6d9633))
21+
22+
## [1.2.2](https://github.com/windingtree/sdk/compare/@windingtree/sdk-client@1.2.1...@windingtree/sdk-client@1.2.2) (2023-10-31)
23+
24+
### Bug Fixes
1525

26+
- 🐛 Fixed file ext for cjs modules ([6f985f2](https://github.com/windingtree/sdk/commit/6f985f2a6b076abdf145176d5036fe89267f2c5a))
1627

28+
## [1.2.1](https://github.com/windingtree/sdk/compare/@windingtree/sdk-client@1.2.0...@windingtree/sdk-client@1.2.1) (2023-10-31)
1729

30+
**Note:** Version bump only for package @windingtree/sdk-client
31+
32+
# [1.2.0](https://github.com/windingtree/sdk/compare/@windingtree/sdk-client@1.2.0-beta.1...@windingtree/sdk-client@1.2.0) (2023-10-25)
33+
34+
**Note:** Version bump only for package @windingtree/sdk-client
35+
36+
# [1.2.0-beta.1](https://github.com/windingtree/sdk/compare/@windingtree/sdk-client@1.2.0-beta.0...@windingtree/sdk-client@1.2.0-beta.1) (2023-10-25)
37+
38+
### Features
1839

40+
- add force param to subscribe method in requests manager ([ab77a45](https://github.com/windingtree/sdk/commit/ab77a45712c9dd7ce98ff4fccdea56cf1682137d))
41+
- move renew subscribe flow to request manager ([90009e2](https://github.com/windingtree/sdk/commit/90009e2c20ef8b9a472cb3d5978b844280e928fc))
42+
- update libp2p ([71daad4](https://github.com/windingtree/sdk/commit/71daad41838ae6b2833c76aa36b5b2071a041e92))
43+
- update reconnect flow, update e2e tests ([73da6f9](https://github.com/windingtree/sdk/commit/73da6f97656592b03851c95f45bcb955937e2a8d))
1944

2045
# [1.2.0-beta.0](https://github.com/windingtree/sdk/compare/@windingtree/sdk-client@1.1.0...@windingtree/sdk-client@1.2.0-beta.0) (2023-07-31)
2146

packages/client/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@windingtree/sdk-client",
3-
"version": "1.2.0-beta.1",
3+
"version": "1.3.2",
44
"description": "The WindingTree market protocol client",
55
"repository": "https://github.com/windingtree/sdk#readme",
66
"author": "Kostiantyn Smyrnov <kostysh@gmail.com>",
@@ -10,7 +10,7 @@
1010
"dist"
1111
],
1212
"types": "./dist/index.d.ts",
13-
"main": "./dist/index.cjs.js",
13+
"main": "./dist/index.cjs",
1414
"module": "./dist/index.js",
1515
"exports": {
1616
".": {
@@ -20,7 +20,7 @@
2020
},
2121
"require": {
2222
"types": "./dist/index.d.ts",
23-
"default": "./dist/index.cjs.js"
23+
"default": "./dist/index.cjs"
2424
}
2525
}
2626
},
@@ -38,7 +38,7 @@
3838
"@libp2p/mplex": "^9.0.8",
3939
"@libp2p/peer-id": "^3.0.3",
4040
"@libp2p/websockets": "^7.0.9",
41-
"@multiformats/multiaddr": "^12.1.3",
41+
"@multiformats/multiaddr": "^12.1.11",
4242
"@windingtree/sdk-contracts-manager": "workspace:*",
4343
"@windingtree/sdk-logger": "workspace:*",
4444
"@windingtree/sdk-messages": "workspace:*",
@@ -47,8 +47,8 @@
4747
"@windingtree/sdk-types": "workspace:*",
4848
"@windingtree/sdk-utils": "workspace:*",
4949
"libp2p": "^0.46.14",
50-
"superjson": "^2.0.0",
51-
"viem": "^1.3.0"
50+
"superjson": "^2.2.1",
51+
"viem": "^1.19.13"
5252
},
5353
"scripts": {
5454
"build": "tsup",

packages/client/src/dealsManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class ClientDealsManager<
9999
private contracts: Contracts;
100100
private chain: Chain;
101101
private storageKeyPrefix: string;
102-
private checkInterval?: NodeJS.Timer;
102+
private checkInterval?: NodeJS.Timeout;
103103
private ongoingCheck = false;
104104

105105
/**

packages/client/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export class Client<
145145
/** Server is connected */
146146
private serverConnected = false;
147147
/** Entity for stop timer after reconnect */
148-
private connectionInterval?: NodeJS.Timer;
148+
private connectionInterval?: NodeJS.Timeout;
149149

150150
/**
151151
*Creates an instance of Client.

packages/client/test/requestManager.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe('Client.ClientRequestManager', () => {
2525
version: '1',
2626
contract: signer.address,
2727
};
28-
const supplierId = spId(randomSalt(), signer.address);
28+
const supplierId = spId(signer.address, randomSalt());
2929

3030
beforeEach(async () => {
3131
const init = memoryStorage.createInitializer();

packages/client/tsup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default defineConfig([
99
},
1010
platform: 'neutral',
1111
treeshake: true,
12-
dts: true,
12+
dts: { resolve: true },
1313
sourcemap: true,
1414
splitting: false,
1515
clean: true,

packages/constants/CHANGELOG.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,25 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6-
# [1.2.0-beta.0](https://github.com/windingtree/sdk/compare/@windingtree/sdk-constants@1.1.0...@windingtree/sdk-constants@1.2.0-beta.0) (2023-10-25)
6+
## [1.2.2](https://github.com/windingtree/sdk/compare/@windingtree/sdk-constants@1.2.1...@windingtree/sdk-constants@1.2.2) (2023-12-11)
7+
8+
**Note:** Version bump only for package @windingtree/sdk-constants
79

10+
## [1.2.1](https://github.com/windingtree/sdk/compare/@windingtree/sdk-constants@1.2.0...@windingtree/sdk-constants@1.2.1) (2023-10-31)
811

9-
### Features
12+
### Bug Fixes
1013

11-
* improve test coverage ([9d49c6e](https://github.com/windingtree/sdk/commit/9d49c6e2e172cce2c6eb320a3f0e4b097d8e83a8))
14+
- 🐛 Fixed file ext for cjs modules ([6f985f2](https://github.com/windingtree/sdk/commit/6f985f2a6b076abdf145176d5036fe89267f2c5a))
1215

16+
# [1.2.0](https://github.com/windingtree/sdk/compare/@windingtree/sdk-constants@1.2.0-beta.0...@windingtree/sdk-constants@1.2.0) (2023-10-25)
1317

18+
**Note:** Version bump only for package @windingtree/sdk-constants
19+
20+
# [1.2.0-beta.0](https://github.com/windingtree/sdk/compare/@windingtree/sdk-constants@1.1.0...@windingtree/sdk-constants@1.2.0-beta.0) (2023-10-25)
1421

22+
### Features
1523

24+
- improve test coverage ([9d49c6e](https://github.com/windingtree/sdk/commit/9d49c6e2e172cce2c6eb320a3f0e4b097d8e83a8))
1625

1726
# [1.1.0](https://github.com/windingtree/sdk/compare/@windingtree/sdk-constants@1.1.0-beta.3...@windingtree/sdk-constants@1.1.0) (2023-07-27)
1827

packages/constants/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@windingtree/sdk-constants",
3-
"version": "1.2.0-beta.0",
3+
"version": "1.2.2",
44
"description": "libp2p PubSub protocol implementation for the WindingTree market protocol",
55
"repository": "https://github.com/windingtree/sdk#readme",
66
"author": "Kostiantyn Smyrnov <kostysh@gmail.com>",
@@ -10,7 +10,7 @@
1010
"dist"
1111
],
1212
"types": "./dist/index.d.ts",
13-
"main": "./dist/index.cjs.js",
13+
"main": "./dist/index.cjs",
1414
"module": "./dist/index.js",
1515
"exports": {
1616
".": {
@@ -20,7 +20,7 @@
2020
},
2121
"require": {
2222
"types": "./dist/index.d.ts",
23-
"default": "./dist/index.cjs.js"
23+
"default": "./dist/index.cjs"
2424
}
2525
}
2626
},

packages/constants/tsup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default defineConfig([
88
},
99
platform: 'neutral',
1010
treeshake: true,
11-
dts: true,
11+
dts: { resolve: true },
1212
sourcemap: true,
1313
splitting: false,
1414
clean: true,

0 commit comments

Comments
 (0)