Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use correct CIDs #41

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 39 additions & 14 deletions build/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ function checkKey(key) {
throw new Error(`bad key: ${JSON.stringify(key)}`);
}
}
async function createEntryFromFile(filepath) {
async function createEntryFromFile(filepath, multicode) {
const buffer = await Deno.readFile(filepath);
const key = createCID(buffer);
const key = createCID(buffer, multicode);
return [key, buffer];
}
function createCID(data, multicode = multicodes.RAW) {
Expand Down Expand Up @@ -260,7 +260,15 @@ var init_utils = __esm({
init_database_sqlite();
backends = { fs: database_fs_exports, sqlite: database_sqlite_exports };
multibase = base58btc;
multicodes = { JSON: 512, RAW: 0 };
multicodes = {
RAW: 0,
JSON: 512,
SHELTER_CONTRACT_MANIFEST: 5316096,
SHELTER_CONTRACT_TEXT: 5316097,
SHELTER_CONTRACT_DATA: 5316098,
SHELTER_FILE_MANIFEST: 5316099,
SHELTER_FILE_CHUNK: 5316100
};
multihasher = default3.blake2b.blake2b256;
readJsonFile = async (file) => {
const contents = await Deno.readTextFile(path.resolve(String(file)));
Expand Down Expand Up @@ -297,8 +305,25 @@ async function upload(args, internal = false) {
throw new Error(`missing files!`);
const uploaded = [];
const uploaderFn = await isDir(urlOrDirOrSqliteFile) ? uploadEntryToDir : urlOrDirOrSqliteFile.endsWith(".db") ? uploadEntryToSQLite : uploadEntryToURL;
for (const filepath of files) {
const entry = await createEntryFromFile(filepath);
for (const filepath_ of files) {
let type = multicodes.RAW;
let filepath = filepath_;
if (filepath_[1] === "|") {
switch (filepath_[0]) {
case "r":
break;
case "m":
type = multicodes.SHELTER_CONTRACT_MANIFEST;
break;
case "t":
type = multicodes.SHELTER_CONTRACT_TEXT;
break;
default:
throw new Error("Unknown file type: " + filepath_[0]);
}
filepath = filepath_.slice(2);
}
const entry = await createEntryFromFile(filepath, type);
const destination = await uploaderFn(entry, urlOrDirOrSqliteFile);
if (!internal) {
console.log(colors.green("uploaded:"), destination);
Expand Down Expand Up @@ -351,11 +376,11 @@ async function deploy(args) {
const json = JSON.parse(Deno.readTextFileSync(manifestPath));
const body = JSON.parse(json.body);
const dirname = path.dirname(manifestPath);
toUpload.push(path.join(dirname, body.contract.file));
toUpload.push("t|" + path.join(dirname, body.contract.file));
if (body.contractSlim) {
toUpload.push(path.join(dirname, body.contractSlim.file));
toUpload.push("t|" + path.join(dirname, body.contractSlim.file));
}
toUpload.push(manifestPath);
toUpload.push("m|" + manifestPath);
}
await upload([urlOrDirOrSqliteFile, ...toUpload], true);
}
Expand Down Expand Up @@ -458,13 +483,13 @@ async function get(args) {

// src/hash.ts
init_utils();
async function hash(args, internal = false) {
async function hash(args, multicode = multicodes.RAW, internal = false) {
const [filename] = args;
if (!filename) {
console.error("please pass in a file");
Deno.exit(1);
}
const [cid] = await createEntryFromFile(filename);
const [cid] = await createEntryFromFile(filename, multicode);
if (!internal) {
console.log(`CID(${filename}):`, cid);
}
Expand Down Expand Up @@ -787,15 +812,15 @@ async function manifest(args) {
name,
version: version2,
contract: {
hash: await hash([contractFile], true),
hash: await hash([contractFile], multicodes.SHELTER_CONTRACT_TEXT, true),
file: contractBasename
},
signingKeys: publicKeys
};
if (slim) {
body.contractSlim = {
file: path.basename(slim),
hash: await hash([slim], true)
hash: await hash([slim], multicodes.SHELTER_CONTRACT_TEXT, true)
};
}
const serializedBody = JSON.stringify(body);
Expand Down Expand Up @@ -920,12 +945,12 @@ var verifySignature2 = async (args, internal = false) => {
if (!body.contract?.file) {
exit("Invalid manifest: no contract file", internal);
}
const computedHash = await hash([path.join(parsedFilepath.dir, body.contract.file)], true);
const computedHash = await hash([path.join(parsedFilepath.dir, body.contract.file)], multicodes.SHELTER_CONTRACT_TEXT, true);
if (computedHash !== body.contract.hash) {
exit(`Invalid contract file hash. Expected ${body.contract.hash} but got ${computedHash}`, internal);
}
if (body.contractSlim) {
const computedHash2 = await hash([path.join(parsedFilepath.dir, body.contractSlim.file)], true);
const computedHash2 = await hash([path.join(parsedFilepath.dir, body.contractSlim.file)], multicodes.SHELTER_CONTRACT_TEXT, true);
if (computedHash2 !== body.contractSlim.hash) {
exit(`Invalid slim contract file hash. Expected ${body.contractSlim.hash} but got ${computedHash2}`, internal);
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions src/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
import { path } from './deps.ts'
import { upload } from './upload.ts'

// Prefixes to use to select the correct CID to use
const CONTRACT_TEXT_PREFIX = `t|`
const CONTRACT_MANIFEST_PREFIX = `m|`

export async function deploy (args: string[]) {
const [urlOrDirOrSqliteFile, ...manifests] = args
if (manifests.length === 0) throw new Error('missing url or manifests!')
Expand All @@ -13,11 +17,11 @@ export async function deploy (args: string[]) {
const json = JSON.parse(Deno.readTextFileSync(manifestPath))
const body = JSON.parse(json.body)
const dirname = path.dirname(manifestPath)
toUpload.push(path.join(dirname, body.contract.file))
toUpload.push(CONTRACT_TEXT_PREFIX + path.join(dirname, body.contract.file))
if (body.contractSlim) {
toUpload.push(path.join(dirname, body.contractSlim.file))
toUpload.push(CONTRACT_TEXT_PREFIX + path.join(dirname, body.contractSlim.file))
}
toUpload.push(manifestPath)
toUpload.push(CONTRACT_MANIFEST_PREFIX + manifestPath)
}
await upload([urlOrDirOrSqliteFile, ...toUpload], true)
}
6 changes: 3 additions & 3 deletions src/hash.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
'use strict'

import { createEntryFromFile } from './utils.ts'
import { createEntryFromFile, multicodes } from './utils.ts'

// TODO: use https://doc.deno.land/https://deno.land/std@0.140.0/streams/mod.ts/~/iterateReader instead to read in large files, and then use blake2b[Init,Update,Final] to iteratively calculate the hash
// Verify that it returns the same hash as when we use readAll https://doc.deno.land/https://deno.land/std@0.140.0/streams/mod.ts/~/readAll

export async function hash (args: string[], internal = false) {
export async function hash (args: string[], multicode: number = multicodes.RAW, internal = false) {
const [filename] = args
if (!filename) {
console.error('please pass in a file')
Deno.exit(1)
}
const [cid] = await createEntryFromFile(filename)
const [cid] = await createEntryFromFile(filename, multicode)
if (!internal) {
console.log(`CID(${filename}):`, cid)
}
Expand Down
6 changes: 3 additions & 3 deletions src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { flags, path, colors } from './deps.ts'
import { hash } from './hash.ts'
import { exit, readJsonFile, revokeNet } from './utils.ts'
import { exit, multicodes, readJsonFile, revokeNet } from './utils.ts'
import { EDWARDS25519SHA512BATCH, deserializeKey, keyId, serializeKey, sign } from './lib/crypto.ts'

// import { writeAllSync } from "https://deno.land/std@0.141.0/streams/mod.ts"
Expand Down Expand Up @@ -45,15 +45,15 @@ export async function manifest (args: string[]) {
name,
version,
contract: {
hash: await hash([contractFile as string], true),
hash: await hash([contractFile as string], multicodes.SHELTER_CONTRACT_TEXT, true),
file: contractBasename
},
signingKeys: publicKeys
}
if (slim) {
body.contractSlim = {
file: path.basename(slim),
hash: await hash([slim], true)
hash: await hash([slim], multicodes.SHELTER_CONTRACT_TEXT, true)
}
}
const serializedBody = JSON.stringify(body)
Expand Down
26 changes: 23 additions & 3 deletions src/upload.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

import { path, colors } from './deps.ts'
import { type Entry, createEntryFromFile, isDir, revokeNet } from './utils.ts'
import { type Entry, createEntryFromFile, isDir, multicodes, revokeNet } from './utils.ts'

// chel upload <url-or-dir-or-sqlitedb> <file1> [<file2> [<file3> ...]]

Expand All @@ -14,8 +14,28 @@ export async function upload (args: string[], internal = false) {
: urlOrDirOrSqliteFile.endsWith('.db')
? uploadEntryToSQLite
: uploadEntryToURL
for (const filepath of files) {
const entry = await createEntryFromFile(filepath)
for (const filepath_ of files) {
let type = multicodes.RAW
let filepath = filepath_
if (internal) {
// The `{type}|` prefix is used to determine which kind of CID is needed
if (filepath_[1] !== '|') throw new Error('Invalid path format')
switch (filepath_[0]) {
case 'r':
// raw file type
break
case 'm':
type = multicodes.SHELTER_CONTRACT_MANIFEST
break
case 't':
type = multicodes.SHELTER_CONTRACT_TEXT
break
default:
throw new Error('Unknown file type: ' + filepath_[0])
}
filepath = filepath_.slice(2)
}
const entry = await createEntryFromFile(filepath, type)
taoeffect marked this conversation as resolved.
Show resolved Hide resolved
const destination = await uploaderFn(entry, urlOrDirOrSqliteFile)
if (!internal) {
console.log(colors.green('uploaded:'), destination)
Expand Down
14 changes: 11 additions & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ import * as sqlite from './database-sqlite.ts'
const backends = { fs, sqlite }
const multibase = base58btc
// Values from https://github.com/multiformats/multicodec/blob/master/table.csv
const multicodes = { JSON: 0x0200, RAW: 0x00 }
export const multicodes = {
RAW: 0x00,
JSON: 0x0200,
SHELTER_CONTRACT_MANIFEST: 0x511e00,
SHELTER_CONTRACT_TEXT: 0x511e01,
SHELTER_CONTRACT_DATA: 0x511e02,
SHELTER_FILE_MANIFEST: 0x511e03,
SHELTER_FILE_CHUNK: 0x511e04
}
// @ts-ignore Property 'blake2b256' does not exist on type '{}'.
const multihasher = blake.blake2b.blake2b256

Expand All @@ -22,9 +30,9 @@ export function checkKey (key: string): void {
}
}

export async function createEntryFromFile (filepath: string): Promise<Entry> {
export async function createEntryFromFile (filepath: string, multicode: number): Promise<Entry> {
const buffer = await Deno.readFile(filepath)
const key = createCID(buffer)
const key = createCID(buffer, multicode)
return [key, buffer]
}

Expand Down
6 changes: 3 additions & 3 deletions src/verifySignature.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hash } from './commands.ts'
import { colors, flags, path } from './deps.ts'
import { verifySignature as cryptoVerifySignature, deserializeKey, keyId } from './lib/crypto.ts'
import { exit, readJsonFile, revokeNet } from './utils.ts'
import { exit, multicodes, readJsonFile, revokeNet } from './utils.ts'

export const verifySignature = async (args: string[], internal = false) => {
await revokeNet()
Expand Down Expand Up @@ -64,13 +64,13 @@ export const verifySignature = async (args: string[], internal = false) => {
if (!body.contract?.file) {
exit('Invalid manifest: no contract file', internal)
}
const computedHash = await hash([path.join(parsedFilepath.dir, body.contract.file)], true)
const computedHash = await hash([path.join(parsedFilepath.dir, body.contract.file)], multicodes.SHELTER_CONTRACT_TEXT, true)
if (computedHash !== body.contract.hash) {
exit(`Invalid contract file hash. Expected ${body.contract.hash} but got ${computedHash}`, internal)
}

if (body.contractSlim) {
const computedHash = await hash([path.join(parsedFilepath.dir, body.contractSlim.file)], true)
const computedHash = await hash([path.join(parsedFilepath.dir, body.contractSlim.file)], multicodes.SHELTER_CONTRACT_TEXT, true)
if (computedHash !== body.contractSlim.hash) {
exit(`Invalid slim contract file hash. Expected ${body.contractSlim.hash} but got ${computedHash}`, internal)
}
Expand Down
2 changes: 1 addition & 1 deletion test/assets/bundle-tampered.bundle.x.manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"head":"{\"manifestVersion\":\"1.0.0\"}","body":"{\"version\":\"x\",\"contract\":{\"hash\":\"z9brRu3VFNnnn1BgyRBaQfs7Jyrx18K2ASgDKAiLyWx3KMVQGL8X\",\"file\":\"bundle-tampered.bundle.example\"},\"signingKeys\":[\"[\\\"edwards25519sha512batch\\\",\\\"PW6nt32OYuWpbHfUk5HtcSTgP+k28Uu752BkLun4U1Y=\\\",null]\",\"[\\\"edwards25519sha512batch\\\",\\\"PfdE8jdWCexc4vDrr6dHworStAhO4Jt8rf6cbdoLxT8=\\\",null]\"],\"contractSlim\":{\"file\":\"bundle-tampered.slim.example\",\"hash\":\"z9brRu3VFNnnn1BgyRBaQfs7Jyrx18K2ASgDKAiLyWx3KMVQGL8X\"}}","signature":{"keyId":"z2Drjgb5QQTKooY4YntALeT1uEQtpo9bP7J9gt5g6kUyhtL5bPd","value":"0kzsDs1sT2A9y8hVKlf7FQBOhnIxaOa1CHWf4+bVE3xBXFt+TyjKpdHKEZ3cc/Qn6i3l3nTKYACElsDv3oEoDw=="}}
{"head":"{\"manifestVersion\":\"1.0.0\"}","body":"{\"name\":\"bundle-tampered.bundle\",\"version\":\"x\",\"contract\":{\"hash\":\"zLAeVmpcc88gFsh6ctZQuXNsnXG8GRX7XGPooEzmQAkAwWfcBmysv1Aw\",\"file\":\"bundle-tampered.bundle.example\"},\"signingKeys\":[\"[\\\"edwards25519sha512batch\\\",\\\"PW6nt32OYuWpbHfUk5HtcSTgP+k28Uu752BkLun4U1Y=\\\",null]\",\"[\\\"edwards25519sha512batch\\\",\\\"PfdE8jdWCexc4vDrr6dHworStAhO4Jt8rf6cbdoLxT8=\\\",null]\"],\"contractSlim\":{\"file\":\"bundle-tampered.slim.example\",\"hash\":\"zLAeVmpcc88gFsh6ctZQuXNsnXG8GRX7XGPooEzmQAkAwWfcBmysv1Aw\"}}","signature":{"keyId":"z2Drjgb5QQTKooY4YntALeT1uEQtpo9bP7J9gt5g6kUyhtL5bPd","value":"MXnrqDWcb80hjumpXb4GQ2fofLr5TTomuTbWgTYQ52VPylw7kG8BZRflQ1l7FMUrpL5ts51uy2cHAsqd8NMXDg=="}}
2 changes: 1 addition & 1 deletion test/assets/slim-tampered.bundle.x.manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"head":"{\"manifestVersion\":\"1.0.0\"}","body":"{\"version\":\"x\",\"contract\":{\"hash\":\"z9brRu3VFNnnn1BgyRBaQfs7Jyrx18K2ASgDKAiLyWx3KMVQGL8X\",\"file\":\"slim-tampered.bundle.example\"},\"signingKeys\":[\"[\\\"edwards25519sha512batch\\\",\\\"PW6nt32OYuWpbHfUk5HtcSTgP+k28Uu752BkLun4U1Y=\\\",null]\",\"[\\\"edwards25519sha512batch\\\",\\\"PfdE8jdWCexc4vDrr6dHworStAhO4Jt8rf6cbdoLxT8=\\\",null]\"],\"contractSlim\":{\"file\":\"slim-tampered.slim.example\",\"hash\":\"z9brRu3VFNnnn1BgyRBaQfs7Jyrx18K2ASgDKAiLyWx3KMVQGL8X\"}}","signature":{"keyId":"z2Drjgb5QQTKooY4YntALeT1uEQtpo9bP7J9gt5g6kUyhtL5bPd","value":"W1bLtxCz11OgGhH9ttBS5d8wybkH6tilhdFNWy6U7UbCHQ5s9dYOwnU28G7ZoyWcwOFGjO7OY8fnea3u8H8qDQ=="}}
{"head":"{\"manifestVersion\":\"1.0.0\"}","body":"{\"name\":\"slim-tampered.bundle\",\"version\":\"x\",\"contract\":{\"hash\":\"zLAeVmpcc88gFsh6ctZQuXNsnXG8GRX7XGPooEzmQAkAwWfcBmysv1Aw\",\"file\":\"slim-tampered.bundle.example\"},\"signingKeys\":[\"[\\\"edwards25519sha512batch\\\",\\\"PW6nt32OYuWpbHfUk5HtcSTgP+k28Uu752BkLun4U1Y=\\\",null]\",\"[\\\"edwards25519sha512batch\\\",\\\"PfdE8jdWCexc4vDrr6dHworStAhO4Jt8rf6cbdoLxT8=\\\",null]\"],\"contractSlim\":{\"file\":\"slim-tampered.slim.example\",\"hash\":\"zLAeVmpcc88gFsh6ctZQuXNsnXG8GRX7XGPooEzmQAkAwWfcBmysv1Aw\"}}","signature":{"keyId":"z2Drjgb5QQTKooY4YntALeT1uEQtpo9bP7J9gt5g6kUyhtL5bPd","value":"l+WiA6hZdDCZ2Tk2fGefN8Js6wTWnsCeA5axtN2BwsWQE+gG+0+dUX2bi3ssdN4dhR9jhG0+2hzfisK51dVyBg=="}}
2 changes: 1 addition & 1 deletion test/assets/valid-signature-missing-id.x.manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"head":"{\"manifestVersion\":\"1.0.0\"}","body":"{\"version\":\"x\",\"contract\":{\"hash\":\"z9brRu3VFNnnn1BgyRBaQfs7Jyrx18K2ASgDKAiLyWx3KMVQGL8X\",\"file\":\"valid-signature.example\"},\"signingKeys\":[\"[\\\"edwards25519sha512batch\\\",\\\"PW6nt32OYuWpbHfUk5HtcSTgP+k28Uu752BkLun4U1Y=\\\",null]\",\"[\\\"edwards25519sha512batch\\\",\\\"PfdE8jdWCexc4vDrr6dHworStAhO4Jt8rf6cbdoLxT8=\\\",null]\"]}","signature":{"removed-keyId":"z2Drjgb5QQTKooY4YntALeT1uEQtpo9bP7J9gt5g6kUyhtL5bPd","value":"Ly1GhzGGwTArCzfGiZQutp+ev9Bxi1THYDa6+RevIfrAeWw3yedWuZltMjY791JXR9DI/YjJNwj2W9XayImUBg=="}}
{"head":"{\"manifestVersion\":\"1.0.0\"}","body":"{\"name\":\"valid-signature\",\"version\":\"x\",\"contract\":{\"hash\":\"zLAeVmpcc88gFsh6ctZQuXNsnXG8GRX7XGPooEzmQAkAwWfcBmysv1Aw\",\"file\":\"valid-signature.example\"},\"signingKeys\":[\"[\\\"edwards25519sha512batch\\\",\\\"PW6nt32OYuWpbHfUk5HtcSTgP+k28Uu752BkLun4U1Y=\\\",null]\",\"[\\\"edwards25519sha512batch\\\",\\\"PfdE8jdWCexc4vDrr6dHworStAhO4Jt8rf6cbdoLxT8=\\\",null]\"]}","signature":{"removed-keyId":"z2Drjgb5QQTKooY4YntALeT1uEQtpo9bP7J9gt5g6kUyhtL5bPd","value":"5s4xVXXhajcOGmN4eUFTw8wrCK3S2lY2JtHJYdNe0KOpS0hn/Xcmb5/bKSPLAOF8E/vjFVqdFmZOxwEhNa3KCw=="}}
2 changes: 1 addition & 1 deletion test/assets/valid-signature-tampered.x.manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"head":"{\"manifestVersion\":\"1.0.0\"}","body":"{\"INSERTION\":\"x\",\"version\":\"x\",\"contract\":{\"hash\":\"z9brRu3VFNnnn1BgyRBaQfs7Jyrx18K2ASgDKAiLyWx3KMVQGL8X\",\"file\":\"valid-signature.example\"},\"signingKeys\":[\"[\\\"edwards25519sha512batch\\\",\\\"PW6nt32OYuWpbHfUk5HtcSTgP+k28Uu752BkLun4U1Y=\\\",null]\",\"[\\\"edwards25519sha512batch\\\",\\\"PfdE8jdWCexc4vDrr6dHworStAhO4Jt8rf6cbdoLxT8=\\\",null]\"]}","signature":{"keyId":"z2Drjgb5QQTKooY4YntALeT1uEQtpo9bP7J9gt5g6kUyhtL5bPd","value":"Ly1GhzGGwTArCzfGiZQutp+ev9Bxi1THYDa6+RevIfrAeWw3yedWuZltMjY791JXR9DI/YjJNwj2W9XayImUBg=="}}
{"head":"{\"manifestVersion\":\"1.0.0\"}","body":"{\"INSERTION\":\"x\",\"name\":\"valid-signature\",\"version\":\"x\",\"contract\":{\"hash\":\"zLAeVmpcc88gFsh6ctZQuXNsnXG8GRX7XGPooEzmQAkAwWfcBmysv1Aw\",\"file\":\"valid-signature.example\"},\"signingKeys\":[\"[\\\"edwards25519sha512batch\\\",\\\"PW6nt32OYuWpbHfUk5HtcSTgP+k28Uu752BkLun4U1Y=\\\",null]\",\"[\\\"edwards25519sha512batch\\\",\\\"PfdE8jdWCexc4vDrr6dHworStAhO4Jt8rf6cbdoLxT8=\\\",null]\"]}","signature":{"keyId":"z2Drjgb5QQTKooY4YntALeT1uEQtpo9bP7J9gt5g6kUyhtL5bPd","value":"5s4xVXXhajcOGmN4eUFTw8wrCK3S2lY2JtHJYdNe0KOpS0hn/Xcmb5/bKSPLAOF8E/vjFVqdFmZOxwEhNa3KCw=="}}
2 changes: 1 addition & 1 deletion test/assets/valid-signature-wrong-id.x.manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"head":"{\"manifestVersion\":\"1.0.0\"}","body":"{\"INSERTION\":\"x\",\"version\":\"x\",\"contract\":{\"hash\":\"z9brRu3VFNnnn1BgyRBaQfs7Jyrx18K2ASgDKAiLyWx3KMVQGL8X\",\"file\":\"valid-signature.example\"},\"signingKeys\":[\"[\\\"edwards25519sha512batch\\\",\\\"PW6nt32OYuWpbHfUk5HtcSTgP+k28Uu752BkLun4U1Y=\\\",null]\",\"[\\\"edwards25519sha512batch\\\",\\\"PfdE8jdWCexc4vDrr6dHworStAhO4Jt8rf6cbdoLxT8=\\\",null]\"]}","signature":{"keyId":"<INSERTION>-z2Drjgb5QQTKooY4YntALeT1uEQtpo9bP7J9gt5g6kUyhtL5bPd","value":"Ly1GhzGGwTArCzfGiZQutp+ev9Bxi1THYDa6+RevIfrAeWw3yedWuZltMjY791JXR9DI/YjJNwj2W9XayImUBg=="}}
{"head":"{\"manifestVersion\":\"1.0.0\"}","body":"{\"name\":\"valid-signature\",\"version\":\"x\",\"contract\":{\"hash\":\"zLAeVmpcc88gFsh6ctZQuXNsnXG8GRX7XGPooEzmQAkAwWfcBmysv1Aw\",\"file\":\"valid-signature.example\"},\"signingKeys\":[\"[\\\"edwards25519sha512batch\\\",\\\"PW6nt32OYuWpbHfUk5HtcSTgP+k28Uu752BkLun4U1Y=\\\",null]\",\"[\\\"edwards25519sha512batch\\\",\\\"PfdE8jdWCexc4vDrr6dHworStAhO4Jt8rf6cbdoLxT8=\\\",null]\"]}","signature":{"keyId":"<INSERTION>-z2Drjgb5QQTKooY4YntALeT1uEQtpo9bP7J9gt5g6kUyhtL5bPd","value":"5s4xVXXhajcOGmN4eUFTw8wrCK3S2lY2JtHJYdNe0KOpS0hn/Xcmb5/bKSPLAOF8E/vjFVqdFmZOxwEhNa3KCw=="}}
2 changes: 1 addition & 1 deletion test/assets/valid-signature.x.manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"head":"{\"manifestVersion\":\"1.0.0\"}","body":"{\"version\":\"x\",\"contract\":{\"hash\":\"z9brRu3VFNnnn1BgyRBaQfs7Jyrx18K2ASgDKAiLyWx3KMVQGL8X\",\"file\":\"valid-signature.example\"},\"signingKeys\":[\"[\\\"edwards25519sha512batch\\\",\\\"PW6nt32OYuWpbHfUk5HtcSTgP+k28Uu752BkLun4U1Y=\\\",null]\",\"[\\\"edwards25519sha512batch\\\",\\\"PfdE8jdWCexc4vDrr6dHworStAhO4Jt8rf6cbdoLxT8=\\\",null]\"]}","signature":{"keyId":"z2Drjgb5QQTKooY4YntALeT1uEQtpo9bP7J9gt5g6kUyhtL5bPd","value":"Ly1GhzGGwTArCzfGiZQutp+ev9Bxi1THYDa6+RevIfrAeWw3yedWuZltMjY791JXR9DI/YjJNwj2W9XayImUBg=="}}
{"head":"{\"manifestVersion\":\"1.0.0\"}","body":"{\"name\":\"valid-signature\",\"version\":\"x\",\"contract\":{\"hash\":\"zLAeVmpcc88gFsh6ctZQuXNsnXG8GRX7XGPooEzmQAkAwWfcBmysv1Aw\",\"file\":\"valid-signature.example\"},\"signingKeys\":[\"[\\\"edwards25519sha512batch\\\",\\\"PW6nt32OYuWpbHfUk5HtcSTgP+k28Uu752BkLun4U1Y=\\\",null]\",\"[\\\"edwards25519sha512batch\\\",\\\"PfdE8jdWCexc4vDrr6dHworStAhO4Jt8rf6cbdoLxT8=\\\",null]\"]}","signature":{"keyId":"z2Drjgb5QQTKooY4YntALeT1uEQtpo9bP7J9gt5g6kUyhtL5bPd","value":"5s4xVXXhajcOGmN4eUFTw8wrCK3S2lY2JtHJYdNe0KOpS0hn/Xcmb5/bKSPLAOF8E/vjFVqdFmZOxwEhNa3KCw=="}}
Loading