@naviprotocol/wallet-client 1.0.0

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.
@@ -0,0 +1,42 @@
1
+ import { SuiTransport, SuiTransportRequestOptions } from '@mysten/sui/client';
2
+
3
+ /**
4
+ * Custom transport implementation for Sui blockchain communication
5
+ *
6
+ * This class implements the SuiTransport interface and provides
7
+ * a custom HTTP transport layer for making RPC calls to Sui nodes.
8
+ * It includes request ID management and proper JSON-RPC 2.0 formatting.
9
+ */
10
+ export declare class CustomTransport implements SuiTransport {
11
+ /** Counter for generating unique request IDs */
12
+ requestId: number;
13
+ /** RPC endpoint URL for the Sui node */
14
+ rpcUrl: string;
15
+ /**
16
+ * Creates a new custom transport instance
17
+ *
18
+ * @param rpcUrl - The RPC endpoint URL for the Sui node
19
+ */
20
+ constructor(rpcUrl: string);
21
+ /**
22
+ * Makes an RPC request to the Sui node
23
+ *
24
+ * This method formats the request according to JSON-RPC 2.0 specification
25
+ * and sends it to the configured RPC endpoint.
26
+ *
27
+ * @param input - The transport request options containing method and parameters
28
+ * @returns Promise<T> - The response data from the RPC call
29
+ */
30
+ request<T>(input: SuiTransportRequestOptions): Promise<T>;
31
+ /**
32
+ * Subscribe to events (not implemented)
33
+ *
34
+ * This method is required by the SuiTransport interface but is not
35
+ * implemented in this custom transport. It throws an error if called.
36
+ *
37
+ * @returns Promise<() => Promise<boolean>> - Unsubscribe function
38
+ * @throws Error - Always throws "subscribe not implemented" error
39
+ */
40
+ subscribe<T>(): Promise<() => Promise<boolean>>;
41
+ }
42
+ //# sourceMappingURL=transport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,0BAA0B,EAAE,MAAM,oBAAoB,CAAA;AAmCvF;;;;;;GAMG;AACH,qBAAa,eAAgB,YAAW,YAAY;IAClD,gDAAgD;IAChD,SAAS,SAAI;IAEb,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAA;IAEd;;;;OAIG;gBACS,MAAM,EAAE,MAAM;IAI1B;;;;;;;;OAQG;IACG,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,CAAC,CAAC;IAe/D;;;;;;;;OAQG;IACG,SAAS,CAAC,CAAC,KAAK,OAAO,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CAGtD"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Wallet Client Type Definitions
3
+ *
4
+ * This module contains type definitions used throughout the wallet client,
5
+ * including transaction options, module configurations, and other shared types.
6
+ *
7
+ * @module WalletClientTypes
8
+ */
9
+ /**
10
+ * Options for dry-running transactions
11
+ *
12
+ * This type is used to specify whether a transaction should be executed
13
+ * in dry-run mode (simulation only) or actually submitted to the blockchain.
14
+ */
15
+ export type DryRunOptions = {
16
+ /** Whether to run the transaction in dry-run mode */
17
+ dryRun: boolean;
18
+ };
19
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,qDAAqD;IACrD,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA"}
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@naviprotocol/wallet-client",
3
+ "version": "1.0.0",
4
+ "description": "NAVI Wallet Client",
5
+ "license": "MIT",
6
+ "keywords": [
7
+ "navi",
8
+ "sui"
9
+ ],
10
+ "author": "NAVI",
11
+ "homepage": "https://navprotocol.io",
12
+ "bugs": "https://github.com/naviprotocol/naviprotocol-monorepo/issues",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/naviprotocol/naviprotocol-monorepo.git"
16
+ },
17
+ "main": "dist/index.cjs.js",
18
+ "module": "dist/index.esm.js",
19
+ "types": "dist/index.d.ts",
20
+ "source": "src/index.ts",
21
+ "files": [
22
+ "dist",
23
+ "README.md"
24
+ ],
25
+ "exports": {
26
+ "./package.json": "./package.json",
27
+ ".": {
28
+ "import": {
29
+ "types": "./dist/index.d.ts",
30
+ "node": "./dist/index.cjs.js",
31
+ "default": "./dist/index.esm.js"
32
+ },
33
+ "require": "./dist/index.cjs.js"
34
+ }
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "scripts": {
40
+ "build": "run-p build:lib",
41
+ "build:lib": "vite build",
42
+ "prettier": "prettier --check src/",
43
+ "prettier:fix": "prettier --write src/",
44
+ "lint": "eslint . --ext .ts,.tsx",
45
+ "lint:fix": "eslint . --ext .ts,.tsx --fix",
46
+ "verify": "run-p prettier lint",
47
+ "verify:fix": "run-p prettier:fix lint:fix",
48
+ "test": "vitest --config ./vite.config.unit.js",
49
+ "test:watch": "vitest",
50
+ "test:coverage": "vitest run --coverage",
51
+ "typedoc": "typedoc"
52
+ },
53
+ "dependencies": {
54
+ "@mysten/sui": "1.34.0",
55
+ "@naviprotocol/astros-aggregator-sdk": "workspace:*",
56
+ "@naviprotocol/lending": "workspace:*",
57
+ "axios": "1.11.0",
58
+ "bignumber.js": "9.1.2",
59
+ "mitt": "^3.0.1"
60
+ },
61
+ "devDependencies": {
62
+ "@types/node": "^20.19.1",
63
+ "dotenv": "16.4.7",
64
+ "tsconfig-paths": "^4.2.0",
65
+ "tslint": "^6.1.3",
66
+ "typescript": "5.8.3",
67
+ "vitest": "^3.2.2"
68
+ }
69
+ }