diff --git a/.yarn/cache/@blockfrost-openapi-npm-0.1.67-188356f956-464cfa9ae4.zip b/.yarn/cache/@blockfrost-openapi-npm-0.1.67-188356f956-464cfa9ae4.zip deleted file mode 100644 index 885aef3..0000000 Binary files a/.yarn/cache/@blockfrost-openapi-npm-0.1.67-188356f956-464cfa9ae4.zip and /dev/null differ diff --git a/.yarn/cache/@blockfrost-openapi-npm-0.1.7-beta.0-0b53a4ead2-2384e78a74.zip b/.yarn/cache/@blockfrost-openapi-npm-0.1.7-beta.0-0b53a4ead2-2384e78a74.zip new file mode 100644 index 0000000..6c4c6dd Binary files /dev/null and b/.yarn/cache/@blockfrost-openapi-npm-0.1.7-beta.0-0b53a4ead2-2384e78a74.zip differ diff --git a/.yarn/cache/glob-npm-11.0.0-3be4126bf5-e66939201d.zip b/.yarn/cache/glob-npm-11.0.0-3be4126bf5-e66939201d.zip new file mode 100644 index 0000000..efd2f03 Binary files /dev/null and b/.yarn/cache/glob-npm-11.0.0-3be4126bf5-e66939201d.zip differ diff --git a/.yarn/cache/jackspeak-npm-4.0.2-95b4b8a1aa-d9722f0e55.zip b/.yarn/cache/jackspeak-npm-4.0.2-95b4b8a1aa-d9722f0e55.zip new file mode 100644 index 0000000..5e8b21d Binary files /dev/null and b/.yarn/cache/jackspeak-npm-4.0.2-95b4b8a1aa-d9722f0e55.zip differ diff --git a/.yarn/cache/lru-cache-npm-11.0.2-72e1eedbe6-25fcb66e9d.zip b/.yarn/cache/lru-cache-npm-11.0.2-72e1eedbe6-25fcb66e9d.zip new file mode 100644 index 0000000..e5f979b Binary files /dev/null and b/.yarn/cache/lru-cache-npm-11.0.2-72e1eedbe6-25fcb66e9d.zip differ diff --git a/.yarn/cache/minimatch-npm-10.0.1-eabcc0d3a0-082e7ccbc0.zip b/.yarn/cache/minimatch-npm-10.0.1-eabcc0d3a0-082e7ccbc0.zip new file mode 100644 index 0000000..e596760 Binary files /dev/null and b/.yarn/cache/minimatch-npm-10.0.1-eabcc0d3a0-082e7ccbc0.zip differ diff --git a/.yarn/cache/minipass-npm-7.1.2-3a5327d36d-c25f0ee819.zip b/.yarn/cache/minipass-npm-7.1.2-3a5327d36d-c25f0ee819.zip new file mode 100644 index 0000000..4c88fb6 Binary files /dev/null and b/.yarn/cache/minipass-npm-7.1.2-3a5327d36d-c25f0ee819.zip differ diff --git a/.yarn/cache/package-json-from-dist-npm-1.0.1-4631a88465-58ee9538f2.zip b/.yarn/cache/package-json-from-dist-npm-1.0.1-4631a88465-58ee9538f2.zip new file mode 100644 index 0000000..f5860a5 Binary files /dev/null and b/.yarn/cache/package-json-from-dist-npm-1.0.1-4631a88465-58ee9538f2.zip differ diff --git a/.yarn/cache/path-scurry-npm-2.0.0-5a556e8161-285ae0c2d6.zip b/.yarn/cache/path-scurry-npm-2.0.0-5a556e8161-285ae0c2d6.zip new file mode 100644 index 0000000..244235a Binary files /dev/null and b/.yarn/cache/path-scurry-npm-2.0.0-5a556e8161-285ae0c2d6.zip differ diff --git a/.yarn/cache/rimraf-npm-6.0.1-2d0b0aeb1b-0eb7edf08a.zip b/.yarn/cache/rimraf-npm-6.0.1-2d0b0aeb1b-0eb7edf08a.zip new file mode 100644 index 0000000..c07620c Binary files /dev/null and b/.yarn/cache/rimraf-npm-6.0.1-2d0b0aeb1b-0eb7edf08a.zip differ diff --git a/package.json b/package.json index 47550e3..a6eb118 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "coverage-ci": "vitest run --coverage" }, "dependencies": { - "@blockfrost/openapi": "0.1.67", + "@blockfrost/openapi": "0.1.7-beta.0", "@emurgo/cardano-serialization-lib-nodejs": "^11.5.0", "@emurgo/cip14-js": "3.0.1", "bottleneck": "^2.19.5", diff --git a/src/types/ipfs.ts b/src/types/ipfs.ts index 5423b1f..00e4472 100644 --- a/src/types/ipfs.ts +++ b/src/types/ipfs.ts @@ -1,20 +1,10 @@ -type State = 'queued' | 'pinned' | 'unpinned' | 'failed' | 'gc'; +import { paths } from '@blockfrost/openapi'; -export type AddResponse = { - name: string; - ipfs_hash: string; - size: number; -}; +export type PinResponse = + paths['/ipfs/pin/add/{IPFS_path}']['post']['responses']['200']['content']['application/json']; -export type PinResponse = { - ipfs_hash: string; - state: State; -}; +export type AddResponse = + paths['/ipfs/add']['post']['responses']['200']['content']['application/json']; -export type ListResponse = { - time_created: number; - time_pinned: number; - ipfs_hash: string; - size: string; - state: State; -}; +export type ListResponse = + paths['/ipfs/pin/list']['get']['responses']['200']['content']['application/json']; diff --git a/yarn.lock b/yarn.lock index 09abeb8..1e75a9f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -33,7 +33,7 @@ __metadata: version: 0.0.0-use.local resolution: "@blockfrost/blockfrost-js@workspace:." dependencies: - "@blockfrost/openapi": "npm:0.1.67" + "@blockfrost/openapi": "npm:0.1.7-beta.0" "@emurgo/cardano-serialization-lib-nodejs": "npm:^11.5.0" "@emurgo/cip14-js": "npm:3.0.1" "@types/json-bigint": "npm:^1.0.2" @@ -63,14 +63,15 @@ __metadata: languageName: unknown linkType: soft -"@blockfrost/openapi@npm:0.1.67": - version: 0.1.67 - resolution: "@blockfrost/openapi@npm:0.1.67" +"@blockfrost/openapi@npm:0.1.7-beta.0": + version: 0.1.7-beta.0 + resolution: "@blockfrost/openapi@npm:0.1.7-beta.0" dependencies: ajv: "npm:^8.12.0" cbor: "npm:^9.0.1" + rimraf: "npm:6.0.1" yaml: "npm:^2.3.4" - checksum: 464cfa9ae4d7911ed963f559c95e97b68763466276d5663596028038faa53c8c1ef415855c6de7b6ff363f3a9576ebcad8d374a1684549096019255cdc1c501f + checksum: 2384e78a74538c83405525959b9c911ec6a4399fbebd2182ba386421d759dd8369fe989bd8264375a15dab103c269cf72102f1788da28452fc7c1e89eb3f33aa languageName: node linkType: hard @@ -2319,6 +2320,22 @@ __metadata: languageName: node linkType: hard +"glob@npm:^11.0.0": + version: 11.0.0 + resolution: "glob@npm:11.0.0" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^4.0.1" + minimatch: "npm:^10.0.0" + minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" + path-scurry: "npm:^2.0.0" + bin: + glob: dist/esm/bin.mjs + checksum: e66939201d11ae30fe97e3364ac2be5c59d6c9bfce18ac633edfad473eb6b46a7553f6f73658f67caaf6cccc1df1ae336298a45e9021fa5695fd78754cc1603e + languageName: node + linkType: hard + "glob@npm:^7.1.3, glob@npm:^7.1.4": version: 7.2.3 resolution: "glob@npm:7.2.3" @@ -2911,6 +2928,15 @@ __metadata: languageName: node linkType: hard +"jackspeak@npm:^4.0.1": + version: 4.0.2 + resolution: "jackspeak@npm:4.0.2" + dependencies: + "@isaacs/cliui": "npm:^8.0.2" + checksum: d9722f0e55f6c322c57aedf094c405f4201b834204629817187953988075521cfddb23df83e2a7b845723ca7eb0555068c5ce1556732e9c275d32a531881efa8 + languageName: node + linkType: hard + "jju@npm:~1.4.0": version: 1.4.0 resolution: "jju@npm:1.4.0" @@ -3062,6 +3088,13 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^11.0.0": + version: 11.0.2 + resolution: "lru-cache@npm:11.0.2" + checksum: 25fcb66e9d91eaf17227c6abfe526a7bed5903de74f93bfde380eb8a13410c5e8d3f14fe447293f3f322a7493adf6f9f015c6f1df7a235ff24ec30f366e1c058 + languageName: node + linkType: hard + "lru-cache@npm:^6.0.0": version: 6.0.0 resolution: "lru-cache@npm:6.0.0" @@ -3231,6 +3264,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^10.0.0": + version: 10.0.1 + resolution: "minimatch@npm:10.0.1" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 082e7ccbc090d5f8c4e4e029255d5a1d1e3af37bda837da2b8b0085b1503a1210c91ac90d9ebfe741d8a5f286ece820a1abb4f61dc1f82ce602a055d461d93f3 + languageName: node + linkType: hard + "minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -3341,6 +3383,13 @@ __metadata: languageName: node linkType: hard +"minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: c25f0ee8196d8e6036661104bacd743785b2599a21de5c516b32b3fa2b83113ac89a2358465bc04956baab37ffb956ae43be679b2262bf7be15fce467ccd7950 + languageName: node + linkType: hard + "minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": version: 2.1.2 resolution: "minizlib@npm:2.1.2" @@ -3725,6 +3774,13 @@ __metadata: languageName: node linkType: hard +"package-json-from-dist@npm:^1.0.0": + version: 1.0.1 + resolution: "package-json-from-dist@npm:1.0.1" + checksum: 58ee9538f2f762988433da00e26acc788036914d57c71c246bf0be1b60cdbd77dd60b6a3e1a30465f0b248aeb80079e0b34cb6050b1dfa18c06953bb1cbc7602 + languageName: node + linkType: hard + "parent-module@npm:^1.0.0": version: 1.0.1 resolution: "parent-module@npm:1.0.1" @@ -3779,6 +3835,16 @@ __metadata: languageName: node linkType: hard +"path-scurry@npm:^2.0.0": + version: 2.0.0 + resolution: "path-scurry@npm:2.0.0" + dependencies: + lru-cache: "npm:^11.0.0" + minipass: "npm:^7.1.2" + checksum: 285ae0c2d6c34ae91dc1d5378ede21981c9a2f6de1ea9ca5a88b5a270ce9763b83dbadc7a324d512211d8d36b0c540427d3d0817030849d97a60fa840a2c59ec + languageName: node + linkType: hard + "path-to-regexp@npm:^6.2.0": version: 6.2.1 resolution: "path-to-regexp@npm:6.2.1" @@ -4060,6 +4126,18 @@ __metadata: languageName: node linkType: hard +"rimraf@npm:6.0.1": + version: 6.0.1 + resolution: "rimraf@npm:6.0.1" + dependencies: + glob: "npm:^11.0.0" + package-json-from-dist: "npm:^1.0.0" + bin: + rimraf: dist/esm/bin.mjs + checksum: 0eb7edf08aa39017496c99ba675552dda11a20811ba78f8232da2ba945308c91e9cd673f95998b1a8202bc7436d33390831d23ea38ae52751038d56373ad99e2 + languageName: node + linkType: hard + "rimraf@npm:^3.0.2": version: 3.0.2 resolution: "rimraf@npm:3.0.2"