Comparing version 0.0.28 to 0.0.29
@@ -12,3 +12,3 @@ export { blake2b } from "./blake2b.js"; | ||
export { progressiveFetch, progressiveFetchResult } from "./progressivefetch.js"; | ||
export { taggedRegistryEntryKeys, deriveRegistryEntryID, resolverLink, verifyRegistrySignature } from "./registry.js"; | ||
export { computeRegistrySignature, deriveRegistryEntryID, entryIDToSkylink, resolverLink, taggedRegistryEntryKeys, verifyRegistrySignature, } from "./registry.js"; | ||
export { generateSeedPhraseDeterministic, seedPhraseToSeed, validSeedPhrase } from "./seed.js"; | ||
@@ -15,0 +15,0 @@ export { sha512 } from "./sha512.js"; |
@@ -12,3 +12,3 @@ export { blake2b } from "./blake2b.js"; | ||
export { progressiveFetch } from "./progressivefetch.js"; | ||
export { taggedRegistryEntryKeys, deriveRegistryEntryID, resolverLink, verifyRegistrySignature } from "./registry.js"; | ||
export { computeRegistrySignature, deriveRegistryEntryID, entryIDToSkylink, resolverLink, taggedRegistryEntryKeys, verifyRegistrySignature, } from "./registry.js"; | ||
export { generateSeedPhraseDeterministic, seedPhraseToSeed, validSeedPhrase } from "./seed.js"; | ||
@@ -15,0 +15,0 @@ export { sha512 } from "./sha512.js"; |
import { ed25519Keypair } from "./ed25519.js"; | ||
import { error } from "./types.js"; | ||
declare function computeRegistrySignature(secretKey: Uint8Array, dataKey: Uint8Array, data: Uint8Array, revision: bigint): [signature: Uint8Array, encodedData: Uint8Array, err: error]; | ||
declare function computeRegistrySignature(secretKey: Uint8Array, dataKey: Uint8Array, data: Uint8Array, revision: bigint): [signature: Uint8Array, err: error]; | ||
declare function deriveRegistryEntryID(pubkey: Uint8Array, datakey: Uint8Array): [Uint8Array, string | null]; | ||
@@ -5,0 +5,0 @@ declare function entryIDToSkylink(entryID: Uint8Array): string; |
@@ -16,3 +16,3 @@ import { blake2b } from "./blake2b.js"; | ||
if (data.length > 86) { | ||
return [nu8, nu8, "registry data must be at most 86 bytes"]; | ||
return [nu8, "registry data must be at most 86 bytes"]; | ||
} | ||
@@ -22,7 +22,7 @@ // Build the encoded data. | ||
if (errEPB !== null) { | ||
return [nu8, nu8, addContextToErr(errEPB, "unable to encode provided registry data")]; | ||
return [nu8, addContextToErr(errEPB, "unable to encode provided registry data")]; | ||
} | ||
let [encodedRevision, errEU64] = encodeU64(revision); | ||
if (errEU64 !== null) { | ||
return [nu8, nu8, addContextToErr(errEU64, "unable to encode the revision number")]; | ||
return [nu8, addContextToErr(errEU64, "unable to encode the revision number")]; | ||
} | ||
@@ -38,5 +38,5 @@ // Build the signing data. | ||
if (errS !== null) { | ||
return [nu8, nu8, addContextToErr(errS, "unable to sign registry entry")]; | ||
return [nu8, addContextToErr(errS, "unable to sign registry entry")]; | ||
} | ||
return [sig, encodedData, null]; | ||
return [sig, null]; | ||
} | ||
@@ -43,0 +43,0 @@ // deriveRegistryEntryID derives a registry entry ID from a provided pubkey and |
{ | ||
"name": "libskynet", | ||
"version": "0.0.28", | ||
"version": "0.0.29", | ||
"description": "helper library to interact with skynet's low level primitives", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
142836