@phala/pink-env
Advanced tools
Comparing version 1.0.9 to 1.0.10
/** Bytes represented in Uint8Array or hex string */ | ||
declare type Bytes = Uint8Array | string; | ||
declare type Headers = { | ||
type Bytes = Uint8Array | string; | ||
type Headers = { | ||
[key: string]: string; | ||
@@ -11,3 +11,3 @@ }; | ||
*/ | ||
export declare type TypeRegistry = { | ||
export type TypeRegistry = { | ||
[_opaqueBrand]: "TypeRegistry"; | ||
@@ -19,3 +19,3 @@ }; | ||
*/ | ||
export declare type Codec = { | ||
export type Codec = { | ||
encode: (value: any) => Uint8Array; | ||
@@ -127,4 +127,16 @@ decode: (value: Uint8Array) => any; | ||
body: Uint8Array | string; | ||
error?: string; | ||
}[]; | ||
/** | ||
* Derives a secret key from a salt. | ||
*/ | ||
deriveSecret(salt: Uint8Array | string): Uint8Array; | ||
/** | ||
* Hashes a message using the specified algorithm. | ||
* @param {string} algrithm - The name of the hash algorithm to use. | ||
* Supported values are "blake2b128", "blake2b256", "sha256", "keccak256". | ||
* @param {(Uint8Array|string)} message - The message to hash, either as a Uint8Array or a string. | ||
*/ | ||
hash(algrithm: string, message: Uint8Array | string): Uint8Array; | ||
/** | ||
* The SCALE codec object for encoding and decoding data. | ||
@@ -131,0 +143,0 @@ * @typedef SCALE |
{ | ||
"name": "@phala/pink-env", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "The js environment accessing of Phala's Phat contract.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
12818
319