nft-did-resolver
Version:
DID Resolver for the NFT method
17 lines • 930 B
TypeScript
import { AssetId } from 'caip';
export declare const fetchQueryData: (queryUrl: string, query: unknown) => Promise<any>;
/**
* Queries TheGraph to find the latest block at the given time.
* @param timestamp
* @param blockQueryUrl - subgraph url for blocks
* @returns {string} latest block num at timestamp
*/
export declare const blockAtTime: (timestamp: number, blockQueryUrl: string) => Promise<number>;
/**
* Eth blocks are typically 13 seconds. We use this check so we don't have to
* make an unneccessary call to the blocks subgraph if the did was just created.
*/
export declare const isWithinLastBlock: (timestamp: number, skew: number) => boolean;
export declare const erc721OwnerOf: (asset: AssetId, blockNum: number, queryUrl: string) => Promise<string>;
export declare const erc1155OwnersOf: (asset: AssetId, blockNum: number, queryUrl: string) => Promise<string[]>;
//# sourceMappingURL=subgraph-utils.d.ts.map