Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/level entries #81

Merged
merged 47 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
4795961
Merge pull request #62 from windingtree/beta
kostysh Oct 25, 2023
0a2c8aa
Publish
github-actions[bot] Oct 25, 2023
3887e4e
fix: 🐛 Added missed export of levelDb
kostysh Oct 31, 2023
dbd9064
Merge pull request #63 from windingtree/fix/expose-leveldb
kostysh Oct 31, 2023
fd2af80
Merge pull request #64 from windingtree/develop
kostysh Oct 31, 2023
c76301d
Publish
github-actions[bot] Oct 31, 2023
6f985f2
fix: 🐛 Fixed file ext for cjs modules
kostysh Oct 31, 2023
1e4c08a
Merge pull request #65 from windingtree/fix/cjs-export
kostysh Oct 31, 2023
57d2ab5
Merge pull request #66 from windingtree/develop
kostysh Oct 31, 2023
a3a606f
Publish
github-actions[bot] Oct 31, 2023
bcf8938
feat: add path to storage options
Galeaf11 Nov 29, 2023
235d207
feat: add LevelStorageOptions
Galeaf11 Nov 29, 2023
1a83a91
feat: update superjson
Galeaf11 Nov 29, 2023
72f116a
Merge pull request #67 from windingtree/feat/db-name-config
kostysh Nov 29, 2023
b9feaf5
Merge pull request #68 from windingtree/develop
kostysh Nov 29, 2023
ca0f393
Publish
github-actions[bot] Nov 29, 2023
904ee70
fix: 🐛 Fixed wrong arguments order in the supplierId utility
kostysh Dec 11, 2023
205fa1e
chore: 🤖 Deps versions update
kostysh Dec 11, 2023
995ed5d
chore: 🤖 Style fixes. Removed mjs
kostysh Dec 11, 2023
d954286
chore: 🤖 Fixed merge conflicts
kostysh Dec 11, 2023
c667289
chore: 🤖 Style fixes in changelog files
kostysh Dec 11, 2023
ece1723
Merge pull request #69 from windingtree/fix/supplier-id
kostysh Dec 11, 2023
19acaf8
Merge pull request #70 from windingtree/develop
kostysh Dec 11, 2023
85633f0
Publish
github-actions[bot] Dec 11, 2023
60d5ef5
fix: 🐛 Fixed auth cookie parser
kostysh Dec 18, 2023
2d6bf8d
Merge pull request #71 from windingtree/fix/node-auth-context
kostysh Dec 18, 2023
366de08
Merge pull request #72 from windingtree/develop
kostysh Dec 18, 2023
7c2d9e4
Publish
github-actions[bot] Dec 18, 2023
728040b
fix: 🐛 Fixed node-api types definitions
kostysh Dec 21, 2023
5dcf808
Merge pull request #73 from windingtree/fix/node-api-types
kostysh Dec 21, 2023
0bbf9af
Merge pull request #74 from windingtree/develop
kostysh Dec 21, 2023
6d0aa00
Publish
github-actions[bot] Dec 21, 2023
4277e36
fix: 🐛 Added export of the service router in node-api
kostysh Dec 21, 2023
7a0b6c0
Merge pull request #75 from windingtree/fix/export-service
kostysh Dec 21, 2023
b8ef277
Merge pull request #76 from windingtree/develop
kostysh Dec 21, 2023
456c777
Publish
github-actions[bot] Dec 21, 2023
c268c57
feat: 🎸 Updated node-api configuration options
kostysh Dec 22, 2023
0580026
Merge pull request #77 from windingtree/feat/node-api-storages
kostysh Dec 22, 2023
e3934f2
Merge pull request #78 from windingtree/develop
kostysh Dec 22, 2023
b7cdc1a
Publish
github-actions[bot] Dec 22, 2023
be3f13b
feat: 🎸 Updated NodeProvider in the react package
kostysh Dec 24, 2023
8eae00e
feat: 🎸 Updated usePoller hook
kostysh Dec 24, 2023
0d09e55
Merge pull request #79 from windingtree/feat/new-nodeprovider
kostysh Dec 24, 2023
729344b
Merge pull request #80 from windingtree/develop
kostysh Dec 24, 2023
a32a742
Publish
github-actions[bot] Dec 24, 2023
0afaff8
fix: 🐛 fix: Fixed scope-related logic in the LevelDB storage
kostysh Jan 17, 2024
e1bf932
chore: 🤖 Minor prettier fix
kostysh Jan 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.1.6",
"viem": "^1.3.0",
"viem": "^1.19.13",
"@libp2p/interface": "^0.1.3",
"luxon": "^3.3.0"
},
"dependencies": {
"superjson": "^1.13.1"
"superjson": "^2.2.1"
},
"eslintConfig": {
"extends": [
Expand Down
2 changes: 1 addition & 1 deletion examples/client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"resolveJsonModule": true,
"isolatedModules": true,
Expand Down
2 changes: 1 addition & 1 deletion examples/client/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"composite": true,
"module": "ESNext",
"module": "NodeNext",
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true
},
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@libp2p/peer-id": "^2.0.4",
"@multiformats/multiaddr": "^12.1.3",
"luxon": "^3.3.0",
"viem": "^1.3.0"
"viem": "^1.19.13"
},
"scripts": {
"build": "echo \"no build specified\" && exit 0",
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e-tests/test/examples/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class NodeExample {
constructor() {
const mnemonic = generateMnemonic();
const signer = mnemonicToAccount(mnemonic);
const supplierId = spId(randomSalt(), signer.address);
const supplierId = spId(signer.address, randomSalt());

const options: NodeOptions = {
topics: ['hello'],
Expand Down
4 changes: 2 additions & 2 deletions examples/manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.1.6",
"viem": "^1.3.0",
"viem": "^1.19.13",
"luxon": "^3.3.0"
},
"dependencies": {
"@windingtree/contracts": "^1.0.0",
"@windingtree/sdk-types": "workspace:*",
"@windingtree/sdk-utils": "workspace:*",
"superjson": "^1.13.1"
"superjson": "^2.2.1"
},
"eslintConfig": {
"extends": [
Expand Down
2 changes: 1 addition & 1 deletion examples/manager/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { App } from './App.js';
import {
AppConfig,
ConfigProvider,
NodeProvider,
WalletProvider,
ContractsProvider,
NodeProvider,
} from '@windingtree/sdk-react/providers';
import { hardhat, polygonZkEvmTestnet } from 'viem/chains';
import { contractsConfig } from 'wtmp-examples-shared-files/dist/index.js';
Expand Down
2 changes: 1 addition & 1 deletion examples/manager/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"resolveJsonModule": true,
"isolatedModules": true,
Expand Down
2 changes: 1 addition & 1 deletion examples/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@windingtree/sdk-utils": "workspace:*",
"dotenv": "^16.3.1",
"luxon": "^3.3.0",
"viem": "^1.3.0",
"viem": "^1.19.13",
"wtmp-examples-shared-files": "workspace:*"
}
}
7 changes: 5 additions & 2 deletions examples/node/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,16 @@ const main = async (): Promise<void> => {
})();

const apiServer = new NodeApiServer({
usersStorage,
dealsStorage,
storage: {
users: usersStorage,
deals: dealsStorage,
},
prefix: 'test',
port: 3456,
secret: 'secret',
ownerAccount: entityOwnerAddress,
protocolContracts: contractsManager,
cors: ['http://localhost:5173'],
});

apiServer.start(appRouter);
Expand Down
5 changes: 4 additions & 1 deletion examples/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@
"lint": "eslint . --ext .ts --ignore-path ../../.lintignore",
"lint:fix": "eslint . --ext .ts --ignore-path ../../.lintignore --fix && prettier --ignore-path ../../.lintignore --write ."
},
"devDependencies": {
"@types/node": "^20.10.4"
},
"dependencies": {
"viem": "^1.3.0",
"viem": "^1.19.13",
"@windingtree/sdk-types": "workspace:*"
}
}
37 changes: 19 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,28 @@
},
"type": "module",
"devDependencies": {
"@commitlint/cli": "^17.6.7",
"@commitlint/config-conventional": "^17.6.7",
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"@libp2p/crypto": "^1.0.17",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"@vitest/coverage-v8": "^0.33.0",
"@vitest/ui": "^0.34.3",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^5.0.0",
"@types/node": "^20.10.5",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"@vitest/coverage-v8": "^1.1.0",
"@vitest/ui": "^1.1.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.1",
"git-cz": "^4.9.0",
"husky": "^8.0.3",
"lerna": "^7.1.4",
"prettier": "^3.0.0",
"tsup": "^7.1.0",
"typescript": "^5.1.6",
"uint8arrays": "^4.0.4",
"vite": "^4.4.4",
"vite-plugin-dts": "^3.3.1",
"vite-plugin-node-polyfills": "^0.9.0",
"vitest": "^0.33.0"
"lerna": "^7.4.2",
"prettier": "^3.1.1",
"tsup": "^8.0.1",
"typescript": "^5.3.3",
"uint8arrays": "^5.0.0",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.6.4",
"vite-plugin-node-polyfills": "^0.17.0",
"vitest": "^1.1.0"
},
"scripts": {
"prepare": "husky install",
Expand Down
35 changes: 30 additions & 5 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,44 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [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)
## [1.3.2](https://github.com/windingtree/sdk/compare/@windingtree/sdk-client@1.3.1...@windingtree/sdk-client@1.3.2) (2023-12-22)

**Note:** Version bump only for package @windingtree/sdk-client

## [1.3.1](https://github.com/windingtree/sdk/compare/@windingtree/sdk-client@1.3.0...@windingtree/sdk-client@1.3.1) (2023-12-11)

### Bug Fixes

- 🐛 Fixed wrong arguments order in the supplierId utility ([904ee70](https://github.com/windingtree/sdk/commit/904ee70f7e906b68ae01f86de7d08d956fbf7688))

# [1.3.0](https://github.com/windingtree/sdk/compare/@windingtree/sdk-client@1.2.2...@windingtree/sdk-client@1.3.0) (2023-11-29)

### Features

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

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

### Bug Fixes

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

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

**Note:** Version bump only for package @windingtree/sdk-client

# [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)

**Note:** Version bump only for package @windingtree/sdk-client

# [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)

### Features

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

# [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)

Expand Down
12 changes: 6 additions & 6 deletions packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@windingtree/sdk-client",
"version": "1.2.0-beta.1",
"version": "1.3.2",
"description": "The WindingTree market protocol client",
"repository": "https://github.com/windingtree/sdk#readme",
"author": "Kostiantyn Smyrnov <kostysh@gmail.com>",
Expand All @@ -10,7 +10,7 @@
"dist"
],
"types": "./dist/index.d.ts",
"main": "./dist/index.cjs.js",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"exports": {
".": {
Expand All @@ -20,7 +20,7 @@
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.cjs.js"
"default": "./dist/index.cjs"
}
}
},
Expand All @@ -38,7 +38,7 @@
"@libp2p/mplex": "^9.0.8",
"@libp2p/peer-id": "^3.0.3",
"@libp2p/websockets": "^7.0.9",
"@multiformats/multiaddr": "^12.1.3",
"@multiformats/multiaddr": "^12.1.11",
"@windingtree/sdk-contracts-manager": "workspace:*",
"@windingtree/sdk-logger": "workspace:*",
"@windingtree/sdk-messages": "workspace:*",
Expand All @@ -47,8 +47,8 @@
"@windingtree/sdk-types": "workspace:*",
"@windingtree/sdk-utils": "workspace:*",
"libp2p": "^0.46.14",
"superjson": "^2.0.0",
"viem": "^1.3.0"
"superjson": "^2.2.1",
"viem": "^1.19.13"
},
"scripts": {
"build": "tsup",
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/dealsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class ClientDealsManager<
private contracts: Contracts;
private chain: Chain;
private storageKeyPrefix: string;
private checkInterval?: NodeJS.Timer;
private checkInterval?: NodeJS.Timeout;
private ongoingCheck = false;

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export class Client<
/** Server is connected */
private serverConnected = false;
/** Entity for stop timer after reconnect */
private connectionInterval?: NodeJS.Timer;
private connectionInterval?: NodeJS.Timeout;

/**
*Creates an instance of Client.
Expand Down
2 changes: 1 addition & 1 deletion packages/client/test/requestManager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('Client.ClientRequestManager', () => {
version: '1',
contract: signer.address,
};
const supplierId = spId(randomSalt(), signer.address);
const supplierId = spId(signer.address, randomSalt());

beforeEach(async () => {
const init = memoryStorage.createInitializer();
Expand Down
2 changes: 1 addition & 1 deletion packages/client/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig([
},
platform: 'neutral',
treeshake: true,
dts: true,
dts: { resolve: true },
sourcemap: true,
splitting: false,
clean: true,
Expand Down
15 changes: 12 additions & 3 deletions packages/constants/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [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)
## [1.2.2](https://github.com/windingtree/sdk/compare/@windingtree/sdk-constants@1.2.1...@windingtree/sdk-constants@1.2.2) (2023-12-11)

**Note:** Version bump only for package @windingtree/sdk-constants

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

### Features
### Bug Fixes

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

# [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)

**Note:** Version bump only for package @windingtree/sdk-constants

# [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)

### Features

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

# [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)

Expand Down
6 changes: 3 additions & 3 deletions packages/constants/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@windingtree/sdk-constants",
"version": "1.2.0-beta.0",
"version": "1.2.2",
"description": "libp2p PubSub protocol implementation for the WindingTree market protocol",
"repository": "https://github.com/windingtree/sdk#readme",
"author": "Kostiantyn Smyrnov <kostysh@gmail.com>",
Expand All @@ -10,7 +10,7 @@
"dist"
],
"types": "./dist/index.d.ts",
"main": "./dist/index.cjs.js",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"exports": {
".": {
Expand All @@ -20,7 +20,7 @@
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.cjs.js"
"default": "./dist/index.cjs"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/constants/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig([
},
platform: 'neutral',
treeshake: true,
dts: true,
dts: { resolve: true },
sourcemap: true,
splitting: false,
clean: true,
Expand Down
Loading