@mentaproject/client 0.1.35 → 0.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -0
- package/dist/_esm-JD7YQDKA.js +3659 -0
- package/dist/_esm-JD7YQDKA.js.map +1 -0
- package/dist/ccip-VFWQBRRA.js +15 -0
- package/dist/ccip-VFWQBRRA.js.map +1 -0
- package/dist/chunk-NV2TBI2O.js +408 -0
- package/dist/chunk-NV2TBI2O.js.map +1 -0
- package/dist/chunk-PR4QN5HX.js +43 -0
- package/dist/chunk-PR4QN5HX.js.map +1 -0
- package/dist/chunk-ZEQAXTUF.js +4335 -0
- package/dist/chunk-ZEQAXTUF.js.map +1 -0
- package/dist/index.cjs +1158 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +1011 -19
- package/dist/index.js.map +1 -0
- package/dist/secp256k1-OKGEQFPH.js +2247 -0
- package/dist/secp256k1-OKGEQFPH.js.map +1 -0
- package/dist/types/MentaClient.d.ts +7 -2
- package/dist/types/index.cjs +25 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.js +2 -6
- package/dist/types/index.js.map +1 -0
- package/package.json +13 -13
- package/src/structures/MentaClient.ts +4 -3
- package/src/types/MentaClient.ts +7 -6
- package/tsup.config.ts +18 -0
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mentaproject/client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.36",
|
|
4
4
|
"description": "High level EVM library used into the Menta App to facilitate Blockchain interactions. ",
|
|
5
|
-
"main": "dist/index.
|
|
5
|
+
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"sideEffects": false,
|
|
@@ -11,42 +11,42 @@
|
|
|
11
11
|
".": {
|
|
12
12
|
"types": "./dist/index.d.ts",
|
|
13
13
|
"import": "./dist/index.mjs",
|
|
14
|
-
"require": "./dist/index.
|
|
14
|
+
"require": "./dist/index.cjs"
|
|
15
15
|
},
|
|
16
16
|
"./types": {
|
|
17
17
|
"types": "./dist/types/index.d.ts",
|
|
18
18
|
"import": "./dist/types/index.mjs",
|
|
19
|
-
"require": "./dist/types/index.
|
|
19
|
+
"require": "./dist/types/index.cjs"
|
|
20
20
|
},
|
|
21
21
|
"./package.json": "./package.json"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"test:file": "tsx test.ts",
|
|
25
25
|
"test": "jest -i",
|
|
26
|
-
"build": "tsc --
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
26
|
+
"build": "tsup && tsc --emitDeclarationOnly",
|
|
27
|
+
"build:fast": "tsup",
|
|
28
|
+
"preversion": "npm whoami && npm run build",
|
|
29
|
+
"postversion": "npm publish --access public && git push --follow-tags || (git tag -d $(git describe --tags --abbrev=0) && git reset --hard HEAD~1 && exit 1)",
|
|
30
|
+
"patch": "npm version patch",
|
|
31
|
+
"minor": "npm version minor",
|
|
32
|
+
"major": "npm version major"
|
|
30
33
|
},
|
|
31
34
|
"author": "@mentaproject",
|
|
32
35
|
"license": "ISC",
|
|
33
36
|
"dependencies": {
|
|
34
37
|
"@mentaproject/contracts": "^0.0.11",
|
|
35
|
-
"@mentaproject/core": "^0.
|
|
38
|
+
"@mentaproject/core": "^0.7.3",
|
|
36
39
|
"@modelcontextprotocol/sdk": "^1.13.0",
|
|
37
40
|
"@shazow/whatsabi": "^0.21.1"
|
|
38
41
|
},
|
|
39
42
|
"devDependencies": {
|
|
40
|
-
"@rollup/plugin-commonjs": "^28.0.3",
|
|
41
|
-
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
42
|
-
"@rollup/plugin-typescript": "^12.1.2",
|
|
43
43
|
"@types/jest": "^30.0.0",
|
|
44
44
|
"@types/node": "^22.15.29",
|
|
45
45
|
"jest": "^30.0.2",
|
|
46
46
|
"jest-mock-extended": "^4.0.0",
|
|
47
|
-
"rollup": "^4.40.1",
|
|
48
47
|
"ts-jest": "^29.4.0",
|
|
49
48
|
"tslib": "^2.8.1",
|
|
49
|
+
"tsup": "^8.5.1",
|
|
50
50
|
"tsx": "^4.19.4",
|
|
51
51
|
"typescript": "^5.8.3"
|
|
52
52
|
},
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { MentaAccountClient } from "@mentaproject/core/types";
|
|
5
5
|
import { createMentaAccount } from "@mentaproject/core/clients";
|
|
6
|
+
import { createClient } from "@mentaproject/core";
|
|
6
7
|
|
|
7
8
|
import { BlockManager } from "../managers/BlockManager";
|
|
8
9
|
import { TransactionManager } from "../managers/TransactionManager";
|
|
@@ -15,7 +16,6 @@ import {
|
|
|
15
16
|
MentaClientConfig,
|
|
16
17
|
} from "../types/MentaClient";
|
|
17
18
|
import { withCache } from "../utils/withCache";
|
|
18
|
-
import { createClient } from "@mentaproject/core";
|
|
19
19
|
import { Account } from "./Account";
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -150,10 +150,11 @@ export class MentaClient {
|
|
|
150
150
|
coreClient = withCache(coreClient, this.params.cache);
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
this._rpc = await createMentaAccount(coreClient, {
|
|
154
|
-
signer: this.params.signer,
|
|
153
|
+
this._rpc = await createMentaAccount(coreClient as any, {
|
|
155
154
|
bundlerTransport: this.params.bundlerTransport,
|
|
156
155
|
publicTransport: this.params.transport,
|
|
156
|
+
signer: this.params.signer,
|
|
157
|
+
validatorAddress: this.params.validatorAddress,
|
|
157
158
|
});
|
|
158
159
|
|
|
159
160
|
this._account = this.accounts.get(this.rpc.account.address);
|
package/src/types/MentaClient.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module MentaClientTypes
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
CoreClientConfig,
|
|
6
|
-
PasskeySigner,
|
|
7
|
-
Transport,
|
|
8
|
-
} from "@mentaproject/core/types";
|
|
4
|
+
import { Address, CoreClientConfig, Transport } from "@mentaproject/core/types";
|
|
9
5
|
import { ICache } from "./Cache";
|
|
10
6
|
import { watchBlockNumber, watchBlocks } from "@mentaproject/core/actions";
|
|
11
7
|
import { IPersistenceAdapter } from "./PersistenceAdapter";
|
|
8
|
+
import { WebAuthnAccount } from "@mentaproject/core/account-abstraction";
|
|
12
9
|
|
|
13
10
|
/**
|
|
14
11
|
* Configuration for the client's cache.
|
|
@@ -46,7 +43,11 @@ export interface MentaClientConfig extends CoreClientConfig {
|
|
|
46
43
|
/**
|
|
47
44
|
* Passkey compatible signer used for signing user operations
|
|
48
45
|
*/
|
|
49
|
-
signer:
|
|
46
|
+
signer: WebAuthnAccount;
|
|
47
|
+
/**
|
|
48
|
+
* Validator address used for userOperations
|
|
49
|
+
*/
|
|
50
|
+
validatorAddress: Address;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
/**
|
package/tsup.config.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineConfig } from "tsup";
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
entry: {
|
|
5
|
+
index: "src/index.ts",
|
|
6
|
+
"types/index": "src/types/index.ts",
|
|
7
|
+
},
|
|
8
|
+
format: ["cjs", "esm"],
|
|
9
|
+
dts: false,
|
|
10
|
+
sourcemap: true,
|
|
11
|
+
clean: false,
|
|
12
|
+
external: [
|
|
13
|
+
"@mentaproject/contracts",
|
|
14
|
+
"@mentaproject/core",
|
|
15
|
+
"@modelcontextprotocol/sdk",
|
|
16
|
+
"@shazow/whatsabi",
|
|
17
|
+
],
|
|
18
|
+
});
|