@xyo-network/crypto-nft-payload-plugin
Advanced tools
Comparing version 3.0.3 to 3.0.4
@@ -1,122 +0,7 @@ | ||
import { DivinerConfig } from '@xyo-network/diviner-model'; | ||
import { Score } from '@xyo-network/crypto-nft-score-model'; | ||
import * as _xyo_network_payload_model from '@xyo-network/payload-model'; | ||
import { Payload } from '@xyo-network/payload-model'; | ||
import { JsonValue } from '@xylabs/object'; | ||
import * as _xyo_network_payload_plugin from '@xyo-network/payload-plugin'; | ||
import { WitnessConfig } from '@xyo-network/witness-model'; | ||
type NftSchema = 'network.xyo.crypto.nft'; | ||
declare const NftSchema: NftSchema; | ||
type NftScoreSchema = `${NftSchema}.score`; | ||
declare const NftScoreSchema: NftScoreSchema; | ||
type NftScoreDivinerConfigSchema = `${NftScoreSchema}.diviner.config`; | ||
declare const NftScoreDivinerConfigSchema: NftScoreDivinerConfigSchema; | ||
type NftScoreDivinerConfig = DivinerConfig<{ | ||
schema: NftScoreDivinerConfigSchema; | ||
}>; | ||
interface NftAttribute { | ||
[key: string]: JsonValue | undefined; | ||
display_type?: JsonValue; | ||
trait_type?: JsonValue; | ||
value?: JsonValue; | ||
} | ||
type TokenType = 'ERC721' | 'ERC1155' | null; | ||
declare const toTokenType: (value: string | null) => TokenType; | ||
interface NftContractInformation { | ||
address: string; | ||
chainId: number; | ||
implementation?: string; | ||
type?: TokenType; | ||
types?: TokenType[]; | ||
} | ||
interface NftMetadata { | ||
[key: string]: JsonValue | NftAttribute[] | undefined; | ||
attributes?: NftAttribute[] | JsonValue; | ||
description?: JsonValue; | ||
image?: JsonValue; | ||
name?: JsonValue; | ||
} | ||
interface NftInfoFields extends NftContractInformation { | ||
metadata?: NftMetadata; | ||
metadataUri?: string; | ||
supply: string; | ||
tokenId: string; | ||
} | ||
type DisplayType = 'date' | 'boost_number' | 'boost_percentage' | 'number' | 'string'; | ||
interface OpenSeaNftAttribute extends NftAttribute { | ||
display_type?: DisplayType; | ||
max_value?: number; | ||
trait_type: string; | ||
value: string | number; | ||
} | ||
interface OpenSeaNftMetadata extends NftMetadata { | ||
animation_url: string; | ||
attributes?: OpenSeaNftAttribute[]; | ||
background_color?: string; | ||
description: string; | ||
external_url?: string; | ||
image: string; | ||
image_data?: string; | ||
name: string; | ||
youtube_url?: string; | ||
} | ||
interface OpenSeaNftInfoFields extends NftInfoFields { | ||
metadata: OpenSeaNftMetadata; | ||
} | ||
type NftInfo = Payload<NftInfoFields, NftSchema>; | ||
declare const isNftInfo: (payload: Payload) => payload is NftInfo; | ||
type AttributesScoringCriteria = 'Attributes'; | ||
type MetadataScoringCriteria = 'Animation URL' | 'Background Color' | 'Description' | 'External Url' | 'Image' | 'Image Data' | 'Name' | 'YouTube URL' | AttributesScoringCriteria; | ||
type ScoringCriteria = 'Contract Address' | 'Supply' | 'Token Id' | 'Type' | MetadataScoringCriteria; | ||
type ScoringCriteriaKey = ScoringCriteria & PropertyKey; | ||
type NftAnalysis = { | ||
[key in ScoringCriteriaKey]: Score; | ||
}; | ||
interface NftScores { | ||
scores: NftAnalysis; | ||
} | ||
type NftScoreFields = NftContractInformation & NftScores & { | ||
sources?: string[]; | ||
}; | ||
type NftScore = Payload<NftScoreFields, NftScoreSchema>; | ||
declare const isNftScore: (x?: Payload | null) => x is NftScore; | ||
declare const NftInfoPayloadPlugin: () => _xyo_network_payload_plugin.PayloadPlugin<_xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & NftInfoFields & { | ||
schema: "network.xyo.crypto.nft"; | ||
}>; | ||
declare const cryptoWalletNftPayloadTemplate: () => Partial<NftInfo>; | ||
type NftWitnessConfigSchema = `${NftSchema}.witness.config`; | ||
declare const NftWitnessConfigSchema: NftWitnessConfigSchema; | ||
type NftWitnessQuerySchema = `${NftSchema}.witness.query`; | ||
declare const NftWitnessQuerySchema: NftWitnessQuerySchema; | ||
type CryptoWalletNftWitnessConfig = WitnessConfig<{ | ||
address?: string; | ||
loadMetadata?: boolean; | ||
schema: NftWitnessConfigSchema; | ||
timeout?: number; | ||
}>; | ||
type NftWitnessQuery = Payload<{ | ||
address?: string; | ||
maxNfts?: number; | ||
}, NftWitnessQuerySchema>; | ||
declare const isNftWitnessQuery: (x?: Payload | null) => x is NftWitnessQuery; | ||
export { type AttributesScoringCriteria, type CryptoWalletNftWitnessConfig, type DisplayType, type MetadataScoringCriteria, type NftAnalysis, type NftAttribute, type NftContractInformation, type NftInfo, type NftInfoFields, NftInfoPayloadPlugin, type NftMetadata, NftSchema, type NftScore, type NftScoreDivinerConfig, NftScoreDivinerConfigSchema, type NftScoreFields, NftScoreSchema, type NftScores, NftWitnessConfigSchema, type NftWitnessQuery, NftWitnessQuerySchema, type OpenSeaNftAttribute, type OpenSeaNftInfoFields, type OpenSeaNftMetadata, type ScoringCriteria, type ScoringCriteriaKey, type TokenType, cryptoWalletNftPayloadTemplate, NftInfoPayloadPlugin as default, isNftInfo, isNftScore, isNftWitnessQuery, toTokenType }; | ||
export * from './Diviner/index.ts'; | ||
export * from './Payload/index.ts'; | ||
export { NftInfoPayloadPlugin as default, NftInfoPayloadPlugin } from './Plugin.ts'; | ||
export * from './Schema.ts'; | ||
export * from './Template.ts'; | ||
export * from './Witness/index.ts'; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "@xyo-network/crypto-nft-payload-plugin", | ||
"version": "3.0.4", | ||
"description": "Typescript/Javascript Plugins for XYO Platform", | ||
"homepage": "https://xyo.network", | ||
"bugs": { | ||
"url": "git+https://github.com/XYOracleNetwork/plugins/issues", | ||
"email": "support@xyo.network" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/XYOracleNetwork/plugins.git" | ||
}, | ||
"license": "LGPL-3.0-only", | ||
"author": { | ||
"name": "XYO Development Team", | ||
"email": "support@xyo.network", | ||
"name": "XYO Development Team", | ||
"url": "https://xyo.network" | ||
}, | ||
"bugs": { | ||
"email": "support@xyo.network", | ||
"url": "git+https://github.com/XYOracleNetwork/plugins/issues" | ||
}, | ||
"dependencies": { | ||
"@xylabs/object": "^4.0.2", | ||
"@xyo-network/crypto-nft-score-model": "^3.0.3", | ||
"@xyo-network/diviner-model": "^3.0.3", | ||
"@xyo-network/payload-model": "^3.0.3", | ||
"@xyo-network/payload-plugin": "^3.0.3", | ||
"@xyo-network/witness-model": "^3.0.3" | ||
}, | ||
"devDependencies": { | ||
"@xylabs/ts-scripts-yarn3": "^4.0.0-rc.20", | ||
"@xylabs/tsconfig": "^4.0.0-rc.20", | ||
"typescript": "^5.5.4" | ||
}, | ||
"description": "Typescript/Javascript Plugins for XYO Platform", | ||
"sideEffects": false, | ||
"type": "module", | ||
"exports": { | ||
@@ -35,14 +31,18 @@ ".": { | ||
"types": "dist/neutral/index.d.ts", | ||
"homepage": "https://xyo.network", | ||
"license": "LGPL-3.0-only", | ||
"dependencies": { | ||
"@xylabs/object": "^4.0.4", | ||
"@xyo-network/crypto-nft-score-model": "^3.0.4", | ||
"@xyo-network/diviner-model": "^3.0.10", | ||
"@xyo-network/payload-model": "^3.0.10", | ||
"@xyo-network/payload-plugin": "^3.0.10", | ||
"@xyo-network/witness-model": "^3.0.10" | ||
}, | ||
"devDependencies": { | ||
"@xylabs/ts-scripts-yarn3": "^4.0.7", | ||
"@xylabs/tsconfig": "^4.0.7", | ||
"typescript": "^5.5.4" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/XYOracleNetwork/plugins.git" | ||
}, | ||
"sideEffects": false, | ||
"version": "3.0.3", | ||
"type": "module" | ||
} | ||
} |
import type { NftInfo } from './Payload/index.ts' | ||
import { NftSchema } from './Schema.ts' | ||
export const cryptoWalletNftPayloadTemplate = (): Partial<NftInfo> => ({ | ||
schema: NftSchema, | ||
}) | ||
export const cryptoWalletNftPayloadTemplate = (): Partial<NftInfo> => ({ schema: NftSchema }) |
@@ -5,5 +5,3 @@ import type { XyTsupConfig } from '@xylabs/ts-scripts-yarn3' | ||
browser: {}, | ||
neutral: { | ||
src: true, | ||
}, | ||
neutral: { src: true }, | ||
node: {}, | ||
@@ -10,0 +8,0 @@ }, |
Sorry, the diff of this file is not supported yet
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
40177
82
432