mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-24 07:48:01 +00:00
chore: update to version 14.0.11 and align website URLs
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* @name base58Validate
|
||||
* @summary Validates a base58 value.
|
||||
* @description
|
||||
* Validates that the supplied value is valid base58, throwing exceptions if not
|
||||
*/
|
||||
export declare const base58Validate: (value?: unknown, ipfsCompat?: boolean) => value is string;
|
||||
/**
|
||||
* @name base58Decode
|
||||
* @summary Decodes a base58 value.
|
||||
* @description
|
||||
* From the provided input, decode the base58 and return the result as an `Uint8Array`.
|
||||
*/
|
||||
export declare const base58Decode: (value: string, ipfsCompat?: boolean) => Uint8Array;
|
||||
/**
|
||||
* @name base58Encode
|
||||
* @summary Creates a base58 value.
|
||||
* @description
|
||||
* From the provided input, create the base58 and return the result as a string.
|
||||
*/
|
||||
export declare const base58Encode: (value: import("@pezkuwi/util/types").U8aLike, ipfsCompat?: boolean) => string;
|
||||
/**
|
||||
* @name isBase58
|
||||
* @description Checks if the input is in base58, returning true/false
|
||||
*/
|
||||
export declare const isBase58: (value?: unknown, ipfsCompat?: boolean) => value is string;
|
||||
@@ -0,0 +1,37 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.isBase58 = exports.base58Encode = exports.base58Decode = exports.base58Validate = void 0;
|
||||
const base_1 = require("@scure/base");
|
||||
const helpers_js_1 = require("../base32/helpers.js");
|
||||
const config = {
|
||||
chars: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz',
|
||||
coder: base_1.base58,
|
||||
ipfs: 'z',
|
||||
type: 'base58'
|
||||
};
|
||||
/**
|
||||
* @name base58Validate
|
||||
* @summary Validates a base58 value.
|
||||
* @description
|
||||
* Validates that the supplied value is valid base58, throwing exceptions if not
|
||||
*/
|
||||
exports.base58Validate = (0, helpers_js_1.createValidate)(config);
|
||||
/**
|
||||
* @name base58Decode
|
||||
* @summary Decodes a base58 value.
|
||||
* @description
|
||||
* From the provided input, decode the base58 and return the result as an `Uint8Array`.
|
||||
*/
|
||||
exports.base58Decode = (0, helpers_js_1.createDecode)(config, exports.base58Validate);
|
||||
/**
|
||||
* @name base58Encode
|
||||
* @summary Creates a base58 value.
|
||||
* @description
|
||||
* From the provided input, create the base58 and return the result as a string.
|
||||
*/
|
||||
exports.base58Encode = (0, helpers_js_1.createEncode)(config);
|
||||
/**
|
||||
* @name isBase58
|
||||
* @description Checks if the input is in base58, returning true/false
|
||||
*/
|
||||
exports.isBase58 = (0, helpers_js_1.createIs)(exports.base58Validate);
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* @summary Encode and decode base58 values
|
||||
*/
|
||||
export { base58Decode, base58Encode, base58Validate, isBase58 } from './bs58.js';
|
||||
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.isBase58 = exports.base58Validate = exports.base58Encode = exports.base58Decode = void 0;
|
||||
/**
|
||||
* @summary Encode and decode base58 values
|
||||
*/
|
||||
var bs58_js_1 = require("./bs58.js");
|
||||
Object.defineProperty(exports, "base58Decode", { enumerable: true, get: function () { return bs58_js_1.base58Decode; } });
|
||||
Object.defineProperty(exports, "base58Encode", { enumerable: true, get: function () { return bs58_js_1.base58Encode; } });
|
||||
Object.defineProperty(exports, "base58Validate", { enumerable: true, get: function () { return bs58_js_1.base58Validate; } });
|
||||
Object.defineProperty(exports, "isBase58", { enumerable: true, get: function () { return bs58_js_1.isBase58; } });
|
||||
Reference in New Issue
Block a user