alchemy-sdk
Advanced tools
Comparing version 3.0.0-beta.0 to 3.0.0-beta.1
@@ -29,2 +29,9 @@ import type { Block, BlockTag, BlockWithTransactions, FeeData, Log, TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; | ||
/** | ||
* Checks if the provided address is a smart contract. | ||
* | ||
* @param address The address to check type for. | ||
* @public | ||
*/ | ||
isContractAddress(address: string): Promise<boolean>; | ||
/** | ||
* Returns the contract code of the provided address at the block. If there is | ||
@@ -31,0 +38,0 @@ * no contract deployed, the result is `0x`. |
import type { BigNumberish } from '@ethersproject/bignumber'; | ||
import { ComputeRarityResponse, GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractMetadataBatchResponse, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetMintedNftsOptions, GetNftMetadataBatchResponse, GetNftMetadataOptions, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftOptions, GetOwnersForNftResponse, GetSpamContractsResponse, GetTransfersForContractOptions, GetTransfersForOwnerOptions, GetTransfersForOwnerTransferType, IsSpamContractResponse, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult, SearchContractMetadataResponse, TransfersNftResponse } from '../types/types'; | ||
import { BaseNft, Nft, NftContract } from './nft'; | ||
import { BaseNft, Nft, NftCollection, NftContract } from './nft'; | ||
/** | ||
@@ -43,2 +43,9 @@ * The NFT namespace contains all the functionality related to NFTs. | ||
/** | ||
* Get the NFT collection metadata associated with the provided parameters. | ||
* | ||
* @param collectionSlug - The OpenSea collection slug of the NFT. | ||
* @beta | ||
*/ | ||
getCollectionMetadata(collectionSlug: string): Promise<NftCollection>; | ||
/** | ||
* Fetches all NFTs for a given owner and yields them in an async iterable. | ||
@@ -45,0 +52,0 @@ * |
@@ -1,2 +0,2 @@ | ||
import { AcquiredAt, NftImage, NftSpamClassification, NftTokenType, OpenSeaCollectionMetadata } from '../types/types'; | ||
import { AcquiredAt, NftImage, NftSpamClassification, NftTokenType, OpenSeaBaseCollectionMetadata, OpenSeaCollectionMetadata } from '../types/types'; | ||
/** | ||
@@ -40,2 +40,23 @@ * Alchemy representation of an NFT contract. | ||
/** | ||
* Alchemy representation of an NFT collection | ||
* | ||
* @public | ||
*/ | ||
export interface NftCollection { | ||
/** The name of the collection. */ | ||
name: string; | ||
/** The OpenSea human-readable slug of the collection. */ | ||
openSeaSlug?: string; | ||
/** OpenSea-specific collection metadata such as floor price. */ | ||
openSea?: OpenSeaBaseCollectionMetadata; | ||
/** The description of the collection. */ | ||
description?: string; | ||
/** The homepage of the collection as determined by OpenSea. */ | ||
externalUrl?: string; | ||
/** The Twitter handle of the collection. */ | ||
twitterUsername?: string; | ||
/** The Discord URL of the collection. */ | ||
discordUrl?: string; | ||
} | ||
/** | ||
* Alchemy representation of an NFT that doesn't contain metadata. | ||
@@ -42,0 +63,0 @@ * |
import { BigNumberish } from '@ethersproject/bignumber'; | ||
import { AlchemyConfig } from '../api/alchemy-config'; | ||
import { BaseNft, Nft, NftContract } from '../api/nft'; | ||
import { BaseNft, Nft, NftCollection, NftContract } from '../api/nft'; | ||
import { AssetTransfersResponse, ComputeRarityResponse, GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractMetadataBatchResponse, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetMintedNftsOptions, GetNftMetadataBatchResponse, GetNftMetadataOptions, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, GetSpamContractsResponse, GetTransfersForContractOptions, GetTransfersForOwnerOptions, GetTransfersForOwnerTransferType, IsSpamContractResponse, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult, SearchContractMetadataResponse, TransfersNftResponse } from '../types/types'; | ||
@@ -18,2 +18,3 @@ /** | ||
export declare function getContractMetadataBatch(config: AlchemyConfig, contractAddresses: string[]): Promise<GetContractMetadataBatchResponse>; | ||
export declare function getCollectionMetadata(config: AlchemyConfig, collectionSlug: string, srcMethod?: string): Promise<NftCollection>; | ||
export declare function getNftsForOwnerIterator(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): AsyncIterable<OwnedBaseNft | OwnedNft>; | ||
@@ -20,0 +21,0 @@ export declare function getNftsForOwner(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): Promise<OwnedNftsResponse | OwnedBaseNftsResponse>; |
@@ -28,5 +28,8 @@ /** | ||
} | ||
/** OpenSea's metadata for an NFT collection. */ | ||
export interface RawOpenSeaCollectionMetadata { | ||
floorPrice: number | null; | ||
/** OpenSea's base metadata for an NFT collection */ | ||
export interface RawOpenSeaBaseCollectionMetadata { | ||
floorPrice?: number; | ||
} | ||
/** OpenSea's full metadata for an NFT collection. */ | ||
export interface RawOpenSeaCollectionMetadata extends RawOpenSeaBaseCollectionMetadata { | ||
collectionName: string | null; | ||
@@ -33,0 +36,0 @@ safelistRequestStatus: string | null; |
@@ -1,3 +0,3 @@ | ||
import { BaseNft, Nft, NftContract, NftContractForNft } from '../api/nft'; | ||
import { RawContractBaseNft, RawGetNftSalesResponse, RawNft, RawNftContract, RawNftContractForNft, RawNftContractForOwner, RawOwnedBaseNft } from '../internal/raw-interfaces'; | ||
import { BaseNft, Nft, NftCollection, NftContract, NftContractForNft } from '../api/nft'; | ||
import { RawContractBaseNft, RawGetNftSalesResponse, RawNft, RawNftCollection, RawNftContract, RawNftContractForNft, RawNftContractForOwner, RawOwnedBaseNft } from '../internal/raw-interfaces'; | ||
import { GetNftSalesResponse, NftContractForOwner } from '../types/types'; | ||
@@ -8,2 +8,3 @@ export declare function formatBlock(block: string | number): string; | ||
export declare function getNftContractFromRaw(rawNftContract: RawNftContract): NftContract; | ||
export declare function getNftCollectionFromRaw(rawNftCollection: RawNftCollection): NftCollection; | ||
export declare function getBaseNftFromRaw(rawBaseNft: RawOwnedBaseNft): BaseNft; | ||
@@ -10,0 +11,0 @@ export declare function getBaseNftFromRaw(rawContractBaseNft: RawContractBaseNft, contractAddress: string): BaseNft; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
var utils = require('./api/utils'); | ||
var index = require('./index-513320a1.js'); | ||
var index = require('./index-36ec6034.js'); | ||
var bignumber = require('@ethersproject/bignumber'); | ||
@@ -9,0 +9,0 @@ require('axios'); |
@@ -29,2 +29,9 @@ import type { Block, BlockTag, BlockWithTransactions, FeeData, Log, TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; | ||
/** | ||
* Checks if the provided address is a smart contract. | ||
* | ||
* @param address The address to check type for. | ||
* @public | ||
*/ | ||
isContractAddress(address: string): Promise<boolean>; | ||
/** | ||
* Returns the contract code of the provided address at the block. If there is | ||
@@ -31,0 +38,0 @@ * no contract deployed, the result is `0x`. |
import type { BigNumberish } from '@ethersproject/bignumber'; | ||
import { ComputeRarityResponse, GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractMetadataBatchResponse, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetMintedNftsOptions, GetNftMetadataBatchResponse, GetNftMetadataOptions, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftOptions, GetOwnersForNftResponse, GetSpamContractsResponse, GetTransfersForContractOptions, GetTransfersForOwnerOptions, GetTransfersForOwnerTransferType, IsSpamContractResponse, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult, SearchContractMetadataResponse, TransfersNftResponse } from '../types/types'; | ||
import { BaseNft, Nft, NftContract } from './nft'; | ||
import { BaseNft, Nft, NftCollection, NftContract } from './nft'; | ||
/** | ||
@@ -43,2 +43,9 @@ * The NFT namespace contains all the functionality related to NFTs. | ||
/** | ||
* Get the NFT collection metadata associated with the provided parameters. | ||
* | ||
* @param collectionSlug - The OpenSea collection slug of the NFT. | ||
* @beta | ||
*/ | ||
getCollectionMetadata(collectionSlug: string): Promise<NftCollection>; | ||
/** | ||
* Fetches all NFTs for a given owner and yields them in an async iterable. | ||
@@ -45,0 +52,0 @@ * |
@@ -1,2 +0,2 @@ | ||
import { AcquiredAt, NftImage, NftSpamClassification, NftTokenType, OpenSeaCollectionMetadata } from '../types/types'; | ||
import { AcquiredAt, NftImage, NftSpamClassification, NftTokenType, OpenSeaBaseCollectionMetadata, OpenSeaCollectionMetadata } from '../types/types'; | ||
/** | ||
@@ -40,2 +40,23 @@ * Alchemy representation of an NFT contract. | ||
/** | ||
* Alchemy representation of an NFT collection | ||
* | ||
* @public | ||
*/ | ||
export interface NftCollection { | ||
/** The name of the collection. */ | ||
name: string; | ||
/** The OpenSea human-readable slug of the collection. */ | ||
openSeaSlug?: string; | ||
/** OpenSea-specific collection metadata such as floor price. */ | ||
openSea?: OpenSeaBaseCollectionMetadata; | ||
/** The description of the collection. */ | ||
description?: string; | ||
/** The homepage of the collection as determined by OpenSea. */ | ||
externalUrl?: string; | ||
/** The Twitter handle of the collection. */ | ||
twitterUsername?: string; | ||
/** The Discord URL of the collection. */ | ||
discordUrl?: string; | ||
} | ||
/** | ||
* Alchemy representation of an NFT that doesn't contain metadata. | ||
@@ -42,0 +63,0 @@ * |
import { BigNumberish } from '@ethersproject/bignumber'; | ||
import { AlchemyConfig } from '../api/alchemy-config'; | ||
import { BaseNft, Nft, NftContract } from '../api/nft'; | ||
import { BaseNft, Nft, NftCollection, NftContract } from '../api/nft'; | ||
import { AssetTransfersResponse, ComputeRarityResponse, GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractMetadataBatchResponse, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetMintedNftsOptions, GetNftMetadataBatchResponse, GetNftMetadataOptions, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, GetSpamContractsResponse, GetTransfersForContractOptions, GetTransfersForOwnerOptions, GetTransfersForOwnerTransferType, IsSpamContractResponse, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult, SearchContractMetadataResponse, TransfersNftResponse } from '../types/types'; | ||
@@ -18,2 +18,3 @@ /** | ||
export declare function getContractMetadataBatch(config: AlchemyConfig, contractAddresses: string[]): Promise<GetContractMetadataBatchResponse>; | ||
export declare function getCollectionMetadata(config: AlchemyConfig, collectionSlug: string, srcMethod?: string): Promise<NftCollection>; | ||
export declare function getNftsForOwnerIterator(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): AsyncIterable<OwnedBaseNft | OwnedNft>; | ||
@@ -20,0 +21,0 @@ export declare function getNftsForOwner(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): Promise<OwnedNftsResponse | OwnedBaseNftsResponse>; |
@@ -28,5 +28,8 @@ /** | ||
} | ||
/** OpenSea's metadata for an NFT collection. */ | ||
export interface RawOpenSeaCollectionMetadata { | ||
floorPrice: number | null; | ||
/** OpenSea's base metadata for an NFT collection */ | ||
export interface RawOpenSeaBaseCollectionMetadata { | ||
floorPrice?: number; | ||
} | ||
/** OpenSea's full metadata for an NFT collection. */ | ||
export interface RawOpenSeaCollectionMetadata extends RawOpenSeaBaseCollectionMetadata { | ||
collectionName: string | null; | ||
@@ -33,0 +36,0 @@ safelistRequestStatus: string | null; |
@@ -1,3 +0,3 @@ | ||
import { BaseNft, Nft, NftContract, NftContractForNft } from '../api/nft'; | ||
import { RawContractBaseNft, RawGetNftSalesResponse, RawNft, RawNftContract, RawNftContractForNft, RawNftContractForOwner, RawOwnedBaseNft } from '../internal/raw-interfaces'; | ||
import { BaseNft, Nft, NftCollection, NftContract, NftContractForNft } from '../api/nft'; | ||
import { RawContractBaseNft, RawGetNftSalesResponse, RawNft, RawNftCollection, RawNftContract, RawNftContractForNft, RawNftContractForOwner, RawOwnedBaseNft } from '../internal/raw-interfaces'; | ||
import { GetNftSalesResponse, NftContractForOwner } from '../types/types'; | ||
@@ -8,2 +8,3 @@ export declare function formatBlock(block: string | number): string; | ||
export declare function getNftContractFromRaw(rawNftContract: RawNftContract): NftContract; | ||
export declare function getNftCollectionFromRaw(rawNftCollection: RawNftCollection): NftCollection; | ||
export declare function getBaseNftFromRaw(rawBaseNft: RawOwnedBaseNft): BaseNft; | ||
@@ -10,0 +11,0 @@ export declare function getBaseNftFromRaw(rawContractBaseNft: RawContractBaseNft, contractAddress: string): BaseNft; |
@@ -29,2 +29,9 @@ import type { Block, BlockTag, BlockWithTransactions, FeeData, Log, TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; | ||
/** | ||
* Checks if the provided address is a smart contract. | ||
* | ||
* @param address The address to check type for. | ||
* @public | ||
*/ | ||
isContractAddress(address: string): Promise<boolean>; | ||
/** | ||
* Returns the contract code of the provided address at the block. If there is | ||
@@ -31,0 +38,0 @@ * no contract deployed, the result is `0x`. |
import type { BigNumberish } from '@ethersproject/bignumber'; | ||
import { ComputeRarityResponse, GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractMetadataBatchResponse, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetMintedNftsOptions, GetNftMetadataBatchResponse, GetNftMetadataOptions, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftOptions, GetOwnersForNftResponse, GetSpamContractsResponse, GetTransfersForContractOptions, GetTransfersForOwnerOptions, GetTransfersForOwnerTransferType, IsSpamContractResponse, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult, SearchContractMetadataResponse, TransfersNftResponse } from '../types/types'; | ||
import { BaseNft, Nft, NftContract } from './nft'; | ||
import { BaseNft, Nft, NftCollection, NftContract } from './nft'; | ||
/** | ||
@@ -43,2 +43,9 @@ * The NFT namespace contains all the functionality related to NFTs. | ||
/** | ||
* Get the NFT collection metadata associated with the provided parameters. | ||
* | ||
* @param collectionSlug - The OpenSea collection slug of the NFT. | ||
* @beta | ||
*/ | ||
getCollectionMetadata(collectionSlug: string): Promise<NftCollection>; | ||
/** | ||
* Fetches all NFTs for a given owner and yields them in an async iterable. | ||
@@ -45,0 +52,0 @@ * |
@@ -1,2 +0,2 @@ | ||
import { AcquiredAt, NftImage, NftSpamClassification, NftTokenType, OpenSeaCollectionMetadata } from '../types/types'; | ||
import { AcquiredAt, NftImage, NftSpamClassification, NftTokenType, OpenSeaBaseCollectionMetadata, OpenSeaCollectionMetadata } from '../types/types'; | ||
/** | ||
@@ -40,2 +40,23 @@ * Alchemy representation of an NFT contract. | ||
/** | ||
* Alchemy representation of an NFT collection | ||
* | ||
* @public | ||
*/ | ||
export interface NftCollection { | ||
/** The name of the collection. */ | ||
name: string; | ||
/** The OpenSea human-readable slug of the collection. */ | ||
openSeaSlug?: string; | ||
/** OpenSea-specific collection metadata such as floor price. */ | ||
openSea?: OpenSeaBaseCollectionMetadata; | ||
/** The description of the collection. */ | ||
description?: string; | ||
/** The homepage of the collection as determined by OpenSea. */ | ||
externalUrl?: string; | ||
/** The Twitter handle of the collection. */ | ||
twitterUsername?: string; | ||
/** The Discord URL of the collection. */ | ||
discordUrl?: string; | ||
} | ||
/** | ||
* Alchemy representation of an NFT that doesn't contain metadata. | ||
@@ -42,0 +63,0 @@ * |
import { BigNumberish } from '@ethersproject/bignumber'; | ||
import { AlchemyConfig } from '../api/alchemy-config'; | ||
import { BaseNft, Nft, NftContract } from '../api/nft'; | ||
import { BaseNft, Nft, NftCollection, NftContract } from '../api/nft'; | ||
import { AssetTransfersResponse, ComputeRarityResponse, GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractMetadataBatchResponse, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetMintedNftsOptions, GetNftMetadataBatchResponse, GetNftMetadataOptions, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, GetSpamContractsResponse, GetTransfersForContractOptions, GetTransfersForOwnerOptions, GetTransfersForOwnerTransferType, IsSpamContractResponse, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult, SearchContractMetadataResponse, TransfersNftResponse } from '../types/types'; | ||
@@ -18,2 +18,3 @@ /** | ||
export declare function getContractMetadataBatch(config: AlchemyConfig, contractAddresses: string[]): Promise<GetContractMetadataBatchResponse>; | ||
export declare function getCollectionMetadata(config: AlchemyConfig, collectionSlug: string, srcMethod?: string): Promise<NftCollection>; | ||
export declare function getNftsForOwnerIterator(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): AsyncIterable<OwnedBaseNft | OwnedNft>; | ||
@@ -20,0 +21,0 @@ export declare function getNftsForOwner(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): Promise<OwnedNftsResponse | OwnedBaseNftsResponse>; |
@@ -28,5 +28,8 @@ /** | ||
} | ||
/** OpenSea's metadata for an NFT collection. */ | ||
export interface RawOpenSeaCollectionMetadata { | ||
floorPrice: number | null; | ||
/** OpenSea's base metadata for an NFT collection */ | ||
export interface RawOpenSeaBaseCollectionMetadata { | ||
floorPrice?: number; | ||
} | ||
/** OpenSea's full metadata for an NFT collection. */ | ||
export interface RawOpenSeaCollectionMetadata extends RawOpenSeaBaseCollectionMetadata { | ||
collectionName: string | null; | ||
@@ -33,0 +36,0 @@ safelistRequestStatus: string | null; |
@@ -1,3 +0,3 @@ | ||
import { BaseNft, Nft, NftContract, NftContractForNft } from '../api/nft'; | ||
import { RawContractBaseNft, RawGetNftSalesResponse, RawNft, RawNftContract, RawNftContractForNft, RawNftContractForOwner, RawOwnedBaseNft } from '../internal/raw-interfaces'; | ||
import { BaseNft, Nft, NftCollection, NftContract, NftContractForNft } from '../api/nft'; | ||
import { RawContractBaseNft, RawGetNftSalesResponse, RawNft, RawNftCollection, RawNftContract, RawNftContractForNft, RawNftContractForOwner, RawOwnedBaseNft } from '../internal/raw-interfaces'; | ||
import { GetNftSalesResponse, NftContractForOwner } from '../types/types'; | ||
@@ -8,2 +8,3 @@ export declare function formatBlock(block: string | number): string; | ||
export declare function getNftContractFromRaw(rawNftContract: RawNftContract): NftContract; | ||
export declare function getNftCollectionFromRaw(rawNftCollection: RawNftCollection): NftCollection; | ||
export declare function getBaseNftFromRaw(rawBaseNft: RawOwnedBaseNft): BaseNft; | ||
@@ -10,0 +11,0 @@ export declare function getBaseNftFromRaw(rawContractBaseNft: RawContractBaseNft, contractAddress: string): BaseNft; |
import * as utils from './api/utils'; | ||
export { utils as Utils }; | ||
export { m as Alchemy, j as AlchemySubscription, r as AssetTransfersCategory, R as CommitmentLevel, o as Contract, p as ContractFactory, L as DebugCallType, U as DebugTracerType, K as DecodingAuthority, M as GasOptimizedTransactionStatus, G as GetTransfersForOwnerTransferType, N as Network, x as NftFilters, y as NftOrdering, F as NftRefreshState, z as NftSaleMarketplace, B as NftSaleTakerType, w as NftSpamClassification, u as NftTokenType, O as OpenSeaSafelistRequestStatus, H as SimulateAssetType, J as SimulateChangeType, S as SortingOrder, T as TokenBalanceType, W as Wallet, Q as WebhookType, P as WebhookVersion, f as fromHex, q as isHex, s as setLogLevel, t as toHex } from './index-f41f167b.js'; | ||
export { m as Alchemy, j as AlchemySubscription, r as AssetTransfersCategory, R as CommitmentLevel, o as Contract, p as ContractFactory, L as DebugCallType, U as DebugTracerType, K as DecodingAuthority, M as GasOptimizedTransactionStatus, G as GetTransfersForOwnerTransferType, N as Network, x as NftFilters, y as NftOrdering, F as NftRefreshState, z as NftSaleMarketplace, B as NftSaleTakerType, w as NftSpamClassification, u as NftTokenType, O as OpenSeaSafelistRequestStatus, H as SimulateAssetType, J as SimulateChangeType, S as SortingOrder, T as TokenBalanceType, W as Wallet, Q as WebhookType, P as WebhookVersion, f as fromHex, q as isHex, s as setLogLevel, t as toHex } from './index-c6ff337c.js'; | ||
export { BigNumber } from '@ethersproject/bignumber'; | ||
@@ -5,0 +5,0 @@ import 'axios'; |
@@ -29,2 +29,9 @@ import type { Block, BlockTag, BlockWithTransactions, FeeData, Log, TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; | ||
/** | ||
* Checks if the provided address is a smart contract. | ||
* | ||
* @param address The address to check type for. | ||
* @public | ||
*/ | ||
isContractAddress(address: string): Promise<boolean>; | ||
/** | ||
* Returns the contract code of the provided address at the block. If there is | ||
@@ -31,0 +38,0 @@ * no contract deployed, the result is `0x`. |
import type { BigNumberish } from '@ethersproject/bignumber'; | ||
import { ComputeRarityResponse, GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractMetadataBatchResponse, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetMintedNftsOptions, GetNftMetadataBatchResponse, GetNftMetadataOptions, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftOptions, GetOwnersForNftResponse, GetSpamContractsResponse, GetTransfersForContractOptions, GetTransfersForOwnerOptions, GetTransfersForOwnerTransferType, IsSpamContractResponse, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult, SearchContractMetadataResponse, TransfersNftResponse } from '../types/types'; | ||
import { BaseNft, Nft, NftContract } from './nft'; | ||
import { BaseNft, Nft, NftCollection, NftContract } from './nft'; | ||
/** | ||
@@ -43,2 +43,9 @@ * The NFT namespace contains all the functionality related to NFTs. | ||
/** | ||
* Get the NFT collection metadata associated with the provided parameters. | ||
* | ||
* @param collectionSlug - The OpenSea collection slug of the NFT. | ||
* @beta | ||
*/ | ||
getCollectionMetadata(collectionSlug: string): Promise<NftCollection>; | ||
/** | ||
* Fetches all NFTs for a given owner and yields them in an async iterable. | ||
@@ -45,0 +52,0 @@ * |
@@ -1,2 +0,2 @@ | ||
import { AcquiredAt, NftImage, NftSpamClassification, NftTokenType, OpenSeaCollectionMetadata } from '../types/types'; | ||
import { AcquiredAt, NftImage, NftSpamClassification, NftTokenType, OpenSeaBaseCollectionMetadata, OpenSeaCollectionMetadata } from '../types/types'; | ||
/** | ||
@@ -40,2 +40,23 @@ * Alchemy representation of an NFT contract. | ||
/** | ||
* Alchemy representation of an NFT collection | ||
* | ||
* @public | ||
*/ | ||
export interface NftCollection { | ||
/** The name of the collection. */ | ||
name: string; | ||
/** The OpenSea human-readable slug of the collection. */ | ||
openSeaSlug?: string; | ||
/** OpenSea-specific collection metadata such as floor price. */ | ||
openSea?: OpenSeaBaseCollectionMetadata; | ||
/** The description of the collection. */ | ||
description?: string; | ||
/** The homepage of the collection as determined by OpenSea. */ | ||
externalUrl?: string; | ||
/** The Twitter handle of the collection. */ | ||
twitterUsername?: string; | ||
/** The Discord URL of the collection. */ | ||
discordUrl?: string; | ||
} | ||
/** | ||
* Alchemy representation of an NFT that doesn't contain metadata. | ||
@@ -42,0 +63,0 @@ * |
import { BigNumberish } from '@ethersproject/bignumber'; | ||
import { AlchemyConfig } from '../api/alchemy-config'; | ||
import { BaseNft, Nft, NftContract } from '../api/nft'; | ||
import { BaseNft, Nft, NftCollection, NftContract } from '../api/nft'; | ||
import { AssetTransfersResponse, ComputeRarityResponse, GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractMetadataBatchResponse, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetMintedNftsOptions, GetNftMetadataBatchResponse, GetNftMetadataOptions, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, GetSpamContractsResponse, GetTransfersForContractOptions, GetTransfersForOwnerOptions, GetTransfersForOwnerTransferType, IsSpamContractResponse, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult, SearchContractMetadataResponse, TransfersNftResponse } from '../types/types'; | ||
@@ -18,2 +18,3 @@ /** | ||
export declare function getContractMetadataBatch(config: AlchemyConfig, contractAddresses: string[]): Promise<GetContractMetadataBatchResponse>; | ||
export declare function getCollectionMetadata(config: AlchemyConfig, collectionSlug: string, srcMethod?: string): Promise<NftCollection>; | ||
export declare function getNftsForOwnerIterator(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): AsyncIterable<OwnedBaseNft | OwnedNft>; | ||
@@ -20,0 +21,0 @@ export declare function getNftsForOwner(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): Promise<OwnedNftsResponse | OwnedBaseNftsResponse>; |
@@ -28,5 +28,8 @@ /** | ||
} | ||
/** OpenSea's metadata for an NFT collection. */ | ||
export interface RawOpenSeaCollectionMetadata { | ||
floorPrice: number | null; | ||
/** OpenSea's base metadata for an NFT collection */ | ||
export interface RawOpenSeaBaseCollectionMetadata { | ||
floorPrice?: number; | ||
} | ||
/** OpenSea's full metadata for an NFT collection. */ | ||
export interface RawOpenSeaCollectionMetadata extends RawOpenSeaBaseCollectionMetadata { | ||
collectionName: string | null; | ||
@@ -33,0 +36,0 @@ safelistRequestStatus: string | null; |
@@ -1,3 +0,3 @@ | ||
import { BaseNft, Nft, NftContract, NftContractForNft } from '../api/nft'; | ||
import { RawContractBaseNft, RawGetNftSalesResponse, RawNft, RawNftContract, RawNftContractForNft, RawNftContractForOwner, RawOwnedBaseNft } from '../internal/raw-interfaces'; | ||
import { BaseNft, Nft, NftCollection, NftContract, NftContractForNft } from '../api/nft'; | ||
import { RawContractBaseNft, RawGetNftSalesResponse, RawNft, RawNftCollection, RawNftContract, RawNftContractForNft, RawNftContractForOwner, RawOwnedBaseNft } from '../internal/raw-interfaces'; | ||
import { GetNftSalesResponse, NftContractForOwner } from '../types/types'; | ||
@@ -8,2 +8,3 @@ export declare function formatBlock(block: string | number): string; | ||
export declare function getNftContractFromRaw(rawNftContract: RawNftContract): NftContract; | ||
export declare function getNftCollectionFromRaw(rawNftCollection: RawNftCollection): NftCollection; | ||
export declare function getBaseNftFromRaw(rawBaseNft: RawOwnedBaseNft): BaseNft; | ||
@@ -10,0 +11,0 @@ export declare function getBaseNftFromRaw(rawContractBaseNft: RawContractBaseNft, contractAddress: string): BaseNft; |
@@ -29,2 +29,9 @@ import type { Block, BlockTag, BlockWithTransactions, FeeData, Log, TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; | ||
/** | ||
* Checks if the provided address is a smart contract. | ||
* | ||
* @param address The address to check type for. | ||
* @public | ||
*/ | ||
isContractAddress(address: string): Promise<boolean>; | ||
/** | ||
* Returns the contract code of the provided address at the block. If there is | ||
@@ -31,0 +38,0 @@ * no contract deployed, the result is `0x`. |
import type { BigNumberish } from '@ethersproject/bignumber'; | ||
import { ComputeRarityResponse, GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractMetadataBatchResponse, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetMintedNftsOptions, GetNftMetadataBatchResponse, GetNftMetadataOptions, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftOptions, GetOwnersForNftResponse, GetSpamContractsResponse, GetTransfersForContractOptions, GetTransfersForOwnerOptions, GetTransfersForOwnerTransferType, IsSpamContractResponse, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult, SearchContractMetadataResponse, TransfersNftResponse } from '../types/types'; | ||
import { BaseNft, Nft, NftContract } from './nft'; | ||
import { BaseNft, Nft, NftCollection, NftContract } from './nft'; | ||
/** | ||
@@ -43,2 +43,9 @@ * The NFT namespace contains all the functionality related to NFTs. | ||
/** | ||
* Get the NFT collection metadata associated with the provided parameters. | ||
* | ||
* @param collectionSlug - The OpenSea collection slug of the NFT. | ||
* @beta | ||
*/ | ||
getCollectionMetadata(collectionSlug: string): Promise<NftCollection>; | ||
/** | ||
* Fetches all NFTs for a given owner and yields them in an async iterable. | ||
@@ -45,0 +52,0 @@ * |
@@ -1,2 +0,2 @@ | ||
import { AcquiredAt, NftImage, NftSpamClassification, NftTokenType, OpenSeaCollectionMetadata } from '../types/types'; | ||
import { AcquiredAt, NftImage, NftSpamClassification, NftTokenType, OpenSeaBaseCollectionMetadata, OpenSeaCollectionMetadata } from '../types/types'; | ||
/** | ||
@@ -40,2 +40,23 @@ * Alchemy representation of an NFT contract. | ||
/** | ||
* Alchemy representation of an NFT collection | ||
* | ||
* @public | ||
*/ | ||
export interface NftCollection { | ||
/** The name of the collection. */ | ||
name: string; | ||
/** The OpenSea human-readable slug of the collection. */ | ||
openSeaSlug?: string; | ||
/** OpenSea-specific collection metadata such as floor price. */ | ||
openSea?: OpenSeaBaseCollectionMetadata; | ||
/** The description of the collection. */ | ||
description?: string; | ||
/** The homepage of the collection as determined by OpenSea. */ | ||
externalUrl?: string; | ||
/** The Twitter handle of the collection. */ | ||
twitterUsername?: string; | ||
/** The Discord URL of the collection. */ | ||
discordUrl?: string; | ||
} | ||
/** | ||
* Alchemy representation of an NFT that doesn't contain metadata. | ||
@@ -42,0 +63,0 @@ * |
import { BigNumberish } from '@ethersproject/bignumber'; | ||
import { AlchemyConfig } from '../api/alchemy-config'; | ||
import { BaseNft, Nft, NftContract } from '../api/nft'; | ||
import { BaseNft, Nft, NftCollection, NftContract } from '../api/nft'; | ||
import { AssetTransfersResponse, ComputeRarityResponse, GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractMetadataBatchResponse, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetMintedNftsOptions, GetNftMetadataBatchResponse, GetNftMetadataOptions, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, GetSpamContractsResponse, GetTransfersForContractOptions, GetTransfersForOwnerOptions, GetTransfersForOwnerTransferType, IsSpamContractResponse, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult, SearchContractMetadataResponse, TransfersNftResponse } from '../types/types'; | ||
@@ -18,2 +18,3 @@ /** | ||
export declare function getContractMetadataBatch(config: AlchemyConfig, contractAddresses: string[]): Promise<GetContractMetadataBatchResponse>; | ||
export declare function getCollectionMetadata(config: AlchemyConfig, collectionSlug: string, srcMethod?: string): Promise<NftCollection>; | ||
export declare function getNftsForOwnerIterator(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): AsyncIterable<OwnedBaseNft | OwnedNft>; | ||
@@ -20,0 +21,0 @@ export declare function getNftsForOwner(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): Promise<OwnedNftsResponse | OwnedBaseNftsResponse>; |
@@ -28,5 +28,8 @@ /** | ||
} | ||
/** OpenSea's metadata for an NFT collection. */ | ||
export interface RawOpenSeaCollectionMetadata { | ||
floorPrice: number | null; | ||
/** OpenSea's base metadata for an NFT collection */ | ||
export interface RawOpenSeaBaseCollectionMetadata { | ||
floorPrice?: number; | ||
} | ||
/** OpenSea's full metadata for an NFT collection. */ | ||
export interface RawOpenSeaCollectionMetadata extends RawOpenSeaBaseCollectionMetadata { | ||
collectionName: string | null; | ||
@@ -33,0 +36,0 @@ safelistRequestStatus: string | null; |
@@ -1,3 +0,3 @@ | ||
import { BaseNft, Nft, NftContract, NftContractForNft } from '../api/nft'; | ||
import { RawContractBaseNft, RawGetNftSalesResponse, RawNft, RawNftContract, RawNftContractForNft, RawNftContractForOwner, RawOwnedBaseNft } from '../internal/raw-interfaces'; | ||
import { BaseNft, Nft, NftCollection, NftContract, NftContractForNft } from '../api/nft'; | ||
import { RawContractBaseNft, RawGetNftSalesResponse, RawNft, RawNftCollection, RawNftContract, RawNftContractForNft, RawNftContractForOwner, RawOwnedBaseNft } from '../internal/raw-interfaces'; | ||
import { GetNftSalesResponse, NftContractForOwner } from '../types/types'; | ||
@@ -8,2 +8,3 @@ export declare function formatBlock(block: string | number): string; | ||
export declare function getNftContractFromRaw(rawNftContract: RawNftContract): NftContract; | ||
export declare function getNftCollectionFromRaw(rawNftCollection: RawNftCollection): NftCollection; | ||
export declare function getBaseNftFromRaw(rawBaseNft: RawOwnedBaseNft): BaseNft; | ||
@@ -10,0 +11,0 @@ export declare function getBaseNftFromRaw(rawContractBaseNft: RawContractBaseNft, contractAddress: string): BaseNft; |
import * as utils from './api/utils'; | ||
export { utils as Utils }; | ||
export { m as Alchemy, j as AlchemySubscription, r as AssetTransfersCategory, R as CommitmentLevel, o as Contract, p as ContractFactory, L as DebugCallType, U as DebugTracerType, K as DecodingAuthority, M as GasOptimizedTransactionStatus, G as GetTransfersForOwnerTransferType, N as Network, x as NftFilters, y as NftOrdering, F as NftRefreshState, z as NftSaleMarketplace, B as NftSaleTakerType, w as NftSpamClassification, u as NftTokenType, O as OpenSeaSafelistRequestStatus, H as SimulateAssetType, J as SimulateChangeType, S as SortingOrder, T as TokenBalanceType, W as Wallet, Q as WebhookType, P as WebhookVersion, f as fromHex, q as isHex, s as setLogLevel, t as toHex } from './index-f41f167b.js'; | ||
export { m as Alchemy, j as AlchemySubscription, r as AssetTransfersCategory, R as CommitmentLevel, o as Contract, p as ContractFactory, L as DebugCallType, U as DebugTracerType, K as DecodingAuthority, M as GasOptimizedTransactionStatus, G as GetTransfersForOwnerTransferType, N as Network, x as NftFilters, y as NftOrdering, F as NftRefreshState, z as NftSaleMarketplace, B as NftSaleTakerType, w as NftSpamClassification, u as NftTokenType, O as OpenSeaSafelistRequestStatus, H as SimulateAssetType, J as SimulateChangeType, S as SortingOrder, T as TokenBalanceType, W as Wallet, Q as WebhookType, P as WebhookVersion, f as fromHex, q as isHex, s as setLogLevel, t as toHex } from './index-c6ff337c.js'; | ||
export { BigNumber } from '@ethersproject/bignumber'; | ||
@@ -5,0 +5,0 @@ import 'axios'; |
@@ -29,2 +29,9 @@ import type { Block, BlockTag, BlockWithTransactions, FeeData, Log, TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; | ||
/** | ||
* Checks if the provided address is a smart contract. | ||
* | ||
* @param address The address to check type for. | ||
* @public | ||
*/ | ||
isContractAddress(address: string): Promise<boolean>; | ||
/** | ||
* Returns the contract code of the provided address at the block. If there is | ||
@@ -31,0 +38,0 @@ * no contract deployed, the result is `0x`. |
import type { BigNumberish } from '@ethersproject/bignumber'; | ||
import { ComputeRarityResponse, GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractMetadataBatchResponse, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetMintedNftsOptions, GetNftMetadataBatchResponse, GetNftMetadataOptions, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftOptions, GetOwnersForNftResponse, GetSpamContractsResponse, GetTransfersForContractOptions, GetTransfersForOwnerOptions, GetTransfersForOwnerTransferType, IsSpamContractResponse, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult, SearchContractMetadataResponse, TransfersNftResponse } from '../types/types'; | ||
import { BaseNft, Nft, NftContract } from './nft'; | ||
import { BaseNft, Nft, NftCollection, NftContract } from './nft'; | ||
/** | ||
@@ -43,2 +43,9 @@ * The NFT namespace contains all the functionality related to NFTs. | ||
/** | ||
* Get the NFT collection metadata associated with the provided parameters. | ||
* | ||
* @param collectionSlug - The OpenSea collection slug of the NFT. | ||
* @beta | ||
*/ | ||
getCollectionMetadata(collectionSlug: string): Promise<NftCollection>; | ||
/** | ||
* Fetches all NFTs for a given owner and yields them in an async iterable. | ||
@@ -45,0 +52,0 @@ * |
@@ -1,2 +0,2 @@ | ||
import { AcquiredAt, NftImage, NftSpamClassification, NftTokenType, OpenSeaCollectionMetadata } from '../types/types'; | ||
import { AcquiredAt, NftImage, NftSpamClassification, NftTokenType, OpenSeaBaseCollectionMetadata, OpenSeaCollectionMetadata } from '../types/types'; | ||
/** | ||
@@ -40,2 +40,23 @@ * Alchemy representation of an NFT contract. | ||
/** | ||
* Alchemy representation of an NFT collection | ||
* | ||
* @public | ||
*/ | ||
export interface NftCollection { | ||
/** The name of the collection. */ | ||
name: string; | ||
/** The OpenSea human-readable slug of the collection. */ | ||
openSeaSlug?: string; | ||
/** OpenSea-specific collection metadata such as floor price. */ | ||
openSea?: OpenSeaBaseCollectionMetadata; | ||
/** The description of the collection. */ | ||
description?: string; | ||
/** The homepage of the collection as determined by OpenSea. */ | ||
externalUrl?: string; | ||
/** The Twitter handle of the collection. */ | ||
twitterUsername?: string; | ||
/** The Discord URL of the collection. */ | ||
discordUrl?: string; | ||
} | ||
/** | ||
* Alchemy representation of an NFT that doesn't contain metadata. | ||
@@ -42,0 +63,0 @@ * |
import { BigNumberish } from '@ethersproject/bignumber'; | ||
import { AlchemyConfig } from '../api/alchemy-config'; | ||
import { BaseNft, Nft, NftContract } from '../api/nft'; | ||
import { BaseNft, Nft, NftCollection, NftContract } from '../api/nft'; | ||
import { AssetTransfersResponse, ComputeRarityResponse, GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractMetadataBatchResponse, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetMintedNftsOptions, GetNftMetadataBatchResponse, GetNftMetadataOptions, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, GetSpamContractsResponse, GetTransfersForContractOptions, GetTransfersForOwnerOptions, GetTransfersForOwnerTransferType, IsSpamContractResponse, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult, SearchContractMetadataResponse, TransfersNftResponse } from '../types/types'; | ||
@@ -18,2 +18,3 @@ /** | ||
export declare function getContractMetadataBatch(config: AlchemyConfig, contractAddresses: string[]): Promise<GetContractMetadataBatchResponse>; | ||
export declare function getCollectionMetadata(config: AlchemyConfig, collectionSlug: string, srcMethod?: string): Promise<NftCollection>; | ||
export declare function getNftsForOwnerIterator(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): AsyncIterable<OwnedBaseNft | OwnedNft>; | ||
@@ -20,0 +21,0 @@ export declare function getNftsForOwner(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): Promise<OwnedNftsResponse | OwnedBaseNftsResponse>; |
@@ -28,5 +28,8 @@ /** | ||
} | ||
/** OpenSea's metadata for an NFT collection. */ | ||
export interface RawOpenSeaCollectionMetadata { | ||
floorPrice: number | null; | ||
/** OpenSea's base metadata for an NFT collection */ | ||
export interface RawOpenSeaBaseCollectionMetadata { | ||
floorPrice?: number; | ||
} | ||
/** OpenSea's full metadata for an NFT collection. */ | ||
export interface RawOpenSeaCollectionMetadata extends RawOpenSeaBaseCollectionMetadata { | ||
collectionName: string | null; | ||
@@ -33,0 +36,0 @@ safelistRequestStatus: string | null; |
@@ -1,3 +0,3 @@ | ||
import { BaseNft, Nft, NftContract, NftContractForNft } from '../api/nft'; | ||
import { RawContractBaseNft, RawGetNftSalesResponse, RawNft, RawNftContract, RawNftContractForNft, RawNftContractForOwner, RawOwnedBaseNft } from '../internal/raw-interfaces'; | ||
import { BaseNft, Nft, NftCollection, NftContract, NftContractForNft } from '../api/nft'; | ||
import { RawContractBaseNft, RawGetNftSalesResponse, RawNft, RawNftCollection, RawNftContract, RawNftContractForNft, RawNftContractForOwner, RawOwnedBaseNft } from '../internal/raw-interfaces'; | ||
import { GetNftSalesResponse, NftContractForOwner } from '../types/types'; | ||
@@ -8,2 +8,3 @@ export declare function formatBlock(block: string | number): string; | ||
export declare function getNftContractFromRaw(rawNftContract: RawNftContract): NftContract; | ||
export declare function getNftCollectionFromRaw(rawNftCollection: RawNftCollection): NftCollection; | ||
export declare function getBaseNftFromRaw(rawBaseNft: RawOwnedBaseNft): BaseNft; | ||
@@ -10,0 +11,0 @@ export declare function getBaseNftFromRaw(rawContractBaseNft: RawContractBaseNft, contractAddress: string): BaseNft; |
@@ -29,2 +29,9 @@ import type { Block, BlockTag, BlockWithTransactions, FeeData, Log, TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; | ||
/** | ||
* Checks if the provided address is a smart contract. | ||
* | ||
* @param address The address to check type for. | ||
* @public | ||
*/ | ||
isContractAddress(address: string): Promise<boolean>; | ||
/** | ||
* Returns the contract code of the provided address at the block. If there is | ||
@@ -31,0 +38,0 @@ * no contract deployed, the result is `0x`. |
import type { BigNumberish } from '@ethersproject/bignumber'; | ||
import { ComputeRarityResponse, GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractMetadataBatchResponse, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetMintedNftsOptions, GetNftMetadataBatchResponse, GetNftMetadataOptions, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftOptions, GetOwnersForNftResponse, GetSpamContractsResponse, GetTransfersForContractOptions, GetTransfersForOwnerOptions, GetTransfersForOwnerTransferType, IsSpamContractResponse, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult, SearchContractMetadataResponse, TransfersNftResponse } from '../types/types'; | ||
import { BaseNft, Nft, NftContract } from './nft'; | ||
import { BaseNft, Nft, NftCollection, NftContract } from './nft'; | ||
/** | ||
@@ -43,2 +43,9 @@ * The NFT namespace contains all the functionality related to NFTs. | ||
/** | ||
* Get the NFT collection metadata associated with the provided parameters. | ||
* | ||
* @param collectionSlug - The OpenSea collection slug of the NFT. | ||
* @beta | ||
*/ | ||
getCollectionMetadata(collectionSlug: string): Promise<NftCollection>; | ||
/** | ||
* Fetches all NFTs for a given owner and yields them in an async iterable. | ||
@@ -45,0 +52,0 @@ * |
@@ -1,2 +0,2 @@ | ||
import { AcquiredAt, NftImage, NftSpamClassification, NftTokenType, OpenSeaCollectionMetadata } from '../types/types'; | ||
import { AcquiredAt, NftImage, NftSpamClassification, NftTokenType, OpenSeaBaseCollectionMetadata, OpenSeaCollectionMetadata } from '../types/types'; | ||
/** | ||
@@ -40,2 +40,23 @@ * Alchemy representation of an NFT contract. | ||
/** | ||
* Alchemy representation of an NFT collection | ||
* | ||
* @public | ||
*/ | ||
export interface NftCollection { | ||
/** The name of the collection. */ | ||
name: string; | ||
/** The OpenSea human-readable slug of the collection. */ | ||
openSeaSlug?: string; | ||
/** OpenSea-specific collection metadata such as floor price. */ | ||
openSea?: OpenSeaBaseCollectionMetadata; | ||
/** The description of the collection. */ | ||
description?: string; | ||
/** The homepage of the collection as determined by OpenSea. */ | ||
externalUrl?: string; | ||
/** The Twitter handle of the collection. */ | ||
twitterUsername?: string; | ||
/** The Discord URL of the collection. */ | ||
discordUrl?: string; | ||
} | ||
/** | ||
* Alchemy representation of an NFT that doesn't contain metadata. | ||
@@ -42,0 +63,0 @@ * |
import { BigNumberish } from '@ethersproject/bignumber'; | ||
import { AlchemyConfig } from '../api/alchemy-config'; | ||
import { BaseNft, Nft, NftContract } from '../api/nft'; | ||
import { BaseNft, Nft, NftCollection, NftContract } from '../api/nft'; | ||
import { AssetTransfersResponse, ComputeRarityResponse, GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractMetadataBatchResponse, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetMintedNftsOptions, GetNftMetadataBatchResponse, GetNftMetadataOptions, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, GetSpamContractsResponse, GetTransfersForContractOptions, GetTransfersForOwnerOptions, GetTransfersForOwnerTransferType, IsSpamContractResponse, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult, SearchContractMetadataResponse, TransfersNftResponse } from '../types/types'; | ||
@@ -18,2 +18,3 @@ /** | ||
export declare function getContractMetadataBatch(config: AlchemyConfig, contractAddresses: string[]): Promise<GetContractMetadataBatchResponse>; | ||
export declare function getCollectionMetadata(config: AlchemyConfig, collectionSlug: string, srcMethod?: string): Promise<NftCollection>; | ||
export declare function getNftsForOwnerIterator(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): AsyncIterable<OwnedBaseNft | OwnedNft>; | ||
@@ -20,0 +21,0 @@ export declare function getNftsForOwner(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): Promise<OwnedNftsResponse | OwnedBaseNftsResponse>; |
@@ -28,5 +28,8 @@ /** | ||
} | ||
/** OpenSea's metadata for an NFT collection. */ | ||
export interface RawOpenSeaCollectionMetadata { | ||
floorPrice: number | null; | ||
/** OpenSea's base metadata for an NFT collection */ | ||
export interface RawOpenSeaBaseCollectionMetadata { | ||
floorPrice?: number; | ||
} | ||
/** OpenSea's full metadata for an NFT collection. */ | ||
export interface RawOpenSeaCollectionMetadata extends RawOpenSeaBaseCollectionMetadata { | ||
collectionName: string | null; | ||
@@ -33,0 +36,0 @@ safelistRequestStatus: string | null; |
@@ -1,3 +0,3 @@ | ||
import { BaseNft, Nft, NftContract, NftContractForNft } from '../api/nft'; | ||
import { RawContractBaseNft, RawGetNftSalesResponse, RawNft, RawNftContract, RawNftContractForNft, RawNftContractForOwner, RawOwnedBaseNft } from '../internal/raw-interfaces'; | ||
import { BaseNft, Nft, NftCollection, NftContract, NftContractForNft } from '../api/nft'; | ||
import { RawContractBaseNft, RawGetNftSalesResponse, RawNft, RawNftCollection, RawNftContract, RawNftContractForNft, RawNftContractForOwner, RawOwnedBaseNft } from '../internal/raw-interfaces'; | ||
import { GetNftSalesResponse, NftContractForOwner } from '../types/types'; | ||
@@ -8,2 +8,3 @@ export declare function formatBlock(block: string | number): string; | ||
export declare function getNftContractFromRaw(rawNftContract: RawNftContract): NftContract; | ||
export declare function getNftCollectionFromRaw(rawNftCollection: RawNftCollection): NftCollection; | ||
export declare function getBaseNftFromRaw(rawBaseNft: RawOwnedBaseNft): BaseNft; | ||
@@ -10,0 +11,0 @@ export declare function getBaseNftFromRaw(rawContractBaseNft: RawContractBaseNft, contractAddress: string): BaseNft; |
{ | ||
"name": "alchemy-sdk", | ||
"version": "3.0.0-beta.0", | ||
"version": "3.0.0-beta.1", | ||
"description": "Extended Ethers.js SDK for Alchemy APIs", | ||
@@ -5,0 +5,0 @@ "author": "Alchemy", |
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 too big to display
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 too big to display
Sorry, the diff of this file is too big to display
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
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
3706542
51040
1