{"_id":"dag-jose","_rev":"4574064","name":"dag-jose","description":"Typescript implementation of the IPLD dag-jose format","dist-tags":{"latest":"5.1.1","next":"2.0.0-rc.1"},"maintainers":[{"name":"dav1do","email":""},{"name":"npm.3box","email":""},{"name":"oed","email":""},{"name":"smrz2001","email":""},{"name":"stbrody","email":""},{"name":"ukstv","email":""}],"time":{"modified":"2026-04-10T15:36:48.000Z","created":"2020-08-19T14:06:41.136Z","5.1.1":"2024-07-22T19:36:58.899Z","5.1.0":"2024-05-20T15:32:52.892Z","5.0.0":"2024-04-15T17:45:07.660Z","4.0.0":"2023-01-11T11:15:53.406Z","3.0.1":"2022-10-20T17:20:15.543Z","3.0.0":"2022-10-19T18:46:54.939Z","2.0.1":"2022-06-29T15:47:11.608Z","2.0.0":"2022-04-19T11:25:55.840Z","2.0.0-rc.1":"2022-04-18T13:59:20.421Z","2.0.0-rc.0":"2022-04-11T09:08:09.049Z","1.0.0":"2021-06-03T09:00:31.423Z","0.3.0":"2020-10-01T13:51:08.251Z","0.2.0":"2020-09-14T07:46:59.126Z","0.1.1":"2020-08-19T15:47:29.163Z","0.1.0":"2020-08-19T14:06:41.136Z"},"users":{},"author":{"name":"Joel Thorstensson","email":"oed@3box.io"},"repository":{"type":"git","url":"git+https://github.com/ceramicnetwork/js-dag-jose.git"},"versions":{"5.1.1":{"name":"dag-jose","version":"5.1.1","description":"Typescript implementation of the IPLD dag-jose format","main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","exports":{".":{"import":"./lib/index.js"}},"scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules npx jest --coverage","build":"tsc -p tsconfig.json","prepublishOnly":"npm run build","prebuild":"npm run clean","lint":"eslint ./src --ext .js,.ts","clean":"rm -rf ./lib"},"repository":{"type":"git","url":"git+https://github.com/ceramicnetwork/js-dag-jose.git"},"keywords":["ipld","ipfs","jose","dag"],"author":{"name":"Joel Thorstensson","email":"oed@3box.io"},"license":"(Apache-2.0 OR MIT)","bugs":{"url":"https://github.com/ceramicnetwork/js-dag-jose/issues"},"homepage":"https://github.com/ceramicnetwork/js-dag-jose#readme","devDependencies":{"@babel/core":"^7.14.3","@babel/preset-env":"^7.14.4","@babel/preset-typescript":"^7.13.0","@stablelib/x25519":"^1.0.1","@types/jest":"^29.1.2","@types/lodash.transform":"^4.6.6","@typescript-eslint/eslint-plugin":"^5.18.0","@typescript-eslint/parser":"^5.18.0","babel-jest":"^29.2.0","did-jwt":"^6.0.0","eslint":"^8.12.0","eslint-config-3box":"^0.4.1","eslint-plugin-jest":"^27.1.2","fast-json-stable-stringify":"^2.1.0","jest":"^29.2.0","prettier":"^2.3.0","typescript":"^4.3.2","uint8arrays":"^5.0.3"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","multiformats":"~13.1.3"},"_id":"dag-jose@5.1.1","gitHead":"f1b2198b6f955b20b4b881fd12d254cdda6fbdc2","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"shasum":"02708321f14b6f43990e238010c73464916259a7","size":7766,"noattachment":false,"key":"/dag-jose/-/dag-jose-5.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-jose/download/dag-jose-5.1.1.tgz"},"_npmUser":{"name":"npm.3box","email":"services@3box.io"},"directories":{},"maintainers":[{"name":"dav1do","email":""},{"name":"npm.3box","email":""},{"name":"oed","email":""},{"name":"smrz2001","email":""},{"name":"stbrody","email":""},{"name":"ukstv","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dag-jose_5.1.1_1721677018720_0.9498540582872979"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-07-22T19:36:58.899Z","publish_time":1721677018899,"_source_registry_name":"default","_cnpm_publish_time":1721677018899},"5.1.0":{"name":"dag-jose","version":"5.1.0","description":"Typescript implementation of the IPLD dag-jose format","main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","exports":{".":{"import":"./lib/index.js"}},"scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules npx jest --coverage","build":"tsc -p tsconfig.json","prepublishOnly":"npm run build","prebuild":"npm run clean","lint":"eslint ./src --ext .js,.ts","clean":"rm -rf ./lib"},"repository":{"type":"git","url":"git+https://github.com/ceramicnetwork/js-dag-jose.git"},"keywords":["ipld","ipfs","jose","dag"],"author":{"name":"Joel Thorstensson","email":"oed@3box.io"},"license":"(Apache-2.0 OR MIT)","bugs":{"url":"https://github.com/ceramicnetwork/js-dag-jose/issues"},"homepage":"https://github.com/ceramicnetwork/js-dag-jose#readme","devDependencies":{"@babel/core":"^7.14.3","@babel/preset-env":"^7.14.4","@babel/preset-typescript":"^7.13.0","@stablelib/x25519":"^1.0.1","@types/jest":"^29.1.2","@types/lodash.transform":"^4.6.6","@typescript-eslint/eslint-plugin":"^5.18.0","@typescript-eslint/parser":"^5.18.0","babel-jest":"^29.2.0","did-jwt":"^6.0.0","eslint":"^8.12.0","eslint-config-3box":"^0.4.1","eslint-plugin-jest":"^27.1.2","fast-json-stable-stringify":"^2.1.0","jest":"^29.2.0","prettier":"^2.3.0","typescript":"^4.3.2","uint8arrays":"^5.0.3"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","multiformats":"^13.1.0"},"_id":"dag-jose@5.1.0","gitHead":"17e74d9e6874d9581bb5e8ba7dbb28a96bbddf70","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"shasum":"1c87391b199444ce5fb78cb53e708b7d79e095d8","size":7830,"noattachment":false,"key":"/dag-jose/-/dag-jose-5.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-jose/download/dag-jose-5.1.0.tgz"},"_npmUser":{"name":"ukstv","email":"sergey@ukstv.me"},"directories":{},"maintainers":[{"name":"dav1do","email":""},{"name":"npm.3box","email":""},{"name":"oed","email":""},{"name":"smrz2001","email":""},{"name":"stbrody","email":""},{"name":"ukstv","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dag-jose_5.1.0_1716219172751_0.23837819621306733"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-05-20T15:32:52.892Z","publish_time":1716219172892,"_source_registry_name":"default","_cnpm_publish_time":1716219172892},"5.0.0":{"name":"dag-jose","version":"5.0.0","description":"Typescript implementation of the IPLD dag-jose format","main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","exports":{".":{"import":"./lib/index.js"}},"scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules npx jest --coverage","build":"tsc -p tsconfig.json","prepublishOnly":"npm run build","prebuild":"npm run clean","lint":"eslint ./src --ext .js,.ts","clean":"rm -rf ./lib"},"repository":{"type":"git","url":"git+https://github.com/ceramicnetwork/js-dag-jose.git"},"keywords":["ipld","ipfs","jose","dag"],"author":{"name":"Joel Thorstensson","email":"oed@3box.io"},"license":"(Apache-2.0 OR MIT)","bugs":{"url":"https://github.com/ceramicnetwork/js-dag-jose/issues"},"homepage":"https://github.com/ceramicnetwork/js-dag-jose#readme","devDependencies":{"@babel/core":"^7.14.3","@babel/preset-env":"^7.14.4","@babel/preset-typescript":"^7.13.0","@stablelib/x25519":"^1.0.1","@types/jest":"^29.1.2","@types/lodash.transform":"^4.6.6","@typescript-eslint/eslint-plugin":"^5.18.0","@typescript-eslint/parser":"^5.18.0","babel-jest":"^29.2.0","blockcodec-to-ipld-format":"^2.0.0","did-jwt":"^6.0.0","eslint":"^8.12.0","eslint-config-3box":"^0.4.1","eslint-plugin-jest":"^27.1.2","fast-json-stable-stringify":"^2.1.0","ipld":"^0.30.0","ipld-in-memory":"^8.0.0","jest":"^29.2.0","prettier":"^2.3.0","typescript":"^4.3.2","uint8arrays":"^5.0.3"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","multiformats":"^13.1.0"},"_id":"dag-jose@5.0.0","gitHead":"8f2a7eb0c8f3cda93a10eb74d58042ff6072a836","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"shasum":"e4be7844fc94d7b13d0f6718e0ef959fd9756ef3","size":7447,"noattachment":false,"key":"/dag-jose/-/dag-jose-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-jose/download/dag-jose-5.0.0.tgz"},"_npmUser":{"name":"ukstv","email":"sergey@ukstv.me"},"directories":{},"maintainers":[{"name":"dav1do","email":""},{"name":"npm.3box","email":""},{"name":"oed","email":""},{"name":"smrz2001","email":""},{"name":"stbrody","email":""},{"name":"ukstv","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dag-jose_5.0.0_1713203107471_0.8332325453487943"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-04-15T17:45:07.660Z","publish_time":1713203107660,"_source_registry_name":"default","_cnpm_publish_time":1713203107660},"4.0.0":{"name":"dag-jose","version":"4.0.0","description":"Typescript implementation of the IPLD dag-jose format","main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","exports":{".":{"import":"./lib/index.js"}},"scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules npx jest --coverage","build":"tsc -p tsconfig.json","prepublishOnly":"npm run build","prebuild":"npm run clean","lint":"eslint ./src --ext .js,.ts","clean":"rm -rf ./lib"},"repository":{"type":"git","url":"git+https://github.com/ceramicnetwork/js-dag-jose.git"},"keywords":["ipld","ipfs","jose","dag"],"author":{"name":"Joel Thorstensson","email":"oed@3box.io"},"license":"(Apache-2.0 OR MIT)","bugs":{"url":"https://github.com/ceramicnetwork/js-dag-jose/issues"},"homepage":"https://github.com/ceramicnetwork/js-dag-jose#readme","devDependencies":{"@babel/core":"^7.14.3","@babel/preset-env":"^7.14.4","@babel/preset-typescript":"^7.13.0","@stablelib/x25519":"^1.0.1","@types/jest":"^29.1.2","@types/lodash.transform":"^4.6.6","@typescript-eslint/eslint-plugin":"^5.18.0","@typescript-eslint/parser":"^5.18.0","babel-jest":"^29.2.0","blockcodec-to-ipld-format":"^2.0.0","did-jwt":"^6.0.0","eslint":"^8.12.0","eslint-config-3box":"^0.4.1","eslint-plugin-jest":"^27.1.2","fast-json-stable-stringify":"^2.1.0","ipld":"^0.30.0","ipld-in-memory":"^8.0.0","jest":"^29.2.0","prettier":"^2.3.0","typescript":"^4.3.2","uint8arrays":"^4.0.2"},"dependencies":{"@ipld/dag-cbor":"^9.0.0","multiformats":"^11.0.0"},"gitHead":"c60b4b17ec346f1046ebbb40d70dd8a0ba01f4f0","_id":"dag-jose@4.0.0","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"shasum":"4e65f62af58dd5203b2b094eb52142ffe0cdec1d","size":7390,"noattachment":false,"key":"/dag-jose/-/dag-jose-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-jose/download/dag-jose-4.0.0.tgz"},"_npmUser":{"name":"ukstv","email":"sergey@ukstv.me"},"directories":{},"maintainers":[{"name":"dav1do","email":""},{"name":"npm.3box","email":""},{"name":"oed","email":""},{"name":"smrz2001","email":""},{"name":"stbrody","email":""},{"name":"ukstv","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dag-jose_4.0.0_1673435753246_0.0758036114723597"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-11T11:15:53.406Z","publish_time":1673435753406,"_cnpm_publish_time":1673435753406},"3.0.1":{"name":"dag-jose","version":"3.0.1","description":"Typescript implementation of the IPLD dag-jose format","main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","exports":{".":{"import":"./lib/index.js"}},"scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules npx jest --coverage","build":"tsc -p tsconfig.json","prepublishOnly":"npm run build","prebuild":"npm run clean","lint":"eslint ./src --ext .js,.ts","clean":"rm -rf ./lib"},"repository":{"type":"git","url":"git+https://github.com/ceramicnetwork/js-dag-jose.git"},"keywords":["ipld","ipfs","jose","dag"],"author":{"name":"Joel Thorstensson","email":"oed@3box.io"},"license":"(Apache-2.0 OR MIT)","bugs":{"url":"https://github.com/ceramicnetwork/js-dag-jose/issues"},"homepage":"https://github.com/ceramicnetwork/js-dag-jose#readme","devDependencies":{"@babel/core":"^7.14.3","@babel/preset-env":"^7.14.4","@babel/preset-typescript":"^7.13.0","@stablelib/x25519":"^1.0.1","@types/jest":"^29.1.2","@types/lodash.transform":"^4.6.6","@typescript-eslint/eslint-plugin":"^5.18.0","@typescript-eslint/parser":"^5.18.0","babel-jest":"^29.2.0","blockcodec-to-ipld-format":"^2.0.0","did-jwt":"^6.0.0","eslint":"^8.12.0","eslint-config-3box":"^0.4.1","eslint-plugin-jest":"^27.1.2","fast-json-stable-stringify":"^2.1.0","ipld":"^0.30.0","ipld-in-memory":"^8.0.0","jest":"^29.2.0","prettier":"^2.3.0","typescript":"^4.3.2","uint8arrays":"^4.0.2"},"dependencies":{"@ipld/dag-cbor":"^8.0.0","multiformats":"^10.0.1"},"gitHead":"ebe9392099d6d24e4126b28384162755dcc84943","_id":"dag-jose@3.0.1","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"shasum":"0c474eff3e70ad522b5d42e848786358c11ea7c6","size":7386,"noattachment":false,"key":"/dag-jose/-/dag-jose-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-jose/download/dag-jose-3.0.1.tgz"},"_npmUser":{"name":"ukstv","email":"sergey@ukstv.me"},"directories":{},"maintainers":[{"name":"dav1do","email":""},{"name":"npm.3box","email":""},{"name":"oed","email":""},{"name":"smrz2001","email":""},{"name":"stbrody","email":""},{"name":"ukstv","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dag-jose_3.0.1_1666286415296_0.25933537671678675"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-10-20T17:22:13.677Z","publish_time":1666286415543,"_cnpm_publish_time":1666286415543},"3.0.0":{"name":"dag-jose","version":"3.0.0","description":"Typescript implementation of the IPLD dag-jose format","main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","exports":{".":{"import":"./lib/index.js"}},"scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules npx jest --coverage","build":"tsc -p tsconfig.json","prepublishOnly":"npm run build","prebuild":"npm run clean","lint":"eslint ./src --ext .js,.ts","clean":"rm -rf ./lib"},"repository":{"type":"git","url":"git+https://github.com/ceramicnetwork/js-dag-jose.git"},"keywords":["ipld","ipfs","jose","dag"],"author":{"name":"Joel Thorstensson","email":"oed@3box.io"},"license":"(Apache-2.0 OR MIT)","bugs":{"url":"https://github.com/ceramicnetwork/js-dag-jose/issues"},"homepage":"https://github.com/ceramicnetwork/js-dag-jose#readme","devDependencies":{"@babel/core":"^7.14.3","@babel/preset-env":"^7.14.4","@babel/preset-typescript":"^7.13.0","@stablelib/x25519":"^1.0.1","@types/jest":"^29.1.2","@types/lodash.transform":"^4.6.6","@typescript-eslint/eslint-plugin":"^5.18.0","@typescript-eslint/parser":"^5.18.0","babel-jest":"^29.2.0","blockcodec-to-ipld-format":"^2.0.0","did-jwt":"^6.0.0","eslint":"^8.12.0","eslint-config-3box":"^0.4.1","eslint-plugin-jest":"^27.1.2","fast-json-stable-stringify":"^2.1.0","ipld":"^0.30.0","ipld-in-memory":"^8.0.0","jest":"^29.2.0","prettier":"^2.3.0","typescript":"^4.3.2","uint8arrays":"^4.0.2"},"dependencies":{"@ipld/dag-cbor":"^7.0.1","multiformats":"^10.0.1"},"gitHead":"727d3f12937418bd6b028a91efc99d7d34feffab","_id":"dag-jose@3.0.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"shasum":"a2bf42ca35c2bd475ddfce0767bc7dbbfd9e9cf5","size":7390,"noattachment":false,"key":"/dag-jose/-/dag-jose-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-jose/download/dag-jose-3.0.0.tgz"},"_npmUser":{"name":"ukstv","email":"sergey@ukstv.me"},"directories":{},"maintainers":[{"name":"dav1do","email":""},{"name":"npm.3box","email":""},{"name":"oed","email":""},{"name":"smrz2001","email":""},{"name":"stbrody","email":""},{"name":"ukstv","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dag-jose_3.0.0_1666205214749_0.5873522218011014"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-10-20T17:22:13.370Z","publish_time":1666205214939,"_cnpm_publish_time":1666205214939},"2.0.1":{"name":"dag-jose","version":"2.0.1","description":"Typescript implementation of the IPLD dag-jose format","main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","exports":{".":{"import":"./lib/index.js"}},"scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules npx jest --coverage","build":"tsc -p tsconfig.json","prepublishOnly":"npm run build","prebuild":"npm run clean","lint":"eslint ./src --ext .js,.ts","clean":"rm -rf ./lib"},"repository":{"type":"git","url":"git+https://github.com/ceramicnetwork/js-dag-jose.git"},"keywords":["ipld","ipfs","jose","dag"],"author":{"name":"Joel Thorstensson","email":"oed@3box.io"},"license":"(Apache-2.0 OR MIT)","bugs":{"url":"https://github.com/ceramicnetwork/js-dag-jose/issues"},"homepage":"https://github.com/ceramicnetwork/js-dag-jose#readme","devDependencies":{"@babel/core":"^7.14.3","@babel/preset-env":"^7.14.4","@babel/preset-typescript":"^7.13.0","@stablelib/x25519":"^1.0.1","@types/jest":"^28.1.3","@types/lodash.transform":"^4.6.6","@typescript-eslint/eslint-plugin":"^5.18.0","@typescript-eslint/parser":"^5.18.0","babel-jest":"^28.1.2","blockcodec-to-ipld-format":"^2.0.0","did-jwt":"^6.0.0","eslint":"^8.12.0","eslint-config-3box":"^0.4.1","eslint-plugin-jest":"^26.1.4","fast-json-stable-stringify":"^2.1.0","ipld":"^0.30.0","ipld-in-memory":"^8.0.0","jest":"^28.1.2","prettier":"^2.3.0","typescript":"^4.3.2","uint8arrays":"^3.0.0"},"dependencies":{"@ipld/dag-cbor":"^7.0.1","multiformats":"^9.6.4"},"gitHead":"6ffd726d30d02fd56f3e586c9b6541ab3556a65a","_id":"dag-jose@2.0.1","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"shasum":"802e3fd159af3ba39a042df09ba3a14bbc63306c","size":7392,"noattachment":false,"key":"/dag-jose/-/dag-jose-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-jose/download/dag-jose-2.0.1.tgz"},"_npmUser":{"name":"ukstv","email":"sergey@ukstv.me"},"directories":{},"maintainers":[{"name":"dav1do","email":""},{"name":"npm.3box","email":""},{"name":"oed","email":""},{"name":"smrz2001","email":""},{"name":"stbrody","email":""},{"name":"ukstv","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dag-jose_2.0.1_1656517631430_0.2820544886790457"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-06-29T16:02:12.111Z","publish_time":1656517631608,"_cnpm_publish_time":1656517631608},"2.0.0":{"name":"dag-jose","version":"2.0.0","description":"Typescript implementation of the IPLD dag-jose format","main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","exports":{".":{"import":"./lib/index.js"}},"scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules npx jest --coverage","build":"tsc -p tsconfig.json","prepublishOnly":"npm run build","prebuild":"npm run clean","lint":"eslint ./src --ext .js,.ts","clean":"rm -rf ./lib"},"repository":{"type":"git","url":"git+https://github.com/ceramicnetwork/js-dag-jose.git"},"keywords":["ipld","ipfs","jose","dag"],"author":{"name":"Joel Thorstensson","email":"oed@3box.io"},"license":"(Apache-2.0 OR MIT)","bugs":{"url":"https://github.com/ceramicnetwork/js-dag-jose/issues"},"homepage":"https://github.com/ceramicnetwork/js-dag-jose#readme","devDependencies":{"@babel/core":"^7.14.3","@babel/preset-env":"^7.14.4","@babel/preset-typescript":"^7.13.0","@stablelib/x25519":"^1.0.1","@types/jest":"^27.4.1","@types/lodash.transform":"^4.6.6","@typescript-eslint/eslint-plugin":"^5.18.0","@typescript-eslint/parser":"^5.18.0","babel-jest":"^27.5.1","blockcodec-to-ipld-format":"^2.0.0","did-jwt":"^6.0.0","eslint":"^8.12.0","eslint-config-3box":"^0.4.1","eslint-plugin-jest":"^26.1.4","fast-json-stable-stringify":"^2.1.0","ipld":"^0.30.0","ipld-in-memory":"^8.0.0","jest":"^27.5.1","prettier":"^2.3.0","typescript":"^4.3.2","uint8arrays":"^3.0.0"},"dependencies":{"@ipld/dag-cbor":"^7.0.1","multiformats":"^9.6.4"},"gitHead":"62317bbfdafde5b00dbdc1d5bac3e7b72ad93022","_id":"dag-jose@2.0.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"shasum":"7bf74bd48acef3821cbf626e0ce728f4757976aa","size":7369,"noattachment":false,"key":"/dag-jose/-/dag-jose-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-jose/download/dag-jose-2.0.0.tgz"},"_npmUser":{"name":"ukstv","email":"sergey@ukstv.me"},"directories":{},"maintainers":[{"name":"dav1do","email":""},{"name":"npm.3box","email":""},{"name":"oed","email":""},{"name":"smrz2001","email":""},{"name":"stbrody","email":""},{"name":"ukstv","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dag-jose_2.0.0_1650367555664_0.8896108147557835"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-04-19T11:28:19.698Z","publish_time":1650367555840,"_cnpm_publish_time":1650367555840},"2.0.0-rc.1":{"name":"dag-jose","version":"2.0.0-rc.1","description":"Typescript implementation of the IPLD dag-jose format","main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","exports":{".":{"import":"./lib/index.js"}},"scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules npx jest --coverage","build":"tsc -p tsconfig.json","prepublishOnly":"npm run build","prebuild":"npm run clean","lint":"eslint ./src --ext .js,.ts","clean":"rm -rf ./lib"},"repository":{"type":"git","url":"git+https://github.com/ceramicnetwork/js-dag-jose.git"},"keywords":["ipld","ipfs","jose","dag"],"author":{"name":"Joel Thorstensson","email":"oed@3box.io"},"license":"(Apache-2.0 OR MIT)","bugs":{"url":"https://github.com/ceramicnetwork/js-dag-jose/issues"},"homepage":"https://github.com/ceramicnetwork/js-dag-jose#readme","devDependencies":{"@babel/core":"^7.14.3","@babel/preset-env":"^7.14.4","@babel/preset-typescript":"^7.13.0","@stablelib/x25519":"^1.0.1","@types/jest":"^27.4.1","@types/lodash.transform":"^4.6.6","@typescript-eslint/eslint-plugin":"^5.18.0","@typescript-eslint/parser":"^5.18.0","babel-jest":"^27.5.1","blockcodec-to-ipld-format":"^2.0.0","did-jwt":"^6.0.0","eslint":"^8.12.0","eslint-config-3box":"^0.4.1","eslint-plugin-jest":"^26.1.4","fast-json-stable-stringify":"^2.1.0","ipld":"^0.30.0","ipld-in-memory":"^8.0.0","jest":"^27.5.1","prettier":"^2.3.0","typescript":"^4.3.2","uint8arrays":"^3.0.0"},"dependencies":{"@ipld/dag-cbor":"^7.0.1","multiformats":"^9.6.4"},"readmeFilename":"README.md","gitHead":"3bdc12d43017ba1cfe7d3ffb76047f7c795d8225","_id":"dag-jose@2.0.0-rc.1","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"shasum":"1a6e076a2c2fb8170fd176d07d8bba28881ab76b","size":7373,"noattachment":false,"key":"/dag-jose/-/dag-jose-2.0.0-rc.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-jose/download/dag-jose-2.0.0-rc.1.tgz"},"_npmUser":{"name":"ukstv","email":"sergey@ukstv.me"},"directories":{},"maintainers":[{"name":"dav1do","email":""},{"name":"npm.3box","email":""},{"name":"oed","email":""},{"name":"smrz2001","email":""},{"name":"stbrody","email":""},{"name":"ukstv","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dag-jose_2.0.0-rc.1_1650290360254_0.3754323749585151"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-04-18T13:59:28.195Z","publish_time":1650290360421,"_cnpm_publish_time":1650290360421},"2.0.0-rc.0":{"name":"dag-jose","version":"2.0.0-rc.0","description":"Typescript implementation of the IPLD dag-jose format","main":"./lib/index.js","type":"module","types":"./lib/index.d.ts","exports":{".":{"import":"./lib/index.js"}},"scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules npx jest --coverage","build":"tsc -p tsconfig.json","prepublishOnly":"npm run build","prebuild":"npm run clean","lint":"eslint ./src --ext .js,.ts","clean":"rm -rf ./lib"},"repository":{"type":"git","url":"git+https://github.com/ceramicnetwork/js-dag-jose.git"},"keywords":["ipld","ipfs","jose","dag"],"author":{"name":"Joel Thorstensson","email":"oed@3box.io"},"license":"(Apache-2.0 OR MIT)","bugs":{"url":"https://github.com/ceramicnetwork/js-dag-jose/issues"},"homepage":"https://github.com/ceramicnetwork/js-dag-jose#readme","devDependencies":{"@babel/core":"^7.14.3","@babel/preset-env":"^7.14.4","@babel/preset-typescript":"^7.13.0","@stablelib/x25519":"^1.0.1","@types/jest":"^27.4.1","@types/lodash.transform":"^4.6.6","@typescript-eslint/eslint-plugin":"^5.18.0","@typescript-eslint/parser":"^5.18.0","babel-jest":"^27.5.1","blockcodec-to-ipld-format":"^2.0.0","did-jwt":"^6.0.0","eslint":"^8.12.0","eslint-config-3box":"^0.4.1","eslint-plugin-jest":"^26.1.4","fast-json-stable-stringify":"^2.1.0","ipld":"^0.30.0","ipld-in-memory":"^8.0.0","jest":"^27.5.1","prettier":"^2.3.0","typescript":"^4.3.2","uint8arrays":"^3.0.0"},"dependencies":{"@ipld/dag-cbor":"^7.0.1","multiformats":"^9.6.4"},"readmeFilename":"README.md","gitHead":"a83d27c7e2475065c7b56e6361c7fdca4f0114e1","_id":"dag-jose@2.0.0-rc.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"shasum":"3afaf2c7efb0c988a9bf8aac791002a32a1dd3dd","size":16048,"noattachment":false,"key":"/dag-jose/-/dag-jose-2.0.0-rc.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-jose/download/dag-jose-2.0.0-rc.0.tgz"},"_npmUser":{"name":"ukstv","email":"sergey@ukstv.me"},"directories":{},"maintainers":[{"name":"dav1do","email":""},{"name":"npm.3box","email":""},{"name":"oed","email":""},{"name":"smrz2001","email":""},{"name":"stbrody","email":""},{"name":"ukstv","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dag-jose_2.0.0-rc.0_1649668088869_0.7047625658184433"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-04-11T09:12:51.845Z","publish_time":1649668089049,"_cnpm_publish_time":1649668089049},"1.0.0":{"name":"dag-jose","version":"1.0.0","description":"Typescript implementation of the IPLD dag-jose format","main":"lib/index.js","scripts":{"test":"jest --coverage","build":"tsc -p tsconfig.json","prepublishOnly":"npm run build","prebuild":"npm run clean","lint":"eslint ./src --ext .js,.ts","clean":"rm -rf ./lib"},"repository":{"type":"git","url":"git+https://github.com/ceramicnetwork/js-dag-jose.git"},"keywords":["ipld","ipfs","jose","dag"],"author":{"name":"Joel Thorstensson","email":"oed@3box.io"},"license":"(Apache-2.0 OR MIT)","bugs":{"url":"https://github.com/ceramicnetwork/js-dag-jose/issues"},"homepage":"https://github.com/ceramicnetwork/js-dag-jose#readme","devDependencies":{"@babel/core":"^7.14.3","@babel/preset-env":"^7.14.4","@babel/preset-typescript":"^7.13.0","@stablelib/x25519":"^1.0.1","@types/jest":"^26.0.23","@types/lodash.transform":"^4.6.6","@types/node":"^15.9.0","@typescript-eslint/eslint-plugin":"^4.26.0","@typescript-eslint/parser":"^4.26.0","babel-jest":"^27.0.2","blockcodec-to-ipld-format":"^1.0.0","did-jwt":"^5.5.2","enhanced-resolve":"^5.8.2","eslint":"^7.27.0","eslint-config-3box":"^0.2.0","eslint-plugin-jest":"^24.3.6","fast-json-stable-stringify":"^2.1.0","ipld":"^0.30.0","ipld-in-memory":"^8.0.0","jest":"^27.0.3","prettier":"^2.3.0","typescript":"^4.3.2"},"jest":{"resolver":"./test/_export_maps_resolver","testPathIgnorePatterns":[".*__fixtures__.*"],"testEnvironment":"node"},"dependencies":{"@ipld/dag-cbor":"^6.0.3","multiformats":"^9.0.2"},"gitHead":"3ad7f815bb93d1d2ffd250c4cdf83cc3c13cf2cc","_id":"dag-jose@1.0.0","_nodeVersion":"15.4.0","_npmVersion":"7.0.15","dist":{"shasum":"52e42d70cb5bee31ae4e8e3ab860615568d7ad73","size":18784,"noattachment":false,"key":"/dag-jose/-/dag-jose-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-jose/download/dag-jose-1.0.0.tgz"},"_npmUser":{"name":"oed","email":"oed@3box.io"},"directories":{},"maintainers":[{"name":"dav1do","email":""},{"name":"npm.3box","email":""},{"name":"oed","email":""},{"name":"smrz2001","email":""},{"name":"stbrody","email":""},{"name":"ukstv","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dag-jose_1.0.0_1622710831256_0.47080006907934746"},"_hasShrinkwrap":false,"publish_time":1622710831423,"_cnpm_publish_time":1622710831423,"_cnpmcore_publish_time":"2021-12-16T17:20:33.690Z"},"0.3.0":{"name":"dag-jose","version":"0.3.0","description":"Typescript implementation of the IPLD dag-jose format","main":"lib/index.js","scripts":{"test":"jest --coverage","build":"tsc -p tsconfig.json","prepublishOnly":"npm run build","prebuild":"npm run clean","lint":"eslint ./src --ext .js,.ts","clean":"rm -rf ./lib"},"repository":{"type":"git","url":"git+https://github.com/ceramicnetwork/js-dag-jose.git"},"keywords":["ipld","ipfs","jose","dag"],"author":{"name":"Joel Thorstensson","email":"oed@3box.io"},"license":"(Apache-2.0 OR MIT)","bugs":{"url":"https://github.com/ceramicnetwork/js-dag-jose/issues"},"homepage":"https://github.com/ceramicnetwork/js-dag-jose#readme","devDependencies":{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@babel/preset-typescript":"^7.9.0","@stablelib/x25519":"^1.0.0","@types/lodash.transform":"^4.6.6","@types/node":"^13.13.2","@typescript-eslint/eslint-plugin":"^2.30.0","@typescript-eslint/parser":"^2.30.0","babel-jest":"^25.4.0","did-jwt":"^4.6.1","eslint":"^6.8.0","eslint-config-3box":"^0.1.2","eslint-plugin-jest":"^23.8.2","fast-json-stable-stringify":"^2.1.0","ipld":"^0.27.1","ipld-in-memory":"^6.0.0","jest":"^25.4.0","multiformats":"^3.0.0","prettier":"^2.0.5","typescript":"^3.8.3"},"dependencies":{"borc":"^2.1.2","cids":"^1.0.0","uint8arrays":"^1.1.0"},"jest":{"transformIgnorePatterns":["/node_modules(?!/multiformats)/"],"testPathIgnorePatterns":[".*__fixtures__.*"]},"gitHead":"39a2b6e4c1dd4d2477d82cff0319085efe524fdb","_id":"dag-jose@0.3.0","_nodeVersion":"14.11.0","_npmVersion":"6.14.8","dist":{"shasum":"2e4277366dc3a441eecf1381b207834ebdf9e690","size":14575,"noattachment":false,"key":"/dag-jose/-/dag-jose-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-jose/download/dag-jose-0.3.0.tgz"},"maintainers":[{"name":"dav1do","email":""},{"name":"npm.3box","email":""},{"name":"oed","email":""},{"name":"smrz2001","email":""},{"name":"stbrody","email":""},{"name":"ukstv","email":""}],"_npmUser":{"name":"oed","email":"oed@3box.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dag-jose_0.3.0_1601560268116_0.028057541499088012"},"_hasShrinkwrap":false,"publish_time":1601560268251,"_cnpm_publish_time":1601560268251,"_cnpmcore_publish_time":"2021-12-16T17:20:33.898Z"},"0.2.0":{"name":"dag-jose","version":"0.2.0","description":"Typescript implementation of the IPLD dag-jose format","main":"lib/index.js","scripts":{"test":"jest --coverage","build":"tsc -p tsconfig.json","prepublishOnly":"npm run build","prebuild":"npm run clean","lint":"eslint ./src --ext .js,.ts","clean":"rm -rf ./lib"},"repository":{"type":"git","url":"git+https://github.com/ceramicnetwork/js-ipld-dag-jose.git"},"keywords":["ipld","ipfs","jose","dag"],"author":{"name":"Joel Thorstensson","email":"oed@3box.io"},"license":"(Apache-2.0 OR MIT)","bugs":{"url":"https://github.com/ceramicnetwork/js-ipld-dag-jose/issues"},"homepage":"https://github.com/ceramicnetwork/js-ipld-dag-jose#readme","devDependencies":{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@babel/preset-typescript":"^7.9.0","@types/lodash.transform":"^4.6.6","@types/node":"^13.13.2","@typescript-eslint/eslint-plugin":"^2.30.0","@typescript-eslint/parser":"^2.30.0","babel-jest":"^25.4.0","eslint":"^6.8.0","eslint-config-3box":"^0.1.2","eslint-plugin-jest":"^23.8.2","ipld":"^0.27.1","ipld-in-memory":"^6.0.0","jest":"^25.4.0","multiformats":"^3.0.0","prettier":"^2.0.5","typescript":"^3.8.3"},"dependencies":{"borc":"^2.1.2","cids":"^1.0.0","did-jwt":"^4.5.0","fast-json-stable-stringify":"^2.1.0","uint8arrays":"^1.1.0"},"jest":{"transformIgnorePatterns":["/node_modules(?!/multiformats)/"],"testPathIgnorePatterns":[".*__fixtures__.*"]},"gitHead":"b251a0bfae58865f5ad042f2b326a15f66df7cc5","_id":"dag-jose@0.2.0","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"shasum":"25bcb02e71ac2a62314af7200281bb27a80dad26","size":13477,"noattachment":false,"key":"/dag-jose/-/dag-jose-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-jose/download/dag-jose-0.2.0.tgz"},"maintainers":[{"name":"dav1do","email":""},{"name":"npm.3box","email":""},{"name":"oed","email":""},{"name":"smrz2001","email":""},{"name":"stbrody","email":""},{"name":"ukstv","email":""}],"_npmUser":{"name":"oed","email":"oed@3box.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dag-jose_0.2.0_1600069619028_0.2976380497738662"},"_hasShrinkwrap":false,"publish_time":1600069619126,"_cnpm_publish_time":1600069619126,"_cnpmcore_publish_time":"2021-12-16T17:20:34.088Z"},"0.1.1":{"name":"dag-jose","version":"0.1.1","description":"Typescript implementation of the IPLD dag-jose format","main":"lib/index.js","scripts":{"test":"jest --coverage","build":"tsc -p tsconfig.json","prepublishOnly":"npm run build","prebuild":"npm run clean","lint":"eslint ./src --ext .js,.ts","clean":"rm -rf ./lib"},"repository":{"type":"git","url":"git+https://github.com/ceramicnetwork/js-ipld-dag-jose.git"},"keywords":["ipld","ipfs","jose","dag"],"author":{"name":"Joel Thorstensson","email":"oed@3box.io"},"license":"MIT","bugs":{"url":"https://github.com/ceramicnetwork/js-ipld-dag-jose/issues"},"homepage":"https://github.com/ceramicnetwork/js-ipld-dag-jose#readme","devDependencies":{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@babel/preset-typescript":"^7.9.0","@types/lodash.transform":"^4.6.6","@types/node":"^13.13.2","@typescript-eslint/eslint-plugin":"^2.30.0","@typescript-eslint/parser":"^2.30.0","babel-jest":"^25.4.0","eslint":"^6.8.0","eslint-config-3box":"^0.1.2","eslint-plugin-jest":"^23.8.2","ipld":"^0.27.1","ipld-in-memory":"^6.0.0","jest":"^25.4.0","multiformats":"^3.0.0","prettier":"^2.0.5","typescript":"^3.8.3"},"dependencies":{"base64url":"^3.0.1","borc":"^2.1.2","cids":"^1.0.0","did-jwt":"^4.5.0","fast-json-stable-stringify":"^2.1.0"},"jest":{"transformIgnorePatterns":["/node_modules(?!/multiformats)/"],"testPathIgnorePatterns":[".*__fixtures__.*"]},"gitHead":"d32edac690d175c5588e32f09b1983bdafcff4d6","_id":"dag-jose@0.1.1","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"shasum":"b62d3fd3ed4108be4e763cf031b729cf09f21956","size":10396,"noattachment":false,"key":"/dag-jose/-/dag-jose-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-jose/download/dag-jose-0.1.1.tgz"},"maintainers":[{"name":"dav1do","email":""},{"name":"npm.3box","email":""},{"name":"oed","email":""},{"name":"smrz2001","email":""},{"name":"stbrody","email":""},{"name":"ukstv","email":""}],"_npmUser":{"name":"oed","email":"oed@3box.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dag-jose_0.1.1_1597852049075_0.25507413593850825"},"_hasShrinkwrap":false,"publish_time":1597852049163,"_cnpm_publish_time":1597852049163,"_cnpmcore_publish_time":"2021-12-16T17:20:34.343Z"},"0.1.0":{"name":"dag-jose","version":"0.1.0","description":"Typescript implementation of the IPLD dag-jose format","main":"lib/index.js","scripts":{"test":"jest --coverage","build":"tsc -p tsconfig.json","prepublishOnly":"npm run build","prebuild":"npm run clean","lint":"eslint ./src --ext .js,.ts","clean":"rm -rf ./lib"},"repository":{"type":"git","url":"git+https://github.com/ceramicnetwork/js-ipld-dag-jose.git"},"keywords":["ipld","ipfs","jose","dag"],"author":{"name":"Joel Thorstensson","email":"oed@3box.io"},"license":"MIT","bugs":{"url":"https://github.com/ceramicnetwork/js-ipld-dag-jose/issues"},"homepage":"https://github.com/ceramicnetwork/js-ipld-dag-jose#readme","devDependencies":{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@babel/preset-typescript":"^7.9.0","@types/lodash.transform":"^4.6.6","@types/node":"^13.13.2","@typescript-eslint/eslint-plugin":"^2.30.0","@typescript-eslint/parser":"^2.30.0","babel-jest":"^25.4.0","eslint":"^6.8.0","eslint-config-3box":"^0.1.2","eslint-plugin-jest":"^23.8.2","ipld":"^0.27.1","ipld-in-memory":"^6.0.0","jest":"^25.4.0","multiformats":"^3.0.0","prettier":"^2.0.5","typescript":"^3.8.3"},"dependencies":{"base64url":"^3.0.1","borc":"^2.1.2","cids":"^1.0.0","did-jwt":"^4.5.0","fast-json-stable-stringify":"^2.1.0"},"jest":{"transformIgnorePatterns":["/node_modules(?!/multiformats)/"],"testPathIgnorePatterns":[".*__fixtures__.*"]},"gitHead":"1b7ca1622cfc3296983014f6ce97f700390ea4d3","_id":"dag-jose@0.1.0","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"shasum":"a0254ff7e987a45267b27a3c1a7ba9d3cfa2a914","size":10250,"noattachment":false,"key":"/dag-jose/-/dag-jose-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dag-jose/download/dag-jose-0.1.0.tgz"},"maintainers":[{"name":"dav1do","email":""},{"name":"npm.3box","email":""},{"name":"oed","email":""},{"name":"smrz2001","email":""},{"name":"stbrody","email":""},{"name":"ukstv","email":""}],"_npmUser":{"name":"oed","email":"oed@3box.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dag-jose_0.1.0_1597846000988_0.9794713133252453"},"_hasShrinkwrap":false,"publish_time":1597846001136,"_cnpm_publish_time":1597846001136,"_cnpmcore_publish_time":"2021-12-16T17:20:34.575Z"}},"readme":"# dag-jose\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fceramicnetwork%2Fjs-dag-jose.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fceramicnetwork%2Fjs-dag-jose?ref=badge_shield)\n\nThis library provides a TypeScript implementation of the DAG-JOSE codec for IPLD.\n\nIt supports the new [multiformats](https://github.com/multiformats/js-multiformats) library in order to be compatible with both the current and future js-ipfs implementations.\n\nTo create and work with DAG-JOSE compatible JOSE objects we recommend using the [dag-jose-utils](https://github.com/ceramicnetwork/js-dag-jose-utils) library.\n\n* [JWS Signing Usage](#jws-signing-usage)\n* [JWE Encryption Usage](#jwe-encryption-usage)\n  * [Symmetric encryption](#symmetric-encryption)\n  * [Asymmetric encryption](#asymmetric-encryption)\n* [Maintainer](#maintainer)\n* [License](#license)\n\n## JWS Signing Usage\n\n_The following example is available in complete form in [example-signing-ipld.mjs](./example-signing-ipld.mjs)._\n\nFor independent usage as an IPLD codec:\n\n```js\nimport * as Block from 'multiformats/block'\nimport { sha256 } from 'multiformats/hashes/sha2'\nimport * as dagCbor from '@ipld/dag-cbor' // for decoding the signed payload\nimport * as dagJose from 'dag-jose'\n```\n\nImport additional libraries for JWS handling:\n\n```js\n// JWT & utilities\nimport {\n  ES256KSigner,\n  createJWS,\n  verifyJWS\n} from 'did-jwt'\nimport {\n  encodePayload,\n  toJWSPayload,\n  toJWSStrings\n} from 'dag-jose-utils'\n```\n\nGiven a keypair:\n\n```js\nconst pubkey = '03fdd57adec3d438ea237fe46b33ee1e016eda6b585c3e27ea66686c2ea5358479'\nconst privkey = '278a5de700e29faae8e40e366ec5012b5ec63d36ec77e8a2417154cc1d25383f'\n```\n\nCreate a signed envelope block:\n\n```js\nconst signer = ES256KSigner(privkey)\n// arbitrary data to DAG-CBOR encode, we get a:\n// { cid:CID, linkedBlock: Uint8Array }\nconst payloadBlock = await encodePayload(payload)\n// sign the CID as a JWS using our signer\nconst jws = await createJWS(toJWSPayload(payloadBlock), signer)\n\n// createJWS gives us a compact string form JWS, DAG-JOSE will accept both the\n// compact and general (object) form but a round-trip decode will always\n// result in the general form. If we want need `jws` to be isometric regardless\n// of whether it has been round-tripped through DAG-JOSE or straight out of\n// `createJWS()` we can call `toGeneral()` to ensure it is always in the\n// general form.\n// jws = dagJose.toGeneral(jws)\n\n// encode as a DagJWS IPLD block\nconst jwsBlock = await Block.encode({ value: jws, codec: dagJose, hasher: sha256 })\n\n// we now have two blocks, a signed envelope and a payload\n// DagJWS envelope:\n//  - CID: jwsBlock.cid\n//  - Bytes: jwsBlock.bytes\n// Payload:\n//  - CID: payloadBlock.cid\n//  - Bytes: payloadBlock.linkedBlock\n```\n\nGiven a DagJWS envelope block CID, load its bytes, verify the signature and load the linked payload block:\n\n```js\n// validate cid matches bytes and decode dag-jose JWS\nconst jwsBlock = await Block.create({ bytes, cid, codec: dagJose, hasher: sha256 })\nconst jwsStrings = toJWSStrings(jwsBlock.value)\n// verify the signatures found in the block against our pubkey\nfor (const jws of jwsStrings) {\n  const verifiedKey = verifyJWS(jws, [{ publicKeyHex: pubkey }]) // will throw if it doesn't verify\n  console.log(`Verified JWS envelope \\u001b[32m${cid}\\u001b[39m with public key:\\n\\t${verifiedKey.publicKeyHex}`)\n}\n\nconst payloadCid = jwsBlock.value.link\n// `store.get()` represents a block store, where `get(cid:string):Uint8Array`,\n// in this example case it's simply a `Map` but it could be any method of\n// fetching bytes for a CID\nconst payloadBytes = store.get(payloadCid.toString())\n// validate payloadCid matches bytes and decode dag-cbor payload\nconst payloadBlock = await Block.create({ bytes: payloadBytes, cid: payloadCid, codec: dagCbor, hasher: sha256 })\n\n// The signed and verified payload is available in `payloadBlock.value`\n```\n\n## JWE Encryption Usage\n\nWhen using DAG-JOSE (for JWE or JWS) with js-IPFS, you will need to convert it from a raw multiformats style codec to a legacy IPLD codec using [blockcodec-to-ipld-format](https://github.com/ipld/js-blockcodec-to-ipld-format).\n\n_The following example is available in complete form in [example-ipfs.mjs](./example-ipfs.mjs)._\n\n_A plain IPLD (without IPFS, for cases where you are managing the block store) version is available in [example-ipld.mjs](./example-ipld.mjs)._\n\n```js\n// IPLD & IPFS\nimport { create as createIpfs } from 'ipfs'\nimport { convert as toLegacyIpld } from 'blockcodec-to-ipld-format'\n\nimport * as dagJose from 'dag-jose'\n```\n\n```js\n// JWT & utilities\nimport {\n  xc20pDirEncrypter,\n  xc20pDirDecrypter,\n  x25519Encrypter,\n  x25519Decrypter,\n  decryptJWE,\n  createJWE\n} from 'did-jwt'\nimport {\n  decodeCleartext,\n  prepareCleartext\n} from 'dag-jose-utils'\n```\n\n```js\n// Miscellaneous crypto libraries to support the examples\nimport { randomBytes } from '@stablelib/random'\nimport { generateKeyPairFromSeed } from '@stablelib/x25519'\n```\n\nSet up js-IPFS:\n\n```js\nconst dagJoseIpldFormat = toLegacyIpld(dagJose)\n\n// Async setup tasks\nasync function setup () {\n  console.log('Starting IPFS ...')\n  // Instantiate an IPFS node, that knows how to deal with DAG-JOSE blocks\n  ipfs = await createIpfs({ ipld: { formats: [dagJoseIpldFormat] } })\n}\n```\n\n### Symmetric encryption\n\nEncrypt and store a payload using a secret key:\n\n```js\nconst storeEncrypted = async (payload, key) => {\n  const dirEncrypter = xc20pDirEncrypter(key)\n  // prepares a cleartext object to be encrypted in a JWE\n  const cleartext = await prepareCleartext(payload)\n  // encrypt into JWE container layout using secret key\n  const jwe = await createJWE(cleartext, [dirEncrypter])\n  // let IPFS store the bytes using the DAG-JOSE codec and return a CID\n  const cid = await ipfs.dag.put(jwe, { format: dagJoseIpldFormat.codec, hashAlg: 'sha2-256' })\n  console.log(`Encrypted block CID: \\u001b[32m${cid}\\u001b[39m`)\n  return cid\n}\n```\n\nLoad an encrypted block from a CID and decrypt the payload using a secret key:\n\n```js\nconst loadEncrypted = async (cid, key) => {\n  const dirDecrypter = xc20pDirDecrypter(key)\n  const retrieved = await ipfs.dag.get(cid)\n  const decryptedData = await decryptJWE(retrieved.value, dirDecrypter)\n  return decodeCleartext(decryptedData)\n}\n```\n\nCreate a key, encrypt and store a block, then load and decrypt it:\n\n```js\nconst key = randomBytes(32)\nconst secretz = { my: 'secret message' }\nconsole.log('Encrypting and storing secret:\\u001b[1m', secretz, '\\u001b[22m')\nconst cid = await storeEncrypted(secretz, key)\nconst decoded = await loadEncrypted(cid, key)\nconsole.log('Loaded and decrypted block content:\\u001b[1m', decoded, '\\u001b[22m')\n```\n\n### Asymmetric encryption\n\nEncrypt and store a payload using a public key:\n\n```js\nconst storeEncrypted = async (payload, pubkey) => {\n  const asymEncrypter = x25519Encrypter(pubkey)\n  // prepares a cleartext object to be encrypted in a JWE\n  const cleartext = await prepareCleartext(payload)\n  // encrypt into JWE container layout using public key\n  const jwe = await createJWE(cleartext, [asymEncrypter])\n  // let IPFS store the bytes using the DAG-JOSE codec and return a CID\n  const cid = await ipfs.dag.put(jwe, { format: dagJoseIpldFormat.codec, hashAlg: 'sha2-256' })\n  console.log(`Encrypted block CID: \\u001b[32m${cid}\\u001b[39m`)\n  return cid\n}\n```\n\nLoad an encrypted block from a CID and decrypt the payload using a secret key:\n\n```js\nconst loadEncrypted = async (cid, privkey) => {\n  const asymDecrypter = x25519Decrypter(privkey)\n  // decode the DAG-JOSE envelope\n  const retrieved = await ipfs.dag.get(cid)\n  const decryptedData = await decryptJWE(retrieved.value, asymDecrypter)\n  return decodeCleartext(decryptedData)\n}\n```\n\nCreate a key pair, encrypt and store a block using the public key, then load and decrypt it using the private key:\n\n```js\nconst privkey = randomBytes(32)\n// generate a public key from the existing private key\nconst pubkey = generateKeyPairFromSeed(privkey).publicKey\nconst secretz = { my: 'secret message' }\nconsole.log('Encrypting and storing secret with public key:\\u001b[1m', secretz, '\\u001b[22m')\nconst cid = await storeEncrypted(secretz, pubkey)\nconst decoded = await loadEncrypted(cid, privkey)\nconsole.log('Loaded and decrypted block content with private key:\\u001b[1m', decoded, '\\u001b[22m')\n```\n\n#### Encrypt and decrypt using other jose library\nThe `did-jwt` library only supports `x25519` key exchange and `XChacha20Poly1305`. If you want to use the `dag-jose` codec with other less secure algorithms you can encrypt another library and put the resulting JWE into the dag. Below is an example using the [jose](https://github.com/panva/jose/) library.\n\n```js\nconst jwk = jose.JWK.generateSync('oct', 256)\nconst cleartext = prepareCleartext({ my: 'secret message' })\n\n// encrypt and put into ipfs\nconst jwe = jose.JWE.encrypt.flattened(cleartext, jwk, { alg: 'dir', enc: 'A128CBC-HS256' })\nconst cid = await ipfs.dag.put(jwe, { format: format.codec, hashAlg: 'sha2-256' })\n\n// retreive and decrypt object\nconst retrived = await ipfs.dag.get(cid)\nconst decryptedData = jose.JWE.decrypt(retrived, jwk)\nconsole.log(decodeCleartext(decryptedData))\n// output:\n// { my: 'secret message' }\n```\n\n## Maintainer\n\n[Joel Thorstensson](https://github.com/oed)\n\n## License\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fceramicnetwork%2Fjs-dag-jose.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fceramicnetwork%2Fjs-dag-jose?ref=badge_large)\n","_attachments":{},"homepage":"https://github.com/ceramicnetwork/js-dag-jose#readme","bugs":{"url":"https://github.com/ceramicnetwork/js-dag-jose/issues"},"license":"(Apache-2.0 OR MIT)"}