@blockfrost/openapi
Advanced tools
Comparing version 0.1.62-beta.2 to 0.1.62-beta.5
@@ -143,9 +143,4 @@ "use strict"; | ||
return false; | ||
// Validating only v1 and v2. | ||
// Note: Version 2 added support for RFT, but due to botched CIP68 update process | ||
// it was initially included in v1. | ||
// As a result we are allowing both v1 and v2 for any token standard (NFT, FT, RFT). | ||
if (!Number.isInteger(input.version) || input.version > 2) | ||
if (input.version !== 1) | ||
return false; | ||
const versionString = `CIP68v${input.version}`; | ||
if (schema === 'nft') { | ||
@@ -155,3 +150,3 @@ const { isValid: isValidNFT } = (0, index_1.validateSchema)('asset_onchain_metadata_cip68_nft_222', input.metadata); | ||
? { | ||
version: versionString, | ||
version: 'CIP68v1', | ||
metadata: input.metadata, | ||
@@ -166,3 +161,3 @@ extra: input.extra, | ||
? { | ||
version: versionString, | ||
version: 'CIP68v1', | ||
metadata: input.metadata, | ||
@@ -177,3 +172,3 @@ extra: input.extra, | ||
? { | ||
version: versionString, | ||
version: 'CIP68v1', | ||
metadata: input.metadata, | ||
@@ -180,0 +175,0 @@ extra: input.extra, |
@@ -9,12 +9,10 @@ import { components } from '../generated-types'; | ||
export type CIPTypes = 'CIP25v1' | 'CIP25v2' | null; | ||
export type ValidCIP68Version = 'CIP68v1' | 'CIP68v2'; | ||
export type CIP68Version = ValidCIP68Version | null; | ||
export type CIP68Version = 'CIP68v1' | null; | ||
export type validateCIP68MetadataInput = { | ||
metadata: unknown; | ||
version: number; | ||
extra: string | undefined; | ||
} | null; | ||
export type validateCIP68MetadataOverload = { | ||
(input: validateCIP68MetadataInput, type: 'ft'): { | ||
version: ValidCIP68Version; | ||
version: 'CIP68v1'; | ||
extra: string | undefined; | ||
@@ -24,3 +22,3 @@ metadata: Schemas['onchain_metadata_cip68_ft_333']; | ||
(input: validateCIP68MetadataInput, type: 'nft'): { | ||
version: ValidCIP68Version; | ||
version: 'CIP68v1'; | ||
extra: string | undefined; | ||
@@ -30,3 +28,3 @@ metadata: Schemas['onchain_metadata_cip68_nft_222']; | ||
(input: validateCIP68MetadataInput, type: 'rft'): { | ||
version: ValidCIP68Version; | ||
version: 'CIP68v1'; | ||
extra: string | undefined; | ||
@@ -36,3 +34,3 @@ metadata: Schemas['onchain_metadata_cip68_rft_444']; | ||
(input: validateCIP68MetadataInput, type: 'nft' | 'ft' | 'rft'): { | ||
version: ValidCIP68Version; | ||
version: 'CIP68v1'; | ||
extra: string | undefined; | ||
@@ -39,0 +37,0 @@ metadata: Schemas['onchain_metadata_cip68_nft_222'] | Schemas['onchain_metadata_cip68_ft_333'] | Schemas['onchain_metadata_cip68_rft_444']; |
{ | ||
"name": "@blockfrost/openapi", | ||
"version": "0.1.62-beta.2", | ||
"version": "0.1.62-beta.5", | ||
"description": "OpenAPI specifications for blockfrost.io", | ||
@@ -17,4 +17,4 @@ "repository": "git@github.com:blockfrost/openapi.git", | ||
"bundle": "yarn redocly bundle -o ./openapi.yaml src/definitions.yaml && yarn redocly bundle -o ./openapi.json src/definitions.yaml", | ||
"generate-docs": "yarn redocly build-docs -t ./src/template.hbs -o docs/index.html ./openapi.yaml", | ||
"lint": "yarn redocly lint src/definitions.yaml", | ||
"generate-docs": "yarn redocly build-docs -t ./src/template.hbs -o docs/index.html ./openapi.yaml", | ||
"generate-types": "yarn openapi-typescript ./openapi.yaml --output ./src/generated-types.ts", | ||
@@ -43,2 +43,2 @@ "generate-json-schema": "node lib/scripts/generate-json-schema.js > json-schema.json", | ||
} | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
970993
9556