mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-22 10:17:57 +00:00
chore: update to version 14.0.11 and align website URLs
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
import type { U8aLike } from '@pezkuwi/util/types';
|
||||
export type { U8aLike } from '@pezkuwi/util/types';
|
||||
interface Coder {
|
||||
decode: (value: string) => Uint8Array;
|
||||
encode: (value: Uint8Array) => string;
|
||||
}
|
||||
interface Config {
|
||||
chars: string;
|
||||
coder: Coder;
|
||||
ipfs?: string;
|
||||
regex?: RegExp;
|
||||
type: string;
|
||||
withPadding?: boolean;
|
||||
}
|
||||
type DecodeFn = (value: string, ipfsCompat?: boolean) => Uint8Array;
|
||||
type EncodeFn = (value: U8aLike, ipfsCompat?: boolean) => string;
|
||||
type ValidateFn = (value?: unknown, ipfsCompat?: boolean) => value is string;
|
||||
/** @internal */
|
||||
export declare function createDecode({ coder, ipfs }: Config, validate: ValidateFn): DecodeFn;
|
||||
/** @internal */
|
||||
export declare function createEncode({ coder, ipfs }: Config): EncodeFn;
|
||||
/** @internal */
|
||||
export declare function createIs(validate: ValidateFn): ValidateFn;
|
||||
/** @internal */
|
||||
export declare function createValidate({ chars, ipfs, type, withPadding }: Config): ValidateFn;
|
||||
Reference in New Issue
Block a user