@xyo-network/xl1-protocol-sdk 1.16.21 → 1.16.22

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,2 @@
1
+ export * from './isZodError.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
@@ -0,0 +1,4 @@
1
+ import * as z from 'zod';
2
+ export declare const isZodError: (error: unknown) => error is z.ZodError;
3
+ export declare const prettifyZodError: (error: z.ZodError) => string;
4
+ //# sourceMappingURL=isZodError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isZodError.d.ts","sourceRoot":"","sources":["../../../src/utils/isZodError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAExB,eAAO,MAAM,UAAU,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,CAAC,CAAC,QAEtD,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,OAAO,CAAC,CAAC,QAAQ,KAAG,MAEpD,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json.schemastore.org/package.json",
3
3
  "name": "@xyo-network/xl1-protocol-sdk",
4
- "version": "1.16.21",
4
+ "version": "1.16.22",
5
5
  "description": "XYO Layer One SDK Protocol",
6
6
  "homepage": "https://xylabs.com",
7
7
  "bugs": {
package/src/index.ts CHANGED
@@ -16,6 +16,7 @@ export * from './SignedBigInt.ts'
16
16
  export * from './simple/index.ts'
17
17
  export * from './time/index.ts'
18
18
  export * from './transaction/index.ts'
19
+ export * from './utils/index.ts'
19
20
  export * from './validation/index.ts'
20
21
  export * from './viewers/index.ts'
21
22
  export * from './wallet/index.ts'
@@ -0,0 +1 @@
1
+ export * from './isZodError.ts'
@@ -0,0 +1,9 @@
1
+ import * as z from 'zod'
2
+
3
+ export const isZodError = (error: unknown): error is z.ZodError => {
4
+ return error instanceof z.ZodError
5
+ }
6
+
7
+ export const prettifyZodError = (error: z.ZodError): string => {
8
+ return z.prettifyError(error)
9
+ }