unwallet-client-sdk 0.23.0 → 0.24.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.
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region \0rolldown/runtime.js
2
+ // \0rolldown/runtime.js
3
3
  var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -20,11 +20,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
20
20
  value: mod,
21
21
  enumerable: true
22
22
  }) : target, mod));
23
- //#endregion
24
23
  let viem = require("viem");
25
24
  let zod = require("zod");
26
25
  zod = __toESM(zod, 1);
27
- //#region src/error.ts
26
+ // src/error.ts
28
27
  var UWError = class extends Error {
29
28
  static {
30
29
  this.prototype.name = "UWError";
@@ -34,8 +33,7 @@ var UWError = class extends Error {
34
33
  this.code = code;
35
34
  }
36
35
  };
37
- //#endregion
38
- //#region src/config.ts
36
+ // src/config.ts
39
37
  const envToUnWalletConfig = {
40
38
  prod: {
41
39
  frontend: { origin: "https://id.unwallet.world" },
@@ -218,8 +216,7 @@ function newUnexpectedXResponseTypeError(resp) {
218
216
  function newConnectionClosedError(event) {
219
217
  return new UWError("CONNECTION_CLOSED", event.reason.length > 0 ? event.reason : void 0);
220
218
  }
221
- //#endregion
222
- //#region src/unwallet.ts
219
+ // src/unwallet.ts
223
220
  var UnWallet = class UnWallet {
224
221
  constructor(args) {
225
222
  this.env = args.env;
@@ -333,6 +330,5 @@ var UnWallet = class UnWallet {
333
330
  this.xConnection.close();
334
331
  }
335
332
  };
336
- //#endregion
337
333
  exports.UWError = UWError;
338
334
  exports.UnWallet = UnWallet;
package/dist/index.d.cts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { Address, Hash, Hex } from "viem";
2
2
  import * as z from "zod";
3
- //#region src/config.d.ts
4
3
  type Env = "prod" | "dev";
5
4
  interface Config {
6
5
  env?: Env;
@@ -10,8 +9,6 @@ interface UnWalletXAPIConfig {
10
9
  url: string;
11
10
  connectionTimeout: number;
12
11
  }
13
- //#endregion
14
- //#region src/eip712.d.ts
15
12
  interface EIP712TypedData {
16
13
  types: Record<string, Array<EIP712TypedDataField>>;
17
14
  primaryType: string;
@@ -29,15 +26,11 @@ interface EIP712TypedDataField {
29
26
  name: string;
30
27
  type: string;
31
28
  }
32
- //#endregion
33
- //#region src/error.d.ts
34
29
  type UWErrorCode = "CONNECTION_TIMEOUT" | "CONNECTION_FAILED" | "CONNECTION_NOT_OPENED" | "CONNECTION_CLOSED" | "INVALID_REQUEST" | "REQUEST_IN_PROGRESS" | "REQUEST_REJECTED" | "INVALID_RESPONSE";
35
30
  export declare class UWError extends Error {
36
31
  readonly code: UWErrorCode;
37
32
  constructor(code: UWErrorCode, msg?: string);
38
33
  }
39
- //#endregion
40
- //#region src/xconn.d.ts
41
34
  declare const xResponseSchema: z.ZodReadonly<z.ZodUnion<readonly [z.ZodObject<{
42
35
  type: z.ZodLiteral<"connectionID">;
43
36
  value: z.ZodString;
@@ -82,8 +75,6 @@ declare class XConnection {
82
75
  setResponseHandler(respHandler: XResponseHandler | null): void;
83
76
  close(): void;
84
77
  }
85
- //#endregion
86
- //#region src/unwallet.d.ts
87
78
  type AuthorizationResponseMode = "fragment" | "form_post";
88
79
  interface SignResult {
89
80
  digest: Hash;
@@ -128,5 +119,4 @@ export declare class UnWallet {
128
119
  private request;
129
120
  close(): void;
130
121
  }
131
- //#endregion
132
122
  export type { AuthorizationResponseMode, Config, EIP712TypedData, EIP712TypedDataDomain, EIP712TypedDataField, Env, SendTransactionResult, SignResult, UWErrorCode };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { Address, Hash, Hex } from "viem";
2
2
  import * as z from "zod";
3
- //#region src/config.d.ts
4
3
  type Env = "prod" | "dev";
5
4
  interface Config {
6
5
  env?: Env;
@@ -10,8 +9,6 @@ interface UnWalletXAPIConfig {
10
9
  url: string;
11
10
  connectionTimeout: number;
12
11
  }
13
- //#endregion
14
- //#region src/eip712.d.ts
15
12
  interface EIP712TypedData {
16
13
  types: Record<string, Array<EIP712TypedDataField>>;
17
14
  primaryType: string;
@@ -29,15 +26,11 @@ interface EIP712TypedDataField {
29
26
  name: string;
30
27
  type: string;
31
28
  }
32
- //#endregion
33
- //#region src/error.d.ts
34
29
  type UWErrorCode = "CONNECTION_TIMEOUT" | "CONNECTION_FAILED" | "CONNECTION_NOT_OPENED" | "CONNECTION_CLOSED" | "INVALID_REQUEST" | "REQUEST_IN_PROGRESS" | "REQUEST_REJECTED" | "INVALID_RESPONSE";
35
30
  export declare class UWError extends Error {
36
31
  readonly code: UWErrorCode;
37
32
  constructor(code: UWErrorCode, msg?: string);
38
33
  }
39
- //#endregion
40
- //#region src/xconn.d.ts
41
34
  declare const xResponseSchema: z.ZodReadonly<z.ZodUnion<readonly [z.ZodObject<{
42
35
  type: z.ZodLiteral<"connectionID">;
43
36
  value: z.ZodString;
@@ -82,8 +75,6 @@ declare class XConnection {
82
75
  setResponseHandler(respHandler: XResponseHandler | null): void;
83
76
  close(): void;
84
77
  }
85
- //#endregion
86
- //#region src/unwallet.d.ts
87
78
  type AuthorizationResponseMode = "fragment" | "form_post";
88
79
  interface SignResult {
89
80
  digest: Hash;
@@ -128,5 +119,4 @@ export declare class UnWallet {
128
119
  private request;
129
120
  close(): void;
130
121
  }
131
- //#endregion
132
122
  export type { AuthorizationResponseMode, Config, EIP712TypedData, EIP712TypedDataDomain, EIP712TypedDataField, Env, SendTransactionResult, SignResult, UWErrorCode };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { BaseError, hashTypedData, isHex, sha256, toBytes, validateTypedData } from "viem";
2
2
  import * as z from "zod";
3
- //#region src/error.ts
3
+ // src/error.ts
4
4
  var UWError = class extends Error {
5
5
  static {
6
6
  this.prototype.name = "UWError";
@@ -10,8 +10,7 @@ var UWError = class extends Error {
10
10
  this.code = code;
11
11
  }
12
12
  };
13
- //#endregion
14
- //#region src/config.ts
13
+ // src/config.ts
15
14
  const envToUnWalletConfig = {
16
15
  prod: {
17
16
  frontend: { origin: "https://id.unwallet.world" },
@@ -194,8 +193,7 @@ function newUnexpectedXResponseTypeError(resp) {
194
193
  function newConnectionClosedError(event) {
195
194
  return new UWError("CONNECTION_CLOSED", event.reason.length > 0 ? event.reason : void 0);
196
195
  }
197
- //#endregion
198
- //#region src/unwallet.ts
196
+ // src/unwallet.ts
199
197
  var UnWallet = class UnWallet {
200
198
  constructor(args) {
201
199
  this.env = args.env;
@@ -309,5 +307,4 @@ var UnWallet = class UnWallet {
309
307
  this.xConnection.close();
310
308
  }
311
309
  };
312
- //#endregion
313
310
  export { UWError, UnWallet };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unwallet-client-sdk",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "unWallet client-side SDK",
5
5
  "license": "MIT",
6
6
  "author": "SIVIRA",
@@ -29,22 +29,21 @@
29
29
  "url": "git+https://github.com/SIVIRA/unwallet-client-sdk-js.git"
30
30
  },
31
31
  "dependencies": {
32
- "viem": "2.56.5",
33
- "zod": "4.6.5"
32
+ "viem": "2.57.11",
33
+ "zod": "4.6.7"
34
34
  },
35
35
  "devDependencies": {
36
- "@commitlint/cli": "21.2.2",
37
- "@commitlint/config-conventional": "21.2.2",
38
- "@commitlint/types": "21.2.0",
36
+ "@commitlint/cli": "21.2.4",
37
+ "@commitlint/config-conventional": "21.2.4",
39
38
  "@tsconfig/strictest": "2.0.8",
40
- "@vitest/coverage-v8": "5.0.0",
39
+ "@vitest/coverage-v8": "5.0.5",
41
40
  "czg": "1.14.0",
42
41
  "husky": "9.1.7",
43
42
  "msw": "2.15.0",
44
- "publint": "0.3.24",
45
- "tsdown": "0.23.0",
46
- "typescript": "7.0.2",
47
- "vitest": "5.0.0"
43
+ "publint": "0.3.25",
44
+ "tsdown": "0.23.2",
45
+ "typescript": "6.0.3",
46
+ "vitest": "5.0.5"
48
47
  },
49
48
  "scripts": {}
50
49
  }