Utils.ts
This module contains generic utilities.
Added in v2.0.0
Signature
export declare class CryptoError
Added in v2.0.0
Source: src/Utils.ts:22
Ensure input is hex encoded (e.g. 0x${string}
), otherwise encode as hex.
Signature
export declare const ensureHex: <T extends string>(s: T) => `0x${string}`
Source: src/Utils.ts:71
Added in v2.0.0
Signature
export declare function extractErrorDetails<T extends Error>( error: T, withOwnProperties: boolean | undefined = true): { [K in keyof T]: T[K]} & { message: string name: string stack?: string cause?: unknown}
Source: src/Utils.ts:92
Added in v2.0.0
Signature
export declare const generateSalt: (rpcType: RpcType) => Effect.Effect<`0x${string}`, CryptoError, never>
Source: src/Utils.ts:30
Added in v2.0.0
Determine timeout timestamp for a fungible asset order.
Signature
export declare function getTimeoutInNanoseconds24HoursFromNow(): bigint
Source: src/Utils.ts:81
Added in v2.0.0
Signature
export declare const matchOptionBool: { <A, B, C>(options: { readonly onNone: LazyArg<A> readonly onSomeTrue: (a: true) => B readonly onSomeFalse: (a: false) => C }): (self: O.Option<boolean>) => Unify<A | Unify<B | C>> <A, B, C>( self: O.Option<boolean>, options: { readonly onNone: LazyArg<A>; readonly onSomeTrue: (a: true) => B; readonly onSomeFalse: (a: false) => C } ): Unify<A | Unify<B | C>>}
Source: src/Utils.ts:141
Added in v2.0.0
Signature
export declare const verifySalt: (hex: `0x${string}`) => Effect.Effect<boolean>
Source: src/Utils.ts:55
Added in v2.0.0