@meshsdk/core-cst 1.9.0-beta.32 → 1.9.0-beta.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +19 -1
- package/dist/index.d.ts +19 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -254,7 +254,13 @@ type Signer = {
|
|
|
254
254
|
key: Ed25519PrivateKey;
|
|
255
255
|
};
|
|
256
256
|
|
|
257
|
-
/**
|
|
257
|
+
/**
|
|
258
|
+
* Check the signature of a given data string
|
|
259
|
+
* @param data The data string to verify the signature against
|
|
260
|
+
* @param {key, signature} The signature obtained by `signData`
|
|
261
|
+
* @param address Optional Bech32 string of a stake, stake_test1, addr, or addr_test1 address. If provided, this function will validate the signer's address against this value.
|
|
262
|
+
* @returns boolean
|
|
263
|
+
*/
|
|
258
264
|
declare const checkSignature: (data: string, { key, signature }: DataSignature, address?: string) => Promise<boolean>;
|
|
259
265
|
|
|
260
266
|
declare class CoseSign1 {
|
|
@@ -284,8 +290,20 @@ declare class CoseSign1 {
|
|
|
284
290
|
declare const getPublicKeyFromCoseKey: (cbor: string) => Buffer$1;
|
|
285
291
|
declare const getCoseKeyFromPublicKey: (cbor: string) => Buffer$1;
|
|
286
292
|
|
|
293
|
+
/**
|
|
294
|
+
* Generate a nonce string
|
|
295
|
+
* @param label The label to prepend to the nonce
|
|
296
|
+
* @param length The length of the nonce
|
|
297
|
+
* @returns The generated nonce in hex format
|
|
298
|
+
*/
|
|
287
299
|
declare const generateNonce: (label?: string, length?: number) => string;
|
|
288
300
|
|
|
301
|
+
/**
|
|
302
|
+
* Sign the data string using the provided signer
|
|
303
|
+
* @param data The data string to sign
|
|
304
|
+
* @param signer The signer object containing the key and address
|
|
305
|
+
* @returns DataSignature for verification
|
|
306
|
+
*/
|
|
289
307
|
declare const signData: (data: string, signer: Signer) => DataSignature;
|
|
290
308
|
|
|
291
309
|
declare const resolveDataHash: (rawData: BuilderData["content"], type?: PlutusDataType) => string;
|
package/dist/index.d.ts
CHANGED
|
@@ -254,7 +254,13 @@ type Signer = {
|
|
|
254
254
|
key: Ed25519PrivateKey;
|
|
255
255
|
};
|
|
256
256
|
|
|
257
|
-
/**
|
|
257
|
+
/**
|
|
258
|
+
* Check the signature of a given data string
|
|
259
|
+
* @param data The data string to verify the signature against
|
|
260
|
+
* @param {key, signature} The signature obtained by `signData`
|
|
261
|
+
* @param address Optional Bech32 string of a stake, stake_test1, addr, or addr_test1 address. If provided, this function will validate the signer's address against this value.
|
|
262
|
+
* @returns boolean
|
|
263
|
+
*/
|
|
258
264
|
declare const checkSignature: (data: string, { key, signature }: DataSignature, address?: string) => Promise<boolean>;
|
|
259
265
|
|
|
260
266
|
declare class CoseSign1 {
|
|
@@ -284,8 +290,20 @@ declare class CoseSign1 {
|
|
|
284
290
|
declare const getPublicKeyFromCoseKey: (cbor: string) => Buffer$1;
|
|
285
291
|
declare const getCoseKeyFromPublicKey: (cbor: string) => Buffer$1;
|
|
286
292
|
|
|
293
|
+
/**
|
|
294
|
+
* Generate a nonce string
|
|
295
|
+
* @param label The label to prepend to the nonce
|
|
296
|
+
* @param length The length of the nonce
|
|
297
|
+
* @returns The generated nonce in hex format
|
|
298
|
+
*/
|
|
287
299
|
declare const generateNonce: (label?: string, length?: number) => string;
|
|
288
300
|
|
|
301
|
+
/**
|
|
302
|
+
* Sign the data string using the provided signer
|
|
303
|
+
* @param data The data string to sign
|
|
304
|
+
* @param signer The signer object containing the key and address
|
|
305
|
+
* @returns DataSignature for verification
|
|
306
|
+
*/
|
|
289
307
|
declare const signData: (data: string, signer: Signer) => DataSignature;
|
|
290
308
|
|
|
291
309
|
declare const resolveDataHash: (rawData: BuilderData["content"], type?: PlutusDataType) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshsdk/core-cst",
|
|
3
|
-
"version": "1.9.0-beta.
|
|
3
|
+
"version": "1.9.0-beta.35",
|
|
4
4
|
"description": "Types and utilities functions between Mesh and cardano-js-sdk",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"browser": "./dist/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@harmoniclabs/plutus-data": "1.2.4",
|
|
45
45
|
"@harmoniclabs/uplc": "1.2.4",
|
|
46
46
|
"@harmoniclabs/pair": "^1.0.0",
|
|
47
|
-
"@meshsdk/common": "1.9.0-beta.
|
|
47
|
+
"@meshsdk/common": "1.9.0-beta.35",
|
|
48
48
|
"@types/base32-encoding": "^1.0.2",
|
|
49
49
|
"base32-encoding": "^1.0.0",
|
|
50
50
|
"bech32": "^2.0.0",
|