UNPKG

@taqueria/protocol

Version:

A TypeScript package which contains types that are to be shared between @taqueria/node-sdk and @taqueria/taqueria.

37 lines 1.64 kB
import { TaqError } from '@taqueria/protocol/TaqError'; import { FutureInstance as Future } from 'fluture'; import { z } from 'zod'; interface SubtleCrypto { digest(method: 'SHA-256', data: Uint8Array): ArrayBuffer; } export declare class Crypto { subtle: SubtleCrypto; constructor(); } export declare const rawSchema: z.ZodString; export declare const toSHA256: (value: string) => Promise<string & { readonly __type: "generated" & z.infer<z.ZodType<any, z.ZodTypeDef, any>>; }>; export declare const internalSchema: z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, string & { readonly __type: "generated" & z.infer<z.ZodType<any, z.ZodTypeDef, any>>; }, any>; export type SHA256 = z.infer<typeof internalSchema>; export type t = SHA256; export declare const create: (input: string) => string & { readonly __type: "generated" & z.infer<z.ZodType<any, z.ZodTypeDef, any>>; }, of: (input: unknown) => Future<TaqError, string & { readonly __type: "generated" & z.infer<z.ZodType<any, z.ZodTypeDef, any>>; }>, make: (input: string) => Future<TaqError, string & { readonly __type: "generated" & z.infer<z.ZodType<any, z.ZodTypeDef, any>>; }>; export declare const schemas: { schema: z.ZodEffects<z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, string & { readonly __type: "generated" & z.infer<z.ZodType<any, z.ZodTypeDef, any>>; }, any>, string & { readonly __type: "generated" & z.infer<z.ZodType<any, z.ZodTypeDef, any>>; }, any>; rawSchema: z.ZodType<any, z.ZodTypeDef, any>; internalSchema: z.ZodType<any, z.ZodTypeDef, any>; }; export {}; //# sourceMappingURL=SHA256.d.ts.map