{"version":3,"sources":["../../src/Diviner/Config.ts","../../src/Diviner/Schema.ts","../../src/Schema.ts","../../src/Diviner/Payload.ts","../../src/Payload/NftInfo/TokenType.ts","../../src/Payload/Payload.ts","../../src/Plugin.ts","../../src/Template.ts","../../src/Witness/Schema.ts","../../src/Witness/Query.ts"],"sourcesContent":["import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { asSchema } from '@xyo-network/payload-model'\n\nimport { NftScoreSchema } from './Schema.ts'\n\nexport type NftScoreDivinerConfigSchema = typeof NftScoreDivinerConfigSchema\nexport const NftScoreDivinerConfigSchema = asSchema(`${NftScoreSchema}.diviner.config`, true)\n\nexport type NftScoreDivinerConfig = DivinerConfig<{ schema: NftScoreDivinerConfigSchema }>\n","import { asSchema } from '@xyo-network/payload-model'\n\nimport { NftSchema } from '../Schema.ts'\n\nexport type NftScoreSchema = typeof NftScoreSchema\nexport const NftScoreSchema = asSchema(`${NftSchema}.score`, true)\n","import { asSchema } from '@xyo-network/payload-model'\n\nexport type NftSchema = typeof NftSchema\nexport const NftSchema = asSchema('network.xyo.crypto.nft', true)\n","import type { Score } from '@xyo-network/crypto-nft-score-model'\nimport type { Payload } from '@xyo-network/payload-model'\n\nimport type { NftContractInformation } from '../Payload/index.ts'\nimport { NftScoreSchema } from './Schema.ts'\n\nexport type AttributesScoringCriteria = 'Attributes'\n\nexport type MetadataScoringCriteria\n  = | 'Animation URL'\n    | 'Background Color'\n    | 'Description'\n    | 'External Url'\n    | 'Image'\n    | 'Image Data'\n    | 'Name'\n    | 'YouTube URL'\n    | AttributesScoringCriteria\n\nexport type ScoringCriteria = 'Contract Address' | 'Supply' | 'Token Id' | 'Type' | MetadataScoringCriteria\n\nexport type ScoringCriteriaKey = ScoringCriteria & PropertyKey\n\nexport type NftAnalysis = Record<ScoringCriteriaKey, Score>\n\nexport interface NftScores {\n  scores: NftAnalysis\n}\n\nexport type NftScoreFields = NftContractInformation & NftScores & { sources?: string[] }\n\nexport type NftScore = Payload<NftScoreFields, NftScoreSchema>\nexport const isNftScore = (x?: Payload | null): x is NftScore => x?.schema === NftScoreSchema\n","export type TokenType = 'ERC721' | 'ERC1155' | null\n\nexport const toTokenType = (value: string | null): TokenType => {\n  if (value === 'ERC721' || value === 'ERC1155' || value === null) {\n    return value\n  }\n  if (value === undefined) {\n    return null\n  }\n  throw new Error(`${value} is not a valid TokenType`)\n}\n","import type { Payload } from '@xyo-network/payload-model'\n\nimport { NftSchema } from '../Schema.ts'\nimport type { NftInfoFields } from './NftInfo/index.ts'\n\nexport type NftInfo = Payload<NftInfoFields, NftSchema>\n\nexport const isNftInfo = (payload: Payload): payload is NftInfo => {\n  return payload.schema === NftSchema\n}\n","import { createPayloadPlugin } from '@xyo-network/sdk-js'\n\nimport type { NftInfo } from './Payload/index.ts'\nimport { NftSchema } from './Schema.ts'\nimport { cryptoWalletNftPayloadTemplate } from './Template.ts'\n\nexport const NftInfoPayloadPlugin = () =>\n  createPayloadPlugin<NftInfo>({\n    schema: NftSchema,\n    template: cryptoWalletNftPayloadTemplate,\n  })\n","import type { NftInfo } from './Payload/index.ts'\nimport { NftSchema } from './Schema.ts'\n\nexport const cryptoWalletNftPayloadTemplate = (): Partial<NftInfo> => ({ schema: NftSchema })\n","import { asSchema } from '@xyo-network/payload-model'\n\nimport { NftSchema } from '../Schema.ts'\n\nexport type NftWitnessConfigSchema = typeof NftWitnessConfigSchema\nexport const NftWitnessConfigSchema = asSchema(`${NftSchema}.witness.config`, true)\n\nexport type NftWitnessQuerySchema = typeof NftWitnessQuerySchema\nexport const NftWitnessQuerySchema = asSchema(`${NftSchema}.witness.query`, true)\n","import type { Payload } from '@xyo-network/payload-model'\n\nimport { NftWitnessQuerySchema } from './Schema.ts'\n\nexport type NftWitnessQuery = Payload<\n  {\n    address?: string\n    /**\n     * The maximum number of NFTs to return. Configurable to prevent\n     * large wallets from exhausting Infura API credits.\n     */\n    maxNfts?: number\n  },\n  NftWitnessQuerySchema\n>\nexport const isNftWitnessQuery = (x?: Payload | null): x is NftWitnessQuery => x?.schema === NftWitnessQuerySchema\n"],"mappings":";AACA,SAAS,YAAAA,iBAAgB;;;ACDzB,SAAS,YAAAC,iBAAgB;;;ACAzB,SAAS,gBAAgB;AAGlB,IAAM,YAAY,SAAS,0BAA0B,IAAI;;;ADEzD,IAAM,iBAAiBC,UAAS,GAAG,SAAS,UAAU,IAAI;;;ADC1D,IAAM,8BAA8BC,UAAS,GAAG,cAAc,mBAAmB,IAAI;;;AG0BrF,IAAM,aAAa,CAAC,MAAsC,GAAG,WAAW;;;AC9BxE,IAAM,cAAc,CAAC,UAAoC;AAC9D,MAAI,UAAU,YAAY,UAAU,aAAa,UAAU,MAAM;AAC/D,WAAO;AAAA,EACT;AACA,MAAI,UAAU,QAAW;AACvB,WAAO;AAAA,EACT;AACA,QAAM,IAAI,MAAM,GAAG,KAAK,2BAA2B;AACrD;;;ACHO,IAAM,YAAY,CAAC,YAAyC;AACjE,SAAO,QAAQ,WAAW;AAC5B;;;ACTA,SAAS,2BAA2B;;;ACG7B,IAAM,iCAAiC,OAAyB,EAAE,QAAQ,UAAU;;;ADGpF,IAAM,uBAAuB,MAClC,oBAA6B;AAAA,EAC3B,QAAQ;AAAA,EACR,UAAU;AACZ,CAAC;;;AEVH,SAAS,YAAAC,iBAAgB;AAKlB,IAAM,yBAAyBC,UAAS,GAAG,SAAS,mBAAmB,IAAI;AAG3E,IAAM,wBAAwBA,UAAS,GAAG,SAAS,kBAAkB,IAAI;;;ACOzE,IAAM,oBAAoB,CAAC,MAA6C,GAAG,WAAW;","names":["asSchema","asSchema","asSchema","asSchema","asSchema","asSchema"]}