diff --git a/docs/interfaces/CollectionListingResponse.md b/docs/interfaces/CollectionListingResponse.md deleted file mode 100644 index 803a11d..0000000 --- a/docs/interfaces/CollectionListingResponse.md +++ /dev/null @@ -1,145 +0,0 @@ -- ***CollectionListingResponse*** -```ts -export interface CollectionListingResponse { - /** - * Nfts,List of NFTs in the collection - */ - nfts: NFT[]; - /** - * Total,Total number of items - */ - total: number; -} -``` - -- ***NFT*** -```ts -export interface NFT { - /** - * Animation Url,The url of animation associated with the NFT - */ - animationUrl?: string; - /** - * Blockchain,Name of the blockchain the NFT belongs to - */ - blockchain: string; - /** - * Collection Name,Name of the collection the NFT belongs to - */ - collectionName?: string; - /** - * Collection Opensea Slug,Opensea Slug of the collection the NFT belongs to - */ - collectionOpenseaSlug?: string; - /** - * Collection Slug,NFTGo Slug of the collection the NFT belongs to - */ - collectionSlug?: string; - /** - * Contract Address,Contract address of the collection the NFT belongs to - */ - contractAddress: string; - /** - * Description,The description of the NFT - */ - description?: string; - /** - * Image,The url or base64 data of image or video associated with the NFT - */ - image?: string; - /** - * Last Sale,Last sale price of the NFT - */ - lastSale?: Sale; - listingData?: ListingOrder; - /** - * Listing Price,Listing price of the NFT - */ - listingPrice?: Price; - /** - * Listing Time,Listing time of the NFT, formatted as timestamp in second. - */ - listingTime?: number; - /** - * Marketplace,Listing marketplace of the NFT - */ - marketplace?: string; - /** - * Marketplace Link,Marketplace link of the NFT - */ - marketplaceLink?: string; - /** - * Name,The name of the NFT - */ - name?: string; - /** - * Owner Addresses,List of owner addresses currently holding the NFT. - * A list of one address if it's an ERC721 NFT. A list of addresses if it's an ERC1155 NFT. - */ - ownerAddresses?: string[]; - /** - * Rarity,NFT Rarity score. Calculation methods can be seen as below: - * https://mirror.xyz/nftgoio.eth/kHWaMtNY6ZOvDzr7PR99D03--VNu6-ZOjYuf6E9-QH0 - */ - rarity?: Rarity; - /** - * Token Id,The token ID of the NFT - */ - tokenId: string; - /** - * Traits,The list of NFT traits. Traits consist of a series of types and values, referring - * to the feature of an NFT. For example, if a project has avatar NFTs, the traits may - * include headwear, facial traits, clothes, etc. Traits make each item in an NFT collection - * unique and determine its rarity in a collection. - */ - traits?: Trait[]; -} -``` - -- ***ListingOrder*** -```ts -export interface ListingOrder { - /** - * Contract,Address of the contract for this NFT collection, beginning with 0x - */ - contract?: string; - /** - * Eth Price,The price(eth) of the NFT - */ - ethPrice?: number; - /** - * Expired Time,The listing expire time of the NFT - */ - expiredTime?: number; - /** - * Listing Time,The listing time of the NFT - */ - listingTime?: number; - /** - * Market Link,The listing market link the NFT - */ - marketLink?: string; - /** - * Market Name,The listing market name the NFT - */ - marketName?: string; - /** - * Order Id,ID for aggregate - */ - orderId?: string; - /** - * Seller Address,The seller address of the NFT - */ - sellerAddress?: string; - /** - * Token Id,The token ID for this NFT. Each item in an NFT collection will be assigned a - * unique id, the value generally ranges from 0 to N, with N being the total number of - * NFTs in a collection. - */ - tokenId?: string; - /** - * Usd Price,The usd price(usd) of the NFT - */ - usdPrice?: number; -} -``` diff --git a/docs/interfaces/CollectionListingsParam.md b/docs/interfaces/CollectionListingsParam.md deleted file mode 100644 index dbbc4aa..0000000 --- a/docs/interfaces/CollectionListingsParam.md +++ /dev/null @@ -1,44 +0,0 @@ -- ***CollectionListingsParam*** -```ts -export interface CollectionListingsParam { - /** - * Select specific traits for nft. Use '-' to join trait type and trait value, and ',' to join different traits. For example, 'Eyes-Bored,Fur-Trippy'. Default is None for not selecting traits. - */ - traits?: string; - /** - * Sort by listing_price_low_to_high / listing_price_high_to_low / last_price_low_to_high / last_price_high_to_low / rarity_low_to_high / rarity_high_to_low / sales_time - */ - sortBy?: SortBy; - /** - * The index of data segments. The returned data is divided into many segments. One segment is returned at a time. {offset} parameter indicates the index of data segments. - */ - offset?: number; // default: 0 - /** - * The size of a returned data segment - */ - limit?: number; // default: 10 - /** - * Queries can be searched with this keyword. - */ - keyWord?: string; - /** - * Queries can be bounded by a Min price and Max Price. - */ - min_price?: number; - /** - * Queries can be bounded by a Min price and Max Price. - */ - max_price?: number; -} -``` -- SortBy -```ts -export type SortBy = - | 'listing_price_low_to_high' - | 'listing_price_high_to_low' - | 'last_price_low_to_high' - | 'last_price_high_to_low' - | 'rarity_low_to_high' - | 'rarity_high_to_low' - | 'sales_time'; -``` diff --git a/docs/interfaces/ListingNFTParams.md b/docs/interfaces/ListingNFTParams.md deleted file mode 100644 index 3f3d97b..0000000 --- a/docs/interfaces/ListingNFTParams.md +++ /dev/null @@ -1,138 +0,0 @@ -- ***ListingNFTParams*** -```ts - -export interface NFTBaseInfo { - contract?: string; - tokenId?: string; -} - -export interface NFTInfoForListing extends NFTBaseInfo { - marketplace: Marketplace; - ethPrice: number; - // The meaning of the field is the time when the order was placed, usually either now or at some specific point in time. It is measured in milliseconds. - listingTime: number; - // the expiration time of the order, measured in milliseconds. - expirationTime: number; - // List of fees (formatted as `feeRecipient:feeBps`) to be bundled within the order. Example: `0xF296178d553C8Ec21A2fBD2c5dDa8CA9ac905A00:100` - fees?: string[]; - royaltyBps?: number; - // Only Opensea requires this field to be configured, which means that the royalty set by the exchange will be automatically used. - automatedRoyalties?: boolean; -} - -export interface ErrorListingItem { - // Here the reason for the error will be returned, usually due to signing or errors passed through by the exchange request. - reason: string; - // Refers to which stage in the entire order placing process the error occurred. - reasonStep?: string; - orderIndexes: number[]; -} - -export interface ApprovePolicyOption { - /** - * If true, automatically approves all unapproved NFTs. - * default: false - */ - autoApprove?: boolean; - - /** - * If true, skips unapproved NFTs and proceeds with the approved ones. - * default: false - */ - skipUnapproved?: boolean; -} - -export interface BulkListingOptions extends ApprovePolicyOption { - onFinish?: (successIndexes: number[], failedItems?: ErrorListingItem[]) => void; - onError?: (err: Error) => void; -} - -``` - - -- ***ListingStepNFTParams*** -```ts - -// prepare listing response -export interface ListingStepsDetailInfo { - steps: [StepInfo, StepInfo]; - errors: any[]; -} - -interface StepInfo { - id: string; - action: string; - description: string; - kind: 'transaction' | 'signature'; - items: T[]; -} - -export interface ApprovalItem { - status: 'complete' | 'incomplete'; - orderIndexes: number[]; - data?: { - from: string; - to: string; - data: string; - } | null; -} - - -interface ListingAction { - post: PostData | BulkSeaPortPostData; - sign: SignData; -} - -export interface BulkSeaPortPostData { - body: { - items: BulkSeaPortOrder[]; - source: string; - }; - endpoint: '/order/v4'; - method: 'POST'; -} - -export interface PostData { - body: { - order: { - data: Record; - kind: string; - }; - orderbook: string; - source: string; - }; - endpoint: '/order/v3' | '/order/v4'; - method: 'POST'; -} - -export interface SignData { - domain: { - name: string; - version: string; - chainId: number; - verifyingContract: string; - }; - signatureKind: 'eip191' | 'eip712'; - types: Record; - value: Record; - // If it is not seaportv1.5, the following fields will be included. - orderIndex?: number; - status?: 'complete' | 'incomplete'; - message?: string; -} - - -export interface ListingItem { - status: 'complete' | 'incomplete'; - orderIndexes: number[]; - data?: ListingAction; -} - -export interface SignedListingItem { - signature: string; - post: PostData | BulkSeaPortPostData; - orderIndexes: number[]; -} - -``` - diff --git a/docs/interfaces/SingleAddressListingsResponse.md b/docs/interfaces/SingleAddressListingsResponse.md deleted file mode 100644 index 7cfffd4..0000000 --- a/docs/interfaces/SingleAddressListingsResponse.md +++ /dev/null @@ -1,144 +0,0 @@ -- ***SingleAddressListingsResponse*** -```ts -export interface SingleAddressListingsResponse { - /** - * Last Updated,Last updated timestamp in seconds - */ - lastUpdated: number; - /** - * Nft List - */ - nfts: NFT[]; -} -``` -- ***NFT*** -```ts -export interface NFT { - /** - * Animation Url,The url of animation associated with the NFT - */ - animationUrl?: string; - /** - * Blockchain,Name of the blockchain the NFT belongs to - */ - blockchain: string; - /** - * Collection Name,Name of the collection the NFT belongs to - */ - collectionName?: string; - /** - * Collection Opensea Slug,Opensea Slug of the collection the NFT belongs to - */ - collectionOpenseaSlug?: string; - /** - * Collection Slug,NFTGo Slug of the collection the NFT belongs to - */ - collectionSlug?: string; - /** - * Contract Address,Contract address of the collection the NFT belongs to - */ - contractAddress: string; - /** - * Description,The description of the NFT - */ - description?: string; - /** - * Image,The url or base64 data of image or video associated with the NFT - */ - image?: string; - /** - * Last Sale,Last sale price of the NFT - */ - lastSale?: Sale; - listingData?: ListingOrder; - /** - * Listing Price,Listing price of the NFT - */ - listingPrice?: Price; - /** - * Listing Time,Listing time of the NFT, formatted as timestamp in second. - */ - listingTime?: number; - /** - * Marketplace,Listing marketplace of the NFT - */ - marketplace?: string; - /** - * Marketplace Link,Marketplace link of the NFT - */ - marketplaceLink?: string; - /** - * Name,The name of the NFT - */ - name?: string; - /** - * Owner Addresses,List of owner addresses currently holding the NFT.A list of one - * address if it's an ERC721 NFT. A list of addresses if it's an ERC1155 NFT. - */ - ownerAddresses?: string[]; - /** - * Rarity,NFT Rarity score. Calculation methods can be seen as below: - * https://mirror.xyz/nftgoio.eth/kHWaMtNY6ZOvDzr7PR99D03--VNu6-ZOjYuf6E9-QH0 - */ - rarity?: Rarity; - /** - * Token Id,The token ID of the NFT - */ - tokenId: string; - /** - * Traits,The list of NFT traits. Traits consist of a series of types and values, referring - * to the feature of an NFT. For example, if a project has avatar NFTs, the traits may - * include headwear, facial traits, clothes, etc. Traits make each item in an NFT collection - * unique and determine its rarity in a collection. - */ - traits?: Trait[]; -} -``` - -- ***ListingOrder*** -```ts -export interface ListingOrder { - /** - * Contract,Address of the contract for this NFT collection, beginning with 0x - */ - contract?: string; - /** - * Eth Price,The price(eth) of the NFT - */ - ethPrice?: number; - /** - * Expired Time,The listing expire time of the NFT - */ - expiredTime?: number; - /** - * Listing Time,The listing time of the NFT - */ - listingTime?: number; - /** - * Market Link,The listing market link the NFT - */ - marketLink?: string; - /** - * Market Name,The listing market name the NFT - */ - marketName?: string; - /** - * Order Id,ID for aggregate - */ - orderId?: string; - /** - * Seller Address,The seller address of the NFT - */ - sellerAddress?: string; - /** - * Token Id,The token ID for this NFT. Each item in an NFT collection will be assigned a - * unique id, the value generally ranges from 0 to N, with N being the total number of - * NFTs in a collection. - */ - tokenId?: string; - /** - * Usd Price,The usd price(usd) of the NFT - */ - usdPrice?: number; -} -``` diff --git a/docs/interfaces/SingleNftListingResponse.md b/docs/interfaces/SingleNftListingResponse.md deleted file mode 100644 index 2c9b72c..0000000 --- a/docs/interfaces/SingleNftListingResponse.md +++ /dev/null @@ -1,61 +0,0 @@ -- ***SingleNFTListingsResponse*** -```ts -export interface SingleNFTListingsResponse { - /** - * Last Updated,Last updated timestamp in seconds - */ - lastUpdated: number; - /** - * Nft List - */ - listingOrders: ListingOrder[]; -} -``` - -- ***ListingOrder*** -```ts -export interface ListingOrder { - /** - * Contract,Address of the contract for this NFT collection, beginning with 0x - */ - contract?: string; - /** - * Eth Price,The price(eth) of the NFT - */ - ethPrice?: number; - /** - * Expired Time,The listing expire time of the NFT - */ - expiredTime?: number; - /** - * Listing Time,The listing time of the NFT - */ - listingTime?: number; - /** - * Market Link,The listing market link the NFT - */ - marketLink?: string; - /** - * Market Name,The listing market name the NFT - */ - marketName?: string; - /** - * Order Id,ID for aggregate - */ - orderId?: string; - /** - * Seller Address,The seller address of the NFT - */ - sellerAddress?: string; - /** - * Token Id,The token ID for this NFT. Each item in an NFT collection will be assigned a - * unique id, the value generally ranges from 0 to N, with N being the total number of - * NFTs in a collection. - */ - tokenId?: string; - /** - * Usd Price,The usd price(usd) of the NFT - */ - usdPrice?: number; -} -``` diff --git a/docs/interfaces/TradeAggregatorParams.md b/docs/interfaces/TradeAggregatorParams.md deleted file mode 100644 index 9aa9cde..0000000 --- a/docs/interfaces/TradeAggregatorParams.md +++ /dev/null @@ -1,18 +0,0 @@ -- ***TradeAggregatorParams*** -```ts -export interface TradeAggregatorParams { - /** - * Buyer Address,Address of buyer. - */ - buyerAddress: string; - /** - * Is Safe,Is it safe mode? true or false - */ - isSafe?: boolean; - /** - * Order Ids,A list of orderIds.order id is from listing API. - */ - orderIds: string[]; -} -``` - diff --git a/docs/interfaces/TradeAggregatorResponse.md b/docs/interfaces/TradeAggregatorResponse.md deleted file mode 100644 index 7096455..0000000 --- a/docs/interfaces/TradeAggregatorResponse.md +++ /dev/null @@ -1,39 +0,0 @@ -- ***TradeAggregatorResponse*** -```ts -export interface TradeAggregatorResponse { - /** - * Gas Limit, recommended gas limit as input for this transaction. - */ - gasLimit: number; - /** - * Saving Gas, gas saved by using GoTrading aggregator. - */ - savingGas: number; - txInfo: TXInfo; - /** - * Used Gas,gas used on testnet for this transaction simulation. - */ - usedGas: number; -} -``` -- ***TXInfo*** -```ts -export interface TXInfo { - /** - * Data,The data of the transaction. - */ - data: string; - /** - * From Address,The address of the from - */ - fromAddress: string; - /** - * To Address,The address of the to - */ - toAddress: string; - /** - * Value,The price(eth) of the NFT - */ - value: number; -} -``` diff --git a/docs/tradeAggregator/BulkBuy.md b/docs/tradeAggregator/BulkBuy.md deleted file mode 100644 index 15d18f7..0000000 --- a/docs/tradeAggregator/BulkBuy.md +++ /dev/null @@ -1,116 +0,0 @@ -# Bulk Buy -## ***complete example*** -- For server-side: -```ts -import { init, NFTInfoForTrade } from '@nftgo/gotrading'; -import Web3 from 'web3'; - -const provider = new Web3.providers.HttpProvider('https://mainnet.infura.io') //Replace with your own provider -const configs = { - apiKey: "YOUR-API-KEY", // Replace with your own API Key. - web3Provider: provider, - walletConfig: { - address: "Your wallet address", - privateKey: "Your private key" - }, // Replace with your wallet info. - agent: new HttpsProxyAgent({ // If you have problem connect to our api end point, please config your http agent - host: "your host ip", - port: "your agent port", - }), -}; - -// Create tradeAggregator client -const {aggregator, utils} = init(configs); - -// List some NFTs you want to buy -// We recommend you using our aggregator.getListingsOfNFT method to check whether your nfts have valid listings - -/** - * Note: If you experience a slower response time when placing orders, it might be due to the presence of a Blur order, which requires an additional signature login to support the order purchase. - The signature login process could take 5-15 seconds or even more. - */ -const nfts: NFTInfoForTrade[] = [ // Replace with your own nft list - { - contract: "0xcfff4c8c0df0e2431977eba7df3d3de857f4b76e", - tokenId: "16", - amount: 1 // How many you want to buy. Usually used in ERC1155 nfts - }, - { - contract: "0xcfff4c8c0dF0E2431977EbA7dF3D3De857f4B76e", - tokenId: "18", - amount: 1 - } -] - -// Config your bulk -const bulkBuyConfig = { - ignoreUnListedNFTs: false, // Do you want to ignore unlisted NFTs? - ignoreInvalidOrders: false, // Do you want to ignore invalid orders? - ignoreSuspiciousNFTs: false, // Do you want to ignore suspicious NFTs? - withSafeMode: false, // Use Safe Mode or Without Safe Mode. -}; - -// Buy nfts -aggregator.bulkBuy({ - nfts, - onSendingTransaction: (hash: string) => console.log(hash), // Callback on sending a transaction - onFinishTransaction: ( // Callback on a transaction finished - successNFTs: NFTBaseInfo[], - failNFTs: NFTBaseInfo[], - nftsListingInfo: NftsListingInfo - ) => console.log(successNFTs, failNFTs, nftsListingInfo), - onError: (error: Error, nftsListingInfo?: NftsListingInfo) => - console.log(error, nftsListingInfo), // Callback on any error occurs - config: bulkBuyConfig, -}); -``` -- For client-side: -```ts -import { init } from '@nftgo/gotrading'; -import Web3 from 'web3'; - -// For client -const provider = window.ethereum; -const configs = { - apiKey: 'YOUR-API-KEY', // Replace with your own API Key. -}; - -// Create tradeAggregator client -const {aggregator, utils} = init(configs); -// List some NFTs you want to buy -// We recommend you using our aggregator.getListingsOfNFT method to check whether your nfts have valid listings -const nfts: NFTInfoForTrade[] = [ // Replace with your own nft list - { - contract: "0xcfff4c8c0df0e2431977eba7df3d3de857f4b76e", - tokenId: "16", - amount: 1 - }, - { - contract: "0xcfff4c8c0dF0E2431977EbA7dF3D3De857f4B76e", - tokenId: "18", - amount: 1 - } -] - -// Config your bulk -const bulkBuyConfig = { - ignoreUnListedNFTs: false, // Do you want to ignore unlisted NFTs? - ignoreInvalidOrders: false, // Do you want to ignore invalid orders? - ignoreSuspiciousNFTs: false, // Do you want to ignore suspicious NFTs? - withSafeMode: false, // Use Safe Mode or Without Safe Mode. -}; - -// Buy nfts -aggregator.bulkBuy({ - nfts, - onSendingTransaction: (hash: string) => console.log(hash), // Callback on sending a transaction - onFinishTransaction: ( // Callback on a transaction finished - successNFTs: NFTBaseInfo[], - failNFTs: NFTBaseInfo[], - nftsListingInfo: NftsListingInfo - ) => console.log(successNFTs, failNFTs, nftsListingInfo), - onError: (error: Error, nftsListingInfo?: NftsListingInfo) => - console.log(error, nftsListingInfo), // Callback on any error occurs - config: bulkBuyConfig, -}); -``` diff --git a/docs/tradeAggregator/BulkList.md b/docs/tradeAggregator/BulkList.md deleted file mode 100644 index d1c2f46..0000000 --- a/docs/tradeAggregator/BulkList.md +++ /dev/null @@ -1,133 +0,0 @@ -# Quick Start for ListingIndexerStable - -## Introduction - -If you need to list NFTs, you can use the `ListingIndexerStable` class for easy operation. It supports single and batch listing, and can be listed on multiple marketplaces such as opensea x2y2 looksrare. In addition, this class also supports setting royalty information and other features. - -## Usage - -Here are some actual examples of code. - -## ***complete example*** -- For server-side: -```ts -// init sdk client -import Web3 from 'web3'; -import { initListingIndexer, NFTInfoForListing } from '@nftgo/gotrading'; - -// server -const provider = new Web3.providers.HttpProvider('https://cloudflare-eth.com/'); - -const openseaApi = { - apiKey: 'apiKey', // replace with your own api key - requestsPerInterval: 2, - interval: 1000, -}; -//Replace with your own provider -const config = { - apiKey: 'api key', // Replace with your own API Key. - web3Provider: provider, // Replace with your provider, - walletConfig: { - address: 'Your wallet address', - privateKey: 'Your private key', - }, // Replace with your wallet info. - openSeaApiKeyConfig: openseaApi, - // looksRareApiKeyConfig: looksrareApi, - // x2y2ApiKeyConfig: x2y2Api, -}; -// create Indexer client -const { listingIndexer } = initListingIndexer(config); - -// Get the listing info of BAYC No.1 -const baycContract = '0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D'; - -const listingNFTS: NFTInfoForListing[] = [ - { - contract: baycContract, - tokenId: '1', - ethPrice: 60, - marketplace: 'OpenSea', - }, - { - contract: baycContract, - tokenId: '2', - ethPrice: 60, - marketplace: 'OpenSea', - }, - { - contract: baycContract, - tokenId: '2', - ethPrice: 60, - marketplace: 'LooksRare', - }, -]; - -const listingDataResult = await listingIndexer.bulkListing(listingNFTS, { - autoApprove: true, - onFinish: (successIndexes, failedItems) => { - // successIndexes: [0, 1] - console.log(successIndexes); - }, - onError: (err) => { - console.error(err); - }, -}); - -``` - -```ts - // You need to initialize a listingIndexer as shown in the code above. - const listingNFTS: NFTInfoForListing[] = [ - { - contract: baycContract, - tokenId: '1', - ethPrice: 60, - marketplace: 'OpenSea', - }, - ]; - const maker = '0x0000' ?? this.config.walletConfig?.address - - const bulkListing = () => { - /** - * Step 1: Prepare listing: - * This function takes two parameters: a list of NFTs to be listed and the owner's address. - * The prepareListing function returns the specific parameter details required for the subsequent steps of the process - * such as the parameters needed for signing and posting. - */ - const data = await listingIndexer.prepareListing(listingNFTS, maker); - /** - * Then, do some simple data formatting and prepare to hand it over to the next process. - */ - const approvalData = listingIndexer.parseApprovalData(data); - const listingData = listingIndexer.parseListingData(data); - /** - * Step 2: Approve Listing Item with Policy: - * This function will authorize the approvedItems and return the final set of ListingItems. - * Note that NFTs must be authorized before being listed, and only one authorization is required per collection per address. - */ - const approvalResult = await listingIndexer.approveWithPolicy([approvalData, listingData]); - /** - * Step 3: Sign Listing Item: - * This function takes in an array of ListingItem objects that need to be listed. - * The user will sign these items using their configured private key, typically stored in their wallet on the client-side. - * Once signed, the function returns an array containing two elements: - SignedListingItem[]: the successfully signed ListingItems. - ErrorListingItem[]: any ListingItems that failed to be signed. - */ - const [listingResult, errorOrders] = await listingIndexer.signListingOrders(approvalResult); - /** - * Step 4: Post Listing Item: - * This function will post the listing order to the target marketplace. - * It takes as input the SignedListingItem that was previously signed in the previous step. - * This is the final step of the listing process, where a request is made to the market API. - * The function will return information about the final result of the listing. - */ - const [successIndexes, errorItems] = await listingIndexer.bulkPostListingOrders(listingResult); - const errorIndexes = [...errorOrders, ...errorItems]; -``` -> - -## ***interface*** -- ***interface*** - - [***ListingNFTParams***](https://github.com/NFTGo/GoTrading-js/blob/feat/draft/docs/interfaces/ListingNFTParams.md) - - [***ListingStepNFTParams***](https://github.com/NFTGo/GoTrading-js/blob/feat/draft/docs/interfaces/ListingNFTParams.md) diff --git a/docs/tradeAggregator/BuyByCollectionListings.md b/docs/tradeAggregator/BuyByCollectionListings.md deleted file mode 100644 index d3b9c03..0000000 --- a/docs/tradeAggregator/BuyByCollectionListings.md +++ /dev/null @@ -1,126 +0,0 @@ -# Buy by collection listings -## ***complete example*** -- For server-side: -```ts -// init sdk client -import Web3 from 'web3'; -import { BigNumber } from "ethers"; -import { CollectionListingsParam, AggregateParams, AggregateResponse, init } from "@nftgo/gotrading"; - -// server -const provider = new Web3.providers.HttpProvider( - "https://rpc.tenderly.co/fork/823ef734-4730-4063-bb00-640c54940021" -); //Replace with your own provider -const configs = { - apiKey: "api key", // Replace with your own API Key. - web3Provider: "provider", // Replace with your provider, - walletConfig: { - address: "Your wallet address", - privateKey: "Your private key" - }, // Replace with your wallet info. -}; -// create tradeAggregator client -const {aggregator, utils} = init(configs); - -// Get the listing info of BAYC. -const baycContract = '0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D'; // Replace with your test collection - -const collectionResponse = await aggregator.getListingsOfCollection(baycContract); - -let orderIds:string[] = []; -for (const nft of collectionResponse.nfts) { - orderIds.push(nft.listingData?.listingOrders[0].orderId as string); -} -const buyerAddress = "0x1234567890123456789012345678901234567890";// Replace with buyer address. -// without safe mode -const params: AggregateParams = ({ - buyerAddress: buyerAddress, - isSafe: false, - orderIds: orderIds, -}); - -const aggregateResponse = await aggregator.getAggregateInfo(params); - -utils?.sendTransaction({ - from: aggregateResponse.txInfo.fromAddress, - to: aggregateResponse.txInfo.toAddress, - data: aggregateResponse.txInfo.data, - value: BigNumber.from(aggregateResponse.txInfo.value.toString()).toHexString() -}).on('transactionHash', (hash)=>{ - console.log(hash); -}).on('receipt', (receipt)=>{ - if (receipt.logs.length) { - for (const log of receipt.logs) { - // not every log with useful info - const decodedLog = utils.decodeLog(log); - } - }else { - console.log('transaction fail for some unknown reason') - } -}).on('error', (error)=>{ - console.log('transaction fail: ', error); -}); -``` -- For client-side: - -```ts -// init sdk client -import { BigNumber } from "ethers"; -import { CollectionListingsParam, AggregateParams, AggregateResponse, init } from "@nftgo/gotrading"; - -// client - -const provider = window.ethereum; -const configs = { - apiKey: "api key", // Replace with your own API Key. -}; -// create tradeAggregator client -const {aggregator, utils} = init(configs); - -// Get the listing info of BAYC. -const baycContract = '0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D'; // Replace with your test collection - -const collectionResponse = await aggregator.getListingsOfCollection(baycContract); - -let orderIds:string[] = []; -for (const nft of collectionResponse.nfts) { - orderIds.push(nft.listingData?.listingOrders[0].orderId as string); -} -const buyerAddress = "0x1234567890123456789012345678901234567890";// Replace with buyer address. -// without safe mode -const params: AggregateParams = ({ - buyerAddress: buyerAddress, - isSafe: false, - orderIds: orderIds, -}); - -const aggregateResponse = await aggregator.getAggregateInfo(params); - -utils?.sendTransaction({ - from: aggregateResponse.txInfo.fromAddress, - to: aggregateResponse.txInfo.toAddress, - data: aggregateResponse.txInfo.data, - value: BigNumber.from(aggregateResponse.txInfo.value.toString()).toHexString() -}).on('transactionHash', (hash)=>{ - console.log(hash); -}).on('receipt', (receipt)=>{ - if (receipt.logs.length) { - for (const log of receipt.logs) { - // not every log with useful info - const decodedLog = utils.decodeLog(log); - } - }else { - console.log('transaction fail for some unknown reason') - } -}).on('error', (error)=>{ - console.log('transaction fail: ', error); -}); -``` -> -> This is [Safe Mode Example](https://github.com/NFTGo/GoTrading/blob/master/docs/tradeAggregator/tradeWithSafeMode.md). - -## ***interface*** - - [***CollectionListingsParam***](https://github.com/NFTGo/GoTrading/blob/master/docs/interfaces/CollectionListingsParam.md) - - [***CollectionListingResponse***](https://github.com/NFTGo/GoTrading/blob/master/docs/interfaces/CollectionListingResponse.md) - - [***AggregateParams***](https://github.com/NFTGo/GoTrading/blob/master/docs/interfaces/TradeAggregatorParams.md) - - [***AggregateResponse***](https://github.com/NFTGo/GoTrading/blob/master/docs/interfaces/TradeAggregatorResponse.md) diff --git a/docs/tradeAggregator/BuyByNFTListings.md b/docs/tradeAggregator/BuyByNFTListings.md deleted file mode 100644 index 1b33dd8..0000000 --- a/docs/tradeAggregator/BuyByNFTListings.md +++ /dev/null @@ -1,124 +0,0 @@ -# Buy by NFT listings -## ***complete example*** -- For server-side: -```ts -// init sdk client -import Web3 from "web3"; -import { BigNumber } from "ethers"; -import { init, AggregateParams, AggregateResponse, SingleNFTListingsResponse } from "@nftgo/gotrading"; - -// server -const provider = new Web3.providers.HttpProvider( - "https://rpc.tenderly.co/fork/823ef734-4730-4063-bb00-640c54940021" -); //Replace with your own provider -const configs = { - apiKey: "api key", // Replace with your own API Key. - web3Provider: "provider", // Replace with your provider, - walletConfig: { - address: "Your wallet address", - privateKey: "Your private key" - }, // Replace with your wallet info. -}; -// create tradeAggregator client -const {aggregator, utils} = init(configs); - -// Get the listing info of BAYC No.1 -const baycContract = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"; -const tokenId = "1"; - -const listingData = await aggregator.getListingsOfNFT(baycContract, tokenId); -let orderIds: string[] = []; -if (listingData?.listingOrders.length > 0) { - orderIds.push(listingData.listingOrders[0].orderId as string); -} - -const buyerAddress = "0x1234567890123456789012345678901234567890";// Replace with buyer address. -// without safe mode -const params: AggregateParams = ({ - buyerAddress: buyerAddress, - isSafe: false, - orderIds: orderIds, -}); - -const aggregateResponse = await aggregator.getAggregateInfo(params); - -utils?.sendTransaction({ - from: aggregateResponse.txInfo.fromAddress, - to: aggregateResponse.txInfo.toAddress, - data: aggregateResponse.txInfo.data, - value: BigNumber.from(aggregateResponse.txInfo.value.toString()).toHexString() -}).on('transactionHash', (hash)=>{ - console.log(hash); -}).on('receipt', (receipt)=>{ - if (receipt.logs.length) { - for (const log of receipt.logs) { - // not every log with useful info - const decodedLog = utils.decodeLog(log); - } - }else { - console.log('transaction fail for some unknown reason') - } -}).on('error', (error)=>{ - console.log('transaction fail: ', error); -}); -``` -- For client-side: - -```ts -// init sdk client -import { BigNumber } from "ethers"; -import { init, AggregateParams, AggregateResponse, SingleNFTListingsResponse } from '@nftgo/gotrading'; - -const provider = window.ethereum; -const configs = { - apiKey: "api key", // Replace with your own API Key. -}; -// create tradeAggregator client -const {aggregator, utils} = init(configs); - -// Get the listing info of BAYC No.1 -const baycContract = "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"; -const tokenId = 1; - -const listingOrders = await aggregator.getListingsOfNFT(baycContract, tokenId); -let orderIds: string[] = []; -orderIds.push(listingOrders[0].orderId as string); - -const buyerAddress = "0x1234567890123456789012345678901234567890";// Replace with buyer address. -// without safe mode -const params: AggregateParams = ({ - buyerAddress: buyerAddress, - isSafe: false, - orderIds: orderIds, -}); - -const aggregateResponse = await aggregator.getAggregateInfo(params); - -utils?.sendTransaction({ - from: aggregateResponse.txInfo.fromAddress, - to: aggregateResponse.txInfo.toAddress, - data: aggregateResponse.txInfo.data, - value: BigNumber.from(aggregateResponse.txInfo.value.toString()).toHexString() -}).on('transactionHash', (hash)=>{ - console.log(hash); -}).on('receipt', (receipt)=>{ - if (receipt.logs.length) { - for (const log of receipt.logs) { - // not every log with useful info - const decodedLog = utils.decodeLog(log); - } - }else { - console.log('transaction fail for some unknown reason') - } -}).on('error', (error)=>{ - console.log('transaction fail: ', error); -}); -``` -> -> This is [Safe Mode Example](https://github.com/NFTGo/GoTrading/blob/master/docs/tradeAggregator/tradeWithSafeMode.md). - -## ***interface*** -- ***interface*** - - [***SingleNFTListingsResponse***](https://github.com/NFTGo/GoTrading/blob/master/docs/interfaces/SingleNftListingResponse.md) - - [***AggregateParams***](https://github.com/NFTGo/GoTrading/blob/master/docs/interfaces/TradeAggregatorParams.md) - - [***AggregateResponse***](https://github.com/NFTGo/GoTrading/blob/master/docs/interfaces/TradeAggregatorResponse.md) diff --git a/docs/tradeAggregator/BuyByWalletListings.md b/docs/tradeAggregator/BuyByWalletListings.md deleted file mode 100644 index bb1e326..0000000 --- a/docs/tradeAggregator/BuyByWalletListings.md +++ /dev/null @@ -1,122 +0,0 @@ -# Buy by wallet listings -## ***complete example*** -- For server-side: -```ts -// init sdk client -import Web3 from 'web3'; -import { BigNumber } from "ethers"; -import { CollectionListingsParam, AggregateParams, AggregateResponse, init } from "@nftgo/gotrading"; - -// server -const provider = new Web3.providers.HttpProvider( - "https://rpc.tenderly.co/fork/823ef734-4730-4063-bb00-640c54940021" -); //Replace with your own provider -const configs = { - apiKey: "api key", // Replace with your own API Key. - web3Provider: "provider", // Replace with your provider, - walletConfig: { - address: "Your wallet address", - privateKey: "Your private key" - }, // Replace with your wallet info. -}; -// Create tradeAggregator client -const {aggregator, utils} = init(configs); - -// The wallet address you want to buy from -const walletAddress = "0x8ae57a027c63fca8070d1bf38622321de8004c67"; - -const { nfts: walletNFTList } = await aggregator.getListingsOfWallet(walletAddress); -let orderIds:string[] = []; -for (const nft of walletNFTList) { - orderIds.push(nft.listingData?.listingOrders[0].orderId as string) -} - -const buyerAddress = "0x1234567890123456789012345678901234567890";// Replace with buyer address. - -// without safe mode -const params: AggregateParams = ({ - buyerAddress: buyerAddress, - isSafe: false, - orderIds: orderIds, -}); - -const aggregateResponse = await aggregator.getAggregateInfo(params); - -utils?.sendTransaction({ - from: aggregateResponse.txInfo.fromAddress, - to: aggregateResponse.txInfo.toAddress, - data: aggregateResponse.txInfo.data, - value: BigNumber.from(aggregateResponse.txInfo.value.toString()).toHexString() -}).on('transactionHash', (hash)=>{ - console.log(hash); -}).on('receipt', (receipt)=>{ - if (receipt.logs.length) { - for (const log of receipt.logs) { - // not every log with useful info - const decodedLog = utils.decodeLog(log); - } - }else { - console.log('transaction fail for some unknown reason') - } -}).on('error', (error)=>{ - console.log('transaction fail: ', error); -}); -``` -- For client-side: - -```ts -// init sdk client -import { BigNumber } from "ethers"; -import { init, AggregateParams, AggregateResponse, SingleAddressListingsResponse } from '@nftgo/gotrading'; -const configs = { - apiKey: 'YOUR-API-KEY', // Replace with your own API Key. -}; -// create tradeAggregator client -const {aggregator, utils} = init(configs); - -const walletAddress = "0x8ae57a027c63fca8070d1bf38622321de8004c67"; - -const { nfts: walletNFTList } = await aggregator.getListingsOfWallet(walletAddress); -let orderIds:string[] = []; -for (const nft of walletNFTList) { - orderIds.push(nft.listingData?.listingOrders[0].orderId as string) -} - -const buyerAddress = "0x1234567890123456789012345678901234567890";// Replace with buyer address. - -// without safe mode -const params: AggregateParams = ({ - buyerAddress: buyerAddress, - isSafe: false, - orderIds: orderIds, -}); - -const aggregateResponse = await aggregator.getAggregateInfo(params); - -utils?.sendTransaction({ - from: aggregateResponse.txInfo.fromAddress, - to: aggregateResponse.txInfo.toAddress, - data: aggregateResponse.txInfo.data, - value: BigNumber.from(aggregateResponse.txInfo.value.toString()).toHexString() -}).on('transactionHash', (hash)=>{ - console.log(hash); -}).on('receipt', (receipt)=>{ - if (receipt.logs.length) { - for (const log of receipt.logs) { - // not every log with useful info - const decodedLog = utils.decodeLog(log); - } - }else { - console.log('transaction fail for some unknown reason') - } -}).on('error', (error)=>{ - console.log('transaction fail: ', error); -}); -``` -> -> This is [Safe Mode Example](https://github.com/NFTGo/GoTrading/blob/master/docs/tradeAggregator/tradeWithSafeMode.md). - -## ***interface*** - - [***SingleAddressListingsResponse***](https://github.com/NFTGo/GoTrading/blob/master/docs/interfaces/SingleAddressListingsResponse.md) - - [***AggregateParams***](https://github.com/NFTGo/GoTrading/blob/master/docs/interfaces/TradeAggregatorParams.md) - - [***AggregateResponse***](https://github.com/NFTGo/GoTrading/blob/master/docs/interfaces/TradeAggregatorResponse.md) diff --git a/docs/tradeAggregator/tradeWithSafeMode.md b/docs/tradeAggregator/tradeWithSafeMode.md deleted file mode 100644 index 345145d..0000000 --- a/docs/tradeAggregator/tradeWithSafeMode.md +++ /dev/null @@ -1,37 +0,0 @@ -# Trade with safe mode -```ts -const buyerAddress = "0x1234567890123456789012345678901234567890";// Replace with buyer address. -const params: AggregateParams = { - buyerAddress: buyerAddress, - isSafe: true, - orderIds: orderIds, -}; - -const aggregateResponse = await aggregator.getAggregateInfo(params); - -utils - ?.sendSafeModeTransaction({ - from: aggregateResponse.txInfo.fromAddress, - to: aggregateResponse.txInfo.toAddress, - data: aggregateResponse.txInfo.data, - value: BigNumber.from(aggregateResponse.txInfo.value.toString()), - chainId: 1, - gasLimit: BigNumber.from(aggregateResponse.gasLimit.toString()), - }) - .on('transactionHash', (hash)=>{ - console.log(hash); - }) - .on('receipt', (receipt)=>{ - if (receipt.logs.length) { - for (const log of receipt.logs) { - // not every log with useful info - const decodedLog = utils.decodeLog(log); - } - } else { - console.log('transaction fail for some unknown reason'); - } - }) - .on('error', (error)=>{ - console.log('transaction fail: ', error); - }); -``` diff --git a/docs/tradeAggregator/tradeWithoutSafeMode.md b/docs/tradeAggregator/tradeWithoutSafeMode.md deleted file mode 100644 index e75b9e4..0000000 --- a/docs/tradeAggregator/tradeWithoutSafeMode.md +++ /dev/null @@ -1,32 +0,0 @@ -# Trade without safe mode -```ts -// without safe mode -const buyerAddress = "0x1234567890123456789012345678901234567890";// Replace with buyer address. -const params: AggregateParams = ({ - buyerAddress: buyerAddress, - isSafe: false, - orderIds: orderIds, -}); - -const aggregateResponse = await aggregator.getAggregateInfo(params); - -utils?.sendTransaction({ - from: aggregateResponse.txInfo.fromAddress, - to: aggregateResponse.txInfo.toAddress, - data: aggregateResponse.txInfo.data, - value: BigNumber.from(aggregateResponse.txInfo.value.toString()).toHexString() -}).on('transactionHash', (hash)=>{ - console.log(hash); -}).on('receipt', (receipt)=>{ - if (receipt.logs.length) { - for (const log of receipt.logs) { - // not every log with useful info - const decodedLog = utils.decodeLog(log); - } - }else { - console.log('transaction fail for some unknown reason') - } -}).on('error', (error)=>{ - console.log('transaction fail: ', error); -}); -``` diff --git a/docs/type/.nojekyll b/docs/type/.nojekyll new file mode 100644 index 0000000..e2ac661 --- /dev/null +++ b/docs/type/.nojekyll @@ -0,0 +1 @@ +TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/docs/type/README.md b/docs/type/README.md new file mode 100644 index 0000000..da212da --- /dev/null +++ b/docs/type/README.md @@ -0,0 +1,490 @@ +**@nftgo/gotrading** ∙ [README](README.md) ∙ [API](exports.md) + +*** + +# GoTrading-js +[![node](https://img.shields.io/badge/node-%3E%3D%2016.14-brightgreen.svg)](https://nodejs.org/en/) [![Discord][discord-image]][discord-url] [![Twitter][twitter-image]][twitter-url] + +# Table of Contents +- [GoTrading-js](#gotrading-js) +- [Table of Contents](#table-of-contents) + - [Introduction](#introduction) + - [Key Features](#key-features) + - [Supported Marketplaces](#supported-marketplaces) + - [Supported Chains](#supported-chains) + - [Requirements](#requirements) + - [Quickstart](#quickstart) + - [1. Install the SDK.](#1-install-the-sdk) + - [2. Import and init the GoTrading SDK.](#2-import-and-init-the-gotrading-sdk) + - [3. Fulfill Listings](#3-fulfill-listings) + - [SDK Core Methods](#sdk-core-methods) + - [Marketplace](#marketplace) + - [Create Listings](#create-listings) + - [Create Offers](#create-offers) + - [Fulfill Listings](#fulfill-listings) + - [Fulfill Offers](#fulfill-offers) + - [Cancel Orders](#cancel-orders) + - [OrderFetcher](#orderfetcher) + - [Get Orders By Contract](#get-orders-by-contract) + - [Get Orders By NFT](#get-orders-by-nft) + - [Get Orders By Ids](#get-orders-by-ids) + - [Get Orders By Maker](#get-orders-by-maker) + - [Utils](#utils) + - [Questions \& Feedback](#questions--feedback) + - [License](#license) + +## Introduction + + + +GoTrading is an open-source development kit that enables you to build your own NFT trading aggregator and marketplace. The SDK provides a comprehensive set of tools and APIs that greatly simplify the development process of a general trading aggregator like Gem.xyz or Blur.io, and allows developers to access real-time order feed and NFT transaction data. With the SDK, you can easily aggregate orders and functionality from mainstream marketplaces such as Opensea, Looksrare, Blur, x2y2, Sudoswap, etc, all in your products and communities. + +## Key Features + - Simple and easy-to-use API + - Real-time market data access + - Code is easy to customize and extend + - Supports Bulk Listing and Bulk Buying + +## Supported Marketplaces +GoTrading currently aggregates the following marketplaces, and we will continue to add more marketplaces in the future. + +| **Marketplace** | **Create Listings** | **Fulfill Listings** | **Create Offers** | **Fulfill Offers** | **Cancel Listings/Offers** | **Protocol** | +|-----------------|---------------------|----------------------|-------------------|--------------------|----------------------------|----------------------| +| OpenSea | Yes | Yes | Yes | Yes | Yes | seaport-v1.5 | +| Blur | Yes | Yes | Yes | Yes | Yes | blur | +| LooksRare | Yes | Yes | Yes | Yes | Yes | looksrare-v2 | +| X2Y2 | Yes | Yes | Yes | Yes | Yes | x2y2 | +| Sudoswap | No | Yes | No | Yes | No | sudoswap/sudoswap-v2 | +| CryptoPunks | No | Yes | No | Yes | Yes | cryptopunks | +| Artblocks | No | Yes | No | Yes | Yes | seaport-v1.5 | +| Reservoir | No | Yes | No | Yes | Yes | seaport-v1.5 | +| ENSVision | No | Yes | No | Yes | Yes | seaport-v1.5 | +| Magically | No | Yes | No | Yes | Yes | seaport-v1.5 | +| Alienswap | No | Yes | No | Yes | Yes | seaport-v1.5 | +| Ordinals | No | Yes | No | Yes | Yes | seaport-v1.5 | +| Sound | No | Yes | No | Yes | Yes | seaport-v1.5 | + +## Supported Chains +GoTrading currently supports the following chains: +- Ethereum Mainnet +- Sepolia Testnet ( Comming Soon ) +- Polygon Mainnet ( Comming Soon ) + +## Requirements +- Node.js >= 16.14 +- web3 >= 1.8.2 +- ethers >= 5.6.9, < 6.1 + +You can do this by running the following commands: +```bash +npm install web3 ethers@5.6.9 +``` + +## Quickstart +### 1. Install the SDK. + +> With `npm` : +```bash +npm install @nftgo/gotrading +``` + +> With `yarn` : +```bash +yarn add @nftgo/gotrading +``` + +### 2. Import and init the GoTrading SDK. +Instantiate the instance of GoTrading using your etheres provider with API key. +```ts +import { init, Config } from '@nftgo/gotrading'; +import Web3 from 'web3'; + +// Create a new Web3 Provider to interact with the Ethereum network. +const provider = new Web3.providers.HttpProvider('https://mainnet.infura.io') //Replace with your own provider + +// Configure the necessary parameters for the Trade Aggregator API client. +const configs: Config = { + apiKey: "YOUR-API-KEY", // Replace with your own API Key. + web3Provider: provider, + walletConfig: { + address: "Your wallet address", + privateKey: "Your private key" + }, // Replace with your wallet info. +}; + +// Create a Trade Aggregator client instance and return the utility and aggregator objects of the Trade Aggregator API. +const {aggregator, utils, orderFetcher} = init(configs); +``` +> If you need to obtain an API key or a custom plan, please contact our support team. You can reach us by submitting a [form](https://forms.monday.com/forms/7fd30cd3cef08cf3b3dbccd1c72892b5), and we will respond to you within 1-2 business days. +> +> Please note that we may need to understand your use case and requirements in order to provide you with the API key and custom plan that best suits your needs. Thank you for your interest in our service, and we look forward to working with you. +### 3. Fulfill Listings +```ts + +import { init, Config, FulfillListingsReq } from '@nftgo/gotrading'; + +async function demo() { + const config: Config = {}; + + const { aggregator, utils } = init(config); + + const {listingDTOs} = await orderFetcher.getOrdersByContract({ + contractAddress: '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d', // bayc contract address + orderType: OrderType.Listing + }) + const req: FulfillListingsReq = { + buyer: 'xxx', // your address + orderIds: listingDTOs.map(listingDTO => listingDTO.orderId), + safeMode: false, + }; + + // get actions, meanwhile we provide executeActions function to deal with actions + const { actions, executeActions } = await aggregator.fulfillListings(req); + + // case 1 + // RECOMMEND: use execute functions we provide + await executeActions({ + onTaskExecuted(task) { + // do something with completed task info + console.log(task.action.name, task.status); + }, + }); + console.log('success'); + + // case 2 + // execute actions by yourself + const executor = utils.createActionExecutor(actions); + for (const task of executor) { + await task.execute(); + console.log(task.action.name, task.status); + } + console.log('success'); +} +``` + +## SDK Core Methods +To use the GoTrading SDK, you need to initialize the SDK with your API key. After initialization, you can use the following methods to interact with the GoTrading API. + +```ts +import { init, Config } from '@nftgo/gotrading'; + +const config: Config = { + apiKey: 'YOUR-API-KEY', + openSeaApiKeyConfig: { + apiKey: 'YOUR-OPENSEA-API-KEY', + requestsPerInterval: 10, // 10 requests per interval + interval: 1000, // 1 second + }, + looksRareApiKeyConfig: { + apiKey: 'YOUR-LOOKSRARE-API-KEY', + requestsPerInterval: 10, // 10 requests per interval + interval: 1000, // 1 second + }, + x2y2ApiKeyConfig: { + apiKey: 'YOUR-X2Y2-API-KEY', + requestsPerInterval: 10, // 10 requests per interval + interval: 1000, // 1 second + }, + walletConfig: { + address: 'Your wallet address', + privateKey: 'Your private key', + }, // Replace with your wallet info. +}; + +const goTrading = init(config); +``` + +### Marketplace +The Marketplace methods are used to create and fulfill listings and offers across all marketplaces. + +#### Create Listings +```ts +import { CreateListingsReq, Orderbook, OrderKind } from '@nftgo/gotrading'; + +const req: CreateListingsReq = { + maker: 'xxx', // your address + params: [ + { + token: '0x97a20815a061eae224c4fdf3109731f73743db73:2', + quantity: 1, + weiPrice: '1000', + orderKind: OrderKind.SeaportV15, + orderbook: Orderbook.Opensea, + listingTime: '1688625367', + expirationTime: '1689858225', + currency: '0x0000000000000000000000000000000000000000', + automatedRoyalties: true, + }, + { + token: '0x97a20815a061eae224c4fdf3109731f73743db73:2', + quantity: 1, + weiPrice: '1000', + orderKind: OrderKind.X2Y2, + orderbook: Orderbook.X2Y2, + listingTime: '1688625367', + expirationTime: '1689858225', + currency: '0x0000000000000000000000000000000000000000', + }, + { + token: '0x97a20815a061eae224c4fdf3109731f73743db73:2', + quantity: 1, + weiPrice: '1000', + orderKind: OrderKind.LooksRareV2, + orderbook: Orderbook.LooksRare, + listingTime: '1688625367', + expirationTime: '1689858225', + currency: '0x0000000000000000000000000000000000000000', + }, + { + token: '0x61628d84d0871a38f102d5f16f4e69ee91d6cdd9:7248', + quantity: 1, + weiPrice: '1000', + orderKind: OrderKind.SeaportV15, + orderbook: Orderbook.Opensea, + listingTime: '1688625367', + expirationTime: '1689858225', + currency: '0x0000000000000000000000000000000000000000', + automatedRoyalties: true, + }, + ], +}; + +const response = await goTrading.aggregator.createListings(req); + +await response.executeActions({ + onTaskExecuted(task) { + console.log(task.action.name, task.status); + }, +}); + +``` +#### Create Offers +```ts +import { CreateOffersReq, Orderbook, OrderKind } from '@nftgo/gotrading'; + +const req: CreateOffersReq = { + maker: 'xxx', // your address + params: [ + { + collection: '0x8d04a8c79ceb0889bdd12acdf3fa9d207ed3ff63', + weiPrice: '10000000000', + orderKind: OrderKind.SeaportV15, + orderbook: Orderbook.Opensea, + listingTime: '1689017272', + expirationTime: '1688017272', + quantity: 2, + }, + { + collection: '0x8d04a8c79ceb0889bdd12acdf3fa9d207ed3ff63', + weiPrice: '10000000000', + orderKind: OrderKind.LooksRareV2, + orderbook: Orderbook.Looksrare, + listingTime: '1689017272', + expirationTime: '1688017272', + quantity: 1, + } + ], +}; + +const response = await goTrading.aggregator.createOffers(req); + +await response.executeActions({ + onTaskExecuted(task) { + console.log(task.action.name, task.status); + }, +}); + +``` + +#### Fulfill Listings +```ts +import { FulfillListingsReq, Orderbook, OrderKind } from '@nftgo/gotrading'; + +const orderIds = ['xxx', 'yyy']; // pass the listing ids you want to fulfill + +const req: FulfillListingsReq = { + buyer: 'xxx', // your address + orderIds, +}; + +const response = await goTrading.aggregator.fulfillListings(req); + +await response.executeActions({ + onTaskExecuted(task) { + console.log(task.action.name, task.status); + }, +}); + +``` + +#### Fulfill Offers +```ts +import { FulfillOffersReq, Orderbook, OrderKind } from '@nftgo/gotrading'; + +const orderIds = ['xxx', 'yyy']; // pass the offer ids you want to fulfill + +const req: FulfillOffersReq = { + sellerAddress: 'xxx', // your address + offerFulfillmentIntentions: [ + { + orderId: orderIds[0], + contractAddress: "0x02d66f9d220553d831b239f00b5841280ddcfaf3", + tokenId: "1", + quantity: 1, + }, + { + orderId: orderIds[1], + contractAddress: "0x02d66f9d220553d831b239f00b5841280ddcfaf3", + tokenId: "2", + quantity: 1, + }, + ], +}; + +const response = await goTrading.aggregator.fulfillOffers(req); + +await response.executeActions({ + onTaskExecuted(task) { + console.log(task.action.name, task.status); + }, +}); + +``` + +#### Cancel Orders +```ts +import { CancelOrdersReq, Orderbook, OrderKind } from '@nftgo/gotrading'; + +const cancelOrdersReq: CancelOrdersReq = { + callerAddress: 'xxx', // your address + orders: [ + { + orderId: 'aaa', + orderType: OrderType.Listing, + }, + { + orderId: 'bbb', + orderType: OrderType.Offer, + }, + ], +}; + +const response = await goTrading.aggregator.cancelOrders(cancelOrdersReq); + +await response.executeActions({ + onTaskExecuted(task) { + console.log(task.action.name, task.status); + }, +}); + +``` + +### OrderFetcher + +#### Get Orders By Contract +```ts +import { OrderType, GetOrdersByContractReq } from '@nftgo/gotrading'; + +// Get listings by contractAddress +const getOrdersByContractReq: GetOrdersByContractReq = { + contractAddress: '0x97a20815a061eae224c4fdf3109731f73743db73', + orderType: OrderType.Listing, +}; + +const { listingDTOs } = await goTrading.orderFetcher.getOrdersByContract(getOrdersByContractReq); + +// Get offers by contractAddress +const getOffersByContractReq: GetOrdersByContractReq = { + contractAddress: '0x97a20815a061eae224c4fdf3109731f73743db73', + orderType: OrderType.Offer, +}; + +const { offerDTOs } = await goTrading.orderFetcher.getOrdersByContract(getOrdersByContractReq); + +``` + +#### Get Orders By NFT +```ts +import { OrderType, GetOrdersByNftsReq } from '@nftgo/gotrading'; + +// Get listings by nft +const getOrdersByNftsReq: GetOrdersByNftsReq = { + contractAddress: '0x8d04a8c79ceb0889bdd12acdf3fa9d207ed3ff63', + tokenId: '1', + orderType: OrderType.Listing, +}; + +const { listingDTOs } = await goTrading.orderFetcher.getOrdersByNFT(getOrdersByNftsReq); + +// Get offers by nft +const getOffersByNftsReq: GetOrdersByNftsReq = { + contractAddress: '0x8d04a8c79ceb0889bdd12acdf3fa9d207ed3ff63', + tokenId: '1', + orderType: OrderType.Offer, +}; + +const { offerDTOs } = await goTrading.orderFetcher.getOrdersByNFT(getOffersByNftsReq); + +``` + +#### Get Orders By Ids +```ts +import { OrderType, GetOrdersByIdsReq } from '@nftgo/gotrading'; + +const getOrdersByIdsReq: GetOrdersByIdsReq = { + orders: [ + { + orderId: 'xxx', + orderType: OrderType.Listing, + }, + { + orderId: 'yyy', + orderType: OrderType.Offer, + }, + ], +}; + +const { listingDTOs, offerDTOs } = await goTrading.orderFetcher.getOrdersByIds(getOrdersByIdsReq); + +``` + +#### Get Orders By Maker +```ts +import { OrderType, GetOrdersByMakerReq } from '@nftgo/gotrading'; + +// Get listings by maker +const getOrdersByMakerReq: GetOrdersByMakerReq = { + maker: 'xxx', // your address + orderType: OrderType.Listing, +}; + +const { listingDTOs } = await goTrading.orderFetcher.getOrdersByMaker(getOrdersByMakerReq); + +// Get offers by maker +const getOffersByMakerReq: GetOrdersByMakerReq = { + maker: 'xxx', // your address + orderType: OrderType.Offer, +}; + +const { offerDTOs } = await goTrading.orderFetcher.getOrdersByMaker(getOffersByMakerReq); + +``` + +### Utils + +## Questions & Feedback + +> If you have any questions, issues, or feedback, please file an issue on GitHub, or drop us a message on our [Discord][discord-url] channel for the SDK. + +## License + +This project is licensed under the [BSD-3-Clause license](LICENSE). + +[discord-image]: https://img.shields.io/discord/1040195071401787413?color=brightgreen&label=Discord&logo=discord&logoColor=blue +[discord-url]: https://discord.gg/nftgo +[twitter-image]: https://img.shields.io/twitter/follow/NFTGo?label=NFTGo&style=social +[twitter-url]: https://twitter.com/NFTGoDevs + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/enumerations/ActionKind.md b/docs/type/enumerations/ActionKind.md new file mode 100644 index 0000000..a93d47a --- /dev/null +++ b/docs/type/enumerations/ActionKind.md @@ -0,0 +1,59 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > ActionKind + +# Enumeration: ActionKind + +## Contents + +- [Enumeration Members](ActionKind.md#enumeration-members) + - [Controller](ActionKind.md#controller) + - [PassThrough](ActionKind.md#passthrough) + - [Signature](ActionKind.md#signature) + - [Transaction](ActionKind.md#transaction) + +## Enumeration Members + +### Controller + +> **Controller**: `"controller"` + +#### Source + +[action/action.ts:19](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L19) + +*** + +### PassThrough + +> **PassThrough**: `"pass-through"` + +#### Source + +[action/action.ts:18](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L18) + +*** + +### Signature + +> **Signature**: `"signature"` + +#### Source + +[action/action.ts:17](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L17) + +*** + +### Transaction + +> **Transaction**: `"transaction"` + +#### Source + +[action/action.ts:16](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L16) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/enumerations/ActionName.md b/docs/type/enumerations/ActionName.md new file mode 100644 index 0000000..a4e0ed1 --- /dev/null +++ b/docs/type/enumerations/ActionName.md @@ -0,0 +1,138 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > ActionName + +# Enumeration: ActionName + +All action can be divided into four action kinds [ActionKind](ActionKind.md) + +## Contents + +- [Enumeration Members](ActionName.md#enumeration-members) + - [AcceptListing](ActionName.md#acceptlisting) + - [AcceptOffer](ActionName.md#acceptoffer) + - [CancelOrders](ActionName.md#cancelorders) + - [Contoller](ActionName.md#contoller) + - [CurrencyApproval](ActionName.md#currencyapproval) + - [CurrencyWrapping](ActionName.md#currencywrapping) + - [Failed](ActionName.md#failed) + - [NftApproval](ActionName.md#nftapproval) + - [OrderSignature](ActionName.md#ordersignature) + - [PassThrough](ActionName.md#passthrough) + - [PostOrderToMarketplace](ActionName.md#postordertomarketplace) + +## Enumeration Members + +### AcceptListing + +> **AcceptListing**: `"accept-listing"` + +#### Source + +[action/action.ts:79](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L79) + +*** + +### AcceptOffer + +> **AcceptOffer**: `"accept-offer"` + +#### Source + +[action/action.ts:78](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L78) + +*** + +### CancelOrders + +> **CancelOrders**: `"cancel-orders"` + +#### Source + +[action/action.ts:87](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L87) + +*** + +### Contoller + +> **Contoller**: `"controller"` + +#### Source + +[action/action.ts:83](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L83) + +*** + +### CurrencyApproval + +> **CurrencyApproval**: `"currency-approval"` + +#### Source + +[action/action.ts:81](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L81) + +*** + +### CurrencyWrapping + +> **CurrencyWrapping**: `"currency-wrapping"` + +#### Source + +[action/action.ts:85](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L85) + +*** + +### Failed + +> **Failed**: `"failed"` + +#### Source + +[action/action.ts:88](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L88) + +*** + +### NftApproval + +> **NftApproval**: `"nft-approval"` + +#### Source + +[action/action.ts:80](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L80) + +*** + +### OrderSignature + +> **OrderSignature**: `"order-signature"` + +#### Source + +[action/action.ts:86](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L86) + +*** + +### PassThrough + +> **PassThrough**: `"pass-through"` + +#### Source + +[action/action.ts:82](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L82) + +*** + +### PostOrderToMarketplace + +> **PostOrderToMarketplace**: `"post-order-to-marketplace"` + +#### Source + +[action/action.ts:84](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L84) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/enumerations/EVMChain.md b/docs/type/enumerations/EVMChain.md new file mode 100644 index 0000000..def9fbe --- /dev/null +++ b/docs/type/enumerations/EVMChain.md @@ -0,0 +1,37 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > EVMChain + +# Enumeration: EVMChain + +## Contents + +- [Enumeration Members](EVMChain.md#enumeration-members) + - [ETHEREUM](EVMChain.md#ethereum) + - [SEPOLIA](EVMChain.md#sepolia) + +## Enumeration Members + +### ETHEREUM + +> **ETHEREUM**: `"ethereum"` + +#### Source + +[config.ts:5](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/config.ts#L5) + +*** + +### SEPOLIA + +> **SEPOLIA**: `"sepolia"` + +#### Source + +[config.ts:6](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/config.ts#L6) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/enumerations/MarketId.md b/docs/type/enumerations/MarketId.md new file mode 100644 index 0000000..a8590b7 --- /dev/null +++ b/docs/type/enumerations/MarketId.md @@ -0,0 +1,147 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > MarketId + +# Enumeration: MarketId + +## Contents + +- [Enumeration Members](MarketId.md#enumeration-members) + - [Alienswap](MarketId.md#alienswap) + - [Artblocks](MarketId.md#artblocks) + - [Blur](MarketId.md#blur) + - [Ensvision](MarketId.md#ensvision) + - [Looksrare](MarketId.md#looksrare) + - [Magically](MarketId.md#magically) + - [Opensea](MarketId.md#opensea) + - [Ordinalsmarket](MarketId.md#ordinalsmarket) + - [Reservoir](MarketId.md#reservoir) + - [Sound](MarketId.md#sound) + - [Sudoswap](MarketId.md#sudoswap) + - [X2Y2](MarketId.md#x2y2) + +## Enumeration Members + +### Alienswap + +> **Alienswap**: `"alienswap"` + +#### Source + +[order-fetcher.ts:95](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L95) + +*** + +### Artblocks + +> **Artblocks**: `"artblocks"` + +#### Source + +[order-fetcher.ts:96](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L96) + +*** + +### Blur + +> **Blur**: `"blur"` + +#### Source + +[order-fetcher.ts:97](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L97) + +*** + +### Ensvision + +> **Ensvision**: `"ensvision"` + +#### Source + +[order-fetcher.ts:98](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L98) + +*** + +### Looksrare + +> **Looksrare**: `"looksrare"` + +#### Source + +[order-fetcher.ts:99](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L99) + +*** + +### Magically + +> **Magically**: `"magically"` + +#### Source + +[order-fetcher.ts:100](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L100) + +*** + +### Opensea + +> **Opensea**: `"opensea"` + +#### Source + +[order-fetcher.ts:101](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L101) + +*** + +### Ordinalsmarket + +> **Ordinalsmarket**: `"ordinalsmarket"` + +#### Source + +[order-fetcher.ts:102](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L102) + +*** + +### Reservoir + +> **Reservoir**: `"reservoir"` + +#### Source + +[order-fetcher.ts:103](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L103) + +*** + +### Sound + +> **Sound**: `"sound"` + +#### Source + +[order-fetcher.ts:104](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L104) + +*** + +### Sudoswap + +> **Sudoswap**: `"sudoswap"` + +#### Source + +[order-fetcher.ts:105](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L105) + +*** + +### X2Y2 + +> **X2Y2**: `"x2y2"` + +#### Source + +[order-fetcher.ts:106](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L106) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/enumerations/OrderKind.md b/docs/type/enumerations/OrderKind.md new file mode 100644 index 0000000..b2b2af1 --- /dev/null +++ b/docs/type/enumerations/OrderKind.md @@ -0,0 +1,72 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > OrderKind + +# Enumeration: OrderKind + +Exchange protocol used to create order. Example: `seaport-v1.5` + +## Contents + +- [Enumeration Members](OrderKind.md#enumeration-members) + - [Blur](OrderKind.md#blur) + - [LooksRareV2](OrderKind.md#looksrarev2) + - [SeaportV15](OrderKind.md#seaportv15) + - [Sudoswap](OrderKind.md#sudoswap) + - [X2Y2](OrderKind.md#x2y2) + +## Enumeration Members + +### Blur + +> **Blur**: `"blur"` + +#### Source + +[order.ts:15](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order.ts#L15) + +*** + +### LooksRareV2 + +> **LooksRareV2**: `"looks-rare-v2"` + +#### Source + +[order.ts:16](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order.ts#L16) + +*** + +### SeaportV15 + +> **SeaportV15**: `"seaport-v1.5"` + +#### Source + +[order.ts:17](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order.ts#L17) + +*** + +### Sudoswap + +> **Sudoswap**: `"sudoswap"` + +#### Source + +[order.ts:18](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order.ts#L18) + +*** + +### X2Y2 + +> **X2Y2**: `"x2y2"` + +#### Source + +[order.ts:19](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order.ts#L19) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/enumerations/OrderStatus.md b/docs/type/enumerations/OrderStatus.md new file mode 100644 index 0000000..7ced082 --- /dev/null +++ b/docs/type/enumerations/OrderStatus.md @@ -0,0 +1,72 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > OrderStatus + +# Enumeration: OrderStatus + +OrderStatus + +## Contents + +- [Enumeration Members](OrderStatus.md#enumeration-members) + - [Active](OrderStatus.md#active) + - [Cancelled](OrderStatus.md#cancelled) + - [Expired](OrderStatus.md#expired) + - [Filled](OrderStatus.md#filled) + - [Inactive](OrderStatus.md#inactive) + +## Enumeration Members + +### Active + +> **Active**: `"active"` + +#### Source + +[order-fetcher.ts:87](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L87) + +*** + +### Cancelled + +> **Cancelled**: `"cancelled"` + +#### Source + +[order-fetcher.ts:88](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L88) + +*** + +### Expired + +> **Expired**: `"expired"` + +#### Source + +[order-fetcher.ts:89](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L89) + +*** + +### Filled + +> **Filled**: `"filled"` + +#### Source + +[order-fetcher.ts:90](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L90) + +*** + +### Inactive + +> **Inactive**: `"inactive"` + +#### Source + +[order-fetcher.ts:91](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L91) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/enumerations/OrderType.md b/docs/type/enumerations/OrderType.md new file mode 100644 index 0000000..79afbfc --- /dev/null +++ b/docs/type/enumerations/OrderType.md @@ -0,0 +1,37 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > OrderType + +# Enumeration: OrderType + +## Contents + +- [Enumeration Members](OrderType.md#enumeration-members) + - [Listing](OrderType.md#listing) + - [Offer](OrderType.md#offer) + +## Enumeration Members + +### Listing + +> **Listing**: `"listing"` + +#### Source + +[order.ts:7](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order.ts#L7) + +*** + +### Offer + +> **Offer**: `"offer"` + +#### Source + +[order.ts:8](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order.ts#L8) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/enumerations/Orderbook.md b/docs/type/enumerations/Orderbook.md new file mode 100644 index 0000000..4f47c0a --- /dev/null +++ b/docs/type/enumerations/Orderbook.md @@ -0,0 +1,72 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > Orderbook + +# Enumeration: Orderbook + +Orderbook where order is placed. Example: `Reservoir` + +## Contents + +- [Enumeration Members](Orderbook.md#enumeration-members) + - [Blur](Orderbook.md#blur) + - [LooksRare](Orderbook.md#looksrare) + - [Opensea](Orderbook.md#opensea) + - [SELF](Orderbook.md#self) + - [X2Y2](Orderbook.md#x2y2) + +## Enumeration Members + +### Blur + +> **Blur**: `"blur"` + +#### Source + +[order.ts:26](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order.ts#L26) + +*** + +### LooksRare + +> **LooksRare**: `"looks-rare"` + +#### Source + +[order.ts:27](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order.ts#L27) + +*** + +### Opensea + +> **Opensea**: `"opensea"` + +#### Source + +[order.ts:28](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order.ts#L28) + +*** + +### SELF + +> **SELF**: `"self"` + +#### Source + +[order.ts:30](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order.ts#L30) + +*** + +### X2Y2 + +> **X2Y2**: `"x2y2"` + +#### Source + +[order.ts:29](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order.ts#L29) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/exports.md b/docs/type/exports.md new file mode 100644 index 0000000..61de051 --- /dev/null +++ b/docs/type/exports.md @@ -0,0 +1,94 @@ +**@nftgo/gotrading** ∙ [README](README.md) ∙ [API](exports.md) + +*** + +# API + +## Index + +### Enumerations + +- [ActionKind](enumerations/ActionKind.md) +- [ActionName](enumerations/ActionName.md) +- [EVMChain](enumerations/EVMChain.md) +- [MarketId](enumerations/MarketId.md) +- [OrderKind](enumerations/OrderKind.md) +- [OrderStatus](enumerations/OrderStatus.md) +- [OrderType](enumerations/OrderType.md) +- [Orderbook](enumerations/Orderbook.md) + +### Interfaces + +- [ActionDataMap](interfaces/ActionDataMap.md) +- [ActionProcessor](interfaces/ActionProcessor.md) +- [ActionTask](interfaces/ActionTask.md) +- [ActionTaskExecutor](interfaces/ActionTaskExecutor.md) +- [ActionTaskResultMap](interfaces/ActionTaskResultMap.md) +- [AggregatorApiResponse](interfaces/AggregatorApiResponse.md) +- [AggregatorApiStatusResponse](interfaces/AggregatorApiStatusResponse.md) +- [AggregatorInterface](interfaces/AggregatorInterface.md) +- [AggregatorResponse](interfaces/AggregatorResponse.md) +- [Attribute](interfaces/Attribute.md) +- [Authenticator](interfaces/Authenticator.md) +- [BlurAuthChallenge](interfaces/BlurAuthChallenge.md) +- [BlurAuthLoginParams](interfaces/BlurAuthLoginParams.md) +- [CancelOrdersReq](interfaces/CancelOrdersReq.md) +- [Config](interfaces/Config.md) +- [CreateListingInput](interfaces/CreateListingInput.md) +- [CreateListingsReq](interfaces/CreateListingsReq.md) +- [CreateOfferInput](interfaces/CreateOfferInput.md) +- [CreateOffersReq](interfaces/CreateOffersReq.md) +- [DecodeLogRes](interfaces/DecodeLogRes.md) +- [ExecuteOptions](interfaces/ExecuteOptions.md) +- [FulfillListingsReq](interfaces/FulfillListingsReq.md) +- [FulfillOffersReq](interfaces/FulfillOffersReq.md) +- [GetOrdersByContractReq](interfaces/GetOrdersByContractReq.md) +- [GetOrdersByIdsReq](interfaces/GetOrdersByIdsReq.md) +- [GetOrdersByMakerReq](interfaces/GetOrdersByMakerReq.md) +- [GetOrdersByNftsReq](interfaces/GetOrdersByNftsReq.md) +- [GoTrading](interfaces/GoTrading.md) +- [HTTPClient](interfaces/HTTPClient.md) +- [InspectTransactionParams](interfaces/InspectTransactionParams.md) +- [InternalUtils](interfaces/InternalUtils.md) +- [ListingOrderDTO](interfaces/ListingOrderDTO.md) +- [OfferDTO](interfaces/OfferDTO.md) +- [OfferFulfillmentIntention](interfaces/OfferFulfillmentIntention.md) +- [Order](interfaces/Order.md) +- [OrderFetcherApiResponse](interfaces/OrderFetcherApiResponse.md) +- [OrderFetcherInterface](interfaces/OrderFetcherInterface.md) +- [OrdersFetcherResp](interfaces/OrdersFetcherResp.md) +- [PostOrderReq](interfaces/PostOrderReq.md) +- [PostOrderResponse](interfaces/PostOrderResponse.md) +- [ProcessTransactionCallBacks](interfaces/ProcessTransactionCallBacks.md) +- [SignData](interfaces/SignData.md) +- [TokenAmount](interfaces/TokenAmount.md) +- [TokenCurrency](interfaces/TokenCurrency.md) +- [TokenPrice](interfaces/TokenPrice.md) +- [Transaction](interfaces/Transaction.md) +- [Utils](interfaces/Utils.md) +- [WalletConfig](interfaces/WalletConfig.md) + +### Type Aliases + +- [ActionTaskStatus](type-aliases/ActionTaskStatus.md) +- [AggregatorAction](type-aliases/AggregatorAction.md) +- [ApiKeyConfig](type-aliases/ApiKeyConfig.md) +- [BlurAuthenticator](type-aliases/BlurAuthenticator.md) +- [BlurAuthenticatorParams](type-aliases/BlurAuthenticatorParams.md) +- [ErrorHandler](type-aliases/ErrorHandler.md) +- [FinallyHandler](type-aliases/FinallyHandler.md) +- [PassThroughActionInfo](type-aliases/PassThroughActionInfo.md) +- [ProcessPassThroughActionParams](type-aliases/ProcessPassThroughActionParams.md) +- [ReceiptHandler](type-aliases/ReceiptHandler.md) +- [SignatureActionInfo](type-aliases/SignatureActionInfo.md) +- [TaskExecutedHandle](type-aliases/TaskExecutedHandle.md) +- [TransactionActionInfo](type-aliases/TransactionActionInfo.md) +- [TransactionHashHandler](type-aliases/TransactionHashHandler.md) +- [TxData](type-aliases/TxData.md) +- [X2Y2Authenticator](type-aliases/X2Y2Authenticator.md) +- [X2Y2AuthenticatorParams](type-aliases/X2Y2AuthenticatorParams.md) +- [X2Y2AuthenticatorResult](type-aliases/X2Y2AuthenticatorResult.md) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/ActionDataMap.md b/docs/type/interfaces/ActionDataMap.md new file mode 100644 index 0000000..acd0b22 --- /dev/null +++ b/docs/type/interfaces/ActionDataMap.md @@ -0,0 +1,59 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > ActionDataMap + +# Interface: ActionDataMap + +## Contents + +- [Properties](ActionDataMap.md#properties) + - [controller](ActionDataMap.md#controller) + - [pass-through](ActionDataMap.md#pass-through) + - [signature](ActionDataMap.md#signature) + - [transaction](ActionDataMap.md#transaction) + +## Properties + +### controller + +> **controller**: [`PassThroughActionInfo`](../type-aliases/PassThroughActionInfo.md) + +#### Source + +[action/action.ts:26](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L26) + +*** + +### pass-through + +> **pass-through**: [`PassThroughActionInfo`](../type-aliases/PassThroughActionInfo.md) + +#### Source + +[action/action.ts:25](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L25) + +*** + +### signature + +> **signature**: [`SignatureActionInfo`](../type-aliases/SignatureActionInfo.md) + +#### Source + +[action/action.ts:24](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L24) + +*** + +### transaction + +> **transaction**: [`TransactionActionInfo`](../type-aliases/TransactionActionInfo.md) + +#### Source + +[action/action.ts:23](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L23) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/ActionProcessor.md b/docs/type/interfaces/ActionProcessor.md new file mode 100644 index 0000000..f21367f --- /dev/null +++ b/docs/type/interfaces/ActionProcessor.md @@ -0,0 +1,149 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > ActionProcessor + +# Interface: ActionProcessor + +Processors for all kinds of actions + +## Contents + +- [Properties](ActionProcessor.md#properties) + - [processControllerAction](ActionProcessor.md#processcontrolleraction) + - [processPassThroughAction](ActionProcessor.md#processpassthroughaction) + - [processSignatureAction](ActionProcessor.md#processsignatureaction) + - [processTransactionAction](ActionProcessor.md#processtransactionaction) + +## Properties + +### processControllerAction + +> **processControllerAction**: (`action`) => `Promise`\<[`AggregatorAction`](../type-aliases/AggregatorAction.md)\<[`ActionKind`](../enumerations/ActionKind.md)\>[]\> + +Process controller action. It process a http request which returns actions need to be processed + +#### Parameters + +▪ **action**: `object` + +controller action [AggregatorAction](../type-aliases/AggregatorAction.md)[ActionKind.Controller](../enumerations/ActionKind.md#controller) + +▪ **action.data**: [`PassThroughActionInfo`](../type-aliases/PassThroughActionInfo.md) + +▪ **action.description**: `string` + +▪ **action.kind**: [`Controller`](../enumerations/ActionKind.md#controller) + +▪ **action.name**: [`ActionName`](../enumerations/ActionName.md) + +#### Returns + +Promise[]> + +#### Source + +[action/processor.ts:61](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/processor.ts#L61) + +*** + +### processPassThroughAction + +> **processPassThroughAction**: (`action`, `params`) => `Promise`\<`any`\> + +Process pass through action. For now, it means request a NFTGo data api with ProcessPassThroughActionParams + +#### Parameters + +▪ **action**: `object` + +pass through action [AggregatorAction](../type-aliases/AggregatorAction.md)[ActionKind.PassThrough](../enumerations/ActionKind.md#passthrough) + +▪ **action.data**: [`PassThroughActionInfo`](../type-aliases/PassThroughActionInfo.md) + +▪ **action.description**: `string` + +▪ **action.kind**: [`PassThrough`](../enumerations/ActionKind.md#passthrough) + +▪ **action.name**: [`ActionName`](../enumerations/ActionName.md) + +▪ **params**: [`ProcessPassThroughActionParams`](../type-aliases/ProcessPassThroughActionParams.md) + +[ProcessPassThroughActionParams](../type-aliases/ProcessPassThroughActionParams.md) + +#### Returns + +Promise + +#### Source + +[action/processor.ts:51](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/processor.ts#L51) + +*** + +### processSignatureAction + +> **processSignatureAction**: (`action`) => `Promise`\<`string`\> + +Process signature action, return a string signature + +#### Parameters + +▪ **action**: `object` + +signature action [AggregatorAction](../type-aliases/AggregatorAction.md)[ActionKind.Signature](../enumerations/ActionKind.md#signature) + +▪ **action.data**: [`SignatureActionInfo`](../type-aliases/SignatureActionInfo.md) + +▪ **action.description**: `string` + +▪ **action.kind**: [`Signature`](../enumerations/ActionKind.md#signature) + +▪ **action.name**: [`ActionName`](../enumerations/ActionName.md) + +#### Returns + +Promise + +#### Source + +[action/processor.ts:32](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/processor.ts#L32) + +*** + +### processTransactionAction + +> **processTransactionAction**: (`action`, `callbacks`?) => `Promise`\<`boolean`\> + +Process signature action, return true if transaction complete + +#### Parameters + +▪ **action**: `object` + +transaction action [AggregatorAction](../type-aliases/AggregatorAction.md)[ActionKind.Transaction](../enumerations/ActionKind.md#transaction) + +▪ **action.data**: [`TransactionActionInfo`](../type-aliases/TransactionActionInfo.md) + +▪ **action.description?**: `string` + +▪ **action.kind?**: [`Transaction`](../enumerations/ActionKind.md#transaction) + +▪ **action.name?**: [`ActionName`](../enumerations/ActionName.md) + +▪ **callbacks?**: [`ProcessTransactionCallBacks`](ProcessTransactionCallBacks.md) + +Callbacks in processing transaction [ProcessTransactionCallBacks](ProcessTransactionCallBacks.md) + +#### Returns + +Promise + +#### Source + +[action/processor.ts:40](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/processor.ts#L40) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/ActionTask.md b/docs/type/interfaces/ActionTask.md new file mode 100644 index 0000000..353bfcd --- /dev/null +++ b/docs/type/interfaces/ActionTask.md @@ -0,0 +1,93 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > ActionTask + +# Interface: ActionTask + +## Contents + +- [Properties](ActionTask.md#properties) + - [action](ActionTask.md#action) + - [error](ActionTask.md#error) + - [index](ActionTask.md#index) + - [pre](ActionTask.md#pre) + - [result](ActionTask.md#result) + - [status](ActionTask.md#status) +- [Methods](ActionTask.md#methods) + - [execute()](ActionTask.md#execute) + +## Properties + +### action + +> **action**: [`AggregatorAction`](../type-aliases/AggregatorAction.md)\<[`ActionKind`](../enumerations/ActionKind.md)\> + +#### Source + +[action/task.ts:15](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/task.ts#L15) + +*** + +### error + +> **error**: `null` \| `Error` + +#### Source + +[action/task.ts:14](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/task.ts#L14) + +*** + +### index + +> **index**: `number` + +#### Source + +[action/task.ts:13](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/task.ts#L13) + +*** + +### pre + +> **pre**: `null` \| [`ActionTask`](ActionTask.md) + +#### Source + +[action/task.ts:16](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/task.ts#L16) + +*** + +### result + +> **result**: `unknown` + +#### Source + +[action/task.ts:17](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/task.ts#L17) + +*** + +### status + +> **status**: [`ActionTaskStatus`](../type-aliases/ActionTaskStatus.md) + +#### Source + +[action/task.ts:12](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/task.ts#L12) + +## Methods + +### execute() + +> **execute**(): `Promise`\<`void`\> + +#### Source + +[action/task.ts:18](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/task.ts#L18) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/ActionTaskExecutor.md b/docs/type/interfaces/ActionTaskExecutor.md new file mode 100644 index 0000000..9abb74e --- /dev/null +++ b/docs/type/interfaces/ActionTaskExecutor.md @@ -0,0 +1,48 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > ActionTaskExecutor + +# Interface: ActionTaskExecutor + +Convert actions to tasks and provide an `execute` function that can complete all tasks step by step + +## Contents + +- [Properties](ActionTaskExecutor.md#properties) + - [[iterator]](ActionTaskExecutor.md#iterator) +- [Methods](ActionTaskExecutor.md#methods) + - [execute()](ActionTaskExecutor.md#execute) + +## Properties + +### [iterator] + +> **[iterator]**: () => `Generator`\<[`ActionTask`](ActionTask.md), `any`, `unknown`\> + +#### Source + +[action/executor.ts:12](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/executor.ts#L12) + +## Methods + +### execute() + +> **execute**(`options`?): `Promise`\<`void`\> + +Execute tasks step by step + +#### Parameters + +▪ **options?**: [`ExecuteOptions`](ExecuteOptions.md) + +[ExecuteOptions](ExecuteOptions.md) + +#### Source + +[action/executor.ts:11](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/executor.ts#L11) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/ActionTaskResultMap.md b/docs/type/interfaces/ActionTaskResultMap.md new file mode 100644 index 0000000..a9d2973 --- /dev/null +++ b/docs/type/interfaces/ActionTaskResultMap.md @@ -0,0 +1,48 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > ActionTaskResultMap + +# Interface: ActionTaskResultMap + +## Contents + +- [Properties](ActionTaskResultMap.md#properties) + - [pass-through](ActionTaskResultMap.md#pass-through) + - [signature](ActionTaskResultMap.md#signature) + - [transaction](ActionTaskResultMap.md#transaction) + +## Properties + +### pass-through + +> **pass-through**: `unknown` + +#### Source + +[action/task.ts:4](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/task.ts#L4) + +*** + +### signature + +> **signature**: `string` + +#### Source + +[action/task.ts:5](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/task.ts#L5) + +*** + +### transaction + +> **transaction**: `unknown` + +#### Source + +[action/task.ts:6](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/task.ts#L6) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/AggregatorApiResponse.md b/docs/type/interfaces/AggregatorApiResponse.md new file mode 100644 index 0000000..9d6366d --- /dev/null +++ b/docs/type/interfaces/AggregatorApiResponse.md @@ -0,0 +1,48 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > AggregatorApiResponse + +# Interface: AggregatorApiResponse + +## Contents + +- [Properties](AggregatorApiResponse.md#properties) + - [actions](AggregatorApiResponse.md#actions) + - [invalidOrderHashes](AggregatorApiResponse.md#invalidorderhashes) + - [invalidOrderIds](AggregatorApiResponse.md#invalidorderids) + +## Properties + +### actions + +> **actions**: [`AggregatorAction`](../type-aliases/AggregatorAction.md)\<[`ActionKind`](../enumerations/ActionKind.md)\>[] + +#### Source + +[aggregator/response.ts:4](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/response.ts#L4) + +*** + +### invalidOrderHashes + +> **invalidOrderHashes**?: `string`[] + +#### Source + +[aggregator/response.ts:5](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/response.ts#L5) + +*** + +### invalidOrderIds + +> **invalidOrderIds**?: `string`[] + +#### Source + +[aggregator/response.ts:6](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/response.ts#L6) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/AggregatorApiStatusResponse.md b/docs/type/interfaces/AggregatorApiStatusResponse.md new file mode 100644 index 0000000..5b801c4 --- /dev/null +++ b/docs/type/interfaces/AggregatorApiStatusResponse.md @@ -0,0 +1,53 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > AggregatorApiStatusResponse + +# Interface: AggregatorApiStatusResponse`` + +## Contents + +- [Type parameters](AggregatorApiStatusResponse.md#type-parameters) +- [Properties](AggregatorApiStatusResponse.md#properties) + - [code](AggregatorApiStatusResponse.md#code) + - [data](AggregatorApiStatusResponse.md#data) + - [msg](AggregatorApiStatusResponse.md#msg) + +## Type parameters + +▪ **T** + +## Properties + +### code + +> **code**: `"SUCCESS"` \| `"SYSTEM_ERROR"` + +#### Source + +[aggregator/response.ts:17](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/response.ts#L17) + +*** + +### data + +> **data**: `T` + +#### Source + +[aggregator/response.ts:19](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/response.ts#L19) + +*** + +### msg + +> **msg**: `string` + +#### Source + +[aggregator/response.ts:18](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/response.ts#L18) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/AggregatorInterface.md b/docs/type/interfaces/AggregatorInterface.md new file mode 100644 index 0000000..4909d22 --- /dev/null +++ b/docs/type/interfaces/AggregatorInterface.md @@ -0,0 +1,135 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > AggregatorInterface + +# Interface: AggregatorInterface + +## Contents + +- [Methods](AggregatorInterface.md#methods) + - [cancelOrders()](AggregatorInterface.md#cancelorders) + - [createListings()](AggregatorInterface.md#createlistings) + - [createOffers()](AggregatorInterface.md#createoffers) + - [fulfillListings()](AggregatorInterface.md#fulfilllistings) + - [fulfillOffers()](AggregatorInterface.md#fulfilloffers) + +## Methods + +### cancelOrders() + +> **cancelOrders**(`params`): `Promise`\<[`AggregatorResponse`](AggregatorResponse.md)\> + +Get the actions you need to execute to cancel orders +- details: [https://docs.nftgo.io/reference/post_trade-v1-nft-cancel-orders](https://docs.nftgo.io/reference/post_trade-v1-nft-cancel-orders) + +#### Parameters + +▪ **params**: [`CancelOrdersReq`](CancelOrdersReq.md) + +[CancelOrdersReq](CancelOrdersReq.md) + +#### Returns + +Promise<[AggregatorResponse](AggregatorResponse.md)> + +#### Source + +[aggregator/aggregator.ts:29](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/aggregator.ts#L29) + +*** + +### createListings() + +> **createListings**(`params`): `Promise`\<[`AggregatorResponse`](AggregatorResponse.md)\> + +Get the actions you need to execute to create listings +- details: [https://docs.nftgo.io/reference/post_trade-v1-nft-create-listings](https://docs.nftgo.io/reference/post_trade-v1-nft-create-listings) + +#### Parameters + +▪ **params**: [`CreateListingsReq`](CreateListingsReq.md) + +[CreateListingsReq](CreateListingsReq.md) + +#### Returns + +Promise<[AggregatorResponse](AggregatorResponse.md)> + +#### Source + +[aggregator/aggregator.ts:37](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/aggregator.ts#L37) + +*** + +### createOffers() + +> **createOffers**(`params`): `Promise`\<[`AggregatorResponse`](AggregatorResponse.md)\> + +Get the actions you need to execute to create offers +- details: [https://docs.nftgo.io/reference/post_trade-v1-nft-create-offers](https://docs.nftgo.io/reference/post_trade-v1-nft-create-offers) + +#### Parameters + +▪ **params**: [`CreateOffersReq`](CreateOffersReq.md) + +[CreateOffersReq](CreateOffersReq.md) + +#### Returns + +Promise<[AggregatorResponse](AggregatorResponse.md)> + +#### Source + +[aggregator/aggregator.ts:13](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/aggregator.ts#L13) + +*** + +### fulfillListings() + +> **fulfillListings**(`params`): `Promise`\<[`AggregatorResponse`](AggregatorResponse.md)\> + +Get the actions you need to execute to fulfill listings +- details: [https://docs.nftgo.io/reference/post_trade-v1-nft-fulfill-listings](https://docs.nftgo.io/reference/post_trade-v1-nft-fulfill-listings) + +#### Parameters + +▪ **params**: [`FulfillListingsReq`](FulfillListingsReq.md) + +[FulfillListingsReq](FulfillListingsReq.md) + +#### Returns + +Promise<[AggregatorResponse](AggregatorResponse.md)> + +#### Source + +[aggregator/aggregator.ts:45](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/aggregator.ts#L45) + +*** + +### fulfillOffers() + +> **fulfillOffers**(`params`): `Promise`\<[`AggregatorResponse`](AggregatorResponse.md)\> + +Get the actions you need to execute to fulfill offers +- details: [https://docs.nftgo.io/reference/post_trade-v1-nft-fulfill-offers](https://docs.nftgo.io/reference/post_trade-v1-nft-fulfill-offers) + +#### Parameters + +▪ **params**: [`FulfillOffersReq`](FulfillOffersReq.md) + +[FulfillOffersReq](FulfillOffersReq.md) + +#### Returns + +Promise<[AggregatorResponse](AggregatorResponse.md)> + +#### Source + +[aggregator/aggregator.ts:21](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/aggregator.ts#L21) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/AggregatorResponse.md b/docs/type/interfaces/AggregatorResponse.md new file mode 100644 index 0000000..513741e --- /dev/null +++ b/docs/type/interfaces/AggregatorResponse.md @@ -0,0 +1,67 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > AggregatorResponse + +# Interface: AggregatorResponse + +## Contents + +- [Properties](AggregatorResponse.md#properties) + - [actions](AggregatorResponse.md#actions) + - [executeActions](AggregatorResponse.md#executeactions) + - [invalidOrderHashes](AggregatorResponse.md#invalidorderhashes) + - [invalidOrderIds](AggregatorResponse.md#invalidorderids) + +## Properties + +### actions + +> **actions**: [`AggregatorAction`](../type-aliases/AggregatorAction.md)\<[`ActionKind`](../enumerations/ActionKind.md)\>[] + +#### Source + +[aggregator/response.ts:10](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/response.ts#L10) + +*** + +### executeActions + +> **executeActions**: (`options`?) => `Promise`\<`void`\> + +Execute tasks step by step + +#### Parameters + +▪ **options?**: [`ExecuteOptions`](ExecuteOptions.md) + +[ExecuteOptions](ExecuteOptions.md) + +#### Source + +[aggregator/response.ts:13](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/response.ts#L13) + +*** + +### invalidOrderHashes + +> **invalidOrderHashes**?: `string`[] + +#### Source + +[aggregator/response.ts:11](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/response.ts#L11) + +*** + +### invalidOrderIds + +> **invalidOrderIds**?: `string`[] + +#### Source + +[aggregator/response.ts:12](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/response.ts#L12) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/Attribute.md b/docs/type/interfaces/Attribute.md new file mode 100644 index 0000000..5f1757f --- /dev/null +++ b/docs/type/interfaces/Attribute.md @@ -0,0 +1,48 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > Attribute + +# Interface: Attribute + +## Contents + +- [Properties](Attribute.md#properties) + - [collection](Attribute.md#collection) + - [key](Attribute.md#key) + - [value](Attribute.md#value) + +## Properties + +### collection + +> **collection**: `string` + +#### Source + +[post-order.ts:34](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/post-order.ts#L34) + +*** + +### key + +> **key**: `string` + +#### Source + +[post-order.ts:35](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/post-order.ts#L35) + +*** + +### value + +> **value**: `string` + +#### Source + +[post-order.ts:36](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/post-order.ts#L36) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/Authenticator.md b/docs/type/interfaces/Authenticator.md new file mode 100644 index 0000000..7a0573c --- /dev/null +++ b/docs/type/interfaces/Authenticator.md @@ -0,0 +1,37 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > Authenticator + +# Interface: Authenticator`` + +## Contents + +- [Type parameters](Authenticator.md#type-parameters) +- [Properties](Authenticator.md#properties) + - [authorize](Authenticator.md#authorize) + +## Type parameters + +▪ **P** = `unknown` + +▪ **R** = `unknown` + +## Properties + +### authorize + +> **authorize**: (`params`) => `Promise`\<`R`\> + +#### Parameters + +▪ **params**: `P` + +#### Source + +[authenticator/index.ts:2](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/authenticator/index.ts#L2) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/BlurAuthChallenge.md b/docs/type/interfaces/BlurAuthChallenge.md new file mode 100644 index 0000000..6df72fa --- /dev/null +++ b/docs/type/interfaces/BlurAuthChallenge.md @@ -0,0 +1,64 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > BlurAuthChallenge + +# Interface: BlurAuthChallenge + +## Contents + +- [Extended By](BlurAuthChallenge.md#extended-by) +- [Properties](BlurAuthChallenge.md#properties) + - [expiresOn](BlurAuthChallenge.md#expireson) + - [hmac](BlurAuthChallenge.md#hmac) + - [message](BlurAuthChallenge.md#message) + - [walletAddress](BlurAuthChallenge.md#walletaddress) + +## Extended By + +- [`BlurAuthLoginParams`](BlurAuthLoginParams.md) + +## Properties + +### expiresOn + +> **expiresOn**: `string` + +#### Source + +[authenticator/index.ts:11](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/authenticator/index.ts#L11) + +*** + +### hmac + +> **hmac**: `string` + +#### Source + +[authenticator/index.ts:12](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/authenticator/index.ts#L12) + +*** + +### message + +> **message**: `string` + +#### Source + +[authenticator/index.ts:13](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/authenticator/index.ts#L13) + +*** + +### walletAddress + +> **walletAddress**: `string` + +#### Source + +[authenticator/index.ts:14](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/authenticator/index.ts#L14) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/BlurAuthLoginParams.md b/docs/type/interfaces/BlurAuthLoginParams.md new file mode 100644 index 0000000..4f3e8b1 --- /dev/null +++ b/docs/type/interfaces/BlurAuthLoginParams.md @@ -0,0 +1,91 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > BlurAuthLoginParams + +# Interface: BlurAuthLoginParams + +## Contents + +- [Extends](BlurAuthLoginParams.md#extends) +- [Properties](BlurAuthLoginParams.md#properties) + - [expiresOn](BlurAuthLoginParams.md#expireson) + - [hmac](BlurAuthLoginParams.md#hmac) + - [message](BlurAuthLoginParams.md#message) + - [signature](BlurAuthLoginParams.md#signature) + - [walletAddress](BlurAuthLoginParams.md#walletaddress) + +## Extends + +- [`BlurAuthChallenge`](BlurAuthChallenge.md) + +## Properties + +### expiresOn + +> **expiresOn**: `string` + +#### Inherited from + +[`BlurAuthChallenge`](BlurAuthChallenge.md).[`expiresOn`](BlurAuthChallenge.md#expireson) + +#### Source + +[authenticator/index.ts:11](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/authenticator/index.ts#L11) + +*** + +### hmac + +> **hmac**: `string` + +#### Inherited from + +[`BlurAuthChallenge`](BlurAuthChallenge.md).[`hmac`](BlurAuthChallenge.md#hmac) + +#### Source + +[authenticator/index.ts:12](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/authenticator/index.ts#L12) + +*** + +### message + +> **message**: `string` + +#### Inherited from + +[`BlurAuthChallenge`](BlurAuthChallenge.md).[`message`](BlurAuthChallenge.md#message) + +#### Source + +[authenticator/index.ts:13](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/authenticator/index.ts#L13) + +*** + +### signature + +> **signature**: `string` + +#### Source + +[authenticator/index.ts:18](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/authenticator/index.ts#L18) + +*** + +### walletAddress + +> **walletAddress**: `string` + +#### Inherited from + +[`BlurAuthChallenge`](BlurAuthChallenge.md).[`walletAddress`](BlurAuthChallenge.md#walletaddress) + +#### Source + +[authenticator/index.ts:14](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/authenticator/index.ts#L14) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/CancelOrdersReq.md b/docs/type/interfaces/CancelOrdersReq.md new file mode 100644 index 0000000..fe2f1f8 --- /dev/null +++ b/docs/type/interfaces/CancelOrdersReq.md @@ -0,0 +1,64 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > CancelOrdersReq + +# Interface: CancelOrdersReq + +cancel orders request params + +## Contents + +- [Properties](CancelOrdersReq.md#properties) + - [callerAddress](CancelOrdersReq.md#calleraddress) + - [extraArgs](CancelOrdersReq.md#extraargs) + - [orders](CancelOrdersReq.md#orders) + +## Properties + +### callerAddress + +> **callerAddress**: `string` + +#### Source + +[aggregator/cancel.ts:7](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/cancel.ts#L7) + +*** + +### extraArgs + +> **extraArgs**?: `object` + +#### Type declaration + +##### blurAuth + +> **blurAuth**?: `string` + +##### sign + +> **sign**?: `string` + +##### signMessage + +> **signMessage**?: `string` + +#### Source + +[aggregator/cancel.ts:8](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/cancel.ts#L8) + +*** + +### orders + +> **orders**: [`Order`](Order.md) & `object`[] + +#### Source + +[aggregator/cancel.ts:13](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/cancel.ts#L13) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/Config.md b/docs/type/interfaces/Config.md new file mode 100644 index 0000000..c07787e --- /dev/null +++ b/docs/type/interfaces/Config.md @@ -0,0 +1,134 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > Config + +# Interface: Config + +SDK Config + +## Contents + +- [Properties](Config.md#properties) + - [agent](Config.md#agent) + - [apiKey](Config.md#apikey) + - [baseUrl](Config.md#baseurl) + - [chain](Config.md#chain) + - [looksRareApiKeyConfig](Config.md#looksrareapikeyconfig) + - [openSeaApiKeyConfig](Config.md#openseaapikeyconfig) + - [walletConfig](Config.md#walletconfig) + - [web3Provider](Config.md#web3provider) + - [x2y2ApiKeyConfig](Config.md#x2y2apikeyconfig) + +## Properties + +### agent + +> **agent**?: `Agent` + +Http proxy agent. + +#### Source + +[config.ts:53](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/config.ts#L53) + +*** + +### apiKey + +> **apiKey**?: `string` + +NFTGo Data api key. Get one form https://nftgo.io/developers + +#### Source + +[config.ts:29](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/config.ts#L29) + +*** + +### baseUrl + +> **baseUrl**: `string` + +Data api base url. Default as https://data-api.nftgo.io + +#### Source + +[config.ts:21](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/config.ts#L21) + +*** + +### chain + +> **chain**: [`EVMChain`](../enumerations/EVMChain.md) + +EVM chain. ETHEREUM as Default + +#### Source + +[config.ts:25](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/config.ts#L25) + +*** + +### looksRareApiKeyConfig + +> **looksRareApiKeyConfig**?: [`ApiKeyConfig`](../type-aliases/ApiKeyConfig.md) + +LooksRare api key. Used to post orders to LooksRare + +#### Source + +[config.ts:45](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/config.ts#L45) + +*** + +### openSeaApiKeyConfig + +> **openSeaApiKeyConfig**?: [`ApiKeyConfig`](../type-aliases/ApiKeyConfig.md) + +Opensea api key. Used to post orders to Opensea + +#### Source + +[config.ts:41](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/config.ts#L41) + +*** + +### walletConfig + +> **walletConfig**?: [`WalletConfig`](WalletConfig.md) + +Web3 wallet config. Ignore web3Provider if walletConfig has been set + +#### Source + +[config.ts:33](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/config.ts#L33) + +*** + +### web3Provider + +> **web3Provider**?: `provider` + +Web3 provider. Will be ignored if walletConfig has been set + +#### Source + +[config.ts:37](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/config.ts#L37) + +*** + +### x2y2ApiKeyConfig + +> **x2y2ApiKeyConfig**?: [`ApiKeyConfig`](../type-aliases/ApiKeyConfig.md) + +X2Y2 api key. Used to post orders to X2Y2 + +#### Source + +[config.ts:49](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/config.ts#L49) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/CreateListingInput.md b/docs/type/interfaces/CreateListingInput.md new file mode 100644 index 0000000..28202d4 --- /dev/null +++ b/docs/type/interfaces/CreateListingInput.md @@ -0,0 +1,179 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > CreateListingInput + +# Interface: CreateListingInput + +## Contents + +- [Properties](CreateListingInput.md#properties) + - [automatedRoyalties](CreateListingInput.md#automatedroyalties) + - [currency](CreateListingInput.md#currency) + - [expirationTime](CreateListingInput.md#expirationtime) + - [listingTime](CreateListingInput.md#listingtime) + - [marketplaceFeeBps](CreateListingInput.md#marketplacefeebps) + - [nonce](CreateListingInput.md#nonce) + - [orderKind](CreateListingInput.md#orderkind) + - [orderbook](CreateListingInput.md#orderbook) + - [quantity](CreateListingInput.md#quantity) + - [royaltyBps](CreateListingInput.md#royaltybps) + - [salt](CreateListingInput.md#salt) + - [token](CreateListingInput.md#token) + - [weiPrice](CreateListingInput.md#weiprice) + +## Properties + +### automatedRoyalties + +> **automatedRoyalties**?: `boolean` + +Only applies to seaport orders. If true, royalty amount and recipients will be set automatically. + +#### Source + +[aggregator/create.ts:35](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L35) + +*** + +### currency + +> **currency**?: `string` + +default to be ethereum + +#### Source + +[aggregator/create.ts:60](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L60) + +*** + +### expirationTime + +> **expirationTime**: `string` + +Unix timestamp (seconds) + +#### Source + +[aggregator/create.ts:54](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L54) + +*** + +### listingTime + +> **listingTime**: `string` + +Unix timestamp (seconds) + +#### Source + +[aggregator/create.ts:50](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L50) + +*** + +### marketplaceFeeBps + +> **marketplaceFeeBps**?: `number` + +For self-build marketplaces, include the marketplaceFeeBps within the order to collect marketplace fee. +Note that 1 Bps stands for 0.01%. For example, using 100 means your marketplace fee address will receive +1% of the order's total price. + +#### Source + +[aggregator/create.ts:46](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L46) + +*** + +### nonce + +> **nonce**?: `string` + +#### Source + +[aggregator/create.ts:55](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L55) + +*** + +### orderKind + +> **orderKind**: [`OrderKind`](../enumerations/OrderKind.md) + +order protocol + +#### Source + +[aggregator/create.ts:27](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L27) + +*** + +### orderbook + +> **orderbook**: [`Orderbook`](../enumerations/Orderbook.md) + +marketplace orderbook + +#### Source + +[aggregator/create.ts:31](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L31) + +*** + +### quantity + +> **quantity**?: `number` + +only applies to ERC1155 + +#### Source + +[aggregator/create.ts:22](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L22) + +*** + +### royaltyBps + +> **royaltyBps**?: `number` + +Only applies to seaport orders. Set a maximum amount of royalties to pay, rather than the full amount. +Only relevant when automatedRoyalties is true. 1 BPS = 0.01% Note: OpenSea does not support values below 50 bps. + +#### Source + +[aggregator/create.ts:40](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L40) + +*** + +### salt + +> **salt**?: `string` + +#### Source + +[aggregator/create.ts:56](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L56) + +*** + +### token + +> **token**: `string` + +#### Source + +[aggregator/create.ts:18](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L18) + +*** + +### weiPrice + +> **weiPrice**: `string` + +#### Source + +[aggregator/create.ts:23](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L23) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/CreateListingsReq.md b/docs/type/interfaces/CreateListingsReq.md new file mode 100644 index 0000000..46ff73c --- /dev/null +++ b/docs/type/interfaces/CreateListingsReq.md @@ -0,0 +1,58 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > CreateListingsReq + +# Interface: CreateListingsReq + +CreateListingV1RequestParam + +## Contents + +- [Properties](CreateListingsReq.md#properties) + - [extraArgs](CreateListingsReq.md#extraargs) + - [maker](CreateListingsReq.md#maker) + - [params](CreateListingsReq.md#params) + +## Properties + +### extraArgs + +> **extraArgs**?: `object` + +#### Type declaration + +##### blurAuth + +> **blurAuth**?: `string` + +#### Source + +[aggregator/create.ts:12](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L12) + +*** + +### maker + +> **maker**: `string` + +order maker address + +#### Source + +[aggregator/create.ts:10](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L10) + +*** + +### params + +> **params**: [`CreateListingInput`](CreateListingInput.md)[] + +#### Source + +[aggregator/create.ts:11](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L11) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/CreateOfferInput.md b/docs/type/interfaces/CreateOfferInput.md new file mode 100644 index 0000000..236b603 --- /dev/null +++ b/docs/type/interfaces/CreateOfferInput.md @@ -0,0 +1,252 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > CreateOfferInput + +# Interface: CreateOfferInput + +## Contents + +- [Properties](CreateOfferInput.md#properties) + - [attributeKey](CreateOfferInput.md#attributekey) + - [attributeValue](CreateOfferInput.md#attributevalue) + - [automatedRoyalties](CreateOfferInput.md#automatedroyalties) + - [collection](CreateOfferInput.md#collection) + - [currency](CreateOfferInput.md#currency) + - [excludeFlaggedTokens](CreateOfferInput.md#excludeflaggedtokens) + - [expirationTime](CreateOfferInput.md#expirationtime) + - [listingTime](CreateOfferInput.md#listingtime) + - [marketplaceFeeBps](CreateOfferInput.md#marketplacefeebps) + - [nonce](CreateOfferInput.md#nonce) + - [orderKind](CreateOfferInput.md#orderkind) + - [orderbook](CreateOfferInput.md#orderbook) + - [orderbookApiKey](CreateOfferInput.md#orderbookapikey) + - [quantity](CreateOfferInput.md#quantity) + - [royaltyBps](CreateOfferInput.md#royaltybps) + - [salt](CreateOfferInput.md#salt) + - [token](CreateOfferInput.md#token) + - [weiPrice](CreateOfferInput.md#weiprice) + +## Properties + +### attributeKey + +> **attributeKey**?: `string` + +Bid on a particular attribute key. This is case sensitive. Example: `Composition` + +#### Source + +[aggregator/create.ts:89](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L89) + +*** + +### attributeValue + +> **attributeValue**?: `string` + +Bid on a particular attribute value. This is case sensitive. Example: `Teddy (#33)` + +#### Source + +[aggregator/create.ts:93](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L93) + +*** + +### automatedRoyalties + +> **automatedRoyalties**?: `boolean` + +If true, royalty amounts and recipients will be set automatically. + +#### Source + +[aggregator/create.ts:114](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L114) + +*** + +### collection + +> **collection**?: `string` + +Bid on a particular collection with collection-contract. Example: +`0x8d04a8c79ceb0889bdd12acdf3fa9d207ed3ff63 + +#### Source + +[aggregator/create.ts:85](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L85) + +*** + +### currency + +> **currency**?: `string` + +ERC20 token address that the offer is providing with. Default to be WETH + +#### Source + +[aggregator/create.ts:150](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L150) + +*** + +### excludeFlaggedTokens + +> **excludeFlaggedTokens**?: `boolean` + +If true flagged tokens will be excluded + +#### Source + +[aggregator/create.ts:130](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L130) + +*** + +### expirationTime + +> **expirationTime**?: `string` + +Unix timestamp (seconds) indicating when listing will expire. Example: `1656080318` + +#### Source + +[aggregator/create.ts:138](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L138) + +*** + +### listingTime + +> **listingTime**?: `string` + +Unix timestamp (seconds) indicating when listing will be listed. Example: `1656080318` + +#### Source + +[aggregator/create.ts:134](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L134) + +*** + +### marketplaceFeeBps + +> **marketplaceFeeBps**?: `number` + +For self-build marketplaces, include the marketplaceFeeBps within the order to collect marketplace fee. +Note that 1 Bps stands for 0.01%. For example, using 100 means your marketplace fee address will receive +1% of the order's total price. + +#### Source + +[aggregator/create.ts:126](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L126) + +*** + +### nonce + +> **nonce**?: `string` + +Optional. Set a custom nonce + +#### Source + +[aggregator/create.ts:142](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L142) + +*** + +### orderKind + +> **orderKind**: [`OrderKind`](../enumerations/OrderKind.md) + +Exchange protocol used to create order. Example: `seaport-v1.5` + +#### Source + +[aggregator/create.ts:105](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L105) + +*** + +### orderbook + +> **orderbook**: [`Orderbook`](../enumerations/Orderbook.md) + +Orderbook where order is placed. Example: `Reservoir` + +#### Source + +[aggregator/create.ts:109](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L109) + +*** + +### orderbookApiKey + +> **orderbookApiKey**?: `string` + +#### Source + +[aggregator/create.ts:110](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L110) + +*** + +### quantity + +> **quantity**?: `number` + +Quantity of tokens user is buying. Only compatible with ERC1155 tokens. Example: `5` + +#### Source + +[aggregator/create.ts:97](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L97) + +*** + +### royaltyBps + +> **royaltyBps**?: `number` + +Set a maximum amount of royalties to pay, rather than the full amount. Only relevant when +using automated royalties. 1 BPS = 0.01% Note: OpenSea does not support values below 50 +bps. + +#### Source + +[aggregator/create.ts:120](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L120) + +*** + +### salt + +> **salt**?: `string` + +Optional. Random string to make the order unique + +#### Source + +[aggregator/create.ts:146](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L146) + +*** + +### token + +> **token**?: `string` + +Bid on a particular token. Example: `0x8d04a8c79ceb0889bdd12acdf3fa9d207ed3ff63:123 + +#### Source + +[aggregator/create.ts:80](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L80) + +*** + +### weiPrice + +> **weiPrice**: `string` + +Amount bidder is willing to offer in wei. Example: `1000000000000000000` + +#### Source + +[aggregator/create.ts:101](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L101) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/CreateOffersReq.md b/docs/type/interfaces/CreateOffersReq.md new file mode 100644 index 0000000..1c01fdb --- /dev/null +++ b/docs/type/interfaces/CreateOffersReq.md @@ -0,0 +1,56 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > CreateOffersReq + +# Interface: CreateOffersReq + +create offers + +## Contents + +- [Properties](CreateOffersReq.md#properties) + - [extraArgs](CreateOffersReq.md#extraargs) + - [maker](CreateOffersReq.md#maker) + - [params](CreateOffersReq.md#params) + +## Properties + +### extraArgs + +> **extraArgs**?: `object` + +#### Type declaration + +##### blurAuth + +> **blurAuth**?: `string` + +#### Source + +[aggregator/create.ts:71](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L71) + +*** + +### maker + +> **maker**: `string` + +#### Source + +[aggregator/create.ts:69](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L69) + +*** + +### params + +> **params**: [`CreateOfferInput`](CreateOfferInput.md)[] + +#### Source + +[aggregator/create.ts:70](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/create.ts#L70) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/DecodeLogRes.md b/docs/type/interfaces/DecodeLogRes.md new file mode 100644 index 0000000..795d3a2 --- /dev/null +++ b/docs/type/interfaces/DecodeLogRes.md @@ -0,0 +1,70 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > DecodeLogRes + +# Interface: DecodeLogRes + +## Contents + +- [Properties](DecodeLogRes.md#properties) + - [amount](DecodeLogRes.md#amount) + - [contract](DecodeLogRes.md#contract) + - [is1155](DecodeLogRes.md#is1155) + - [to](DecodeLogRes.md#to) + - [tokenId](DecodeLogRes.md#tokenid) + +## Properties + +### amount + +> **amount**?: `number` + +#### Source + +[utils.ts:61](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L61) + +*** + +### contract + +> **contract**?: `string` + +#### Source + +[utils.ts:59](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L59) + +*** + +### is1155 + +> **is1155**?: `boolean` + +#### Source + +[utils.ts:62](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L62) + +*** + +### to + +> **to**?: `string` + +#### Source + +[utils.ts:63](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L63) + +*** + +### tokenId + +> **tokenId**?: `string` + +#### Source + +[utils.ts:60](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L60) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/ExecuteOptions.md b/docs/type/interfaces/ExecuteOptions.md new file mode 100644 index 0000000..27c3e18 --- /dev/null +++ b/docs/type/interfaces/ExecuteOptions.md @@ -0,0 +1,28 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > ExecuteOptions + +# Interface: ExecuteOptions + +## Contents + +- [Properties](ExecuteOptions.md#properties) + - [onTaskExecuted](ExecuteOptions.md#ontaskexecuted) + +## Properties + +### onTaskExecuted + +> **onTaskExecuted**: [`TaskExecutedHandle`](../type-aliases/TaskExecutedHandle.md) + +Callback after every task executed + +#### Source + +[action/executor.ts:19](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/executor.ts#L19) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/FulfillListingsReq.md b/docs/type/interfaces/FulfillListingsReq.md new file mode 100644 index 0000000..89e1a6a --- /dev/null +++ b/docs/type/interfaces/FulfillListingsReq.md @@ -0,0 +1,89 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > FulfillListingsReq + +# Interface: FulfillListingsReq + +AggregateAcceptListingRequest + +## Contents + +- [Properties](FulfillListingsReq.md#properties) + - [buyer](FulfillListingsReq.md#buyer) + - [extraArgs](FulfillListingsReq.md#extraargs) + - [noDirect](FulfillListingsReq.md#nodirect) + - [orderHashes](FulfillListingsReq.md#orderhashes) + - [orderIds](FulfillListingsReq.md#orderids) + - [safeMode](FulfillListingsReq.md#safemode) + +## Properties + +### buyer + +> **buyer**: `string` + +#### Source + +[aggregator/fulfill.ts:5](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/fulfill.ts#L5) + +*** + +### extraArgs + +> **extraArgs**?: `object` + +#### Type declaration + +##### blurAuth + +> **blurAuth**?: `string` + +#### Source + +[aggregator/fulfill.ts:10](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/fulfill.ts#L10) + +*** + +### noDirect + +> **noDirect**?: `boolean` + +#### Source + +[aggregator/fulfill.ts:6](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/fulfill.ts#L6) + +*** + +### orderHashes + +> **orderHashes**?: `string`[] + +#### Source + +[aggregator/fulfill.ts:8](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/fulfill.ts#L8) + +*** + +### orderIds + +> **orderIds**?: `string`[] + +#### Source + +[aggregator/fulfill.ts:7](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/fulfill.ts#L7) + +*** + +### safeMode + +> **safeMode**: `boolean` + +#### Source + +[aggregator/fulfill.ts:9](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/fulfill.ts#L9) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/FulfillOffersReq.md b/docs/type/interfaces/FulfillOffersReq.md new file mode 100644 index 0000000..fd4ede4 --- /dev/null +++ b/docs/type/interfaces/FulfillOffersReq.md @@ -0,0 +1,56 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > FulfillOffersReq + +# Interface: FulfillOffersReq + +fulfill offers + +## Contents + +- [Properties](FulfillOffersReq.md#properties) + - [extraArgs](FulfillOffersReq.md#extraargs) + - [offerFulfillmentIntentions](FulfillOffersReq.md#offerfulfillmentintentions) + - [sellerAddress](FulfillOffersReq.md#selleraddress) + +## Properties + +### extraArgs + +> **extraArgs**?: `object` + +#### Type declaration + +##### blurAuth + +> **blurAuth**?: `string` + +#### Source + +[aggregator/fulfill.ts:21](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/fulfill.ts#L21) + +*** + +### offerFulfillmentIntentions + +> **offerFulfillmentIntentions**: [`OfferFulfillmentIntention`](OfferFulfillmentIntention.md)[] + +#### Source + +[aggregator/fulfill.ts:19](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/fulfill.ts#L19) + +*** + +### sellerAddress + +> **sellerAddress**: `string` + +#### Source + +[aggregator/fulfill.ts:20](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/fulfill.ts#L20) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/GetOrdersByContractReq.md b/docs/type/interfaces/GetOrdersByContractReq.md new file mode 100644 index 0000000..f3b8c5c --- /dev/null +++ b/docs/type/interfaces/GetOrdersByContractReq.md @@ -0,0 +1,70 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > GetOrdersByContractReq + +# Interface: GetOrdersByContractReq + +## Contents + +- [Properties](GetOrdersByContractReq.md#properties) + - [contractAddress](GetOrdersByContractReq.md#contractaddress) + - [includePrivate](GetOrdersByContractReq.md#includeprivate) + - [limit](GetOrdersByContractReq.md#limit) + - [offset](GetOrdersByContractReq.md#offset) + - [orderType](GetOrdersByContractReq.md#ordertype) + +## Properties + +### contractAddress + +> **contractAddress**: `string` + +#### Source + +[order-fetcher.ts:256](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L256) + +*** + +### includePrivate + +> **includePrivate**?: `boolean` + +#### Source + +[order-fetcher.ts:257](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L257) + +*** + +### limit + +> **limit**?: `number` + +#### Source + +[order-fetcher.ts:258](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L258) + +*** + +### offset + +> **offset**?: `number` + +#### Source + +[order-fetcher.ts:259](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L259) + +*** + +### orderType + +> **orderType**: [`OrderType`](../enumerations/OrderType.md) + +#### Source + +[order-fetcher.ts:260](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L260) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/GetOrdersByIdsReq.md b/docs/type/interfaces/GetOrdersByIdsReq.md new file mode 100644 index 0000000..15d1e65 --- /dev/null +++ b/docs/type/interfaces/GetOrdersByIdsReq.md @@ -0,0 +1,26 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > GetOrdersByIdsReq + +# Interface: GetOrdersByIdsReq + +## Contents + +- [Properties](GetOrdersByIdsReq.md#properties) + - [orders](GetOrdersByIdsReq.md#orders) + +## Properties + +### orders + +> **orders**: [`Order`](Order.md)[] + +#### Source + +[order-fetcher.ts:264](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L264) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/GetOrdersByMakerReq.md b/docs/type/interfaces/GetOrdersByMakerReq.md new file mode 100644 index 0000000..e635788 --- /dev/null +++ b/docs/type/interfaces/GetOrdersByMakerReq.md @@ -0,0 +1,48 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > GetOrdersByMakerReq + +# Interface: GetOrdersByMakerReq + +## Contents + +- [Properties](GetOrdersByMakerReq.md#properties) + - [includePrivate](GetOrdersByMakerReq.md#includeprivate) + - [maker](GetOrdersByMakerReq.md#maker) + - [orderType](GetOrdersByMakerReq.md#ordertype) + +## Properties + +### includePrivate + +> **includePrivate**?: `boolean` + +#### Source + +[order-fetcher.ts:267](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L267) + +*** + +### maker + +> **maker**: `string` + +#### Source + +[order-fetcher.ts:268](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L268) + +*** + +### orderType + +> **orderType**: [`OrderType`](../enumerations/OrderType.md) + +#### Source + +[order-fetcher.ts:269](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L269) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/GetOrdersByNftsReq.md b/docs/type/interfaces/GetOrdersByNftsReq.md new file mode 100644 index 0000000..fe44ab3 --- /dev/null +++ b/docs/type/interfaces/GetOrdersByNftsReq.md @@ -0,0 +1,81 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > GetOrdersByNftsReq + +# Interface: GetOrdersByNftsReq + +## Contents + +- [Properties](GetOrdersByNftsReq.md#properties) + - [contractAddress](GetOrdersByNftsReq.md#contractaddress) + - [includePrivate](GetOrdersByNftsReq.md#includeprivate) + - [limit](GetOrdersByNftsReq.md#limit) + - [offset](GetOrdersByNftsReq.md#offset) + - [orderType](GetOrdersByNftsReq.md#ordertype) + - [tokenId](GetOrdersByNftsReq.md#tokenid) + +## Properties + +### contractAddress + +> **contractAddress**: `string` + +#### Source + +[order-fetcher.ts:272](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L272) + +*** + +### includePrivate + +> **includePrivate**?: `boolean` + +#### Source + +[order-fetcher.ts:273](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L273) + +*** + +### limit + +> **limit**?: `number` + +#### Source + +[order-fetcher.ts:274](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L274) + +*** + +### offset + +> **offset**?: `number` + +#### Source + +[order-fetcher.ts:275](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L275) + +*** + +### orderType + +> **orderType**: [`OrderType`](../enumerations/OrderType.md) + +#### Source + +[order-fetcher.ts:276](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L276) + +*** + +### tokenId + +> **tokenId**: `string` + +#### Source + +[order-fetcher.ts:277](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L277) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/GoTrading.md b/docs/type/interfaces/GoTrading.md new file mode 100644 index 0000000..696ea8a --- /dev/null +++ b/docs/type/interfaces/GoTrading.md @@ -0,0 +1,59 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > GoTrading + +# Interface: GoTrading + +## Contents + +- [Properties](GoTrading.md#properties) + - [aggregator](GoTrading.md#aggregator) + - [config](GoTrading.md#config) + - [orderFetcher](GoTrading.md#orderfetcher) + - [utils](GoTrading.md#utils) + +## Properties + +### aggregator + +> **aggregator**: [`AggregatorInterface`](AggregatorInterface.md) + +#### Source + +[go-trading.ts:9](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/go-trading.ts#L9) + +*** + +### config + +> **config**: [`Config`](Config.md) + +#### Source + +[go-trading.ts:10](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/go-trading.ts#L10) + +*** + +### orderFetcher + +> **orderFetcher**: [`OrderFetcherInterface`](OrderFetcherInterface.md) + +#### Source + +[go-trading.ts:7](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/go-trading.ts#L7) + +*** + +### utils + +> **utils**: [`Utils`](Utils.md) + +#### Source + +[go-trading.ts:8](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/go-trading.ts#L8) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/HTTPClient.md b/docs/type/interfaces/HTTPClient.md new file mode 100644 index 0000000..9baa055 --- /dev/null +++ b/docs/type/interfaces/HTTPClient.md @@ -0,0 +1,67 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > HTTPClient + +# Interface: HTTPClient + +## Contents + +- [Methods](HTTPClient.md#methods) + - [get()](HTTPClient.md#get) + - [post()](HTTPClient.md#post) + +## Methods + +### get() + +> **get**\<`R`, `Q`\>(`url`, `query`, `headers`?): `Promise`\<`R`\> + +#### Type parameters + +▪ **R** + +▪ **Q** = `undefined` + +#### Parameters + +▪ **url**: `string` + +▪ **query**: `undefined` \| `Q` + +▪ **headers?**: `Record`\<`string`, `string`\> + +#### Source + +[http.ts:2](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/http.ts#L2) + +*** + +### post() + +> **post**\<`R`, `P`\>(`url`, `data`, `headers`?, `needOriginResponse`?): `Promise`\<`R`\> + +#### Type parameters + +▪ **R** + +▪ **P** = `undefined` + +#### Parameters + +▪ **url**: `string` + +▪ **data**: `P` + +▪ **headers?**: `Record`\<`string`, `string`\> + +▪ **needOriginResponse?**: `boolean` + +#### Source + +[http.ts:3](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/http.ts#L3) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/InspectTransactionParams.md b/docs/type/interfaces/InspectTransactionParams.md new file mode 100644 index 0000000..5152e79 --- /dev/null +++ b/docs/type/interfaces/InspectTransactionParams.md @@ -0,0 +1,37 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > InspectTransactionParams + +# Interface: InspectTransactionParams + +## Contents + +- [Properties](InspectTransactionParams.md#properties) + - [hash](InspectTransactionParams.md#hash) + - [interval](InspectTransactionParams.md#interval) + +## Properties + +### hash + +> **hash**: `string` + +#### Source + +[utils.ts:89](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L89) + +*** + +### interval + +> **interval**?: `number` + +#### Source + +[utils.ts:90](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L90) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/InternalUtils.md b/docs/type/interfaces/InternalUtils.md new file mode 100644 index 0000000..8a00db2 --- /dev/null +++ b/docs/type/interfaces/InternalUtils.md @@ -0,0 +1,201 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > InternalUtils + +# Interface: InternalUtils + +## Contents + +- [Extended By](InternalUtils.md#extended-by) +- [Properties](InternalUtils.md#properties) + - [blurAuthenticator](InternalUtils.md#blurauthenticator) + - [createActionExecutor](InternalUtils.md#createactionexecutor) + - [getSigner](InternalUtils.md#getsigner) + - [processor](InternalUtils.md#processor) + - [signMessage](InternalUtils.md#signmessage) + - [x2y2Authenticator](InternalUtils.md#x2y2authenticator) +- [Methods](InternalUtils.md#methods) + - [decodeLog()](InternalUtils.md#decodelog) + - [inspectTransaction()](InternalUtils.md#inspecttransaction) + - [sendSafeModeTransaction()](InternalUtils.md#sendsafemodetransaction) + - [sendTransaction()](InternalUtils.md#sendtransaction) + +## Extended By + +- [`Utils`](Utils.md) + +## Properties + +### blurAuthenticator + +> **blurAuthenticator**?: [`BlurAuthenticator`](../type-aliases/BlurAuthenticator.md) + +#### Source + +[utils.ts:9](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L9) + +*** + +### createActionExecutor + +> **createActionExecutor**?: (`actions`) => [`ActionTaskExecutor`](ActionTaskExecutor.md) + +#### Parameters + +▪ **actions**: `never`[] + +#### Source + +[utils.ts:12](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L12) + +*** + +### getSigner + +> **getSigner**: () => `Wallet` \| `JsonRpcSigner` + +Get ehters signer + +#### Returns + +ethers.providers.JsonRpcSigner | ethers.Wallet + +#### Source + +[utils.ts:50](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L50) + +*** + +### processor + +> **processor**?: [`ActionProcessor`](ActionProcessor.md) + +#### Source + +[utils.ts:19](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L19) + +*** + +### signMessage + +> **signMessage**: (`message`) => `Promise`\<`undefined` \| `string`\> + +Standard sign message + +#### Parameters + +▪ **message**: `string` + +string + +#### Returns + +Promise + +#### Source + +[utils.ts:44](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L44) + +*** + +### x2y2Authenticator + +> **x2y2Authenticator**?: [`X2Y2Authenticator`](../type-aliases/X2Y2Authenticator.md) + +#### Source + +[utils.ts:10](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L10) + +## Methods + +### decodeLog() + +> **decodeLog**(`log`): `null` \| [`DecodeLogRes`](DecodeLogRes.md) + +Decode transaction log, return contract, token id, trading amount, buyer + +#### Parameters + +▪ **log**: `Log` + +[Log]([object Object]) single log returned by send transaction method + +#### Returns + +res [DecodeLogRes](DecodeLogRes.md) + +#### Source + +[utils.ts:18](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L18) + +*** + +### inspectTransaction() + +> **inspectTransaction**(`params`): [`Transaction`](Transaction.md) + +Inspect a transaction + +#### Parameters + +▪ **params**: [`InspectTransactionParams`](InspectTransactionParams.md) + +[InspectTransactionParams](InspectTransactionParams.md) transaction hash, inspect interval + +#### Returns + +transaction [Transaction](Transaction.md) + +#### Source + +[utils.ts:37](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L37) + +*** + +### sendSafeModeTransaction() + +> **sendSafeModeTransaction**(`transactionConfig`): [`Transaction`](Transaction.md) + +Send transaction with safe mode, using flash bot + +#### Parameters + +▪ **transactionConfig**: `Partial`\<`Transaction`\> + +[https://docs.ethers.io/v5/api/providers/types/#providers-TransactionRequest](https://docs.ethers.io/v5/api/providers/types/#providers-TransactionRequest) transaction config + +#### Returns + +transaction [Transaction](Transaction.md) + +#### Source + +[utils.ts:25](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L25) + +*** + +### sendTransaction() + +> **sendTransaction**(`transactionConfig`): [`Transaction`](Transaction.md) + +Send transaction + +#### Parameters + +▪ **transactionConfig**: `TransactionConfig` + +[https://web3js.readthedocs.io/en/v1.8.2/web3-eth.html#sendtransaction](https://web3js.readthedocs.io/en/v1.8.2/web3-eth.html#sendtransaction) transaction config + +#### Returns + +transaction [Transaction](Transaction.md) + +#### Source + +[utils.ts:31](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L31) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/ListingOrderDTO.md b/docs/type/interfaces/ListingOrderDTO.md new file mode 100644 index 0000000..0eca24c --- /dev/null +++ b/docs/type/interfaces/ListingOrderDTO.md @@ -0,0 +1,237 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > ListingOrderDTO + +# Interface: ListingOrderDTO + +ListingOrderDTO + +## Contents + +- [Properties](ListingOrderDTO.md#properties) + - [contractAddress](ListingOrderDTO.md#contractaddress) + - [expiration](ListingOrderDTO.md#expiration) + - [isPrivate](ListingOrderDTO.md#isprivate) + - [maker](ListingOrderDTO.md#maker) + - [marketId](ListingOrderDTO.md#marketid) + - [orderCreateTime](ListingOrderDTO.md#ordercreatetime) + - [orderExpirationTime](ListingOrderDTO.md#orderexpirationtime) + - [orderGeneratedTime](ListingOrderDTO.md#ordergeneratedtime) + - [orderHash](ListingOrderDTO.md#orderhash) + - [orderId](ListingOrderDTO.md#orderid) + - [price](ListingOrderDTO.md#price) + - [quantityFilled](ListingOrderDTO.md#quantityfilled) + - [quantityRemaining](ListingOrderDTO.md#quantityremaining) + - [status](ListingOrderDTO.md#status) + - [taker](ListingOrderDTO.md#taker) + - [tokenId](ListingOrderDTO.md#tokenid) + - [totalQuantity](ListingOrderDTO.md#totalquantity) + +## Properties + +### contractAddress + +> **contractAddress**: `string` + +Listing associated NFT contract address + +#### Source + +[order-fetcher.ts:116](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L116) + +*** + +### expiration + +> **expiration**: `number` + +Time that order will expire + +#### Source + +[order-fetcher.ts:120](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L120) + +*** + +### isPrivate + +> **isPrivate**: `boolean` + +False means order can be fulfilled by anyone + +#### Source + +[order-fetcher.ts:124](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L124) + +*** + +### maker + +> **maker**: `string` + +Listing's maker address + +#### Source + +[order-fetcher.ts:128](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L128) + +*** + +### marketId + +> **marketId**: [`MarketId`](../enumerations/MarketId.md) + +The marketplace uniqueId that order belongs to +[MarketId](../enumerations/MarketId.md) + +#### Source + +[order-fetcher.ts:133](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L133) + +*** + +### orderCreateTime + +> **orderCreateTime**?: `number` + +Time that order is crreated + +#### Source + +[order-fetcher.ts:137](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L137) + +*** + +### orderExpirationTime + +> **orderExpirationTime**?: `number` + +Time that order will expire + +#### Source + +[order-fetcher.ts:141](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L141) + +*** + +### orderGeneratedTime + +> **orderGeneratedTime**: `number` + +#### Source + +[order-fetcher.ts:142](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L142) + +*** + +### orderHash + +> **orderHash**: `string` + +Unique order hash. Provided and used by NFTGo + +#### Source + +[order-fetcher.ts:150](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L150) + +*** + +### orderId + +> **orderId**: `string` + +Unique order id. Shared between marketplaces + +#### Source + +[order-fetcher.ts:146](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L146) + +*** + +### price + +> **price**: [`TokenPrice`](TokenPrice.md) + +Order price +[TokenPrice](TokenPrice.md) + +#### Source + +[order-fetcher.ts:155](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L155) + +*** + +### quantityFilled + +> **quantityFilled**: `number` + +#### Source + +[order-fetcher.ts:156](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L156) + +*** + +### quantityRemaining + +> **quantityRemaining**: `number` + +Number of tokens remaining for this listing + +#### Source + +[order-fetcher.ts:160](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L160) + +*** + +### status + +> **status**: [`OrderStatus`](../enumerations/OrderStatus.md) + +Order's status +[OrderStatus](../enumerations/OrderStatus.md) + +#### Source + +[order-fetcher.ts:165](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L165) + +*** + +### taker + +> **taker**: `string` + +Listing's taker address, generally points to zero address implies any address can fulfill the listing + +#### Source + +[order-fetcher.ts:169](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L169) + +*** + +### tokenId + +> **tokenId**: `string` + +Listing associated NFT token ID + +#### Source + +[order-fetcher.ts:173](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L173) + +*** + +### totalQuantity + +> **totalQuantity**: `number` + +Number of tokens when listing was created + +#### Source + +[order-fetcher.ts:177](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L177) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/OfferDTO.md b/docs/type/interfaces/OfferDTO.md new file mode 100644 index 0000000..b4afb29 --- /dev/null +++ b/docs/type/interfaces/OfferDTO.md @@ -0,0 +1,240 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > OfferDTO + +# Interface: OfferDTO + +OfferDTO + +## Contents + +- [Properties](OfferDTO.md#properties) + - [contractAddress](OfferDTO.md#contractaddress) + - [criteria](OfferDTO.md#criteria) + - [isPrivate](OfferDTO.md#isprivate) + - [kind](OfferDTO.md#kind) + - [maker](OfferDTO.md#maker) + - [marketId](OfferDTO.md#marketid) + - [orderCreateTime](OfferDTO.md#ordercreatetime) + - [orderExpirationTime](OfferDTO.md#orderexpirationtime) + - [orderHash](OfferDTO.md#orderhash) + - [orderId](OfferDTO.md#orderid) + - [price](OfferDTO.md#price) + - [quantityRemaining](OfferDTO.md#quantityremaining) + - [rawData](OfferDTO.md#rawdata) + - [status](OfferDTO.md#status) + - [taker](OfferDTO.md#taker) + - [tokenId](OfferDTO.md#tokenid) + - [totalQuantity](OfferDTO.md#totalquantity) + +## Properties + +### contractAddress + +> **contractAddress**: `string` + +Offer associated NFT contract address + +#### Source + +[order-fetcher.ts:187](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L187) + +*** + +### criteria + +> **criteria**: `string` + +Describes the offer kind, this can be token, contract or trait offer. + +#### Source + +[order-fetcher.ts:191](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L191) + +*** + +### isPrivate + +> **isPrivate**: `boolean` + +False means order can be fulfilled by anyone + +#### Source + +[order-fetcher.ts:195](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L195) + +*** + +### kind + +> **kind**: [`OrderKind`](../enumerations/OrderKind.md) + +Offer's marketplace protocol +[OrderKind](../enumerations/OrderKind.md) + +#### Source + +[order-fetcher.ts:200](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L200) + +*** + +### maker + +> **maker**: `string` + +Offer's maker address + +#### Source + +[order-fetcher.ts:204](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L204) + +*** + +### marketId + +> **marketId**: `string` + +The marketplace uniqueId that order belongs to +[MarketId](../enumerations/MarketId.md) + +#### Source + +[order-fetcher.ts:209](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L209) + +*** + +### orderCreateTime + +> **orderCreateTime**?: `number` + +Time that order is crreated + +#### Source + +[order-fetcher.ts:213](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L213) + +*** + +### orderExpirationTime + +> **orderExpirationTime**: `number` + +Time that order will expire + +#### Source + +[order-fetcher.ts:217](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L217) + +*** + +### orderHash + +> **orderHash**: `string` + +Unique order hash. Provided and used by NFTGo + +#### Source + +[order-fetcher.ts:225](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L225) + +*** + +### orderId + +> **orderId**: `string` + +Unique order id. Shared between marketplaces + +#### Source + +[order-fetcher.ts:221](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L221) + +*** + +### price + +> **price**: [`TokenPrice`](TokenPrice.md) + +Offer price +[TokenPrice](TokenPrice.md) + +#### Source + +[order-fetcher.ts:230](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L230) + +*** + +### quantityRemaining + +> **quantityRemaining**: `number` + +Number of tokens remaining for this offer + +#### Source + +[order-fetcher.ts:234](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L234) + +*** + +### rawData + +> **rawData**?: `string` + +#### Source + +[order-fetcher.ts:235](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L235) + +*** + +### status + +> **status**: [`OrderStatus`](../enumerations/OrderStatus.md) + +Offer's status +[OrderStatus](../enumerations/OrderStatus.md) + +#### Source + +[order-fetcher.ts:240](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L240) + +*** + +### taker + +> **taker**: `string` + +Offer's taker address, generally points to zero address implies any address can fulfill the offer + +#### Source + +[order-fetcher.ts:244](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L244) + +*** + +### tokenId + +> **tokenId**?: `string` + +Offer associated NFT token ID + +#### Source + +[order-fetcher.ts:248](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L248) + +*** + +### totalQuantity + +> **totalQuantity**: `number` + +Number of tokens when offer was created + +#### Source + +[order-fetcher.ts:252](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L252) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/OfferFulfillmentIntention.md b/docs/type/interfaces/OfferFulfillmentIntention.md new file mode 100644 index 0000000..71579c1 --- /dev/null +++ b/docs/type/interfaces/OfferFulfillmentIntention.md @@ -0,0 +1,70 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > OfferFulfillmentIntention + +# Interface: OfferFulfillmentIntention + +## Contents + +- [Properties](OfferFulfillmentIntention.md#properties) + - [contractAddress](OfferFulfillmentIntention.md#contractaddress) + - [orderHash](OfferFulfillmentIntention.md#orderhash) + - [orderId](OfferFulfillmentIntention.md#orderid) + - [quantity](OfferFulfillmentIntention.md#quantity) + - [tokenId](OfferFulfillmentIntention.md#tokenid) + +## Properties + +### contractAddress + +> **contractAddress**: `string` + +#### Source + +[aggregator/fulfill.ts:27](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/fulfill.ts#L27) + +*** + +### orderHash + +> **orderHash**?: `string` + +#### Source + +[aggregator/fulfill.ts:29](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/fulfill.ts#L29) + +*** + +### orderId + +> **orderId**?: `string` + +#### Source + +[aggregator/fulfill.ts:28](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/fulfill.ts#L28) + +*** + +### quantity + +> **quantity**: `number` + +#### Source + +[aggregator/fulfill.ts:30](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/fulfill.ts#L30) + +*** + +### tokenId + +> **tokenId**: `string` + +#### Source + +[aggregator/fulfill.ts:31](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/aggregator/fulfill.ts#L31) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/Order.md b/docs/type/interfaces/Order.md new file mode 100644 index 0000000..fb9dcaf --- /dev/null +++ b/docs/type/interfaces/Order.md @@ -0,0 +1,37 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > Order + +# Interface: Order + +## Contents + +- [Properties](Order.md#properties) + - [orderId](Order.md#orderid) + - [orderType](Order.md#ordertype) + +## Properties + +### orderId + +> **orderId**: `string` + +#### Source + +[order.ts:2](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order.ts#L2) + +*** + +### orderType + +> **orderType**: [`OrderType`](../enumerations/OrderType.md) + +#### Source + +[order.ts:3](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order.ts#L3) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/OrderFetcherApiResponse.md b/docs/type/interfaces/OrderFetcherApiResponse.md new file mode 100644 index 0000000..9bc898a --- /dev/null +++ b/docs/type/interfaces/OrderFetcherApiResponse.md @@ -0,0 +1,74 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > OrderFetcherApiResponse + +# Interface: OrderFetcherApiResponse`` + +Response template for all order fetcher api + +## Contents + +- [Type parameters](OrderFetcherApiResponse.md#type-parameters) +- [Properties](OrderFetcherApiResponse.md#properties) + - [code](OrderFetcherApiResponse.md#code) + - [data](OrderFetcherApiResponse.md#data) + - [msg](OrderFetcherApiResponse.md#msg) + - [statusCode](OrderFetcherApiResponse.md#statuscode) + +## Type parameters + +▪ **T** + +## Properties + +### code + +> **code**: `string` + +Response code + +#### Source + +[order-fetcher.ts:10](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L10) + +*** + +### data + +> **data**: `T` + +Response data. Specified by every api + +#### Source + +[order-fetcher.ts:14](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L14) + +*** + +### msg + +> **msg**: `string` + +Response message + +#### Source + +[order-fetcher.ts:18](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L18) + +*** + +### statusCode + +> **statusCode**: `number` + +Http status code + +#### Source + +[order-fetcher.ts:22](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L22) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/OrderFetcherInterface.md b/docs/type/interfaces/OrderFetcherInterface.md new file mode 100644 index 0000000..64710a7 --- /dev/null +++ b/docs/type/interfaces/OrderFetcherInterface.md @@ -0,0 +1,111 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > OrderFetcherInterface + +# Interface: OrderFetcherInterface + +## Contents + +- [Methods](OrderFetcherInterface.md#methods) + - [getOrdersByContract()](OrderFetcherInterface.md#getordersbycontract) + - [getOrdersByIds()](OrderFetcherInterface.md#getordersbyids) + - [getOrdersByMaker()](OrderFetcherInterface.md#getordersbymaker) + - [getOrdersByNFT()](OrderFetcherInterface.md#getordersbynft) + +## Methods + +### getOrdersByContract() + +> **getOrdersByContract**(`params`): `Promise`\<[`OrdersFetcherResp`](OrdersFetcherResp.md)\> + +Return listings and offers of a collection by contract +- details: [https://docs.nftgo.io/reference/post_orderbook-v1-orders-get-orders-by-contract](https://docs.nftgo.io/reference/post_orderbook-v1-orders-get-orders-by-contract) + +#### Parameters + +▪ **params**: [`GetOrdersByContractReq`](GetOrdersByContractReq.md) + +[GetOrdersByContractReq](GetOrdersByContractReq.md) + +#### Returns + +Promise<[OrdersFetcherResp](OrdersFetcherResp.md)> + +#### Source + +[order-fetcher.ts:292](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L292) + +*** + +### getOrdersByIds() + +> **getOrdersByIds**(`params`): `Promise`\<[`OrdersFetcherResp`](OrdersFetcherResp.md)\> + +Return listings and offers by order ids +- details: [https://docs.nftgo.io/reference/post_orderbook-v1-orders-get-orders-by-ids](https://docs.nftgo.io/reference/post_orderbook-v1-orders-get-orders-by-ids) + +#### Parameters + +▪ **params**: [`GetOrdersByIdsReq`](GetOrdersByIdsReq.md) + +[GetOrdersByIdsReq](GetOrdersByIdsReq.md) + +#### Returns + +Promise<[OrdersFetcherResp](OrdersFetcherResp.md)> + +#### Source + +[order-fetcher.ts:308](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L308) + +*** + +### getOrdersByMaker() + +> **getOrdersByMaker**(`params`): `Promise`\<[`OrdersFetcherResp`](OrdersFetcherResp.md)\> + +Return listings and offers of a wallet address +- details: [https://docs.nftgo.io/reference/post_orderbook-v1-orders-get-orders-by-maker](https://docs.nftgo.io/reference/post_orderbook-v1-orders-get-orders-by-maker) + +#### Parameters + +▪ **params**: [`GetOrdersByMakerReq`](GetOrdersByMakerReq.md) + +[GetOrdersByMakerReq](GetOrdersByMakerReq.md) + +#### Returns + +Promise<[OrdersFetcherResp](OrdersFetcherResp.md)> + +#### Source + +[order-fetcher.ts:316](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L316) + +*** + +### getOrdersByNFT() + +> **getOrdersByNFT**(`params`): `Promise`\<[`OrdersFetcherResp`](OrdersFetcherResp.md)\> + +Return listings and offers of a NFT +- details: [https://docs.nftgo.io/reference/post_orderbook-v1-orders-get-orders-by-nft](https://docs.nftgo.io/reference/post_orderbook-v1-orders-get-orders-by-nft) + +#### Parameters + +▪ **params**: [`GetOrdersByNftsReq`](GetOrdersByNftsReq.md) + +[GetOrdersByNftsReq](GetOrdersByNftsReq.md) + +#### Returns + +Promise<[OrdersFetcherResp](OrdersFetcherResp.md)> + +#### Source + +[order-fetcher.ts:300](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L300) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/OrdersFetcherResp.md b/docs/type/interfaces/OrdersFetcherResp.md new file mode 100644 index 0000000..e0515d2 --- /dev/null +++ b/docs/type/interfaces/OrdersFetcherResp.md @@ -0,0 +1,37 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > OrdersFetcherResp + +# Interface: OrdersFetcherResp + +## Contents + +- [Properties](OrdersFetcherResp.md#properties) + - [listingDTOs](OrdersFetcherResp.md#listingdtos) + - [offerDTOs](OrdersFetcherResp.md#offerdtos) + +## Properties + +### listingDTOs + +> **listingDTOs**: [`ListingOrderDTO`](ListingOrderDTO.md)[] + +#### Source + +[order-fetcher.ts:281](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L281) + +*** + +### offerDTOs + +> **offerDTOs**: [`OfferDTO`](OfferDTO.md)[] + +#### Source + +[order-fetcher.ts:282](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L282) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/PostOrderReq.md b/docs/type/interfaces/PostOrderReq.md new file mode 100644 index 0000000..fff5b4b --- /dev/null +++ b/docs/type/interfaces/PostOrderReq.md @@ -0,0 +1,183 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > PostOrderReq + +# Interface: PostOrderReq + +post order (listings & offers) + +## Contents + +- [Properties](PostOrderReq.md#properties) + - [attribute](PostOrderReq.md#attribute) + - [bulkData](PostOrderReq.md#bulkdata) + - [collection](PostOrderReq.md#collection) + - [extraArgs](PostOrderReq.md#extraargs) + - [isNonFlagged](PostOrderReq.md#isnonflagged) + - [order](PostOrderReq.md#order) + - [orderType](PostOrderReq.md#ordertype) + - [orderbook](PostOrderReq.md#orderbook) + - [orderbookApiKey](PostOrderReq.md#orderbookapikey) + - [slug](PostOrderReq.md#slug) + - [source](PostOrderReq.md#source) + - [tokenSetId](PostOrderReq.md#tokensetid) + +## Properties + +### attribute + +> **attribute**?: [`Attribute`](Attribute.md) + +#### Source + +[post-order.ts:8](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/post-order.ts#L8) + +*** + +### bulkData + +> **bulkData**?: `object` + +#### Type declaration + +##### data + +> **data**: `object` + +##### data.merkleProof + +> **data.merkleProof**: `string`[] + +##### data.orderIndex + +> **data.orderIndex**: `number` + +##### kind + +> **kind**: [`OrderKind`](../enumerations/OrderKind.md) + +#### Source + +[post-order.ts:9](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/post-order.ts#L9) + +*** + +### collection + +> **collection**?: `string` + +#### Source + +[post-order.ts:16](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/post-order.ts#L16) + +*** + +### extraArgs + +> **extraArgs**: `object` + +#### Type declaration + +##### version + +> **version**: `string` + +#### Source + +[post-order.ts:17](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/post-order.ts#L17) + +*** + +### isNonFlagged + +> **isNonFlagged**?: `boolean` + +#### Source + +[post-order.ts:20](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/post-order.ts#L20) + +*** + +### order + +> **order**: `object` + +#### Type declaration + +##### data + +> **data**: `any` + +##### kind + +> **kind**: [`OrderKind`](../enumerations/OrderKind.md) + +#### Source + +[post-order.ts:21](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/post-order.ts#L21) + +*** + +### orderType + +> **orderType**: [`OrderType`](../enumerations/OrderType.md) + +#### Source + +[post-order.ts:25](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/post-order.ts#L25) + +*** + +### orderbook + +> **orderbook**: [`Orderbook`](../enumerations/Orderbook.md) + +#### Source + +[post-order.ts:27](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/post-order.ts#L27) + +*** + +### orderbookApiKey + +> **orderbookApiKey**?: `string` + +#### Source + +[post-order.ts:28](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/post-order.ts#L28) + +*** + +### slug + +> **slug**?: `string` + +#### Source + +[post-order.ts:26](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/post-order.ts#L26) + +*** + +### source + +> **source**?: `string` + +#### Source + +[post-order.ts:29](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/post-order.ts#L29) + +*** + +### tokenSetId + +> **tokenSetId**?: `string` + +#### Source + +[post-order.ts:30](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/post-order.ts#L30) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/PostOrderResponse.md b/docs/type/interfaces/PostOrderResponse.md new file mode 100644 index 0000000..fb37efa --- /dev/null +++ b/docs/type/interfaces/PostOrderResponse.md @@ -0,0 +1,26 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > PostOrderResponse + +# Interface: PostOrderResponse + +## Contents + +- [Properties](PostOrderResponse.md#properties) + - [message](PostOrderResponse.md#message) + +## Properties + +### message + +> **message**: `string` + +#### Source + +[post-order.ts:40](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/post-order.ts#L40) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/ProcessTransactionCallBacks.md b/docs/type/interfaces/ProcessTransactionCallBacks.md new file mode 100644 index 0000000..66836d7 --- /dev/null +++ b/docs/type/interfaces/ProcessTransactionCallBacks.md @@ -0,0 +1,56 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > ProcessTransactionCallBacks + +# Interface: ProcessTransactionCallBacks + +Callbacks in processing transaction + +## Contents + +- [Properties](ProcessTransactionCallBacks.md#properties) + - [onError](ProcessTransactionCallBacks.md#onerror) + - [onReceipt](ProcessTransactionCallBacks.md#onreceipt) + - [onTransaction](ProcessTransactionCallBacks.md#ontransaction) + +## Properties + +### onError + +> **onError**: [`ErrorHandler`](../type-aliases/ErrorHandler.md) + +Callback after any error occurred before transaction completed + +#### Source + +[action/processor.ts:20](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/processor.ts#L20) + +*** + +### onReceipt + +> **onReceipt**: [`ReceiptHandler`](../type-aliases/ReceiptHandler.md) + +Callback after transaction completed + +#### Source + +[action/processor.ts:16](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/processor.ts#L16) + +*** + +### onTransaction + +> **onTransaction**: [`TransactionHashHandler`](../type-aliases/TransactionHashHandler.md) + +Callback after transaction been sent + +#### Source + +[action/processor.ts:12](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/processor.ts#L12) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/SignData.md b/docs/type/interfaces/SignData.md new file mode 100644 index 0000000..9d53ca0 --- /dev/null +++ b/docs/type/interfaces/SignData.md @@ -0,0 +1,88 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > SignData + +# Interface: SignData + +## Contents + +- [Properties](SignData.md#properties) + - [domain](SignData.md#domain) + - [message](SignData.md#message) + - [signatureKind](SignData.md#signaturekind) + - [types](SignData.md#types) + - [value](SignData.md#value) + +## Properties + +### domain + +> **domain**: `object` + +#### Type declaration + +##### chainId + +> **chainId**: `number` + +##### name + +> **name**: `string` + +##### verifyingContract + +> **verifyingContract**: `string` + +##### version + +> **version**: `string` + +#### Source + +[action/action.ts:46](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L46) + +*** + +### message + +> **message**?: `string` + +#### Source + +[action/action.ts:55](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L55) + +*** + +### signatureKind + +> **signatureKind**: `"eip191"` \| `"eip712"` + +#### Source + +[action/action.ts:52](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L52) + +*** + +### types + +> **types**: `Record`\<`string`, `any`[]\> + +#### Source + +[action/action.ts:53](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L53) + +*** + +### value + +> **value**: `Record`\<`string`, `any`\> + +#### Source + +[action/action.ts:54](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L54) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/TokenAmount.md b/docs/type/interfaces/TokenAmount.md new file mode 100644 index 0000000..584ef07 --- /dev/null +++ b/docs/type/interfaces/TokenAmount.md @@ -0,0 +1,69 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > TokenAmount + +# Interface: TokenAmount + +TokenAmount + +## Contents + +- [Properties](TokenAmount.md#properties) + - [decimal](TokenAmount.md#decimal) + - [platform](TokenAmount.md#platform) + - [raw](TokenAmount.md#raw) + - [usd](TokenAmount.md#usd) + +## Properties + +### decimal + +> **decimal**: `number` + +Token amount in decimal + +#### Source + +[order-fetcher.ts:46](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L46) + +*** + +### platform + +> **platform**: `null` \| `number` + +Token amount in platform token + +#### Source + +[order-fetcher.ts:50](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L50) + +*** + +### raw + +> **raw**: `string` + +Token amount in the smallest denomination + +#### Source + +[order-fetcher.ts:54](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L54) + +*** + +### usd + +> **usd**: `null` \| `number` + +Amount in USD + +#### Source + +[order-fetcher.ts:58](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L58) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/TokenCurrency.md b/docs/type/interfaces/TokenCurrency.md new file mode 100644 index 0000000..aa90108 --- /dev/null +++ b/docs/type/interfaces/TokenCurrency.md @@ -0,0 +1,69 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > TokenCurrency + +# Interface: TokenCurrency + +TokenCurrency + +## Contents + +- [Properties](TokenCurrency.md#properties) + - [chain](TokenCurrency.md#chain) + - [contractAddress](TokenCurrency.md#contractaddress) + - [decimals](TokenCurrency.md#decimals) + - [symbol](TokenCurrency.md#symbol) + +## Properties + +### chain + +> **chain**: `string` + +Chain of the currency + +#### Source + +[order-fetcher.ts:68](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L68) + +*** + +### contractAddress + +> **contractAddress**: `string` + +Contract address of the currency + +#### Source + +[order-fetcher.ts:72](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L72) + +*** + +### decimals + +> **decimals**: `number` + +The smallest denomination for the currency + +#### Source + +[order-fetcher.ts:76](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L76) + +*** + +### symbol + +> **symbol**: `string` + +Token symbol + +#### Source + +[order-fetcher.ts:80](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L80) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/TokenPrice.md b/docs/type/interfaces/TokenPrice.md new file mode 100644 index 0000000..4ee60b5 --- /dev/null +++ b/docs/type/interfaces/TokenPrice.md @@ -0,0 +1,43 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > TokenPrice + +# Interface: TokenPrice + +TokenPrice + +## Contents + +- [Properties](TokenPrice.md#properties) + - [amount](TokenPrice.md#amount) + - [currency](TokenPrice.md#currency) + +## Properties + +### amount + +> **amount**: [`TokenAmount`](TokenAmount.md) + +Detail of token amount + +#### Source + +[order-fetcher.ts:32](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L32) + +*** + +### currency + +> **currency**: [`TokenCurrency`](TokenCurrency.md) + +Detail of token currency + +#### Source + +[order-fetcher.ts:36](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/order-fetcher.ts#L36) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/Transaction.md b/docs/type/interfaces/Transaction.md new file mode 100644 index 0000000..ef71a18 --- /dev/null +++ b/docs/type/interfaces/Transaction.md @@ -0,0 +1,91 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > Transaction + +# Interface: Transaction + +## Contents + +- [Methods](Transaction.md#methods) + - [finally()](Transaction.md#finally) + - [on()](Transaction.md#on) + +## Methods + +### finally() + +> **finally**(`handler`): `void` + +#### Parameters + +▪ **handler**: [`FinallyHandler`](../type-aliases/FinallyHandler.md) + +#### Source + +[utils.ts:77](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L77) + +*** + +### on() + +#### on(type, handler) + +> **on**(`type`, `handler`): [`Transaction`](Transaction.md) + +##### Parameters + +▪ **type**: `"transactionHash"` + +▪ **handler**: [`TransactionHashHandler`](../type-aliases/TransactionHashHandler.md) + +##### Source + +[utils.ts:67](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L67) + +#### on(type, handler) + +> **on**(`type`, `handler`): [`Transaction`](Transaction.md) + +##### Parameters + +▪ **type**: `"receipt"` + +▪ **handler**: [`ReceiptHandler`](../type-aliases/ReceiptHandler.md) + +##### Source + +[utils.ts:69](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L69) + +#### on(type, handler) + +> **on**(`type`, `handler`): [`Transaction`](Transaction.md) + +##### Parameters + +▪ **type**: `"error"` + +▪ **handler**: [`ErrorHandler`](../type-aliases/ErrorHandler.md) + +##### Source + +[utils.ts:71](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L71) + +#### on(type, handler) + +> **on**(`type`, `handler`): [`Transaction`](Transaction.md) + +##### Parameters + +▪ **type**: `"error"` \| `"transactionHash"` \| `"receipt"` + +▪ **handler**: (`receipt`) => `void` + +##### Source + +[utils.ts:73](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L73) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/Utils.md b/docs/type/interfaces/Utils.md new file mode 100644 index 0000000..870ec3f --- /dev/null +++ b/docs/type/interfaces/Utils.md @@ -0,0 +1,241 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > Utils + +# Interface: Utils + +## Contents + +- [Extends](Utils.md#extends) +- [Properties](Utils.md#properties) + - [blurAuthenticator](Utils.md#blurauthenticator) + - [getSigner](Utils.md#getsigner) + - [processor](Utils.md#processor) + - [signMessage](Utils.md#signmessage) + - [x2y2Authenticator](Utils.md#x2y2authenticator) +- [Methods](Utils.md#methods) + - [createActionExecutor()](Utils.md#createactionexecutor) + - [decodeLog()](Utils.md#decodelog) + - [inspectTransaction()](Utils.md#inspecttransaction) + - [sendSafeModeTransaction()](Utils.md#sendsafemodetransaction) + - [sendTransaction()](Utils.md#sendtransaction) + +## Extends + +- [`InternalUtils`](InternalUtils.md) + +## Properties + +### blurAuthenticator + +> **blurAuthenticator**?: [`BlurAuthenticator`](../type-aliases/BlurAuthenticator.md) + +#### Inherited from + +[`InternalUtils`](InternalUtils.md).[`blurAuthenticator`](InternalUtils.md#blurauthenticator) + +#### Source + +[utils.ts:9](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L9) + +*** + +### getSigner + +> **getSigner**: () => `Wallet` \| `JsonRpcSigner` + +Get ehters signer + +#### Returns + +ethers.providers.JsonRpcSigner | ethers.Wallet + +#### Inherited from + +[`InternalUtils`](InternalUtils.md).[`getSigner`](InternalUtils.md#getsigner) + +#### Source + +[utils.ts:50](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L50) + +*** + +### processor + +> **processor**: [`ActionProcessor`](ActionProcessor.md) + +#### Overrides + +[`InternalUtils`](InternalUtils.md).[`processor`](InternalUtils.md#processor) + +#### Source + +[utils.ts:55](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L55) + +*** + +### signMessage + +> **signMessage**: (`message`) => `Promise`\<`undefined` \| `string`\> + +Standard sign message + +#### Parameters + +▪ **message**: `string` + +string + +#### Returns + +Promise + +#### Inherited from + +[`InternalUtils`](InternalUtils.md).[`signMessage`](InternalUtils.md#signmessage) + +#### Source + +[utils.ts:44](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L44) + +*** + +### x2y2Authenticator + +> **x2y2Authenticator**?: [`X2Y2Authenticator`](../type-aliases/X2Y2Authenticator.md) + +#### Inherited from + +[`InternalUtils`](InternalUtils.md).[`x2y2Authenticator`](InternalUtils.md#x2y2authenticator) + +#### Source + +[utils.ts:10](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L10) + +## Methods + +### createActionExecutor() + +> **createActionExecutor**(`actions`): [`ActionTaskExecutor`](ActionTaskExecutor.md) + +#### Parameters + +▪ **actions**: [`AggregatorAction`](../type-aliases/AggregatorAction.md)\<[`ActionKind`](../enumerations/ActionKind.md)\>[] + +#### Overrides + +InternalUtils.createActionExecutor + +#### Source + +[utils.ts:54](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L54) + +*** + +### decodeLog() + +> **decodeLog**(`log`): `null` \| [`DecodeLogRes`](DecodeLogRes.md) + +Decode transaction log, return contract, token id, trading amount, buyer + +#### Parameters + +▪ **log**: `Log` + +[Log]([object Object]) single log returned by send transaction method + +#### Returns + +res [DecodeLogRes](DecodeLogRes.md) + +#### Inherited from + +[`InternalUtils`](InternalUtils.md).[`decodeLog`](InternalUtils.md#decodelog) + +#### Source + +[utils.ts:18](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L18) + +*** + +### inspectTransaction() + +> **inspectTransaction**(`params`): [`Transaction`](Transaction.md) + +Inspect a transaction + +#### Parameters + +▪ **params**: [`InspectTransactionParams`](InspectTransactionParams.md) + +[InspectTransactionParams](InspectTransactionParams.md) transaction hash, inspect interval + +#### Returns + +transaction [Transaction](Transaction.md) + +#### Inherited from + +[`InternalUtils`](InternalUtils.md).[`inspectTransaction`](InternalUtils.md#inspecttransaction) + +#### Source + +[utils.ts:37](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L37) + +*** + +### sendSafeModeTransaction() + +> **sendSafeModeTransaction**(`transactionConfig`): [`Transaction`](Transaction.md) + +Send transaction with safe mode, using flash bot + +#### Parameters + +▪ **transactionConfig**: `Partial`\<`Transaction`\> + +[https://docs.ethers.io/v5/api/providers/types/#providers-TransactionRequest](https://docs.ethers.io/v5/api/providers/types/#providers-TransactionRequest) transaction config + +#### Returns + +transaction [Transaction](Transaction.md) + +#### Inherited from + +[`InternalUtils`](InternalUtils.md).[`sendSafeModeTransaction`](InternalUtils.md#sendsafemodetransaction) + +#### Source + +[utils.ts:25](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L25) + +*** + +### sendTransaction() + +> **sendTransaction**(`transactionConfig`): [`Transaction`](Transaction.md) + +Send transaction + +#### Parameters + +▪ **transactionConfig**: `TransactionConfig` + +[https://web3js.readthedocs.io/en/v1.8.2/web3-eth.html#sendtransaction](https://web3js.readthedocs.io/en/v1.8.2/web3-eth.html#sendtransaction) transaction config + +#### Returns + +transaction [Transaction](Transaction.md) + +#### Inherited from + +[`InternalUtils`](InternalUtils.md).[`sendTransaction`](InternalUtils.md#sendtransaction) + +#### Source + +[utils.ts:31](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L31) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/interfaces/WalletConfig.md b/docs/type/interfaces/WalletConfig.md new file mode 100644 index 0000000..9161297 --- /dev/null +++ b/docs/type/interfaces/WalletConfig.md @@ -0,0 +1,37 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > WalletConfig + +# Interface: WalletConfig + +## Contents + +- [Properties](WalletConfig.md#properties) + - [address](WalletConfig.md#address) + - [privateKey](WalletConfig.md#privatekey) + +## Properties + +### address + +> **address**: `string` + +#### Source + +[config.ts:10](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/config.ts#L10) + +*** + +### privateKey + +> **privateKey**: `string` + +#### Source + +[config.ts:11](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/config.ts#L11) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/type-aliases/ActionTaskStatus.md b/docs/type/type-aliases/ActionTaskStatus.md new file mode 100644 index 0000000..347fe66 --- /dev/null +++ b/docs/type/type-aliases/ActionTaskStatus.md @@ -0,0 +1,17 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > ActionTaskStatus + +# Type alias: ActionTaskStatus + +> **ActionTaskStatus**: `"success"` \| `"fail"` \| `"ready"` \| `"pending"` + +## Source + +[action/task.ts:9](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/task.ts#L9) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/type-aliases/AggregatorAction.md b/docs/type/type-aliases/AggregatorAction.md new file mode 100644 index 0000000..b1d0d5e --- /dev/null +++ b/docs/type/type-aliases/AggregatorAction.md @@ -0,0 +1,25 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > AggregatorAction + +# Type alias: AggregatorAction`` + +> **AggregatorAction**\<`T`\>: `T` extends [`ActionKind`](../enumerations/ActionKind.md) ? `object` : `never` + +Actions which trade aggregate response for frontend developer to process user interaction + +## Type parameters + +| Parameter | Default | +| :------ | :------ | +| `T` | `unknown` | + +## Source + +[action/action.ts:6](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L6) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/type-aliases/ApiKeyConfig.md b/docs/type/type-aliases/ApiKeyConfig.md new file mode 100644 index 0000000..c4d130b --- /dev/null +++ b/docs/type/type-aliases/ApiKeyConfig.md @@ -0,0 +1,31 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > ApiKeyConfig + +# Type alias: ApiKeyConfig + +> **ApiKeyConfig**: `object` + +## Type declaration + +### apiKey + +> **apiKey**: `string` + +### interval + +> **interval**: `number` + +### requestsPerInterval + +> **requestsPerInterval**: `number` + +## Source + +[config.ts:56](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/config.ts#L56) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/type-aliases/BlurAuthenticator.md b/docs/type/type-aliases/BlurAuthenticator.md new file mode 100644 index 0000000..eea73ef --- /dev/null +++ b/docs/type/type-aliases/BlurAuthenticator.md @@ -0,0 +1,39 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > BlurAuthenticator + +# Type alias: BlurAuthenticator + +> **BlurAuthenticator**: [`Authenticator`](../interfaces/Authenticator.md)\<[`BlurAuthenticatorParams`](BlurAuthenticatorParams.md), `string`\> & `object` + +## Type declaration + +### signBlurAuthChallenge + +> **signBlurAuthChallenge**: (`params`) => `Promise`\<`string`\> + +#### Parameters + +▪ **params**: [`BlurAuthLoginParams`](../interfaces/BlurAuthLoginParams.md) + +### getAuthChallenge() + +#### Parameters + +▪ **address**: `string` + +### getAuthSignature() + +#### Parameters + +▪ **message**: `string` + +## Source + +[authenticator/index.ts:21](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/authenticator/index.ts#L21) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/type-aliases/BlurAuthenticatorParams.md b/docs/type/type-aliases/BlurAuthenticatorParams.md new file mode 100644 index 0000000..35d4ea4 --- /dev/null +++ b/docs/type/type-aliases/BlurAuthenticatorParams.md @@ -0,0 +1,27 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > BlurAuthenticatorParams + +# Type alias: BlurAuthenticatorParams + +> **BlurAuthenticatorParams**: `object` + +## Type declaration + +### address + +> **address**: `string` + +### force + +> **force**?: `boolean` + +## Source + +[authenticator/index.ts:5](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/authenticator/index.ts#L5) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/type-aliases/ErrorHandler.md b/docs/type/type-aliases/ErrorHandler.md new file mode 100644 index 0000000..0e54408 --- /dev/null +++ b/docs/type/type-aliases/ErrorHandler.md @@ -0,0 +1,17 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > ErrorHandler + +# Type alias: ErrorHandler + +> **ErrorHandler**: (`error`) => `void` \| `null` \| `undefined` + +## Source + +[utils.ts:97](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L97) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/type-aliases/FinallyHandler.md b/docs/type/type-aliases/FinallyHandler.md new file mode 100644 index 0000000..1638039 --- /dev/null +++ b/docs/type/type-aliases/FinallyHandler.md @@ -0,0 +1,17 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > FinallyHandler + +# Type alias: FinallyHandler + +> **FinallyHandler**: () => `void` \| `null` \| `undefined` + +## Source + +[utils.ts:99](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L99) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/type-aliases/PassThroughActionInfo.md b/docs/type/type-aliases/PassThroughActionInfo.md new file mode 100644 index 0000000..fb5da7f --- /dev/null +++ b/docs/type/type-aliases/PassThroughActionInfo.md @@ -0,0 +1,37 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > PassThroughActionInfo + +# Type alias: PassThroughActionInfo + +> **PassThroughActionInfo**: `object` + +Pass through means pass payload to a NFTGo data api endpoint + +## Type declaration + +### endpoint + +> **endpoint**: `string` + +### method + +> **method**: `"POST"` \| `"GET"` + +### orderIndexes + +> **orderIndexes**: `number`[] + +### payload + +> **payload**: `SafeAny` + +## Source + +[action/action.ts:67](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L67) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/type-aliases/ProcessPassThroughActionParams.md b/docs/type/type-aliases/ProcessPassThroughActionParams.md new file mode 100644 index 0000000..9a9acb4 --- /dev/null +++ b/docs/type/type-aliases/ProcessPassThroughActionParams.md @@ -0,0 +1,23 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > ProcessPassThroughActionParams + +# Type alias: ProcessPassThroughActionParams + +> **ProcessPassThroughActionParams**: `object` + +## Type declaration + +### signature + +> **signature**: `string` + +## Source + +[action/processor.ts:64](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/processor.ts#L64) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/type-aliases/ReceiptHandler.md b/docs/type/type-aliases/ReceiptHandler.md new file mode 100644 index 0000000..a1aa2eb --- /dev/null +++ b/docs/type/type-aliases/ReceiptHandler.md @@ -0,0 +1,17 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > ReceiptHandler + +# Type alias: ReceiptHandler + +> **ReceiptHandler**: (`receipt`) => `void` \| `null` \| `undefined` + +## Source + +[utils.ts:95](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L95) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/type-aliases/SignatureActionInfo.md b/docs/type/type-aliases/SignatureActionInfo.md new file mode 100644 index 0000000..bac58d1 --- /dev/null +++ b/docs/type/type-aliases/SignatureActionInfo.md @@ -0,0 +1,31 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > SignatureActionInfo + +# Type alias: SignatureActionInfo + +> **SignatureActionInfo**: `object` + +## Type declaration + +### body + +> **body**: `object` + +### orderIndexes + +> **orderIndexes**: `number`[] + +### sign + +> **sign**: [`SignData`](../interfaces/SignData.md) + +## Source + +[action/action.ts:58](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L58) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/type-aliases/TaskExecutedHandle.md b/docs/type/type-aliases/TaskExecutedHandle.md new file mode 100644 index 0000000..9b8fe1e --- /dev/null +++ b/docs/type/type-aliases/TaskExecutedHandle.md @@ -0,0 +1,21 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > TaskExecutedHandle + +# Type alias: TaskExecutedHandle + +> **TaskExecutedHandle**: (`task`) => `void` + +## Parameters + +▪ **task**: [`ActionTask`](../interfaces/ActionTask.md) + +## Source + +[action/executor.ts:22](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/executor.ts#L22) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/type-aliases/TransactionActionInfo.md b/docs/type/type-aliases/TransactionActionInfo.md new file mode 100644 index 0000000..a51d276 --- /dev/null +++ b/docs/type/type-aliases/TransactionActionInfo.md @@ -0,0 +1,43 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > TransactionActionInfo + +# Type alias: TransactionActionInfo + +> **TransactionActionInfo**: `object` + +## Type declaration + +### gasLimit + +> **gasLimit**?: `string` + +### orderIndexes + +> **orderIndexes**?: `number`[] + +### safeMode + +> **safeMode**?: `boolean` + +### txAssociatedOrderIds + +> **txAssociatedOrderIds**: `string`[] + +### txData + +> **txData**: [`TxData`](TxData.md) + +### usdGas + +> **usdGas**?: `string` + +## Source + +[action/action.ts:29](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L29) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/type-aliases/TransactionHashHandler.md b/docs/type/type-aliases/TransactionHashHandler.md new file mode 100644 index 0000000..3e5f2d6 --- /dev/null +++ b/docs/type/type-aliases/TransactionHashHandler.md @@ -0,0 +1,17 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > TransactionHashHandler + +# Type alias: TransactionHashHandler + +> **TransactionHashHandler**: (`hash`) => `void` \| `null` \| `undefined` + +## Source + +[utils.ts:93](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/utils.ts#L93) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/type-aliases/TxData.md b/docs/type/type-aliases/TxData.md new file mode 100644 index 0000000..5e8d40a --- /dev/null +++ b/docs/type/type-aliases/TxData.md @@ -0,0 +1,35 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > TxData + +# Type alias: TxData + +> **TxData**: `object` + +## Type declaration + +### data + +> **data**: `string` + +### from + +> **from**: `string` + +### to + +> **to**: `string` + +### value + +> **value**: `string` + +## Source + +[action/action.ts:38](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/action/action.ts#L38) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/type-aliases/X2Y2Authenticator.md b/docs/type/type-aliases/X2Y2Authenticator.md new file mode 100644 index 0000000..e298d65 --- /dev/null +++ b/docs/type/type-aliases/X2Y2Authenticator.md @@ -0,0 +1,17 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > X2Y2Authenticator + +# Type alias: X2Y2Authenticator + +> **X2Y2Authenticator**: [`Authenticator`](../interfaces/Authenticator.md)\<[`X2Y2AuthenticatorParams`](X2Y2AuthenticatorParams.md), [`X2Y2AuthenticatorResult`](X2Y2AuthenticatorResult.md)\> + +## Source + +[authenticator/index.ts:36](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/authenticator/index.ts#L36) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/type-aliases/X2Y2AuthenticatorParams.md b/docs/type/type-aliases/X2Y2AuthenticatorParams.md new file mode 100644 index 0000000..73a96a4 --- /dev/null +++ b/docs/type/type-aliases/X2Y2AuthenticatorParams.md @@ -0,0 +1,23 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > X2Y2AuthenticatorParams + +# Type alias: X2Y2AuthenticatorParams + +> **X2Y2AuthenticatorParams**: `object` + +## Type declaration + +### address + +> **address**: `string` + +## Source + +[authenticator/index.ts:27](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/authenticator/index.ts#L27) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/docs/type/type-aliases/X2Y2AuthenticatorResult.md b/docs/type/type-aliases/X2Y2AuthenticatorResult.md new file mode 100644 index 0000000..7b04d10 --- /dev/null +++ b/docs/type/type-aliases/X2Y2AuthenticatorResult.md @@ -0,0 +1,27 @@ +**@nftgo/gotrading** ∙ [README](../README.md) ∙ [API](../exports.md) + +*** + +[API](../exports.md) > X2Y2AuthenticatorResult + +# Type alias: X2Y2AuthenticatorResult + +> **X2Y2AuthenticatorResult**: `object` + +## Type declaration + +### message + +> **message**: `string` + +### signature + +> **signature**: `string` + +## Source + +[authenticator/index.ts:31](https://github.com/NFTGo/GoTrading/blob/1fa3b8d/src/types/authenticator/index.ts#L31) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/package.json b/package.json index 0de358b..b36f535 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nftgo/gotrading", - "version": "1.0.11", + "version": "1.1.0", "main": "dist/index.js", "module": "dist/index.esm.js", "types": "dist/index.d.ts", @@ -27,8 +27,8 @@ "dev": "rimraf dist types && cross-env NODE_ENV=development webpack --config ./config/webpack/webpack.dev.js", "build": "tsc -p tsconfig.build.json", "build:rollup": "rollup -c rollup.config.mjs", - "publish:dev": "npm run build && npm publish --registry=https://npm.nftgo.dev/", - "typedoc": "rimraf docs && typedoc", + "publish:dev": "npm run build:rollup && npm publish --registry=https://npm.nftgo.dev/", + "typedoc": "rm -rf docs/type/* && typedoc", "test": "jest", "release": "standard-version", "release-major": "standard-version --release-as major", @@ -46,6 +46,10 @@ "@commitlint/cli": "^17.3.0", "@commitlint/config-conventional": "^17.3.0", "@ethersproject/abstract-signer": "^5.7.0", + "@rollup/plugin-alias": "^5.0.0", + "@rollup/plugin-commonjs": "^25.0.2", + "@rollup/plugin-json": "^6.0.0", + "@rollup/plugin-node-resolve": "^15.1.0", "@types/jest": "^29.2.4", "@types/node": "^14.11.2", "@typescript-eslint/eslint-plugin": "latest", @@ -60,28 +64,28 @@ "husky": "^6.0.0", "jest": "^29.5.0", "lint-staged": "^11.2.6", + "rollup": "^3.26.2", + "rollup-plugin-dts": "^5.3.0", + "rollup-plugin-peer-deps-external": "^2.2.4", + "rollup-plugin-typescript2": "^0.35.0", "standard-version": "^9.5.0", "ts-jest": "^29.0.3", + "tslib": "^2.6.0", + "typedoc": "^0.25.2", + "typedoc-github-wiki-theme": "2.0.0-next.2", + "typedoc-plugin-markdown": "4.0.0-next.23", "types-bn": "^0.0.1", "typescript": "^5.1.6", "undici": "^5.22.1", "web3-core": "^1.8.2", "web3-utils": "^1.8.2" }, - "dependencies": { - "@rollup/plugin-alias": "^5.0.0", - "@rollup/plugin-commonjs": "^25.0.2", - "@rollup/plugin-json": "^6.0.0", - "@rollup/plugin-node-resolve": "^15.1.0", + "peerDependencies": { "ethers": "^5.6.9", - "install": "^0.13.0", - "limiter": "^2.1.0", - "rollup": "^3.26.2", - "rollup-plugin-dts": "^5.3.0", - "rollup-plugin-peer-deps-external": "^2.2.4", - "rollup-plugin-typescript2": "^0.35.0", - "tslib": "^2.6.0", "web3": "^1.8.2" }, + "dependencies": { + "limiter": "^2.1.0" + }, "packageManager": "pnpm@8.6.0" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e7d2cc0..ff0b796 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,42 +5,12 @@ settings: excludeLinksFromLockfile: false dependencies: - '@rollup/plugin-alias': - specifier: ^5.0.0 - version: registry.npmmirror.com/@rollup/plugin-alias@5.0.0(rollup@3.26.2) - '@rollup/plugin-commonjs': - specifier: ^25.0.2 - version: registry.npmmirror.com/@rollup/plugin-commonjs@25.0.2(rollup@3.26.2) - '@rollup/plugin-json': - specifier: ^6.0.0 - version: registry.npmmirror.com/@rollup/plugin-json@6.0.0(rollup@3.26.2) - '@rollup/plugin-node-resolve': - specifier: ^15.1.0 - version: registry.npmmirror.com/@rollup/plugin-node-resolve@15.1.0(rollup@3.26.2) ethers: specifier: ^5.6.9 version: registry.npmmirror.com/ethers@5.7.2 - install: - specifier: ^0.13.0 - version: registry.npmmirror.com/install@0.13.0 limiter: specifier: ^2.1.0 version: registry.npmmirror.com/limiter@2.1.0 - rollup: - specifier: ^3.26.2 - version: registry.npmmirror.com/rollup@3.26.2 - rollup-plugin-dts: - specifier: ^5.3.0 - version: registry.npmmirror.com/rollup-plugin-dts@5.3.0(rollup@3.26.2)(typescript@5.1.6) - rollup-plugin-peer-deps-external: - specifier: ^2.2.4 - version: registry.npmmirror.com/rollup-plugin-peer-deps-external@2.2.4(rollup@3.26.2) - rollup-plugin-typescript2: - specifier: ^0.35.0 - version: registry.npmmirror.com/rollup-plugin-typescript2@0.35.0(rollup@3.26.2)(typescript@5.1.6) - tslib: - specifier: ^2.6.0 - version: registry.npmmirror.com/tslib@2.6.0 web3: specifier: ^1.8.2 version: registry.npmmirror.com/web3@1.10.0 @@ -55,6 +25,18 @@ devDependencies: '@ethersproject/abstract-signer': specifier: ^5.7.0 version: registry.npmmirror.com/@ethersproject/abstract-signer@5.7.0 + '@rollup/plugin-alias': + specifier: ^5.0.0 + version: registry.npmmirror.com/@rollup/plugin-alias@5.0.0(rollup@3.26.2) + '@rollup/plugin-commonjs': + specifier: ^25.0.2 + version: registry.npmmirror.com/@rollup/plugin-commonjs@25.0.2(rollup@3.26.2) + '@rollup/plugin-json': + specifier: ^6.0.0 + version: registry.npmmirror.com/@rollup/plugin-json@6.0.0(rollup@3.26.2) + '@rollup/plugin-node-resolve': + specifier: ^15.1.0 + version: registry.npmmirror.com/@rollup/plugin-node-resolve@15.1.0(rollup@3.26.2) '@types/jest': specifier: ^29.2.4 version: registry.npmmirror.com/@types/jest@29.5.2 @@ -63,7 +45,7 @@ devDependencies: version: registry.npmmirror.com/@types/node@14.18.53 '@typescript-eslint/eslint-plugin': specifier: latest - version: 6.7.2(@typescript-eslint/parser@5.61.0)(eslint@8.44.0)(typescript@5.1.6) + version: 6.8.0(@typescript-eslint/parser@5.61.0)(eslint@8.44.0)(typescript@5.1.6) '@typescript-eslint/parser': specifier: ^5.46.1 version: registry.npmmirror.com/@typescript-eslint/parser@5.61.0(eslint@8.44.0)(typescript@5.1.6) @@ -81,7 +63,7 @@ devDependencies: version: registry.npmmirror.com/eslint@8.44.0 eslint-plugin-jest: specifier: latest - version: 27.4.0(@typescript-eslint/eslint-plugin@6.7.2)(eslint@8.44.0)(jest@29.6.0)(typescript@5.1.6) + version: 27.4.2(@typescript-eslint/eslint-plugin@6.8.0)(eslint@8.44.0)(jest@29.6.0)(typescript@5.1.6) gts: specifier: ^3.1.1 version: registry.npmmirror.com/gts@3.1.1(typescript@5.1.6) @@ -97,12 +79,36 @@ devDependencies: lint-staged: specifier: ^11.2.6 version: registry.npmmirror.com/lint-staged@11.2.6 + rollup: + specifier: ^3.26.2 + version: registry.npmmirror.com/rollup@3.26.2 + rollup-plugin-dts: + specifier: ^5.3.0 + version: registry.npmmirror.com/rollup-plugin-dts@5.3.0(rollup@3.26.2)(typescript@5.1.6) + rollup-plugin-peer-deps-external: + specifier: ^2.2.4 + version: registry.npmmirror.com/rollup-plugin-peer-deps-external@2.2.4(rollup@3.26.2) + rollup-plugin-typescript2: + specifier: ^0.35.0 + version: registry.npmmirror.com/rollup-plugin-typescript2@0.35.0(rollup@3.26.2)(typescript@5.1.6) standard-version: specifier: ^9.5.0 version: registry.npmmirror.com/standard-version@9.5.0 ts-jest: specifier: ^29.0.3 version: registry.npmmirror.com/ts-jest@29.1.1(@babel/core@7.22.6)(jest@29.6.0)(typescript@5.1.6) + tslib: + specifier: ^2.6.0 + version: registry.npmmirror.com/tslib@2.6.0 + typedoc: + specifier: ^0.25.2 + version: 0.25.2(typescript@5.1.6) + typedoc-github-wiki-theme: + specifier: 2.0.0-next.2 + version: 2.0.0-next.2(typedoc-plugin-markdown@4.0.0-next.23) + typedoc-plugin-markdown: + specifier: 4.0.0-next.23 + version: 4.0.0-next.23(typedoc@0.25.2) types-bn: specifier: ^0.0.1 version: registry.npmmirror.com/types-bn@0.0.1 @@ -132,6 +138,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/highlight': registry.npmmirror.com/@babel/highlight@7.22.5 + dev: true /@eslint-community/eslint-utils@4.4.0(eslint@8.44.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} @@ -203,8 +210,8 @@ packages: - supports-color dev: true - /@typescript-eslint/eslint-plugin@6.7.2(@typescript-eslint/parser@5.61.0)(eslint@8.44.0)(typescript@5.1.6): - resolution: {integrity: sha512-ooaHxlmSgZTM6CHYAFRlifqh1OAr3PAQEwi7lhYhaegbnXrnh7CDcHmc3+ihhbQC7H0i4JF0psI5ehzkF6Yl6Q==} + /@typescript-eslint/eslint-plugin@6.8.0(@typescript-eslint/parser@5.61.0)(eslint@8.44.0)(typescript@5.1.6): + resolution: {integrity: sha512-GosF4238Tkes2SHPQ1i8f6rMtG6zlKwMEB0abqSJ3Npvos+doIlc/ATG+vX1G9coDF3Ex78zM3heXHLyWEwLUw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha @@ -216,10 +223,10 @@ packages: dependencies: '@eslint-community/regexpp': 4.5.1 '@typescript-eslint/parser': registry.npmmirror.com/@typescript-eslint/parser@5.61.0(eslint@8.44.0)(typescript@5.1.6) - '@typescript-eslint/scope-manager': 6.7.2 - '@typescript-eslint/type-utils': 6.7.2(eslint@8.44.0)(typescript@5.1.6) - '@typescript-eslint/utils': 6.7.2(eslint@8.44.0)(typescript@5.1.6) - '@typescript-eslint/visitor-keys': 6.7.2 + '@typescript-eslint/scope-manager': 6.8.0 + '@typescript-eslint/type-utils': 6.8.0(eslint@8.44.0)(typescript@5.1.6) + '@typescript-eslint/utils': 6.8.0(eslint@8.44.0)(typescript@5.1.6) + '@typescript-eslint/visitor-keys': 6.8.0 debug: 4.3.4 eslint: registry.npmmirror.com/eslint@8.44.0 graphemer: 1.4.0 @@ -248,16 +255,16 @@ packages: '@typescript-eslint/visitor-keys': 5.61.0 dev: true - /@typescript-eslint/scope-manager@6.7.2: - resolution: {integrity: sha512-bgi6plgyZjEqapr7u2mhxGR6E8WCzKNUFWNh6fkpVe9+yzRZeYtDTbsIBzKbcxI+r1qVWt6VIoMSNZ4r2A+6Yw==} + /@typescript-eslint/scope-manager@6.8.0: + resolution: {integrity: sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.7.2 - '@typescript-eslint/visitor-keys': 6.7.2 + '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/visitor-keys': 6.8.0 dev: true - /@typescript-eslint/type-utils@6.7.2(eslint@8.44.0)(typescript@5.1.6): - resolution: {integrity: sha512-36F4fOYIROYRl0qj95dYKx6kybddLtsbmPIYNK0OBeXv2j9L5nZ17j9jmfy+bIDHKQgn2EZX+cofsqi8NPATBQ==} + /@typescript-eslint/type-utils@6.8.0(eslint@8.44.0)(typescript@5.1.6): + resolution: {integrity: sha512-RYOJdlkTJIXW7GSldUIHqc/Hkto8E+fZN96dMIFhuTJcQwdRoGN2rEWA8U6oXbLo0qufH7NPElUb+MceHtz54g==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -266,8 +273,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.7.2(typescript@5.1.6) - '@typescript-eslint/utils': 6.7.2(eslint@8.44.0)(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 6.8.0(typescript@5.1.6) + '@typescript-eslint/utils': 6.8.0(eslint@8.44.0)(typescript@5.1.6) debug: 4.3.4 eslint: registry.npmmirror.com/eslint@8.44.0 ts-api-utils: 1.0.2(typescript@5.1.6) @@ -286,8 +293,8 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/types@6.7.2: - resolution: {integrity: sha512-flJYwMYgnUNDAN9/GAI3l8+wTmvTYdv64fcH8aoJK76Y+1FCZ08RtI5zDerM/FYT5DMkAc+19E4aLmd5KqdFyg==} + /@typescript-eslint/types@6.8.0: + resolution: {integrity: sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ==} engines: {node: ^16.0.0 || >=18.0.0} dev: true @@ -333,8 +340,8 @@ packages: - supports-color dev: true - /@typescript-eslint/typescript-estree@6.7.2(typescript@5.1.6): - resolution: {integrity: sha512-kiJKVMLkoSciGyFU0TOY0fRxnp9qq1AzVOHNeN1+B9erKFCJ4Z8WdjAkKQPP+b1pWStGFqezMLltxO+308dJTQ==} + /@typescript-eslint/typescript-estree@6.8.0(typescript@5.1.6): + resolution: {integrity: sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -342,8 +349,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.7.2 - '@typescript-eslint/visitor-keys': 6.7.2 + '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/visitor-keys': 6.8.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -374,8 +381,8 @@ packages: - typescript dev: true - /@typescript-eslint/utils@6.7.2(eslint@8.44.0)(typescript@5.1.6): - resolution: {integrity: sha512-ZCcBJug/TS6fXRTsoTkgnsvyWSiXwMNiPzBUani7hDidBdj1779qwM1FIAmpH4lvlOZNF3EScsxxuGifjpLSWQ==} + /@typescript-eslint/utils@6.8.0(eslint@8.44.0)(typescript@5.1.6): + resolution: {integrity: sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -383,9 +390,9 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.44.0) '@types/json-schema': 7.0.12 '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 6.7.2 - '@typescript-eslint/types': 6.7.2 - '@typescript-eslint/typescript-estree': 6.7.2(typescript@5.1.6) + '@typescript-eslint/scope-manager': 6.8.0 + '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/typescript-estree': 6.8.0(typescript@5.1.6) eslint: registry.npmmirror.com/eslint@8.44.0 semver: 7.5.4 transitivePeerDependencies: @@ -409,11 +416,11 @@ packages: eslint-visitor-keys: 3.4.1 dev: true - /@typescript-eslint/visitor-keys@6.7.2: - resolution: {integrity: sha512-uVw9VIMFBUTz8rIeaUT3fFe8xIUx8r4ywAdlQv1ifH+6acn/XF8Y6rwJ7XNmkNMDrTW+7+vxFFPIF40nJCVsMQ==} + /@typescript-eslint/visitor-keys@6.8.0: + resolution: {integrity: sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.7.2 + '@typescript-eslint/types': 6.8.0 eslint-visitor-keys: 3.4.1 dev: true @@ -426,11 +433,25 @@ packages: - supports-color dev: true + /ansi-sequence-parser@1.1.1: + resolution: {integrity: sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==} + dev: true + /array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} dev: true + /balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: true + + /brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + dependencies: + balanced-match: 1.0.2 + dev: true + /braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} @@ -467,8 +488,8 @@ packages: path-type: 4.0.0 dev: true - /eslint-plugin-jest@27.4.0(@typescript-eslint/eslint-plugin@6.7.2)(eslint@8.44.0)(jest@29.6.0)(typescript@5.1.6): - resolution: {integrity: sha512-ukVeKmMPAUA5SWjHenvyyXnirKfHKMdOsTZdn5tZx5EW05HGVQwBohigjFZGGj3zuv1cV6hc82FvWv6LdIbkgg==} + /eslint-plugin-jest@27.4.2(@typescript-eslint/eslint-plugin@6.8.0)(eslint@8.44.0)(jest@29.6.0)(typescript@5.1.6): + resolution: {integrity: sha512-3Nfvv3wbq2+PZlRTf2oaAWXWwbdBejFRBR2O8tAO67o+P8zno+QGbcDYaAXODlreXVg+9gvWhKKmG2rgfb8GEg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: '@typescript-eslint/eslint-plugin': ^5.0.0 || ^6.0.0 @@ -480,7 +501,7 @@ packages: jest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 6.7.2(@typescript-eslint/parser@5.61.0)(eslint@8.44.0)(typescript@5.1.6) + '@typescript-eslint/eslint-plugin': 6.8.0(@typescript-eslint/parser@5.61.0)(eslint@8.44.0)(typescript@5.1.6) '@typescript-eslint/utils': 5.61.0(eslint@8.44.0)(typescript@5.1.6) eslint: registry.npmmirror.com/eslint@8.44.0 jest: registry.npmmirror.com/jest@29.6.0(@types/node@14.18.53)(ts-node@10.9.1) @@ -558,6 +579,7 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true + dev: true optional: true /glob-parent@5.1.2: @@ -623,6 +645,10 @@ packages: engines: {node: '>=0.12.0'} dev: true + /jsonc-parser@3.2.0: + resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} + dev: true + /lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: @@ -634,6 +660,17 @@ packages: engines: {node: '>=10'} dependencies: yallist: 4.0.0 + dev: true + + /lunr@2.3.9: + resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} + dev: true + + /marked@4.3.0: + resolution: {integrity: sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==} + engines: {node: '>= 12'} + hasBin: true + dev: true /merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} @@ -648,6 +685,13 @@ packages: picomatch: 2.3.1 dev: true + /minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: true + /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true @@ -689,6 +733,7 @@ packages: /semver@6.3.0: resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} hasBin: true + dev: true /semver@7.5.2: resolution: {integrity: sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==} @@ -706,6 +751,15 @@ packages: lru-cache: 6.0.0 dev: true + /shiki@0.14.5: + resolution: {integrity: sha512-1gCAYOcmCFONmErGTrS1fjzJLA7MGZmKzrBNX7apqSwhyITJg2O102uFzXUeBxNnEkDA9vHIKLyeKq0V083vIw==} + dependencies: + ansi-sequence-parser: 1.1.1 + jsonc-parser: 3.2.0 + vscode-oniguruma: 1.7.0 + vscode-textmate: 8.0.0 + dev: true + /slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -741,6 +795,36 @@ packages: typescript: registry.npmmirror.com/typescript@5.1.6 dev: true + /typedoc-github-wiki-theme@2.0.0-next.2(typedoc-plugin-markdown@4.0.0-next.23): + resolution: {integrity: sha512-vPs10EvOOS6ZAixtEPtB71YvMnlY7J/UnMVIigU8xsau29+cX/NkMgXhYW7n34VKK57Sua8U3mSLesELA8K75Q==} + peerDependencies: + typedoc-plugin-markdown: '>=4.0.0-next.13' + dependencies: + typedoc-plugin-markdown: 4.0.0-next.23(typedoc@0.25.2) + dev: true + + /typedoc-plugin-markdown@4.0.0-next.23(typedoc@0.25.2): + resolution: {integrity: sha512-bKD0LnrQxUTbuDRiJfCWYLlzyERuskWldJ5eWKKuNY38xBOyBhSN8P+vD5KxlJoAifTOm76MK58sNrl4wgOoWg==} + peerDependencies: + typedoc: '>=0.25.0' + dependencies: + typedoc: 0.25.2(typescript@5.1.6) + dev: true + + /typedoc@0.25.2(typescript@5.1.6): + resolution: {integrity: sha512-286F7BeATBiWe/qC4PCOCKlSTwfnsLbC/4cZ68oGBbvAqb9vV33quEOXx7q176OXotD+JdEerdQ1OZGJ818lnA==} + engines: {node: '>= 16'} + hasBin: true + peerDependencies: + typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x + dependencies: + lunr: 2.3.9 + marked: 4.3.0 + minimatch: 9.0.3 + shiki: 0.14.5 + typescript: registry.npmmirror.com/typescript@5.1.6 + dev: true + /uglify-js@3.17.4: resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} engines: {node: '>=0.8.0'} @@ -749,12 +833,21 @@ packages: dev: true optional: true + /vscode-oniguruma@1.7.0: + resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} + dev: true + + /vscode-textmate@8.0.0: + resolution: {integrity: sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==} + dev: true + /yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} dev: true /yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + dev: true registry.npmmirror.com/@aashutoshrathi/word-wrap@1.2.6: resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz} @@ -933,6 +1026,7 @@ packages: name: '@babel/helper-validator-identifier' version: 7.22.5 engines: {node: '>=6.9.0'} + dev: true registry.npmmirror.com/@babel/helper-validator-option@7.22.5: resolution: {integrity: sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz} @@ -963,6 +1057,7 @@ packages: '@babel/helper-validator-identifier': registry.npmmirror.com/@babel/helper-validator-identifier@7.22.5 chalk: registry.npmmirror.com/chalk@2.4.2 js-tokens: registry.npmmirror.com/js-tokens@4.0.0 + dev: true registry.npmmirror.com/@babel/parser@7.22.6: resolution: {integrity: sha512-EIQu22vNkceq3LbjAq7knDf/UmtI2qbcNI8GRBlijez6TpQLvSodJPYfydQmNA5buwkxxxa/PVI44jjYZ+/cLw==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/@babel/parser/-/parser-7.22.6.tgz} @@ -2196,6 +2291,7 @@ packages: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz} name: '@jridgewell/sourcemap-codec' version: 1.4.15 + dev: true registry.npmmirror.com/@jridgewell/trace-mapping@0.3.18: resolution: {integrity: sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz} @@ -2263,7 +2359,7 @@ packages: dependencies: rollup: registry.npmmirror.com/rollup@3.26.2 slash: registry.npmmirror.com/slash@4.0.0 - dev: false + dev: true registry.npmmirror.com/@rollup/plugin-commonjs@25.0.2(rollup@3.26.2): resolution: {integrity: sha512-NGTwaJxIO0klMs+WSFFtBP7b9TdTJ3K76HZkewT8/+yHzMiUGVQgaPtLQxNVYIgT5F7lxkEyVID+yS3K7bhCow==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.2.tgz} @@ -2284,7 +2380,7 @@ packages: is-reference: registry.npmmirror.com/is-reference@1.2.1 magic-string: registry.npmmirror.com/magic-string@0.27.0 rollup: registry.npmmirror.com/rollup@3.26.2 - dev: false + dev: true registry.npmmirror.com/@rollup/plugin-json@6.0.0(rollup@3.26.2): resolution: {integrity: sha512-i/4C5Jrdr1XUarRhVu27EEwjt4GObltD7c+MkCIpO2QIbojw8MUs+CCTqOphQi3Qtg1FLmYt+l+6YeoIf51J7w==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/@rollup/plugin-json/-/plugin-json-6.0.0.tgz} @@ -2300,7 +2396,7 @@ packages: dependencies: '@rollup/pluginutils': registry.npmmirror.com/@rollup/pluginutils@5.0.2(rollup@3.26.2) rollup: registry.npmmirror.com/rollup@3.26.2 - dev: false + dev: true registry.npmmirror.com/@rollup/plugin-node-resolve@15.1.0(rollup@3.26.2): resolution: {integrity: sha512-xeZHCgsiZ9pzYVgAo9580eCGqwh/XCEUM9q6iQfGNocjgkufHAqC3exA+45URvhiYV8sBF9RlBai650eNs7AsA==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.1.0.tgz} @@ -2321,7 +2417,7 @@ packages: is-module: registry.npmmirror.com/is-module@1.0.0 resolve: registry.npmmirror.com/resolve@1.22.2 rollup: registry.npmmirror.com/rollup@3.26.2 - dev: false + dev: true registry.npmmirror.com/@rollup/pluginutils@4.2.1: resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz} @@ -2331,7 +2427,7 @@ packages: dependencies: estree-walker: registry.npmmirror.com/estree-walker@2.0.2 picomatch: registry.npmmirror.com/picomatch@2.3.1 - dev: false + dev: true registry.npmmirror.com/@rollup/pluginutils@5.0.2(rollup@3.26.2): resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz} @@ -2349,7 +2445,7 @@ packages: estree-walker: registry.npmmirror.com/estree-walker@2.0.2 picomatch: registry.npmmirror.com/picomatch@2.3.1 rollup: registry.npmmirror.com/rollup@3.26.2 - dev: false + dev: true registry.npmmirror.com/@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/@sinclair/typebox/-/typebox-0.27.8.tgz} @@ -2481,7 +2577,7 @@ packages: resolution: {integrity: sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/@types/estree/-/estree-1.0.1.tgz} name: '@types/estree' version: 1.0.1 - dev: false + dev: true registry.npmmirror.com/@types/graceful-fs@4.1.6: resolution: {integrity: sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/@types/graceful-fs/-/graceful-fs-4.1.6.tgz} @@ -2581,7 +2677,7 @@ packages: resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/@types/resolve/-/resolve-1.20.2.tgz} name: '@types/resolve' version: 1.20.2 - dev: false + dev: true registry.npmmirror.com/@types/responselike@1.0.0: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/@types/responselike/-/responselike-1.0.0.tgz} @@ -2879,6 +2975,7 @@ packages: engines: {node: '>=4'} dependencies: color-convert: registry.npmmirror.com/color-convert@1.9.3 + dev: true registry.npmmirror.com/ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz} @@ -3093,6 +3190,7 @@ packages: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz} name: balanced-match version: 1.0.2 + dev: true registry.npmmirror.com/base-x@3.0.9: resolution: {integrity: sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/base-x/-/base-x-3.0.9.tgz} @@ -3217,7 +3315,7 @@ packages: version: 2.0.1 dependencies: balanced-match: registry.npmmirror.com/balanced-match@1.0.2 - dev: false + dev: true registry.npmmirror.com/braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/braces/-/braces-3.0.2.tgz} @@ -3331,7 +3429,7 @@ packages: name: builtin-modules version: 3.3.0 engines: {node: '>=6'} - dev: false + dev: true registry.npmmirror.com/busboy@1.6.0: resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/busboy/-/busboy-1.6.0.tgz} @@ -3439,6 +3537,7 @@ packages: ansi-styles: registry.npmmirror.com/ansi-styles@3.2.1 escape-string-regexp: registry.npmmirror.com/escape-string-regexp@1.0.5 supports-color: registry.npmmirror.com/supports-color@5.5.0 + dev: true registry.npmmirror.com/chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz} @@ -3591,6 +3690,7 @@ packages: version: 1.9.3 dependencies: color-name: registry.npmmirror.com/color-name@1.1.3 + dev: true registry.npmmirror.com/color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz} @@ -3605,6 +3705,7 @@ packages: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/color-name/-/color-name-1.1.3.tgz} name: color-name version: 1.1.3 + dev: true registry.npmmirror.com/color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz} @@ -3644,7 +3745,7 @@ packages: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/commondir/-/commondir-1.0.1.tgz} name: commondir version: 1.0.1 - dev: false + dev: true registry.npmmirror.com/compare-func@2.0.0: resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/compare-func/-/compare-func-2.0.0.tgz} @@ -4171,6 +4272,7 @@ packages: name: deepmerge version: 4.3.1 engines: {node: '>=0.10.0'} + dev: true registry.npmmirror.com/defer-to-connect@2.0.1: resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz} @@ -4408,6 +4510,7 @@ packages: name: escape-string-regexp version: 1.0.5 engines: {node: '>=0.8.0'} + dev: true registry.npmmirror.com/escape-string-regexp@2.0.0: resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz} @@ -4686,7 +4789,7 @@ packages: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz} name: estree-walker version: 2.0.2 - dev: false + dev: true registry.npmmirror.com/esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/esutils/-/esutils-2.0.3.tgz} @@ -5054,7 +5157,7 @@ packages: commondir: registry.npmmirror.com/commondir@1.0.1 make-dir: registry.npmmirror.com/make-dir@3.1.0 pkg-dir: registry.npmmirror.com/pkg-dir@4.2.0 - dev: false + dev: true registry.npmmirror.com/find-up@2.1.0: resolution: {integrity: sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/find-up/-/find-up-2.1.0.tgz} @@ -5082,6 +5185,7 @@ packages: dependencies: locate-path: registry.npmmirror.com/locate-path@5.0.0 path-exists: registry.npmmirror.com/path-exists@4.0.0 + dev: true registry.npmmirror.com/find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/find-up/-/find-up-5.0.0.tgz} @@ -5162,7 +5266,7 @@ packages: graceful-fs: registry.npmmirror.com/graceful-fs@4.2.11 jsonfile: registry.npmmirror.com/jsonfile@6.1.0 universalify: registry.npmmirror.com/universalify@2.0.0 - dev: false + dev: true registry.npmmirror.com/fs-extra@11.1.1: resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/fs-extra/-/fs-extra-11.1.1.tgz} @@ -5197,6 +5301,7 @@ packages: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz} name: fs.realpath version: 1.0.0 + dev: true registry.npmmirror.com/function-bind@1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/function-bind/-/function-bind-1.1.1.tgz} @@ -5367,7 +5472,7 @@ packages: inherits: registry.npmmirror.com/inherits@2.0.4 minimatch: registry.npmmirror.com/minimatch@5.1.6 once: registry.npmmirror.com/once@1.4.0 - dev: false + dev: true registry.npmmirror.com/global-dirs@0.1.1: resolution: {integrity: sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/global-dirs/-/global-dirs-0.1.1.tgz} @@ -5550,6 +5655,7 @@ packages: name: has-flag version: 3.0.0 engines: {node: '>=4'} + dev: true registry.npmmirror.com/has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz} @@ -5775,6 +5881,7 @@ packages: dependencies: once: registry.npmmirror.com/once@1.4.0 wrappy: registry.npmmirror.com/wrappy@1.0.2 + dev: true registry.npmmirror.com/inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz} @@ -5808,13 +5915,6 @@ packages: through: registry.npmmirror.com/through@2.3.8 dev: true - registry.npmmirror.com/install@0.13.0: - resolution: {integrity: sha512-zDml/jzr2PKU9I8J/xyZBQn8rPCAY//UOYNmR01XwNwyfhEWObo2SWfSl1+0tm1u6PhxLwDnfsT/6jB7OUxqFA==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/install/-/install-0.13.0.tgz} - name: install - version: 0.13.0 - engines: {node: '>= 0.10'} - dev: false - registry.npmmirror.com/ipaddr.js@1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz} name: ipaddr.js @@ -5844,7 +5944,7 @@ packages: engines: {node: '>=6'} dependencies: builtin-modules: registry.npmmirror.com/builtin-modules@3.3.0 - dev: false + dev: true registry.npmmirror.com/is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/is-callable/-/is-callable-1.2.7.tgz} @@ -5858,6 +5958,7 @@ packages: version: 2.12.1 dependencies: has: registry.npmmirror.com/has@1.0.3 + dev: true registry.npmmirror.com/is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz} @@ -5913,7 +6014,7 @@ packages: resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/is-module/-/is-module-1.0.0.tgz} name: is-module version: 1.0.0 - dev: false + dev: true registry.npmmirror.com/is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz} @@ -5956,7 +6057,7 @@ packages: version: 1.2.1 dependencies: '@types/estree': registry.npmmirror.com/@types/estree@1.0.1 - dev: false + dev: true registry.npmmirror.com/is-regexp@1.0.0: resolution: {integrity: sha512-7zjFAPO4/gwyQAAgRRmqeEeyIICSdmCqa3tsVHMdBzaXXRiqopZL4Cyghg/XulGWrtABTpbnYYzzIRffLkP4oA==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/is-regexp/-/is-regexp-1.0.0.tgz} @@ -6551,6 +6652,7 @@ packages: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz} name: js-tokens version: 4.0.0 + dev: true registry.npmmirror.com/js-yaml@3.14.1: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/js-yaml/-/js-yaml-3.14.1.tgz} @@ -6655,6 +6757,7 @@ packages: universalify: registry.npmmirror.com/universalify@2.0.0 optionalDependencies: graceful-fs: 4.2.11 + dev: true registry.npmmirror.com/jsonparse@1.3.1: resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/jsonparse/-/jsonparse-1.3.1.tgz} @@ -6829,6 +6932,7 @@ packages: engines: {node: '>=8'} dependencies: p-locate: registry.npmmirror.com/p-locate@4.1.0 + dev: true registry.npmmirror.com/locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/locate-path/-/locate-path-6.0.0.tgz} @@ -6956,7 +7060,7 @@ packages: engines: {node: '>=12'} dependencies: '@jridgewell/sourcemap-codec': registry.npmmirror.com/@jridgewell/sourcemap-codec@1.4.15 - dev: false + dev: true registry.npmmirror.com/magic-string@0.30.1: resolution: {integrity: sha512-mbVKXPmS0z0G4XqFDCTllmDQ6coZzn94aMlb0o/A4HEHJCKcanlDZwYJgwnkmgD3jyWhUgj9VsPrfd972yPffA==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/magic-string/-/magic-string-0.30.1.tgz} @@ -6965,7 +7069,7 @@ packages: engines: {node: '>=12'} dependencies: '@jridgewell/sourcemap-codec': registry.npmmirror.com/@jridgewell/sourcemap-codec@1.4.15 - dev: false + dev: true registry.npmmirror.com/make-dir@3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/make-dir/-/make-dir-3.1.0.tgz} @@ -6974,6 +7078,7 @@ packages: engines: {node: '>=8'} dependencies: semver: 6.3.0 + dev: true registry.npmmirror.com/make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/make-error/-/make-error-1.3.6.tgz} @@ -7179,7 +7284,7 @@ packages: engines: {node: '>=10'} dependencies: brace-expansion: registry.npmmirror.com/brace-expansion@2.0.1 - dev: false + dev: true registry.npmmirror.com/minimist-options@4.1.0: resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/minimist-options/-/minimist-options-4.1.0.tgz} @@ -7556,6 +7661,7 @@ packages: engines: {node: '>=6'} dependencies: p-try: registry.npmmirror.com/p-try@2.2.0 + dev: true registry.npmmirror.com/p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/p-limit/-/p-limit-3.1.0.tgz} @@ -7591,6 +7697,7 @@ packages: engines: {node: '>=8'} dependencies: p-limit: registry.npmmirror.com/p-limit@2.3.0 + dev: true registry.npmmirror.com/p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/p-locate/-/p-locate-5.0.0.tgz} @@ -7622,6 +7729,7 @@ packages: name: p-try version: 2.2.0 engines: {node: '>=6'} + dev: true registry.npmmirror.com/parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz} @@ -7679,6 +7787,7 @@ packages: name: path-exists version: 4.0.0 engines: {node: '>=8'} + dev: true registry.npmmirror.com/path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz} @@ -7698,6 +7807,7 @@ packages: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz} name: path-parse version: 1.0.7 + dev: true registry.npmmirror.com/path-to-regexp@0.1.7: resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz} @@ -7750,6 +7860,7 @@ packages: name: picomatch version: 2.3.1 engines: {node: '>=8.6'} + dev: true registry.npmmirror.com/pify@2.3.0: resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/pify/-/pify-2.3.0.tgz} @@ -7779,6 +7890,7 @@ packages: engines: {node: '>=8'} dependencies: find-up: registry.npmmirror.com/find-up@4.1.0 + dev: true registry.npmmirror.com/please-upgrade-node@3.2.0: resolution: {integrity: sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz} @@ -8177,6 +8289,7 @@ packages: is-core-module: registry.npmmirror.com/is-core-module@2.12.1 path-parse: registry.npmmirror.com/path-parse@1.0.7 supports-preserve-symlinks-flag: registry.npmmirror.com/supports-preserve-symlinks-flag@1.0.0 + dev: true registry.npmmirror.com/responselike@2.0.1: resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/responselike/-/responselike-2.0.1.tgz} @@ -8249,7 +8362,7 @@ packages: typescript: registry.npmmirror.com/typescript@5.1.6 optionalDependencies: '@babel/code-frame': 7.22.5 - dev: false + dev: true registry.npmmirror.com/rollup-plugin-peer-deps-external@2.2.4(rollup@3.26.2): resolution: {integrity: sha512-AWdukIM1+k5JDdAqV/Cxd+nejvno2FVLVeZ74NKggm3Q5s9cbbcOgUPGdbxPi4BXu7xGaZ8HG12F+thImYu/0g==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/rollup-plugin-peer-deps-external/-/rollup-plugin-peer-deps-external-2.2.4.tgz} @@ -8260,7 +8373,7 @@ packages: rollup: '*' dependencies: rollup: registry.npmmirror.com/rollup@3.26.2 - dev: false + dev: true registry.npmmirror.com/rollup-plugin-typescript2@0.35.0(rollup@3.26.2)(typescript@5.1.6): resolution: {integrity: sha512-szcIO9hPUx3PhQl91u4pfNAH2EKbtrXaES+m163xQVE5O1CC0ea6YZV/5woiDDW3CR9jF2CszPrKN+AFiND0bg==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.35.0.tgz} @@ -8278,7 +8391,7 @@ packages: semver: registry.npmmirror.com/semver@7.5.3 tslib: registry.npmmirror.com/tslib@2.6.0 typescript: registry.npmmirror.com/typescript@5.1.6 - dev: false + dev: true registry.npmmirror.com/rollup@3.26.2: resolution: {integrity: sha512-6umBIGVz93er97pMgQO08LuH3m6PUb3jlDUUGFsNJB6VgTCUaDFpupf5JfU30529m/UKOgmiX+uY6Sx8cOYpLA==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/rollup/-/rollup-3.26.2.tgz} @@ -8288,7 +8401,7 @@ packages: hasBin: true optionalDependencies: fsevents: 2.3.2 - dev: false + dev: true registry.npmmirror.com/run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/run-async/-/run-async-2.4.1.tgz} @@ -8367,6 +8480,7 @@ packages: hasBin: true dependencies: lru-cache: 6.0.0 + dev: true registry.npmmirror.com/send@0.18.0: resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/send/-/send-0.18.0.tgz} @@ -8506,7 +8620,7 @@ packages: name: slash version: 4.0.0 engines: {node: '>=12'} - dev: false + dev: true registry.npmmirror.com/slice-ansi@3.0.0: resolution: {integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/slice-ansi/-/slice-ansi-3.0.0.tgz} @@ -8791,6 +8905,7 @@ packages: engines: {node: '>=4'} dependencies: has-flag: registry.npmmirror.com/has-flag@3.0.0 + dev: true registry.npmmirror.com/supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz} @@ -8815,6 +8930,7 @@ packages: name: supports-preserve-symlinks-flag version: 1.0.0 engines: {node: '>= 0.4'} + dev: true registry.npmmirror.com/swarm-js@0.1.42: resolution: {integrity: sha512-BV7c/dVlA3R6ya1lMlSSNPLYrntt0LUq4YMgy3iwpCIc6rZnS5W2wUoctarZ5pXlpKtxDDf9hNziEkcfrxdhqQ==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/swarm-js/-/swarm-js-0.1.42.tgz} @@ -9061,6 +9177,7 @@ packages: resolution: {integrity: sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/tslib/-/tslib-2.6.0.tgz} name: tslib version: 2.6.0 + dev: true registry.npmmirror.com/tsutils@3.21.0(typescript@5.1.6): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/tsutils/-/tsutils-3.21.0.tgz} @@ -9187,6 +9304,7 @@ packages: version: 5.1.6 engines: {node: '>=14.17'} hasBin: true + dev: true registry.npmmirror.com/ultron@1.1.1: resolution: {integrity: sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/ultron/-/ultron-1.1.1.tgz} @@ -9215,6 +9333,7 @@ packages: name: universalify version: 2.0.0 engines: {node: '>= 10.0.0'} + dev: true registry.npmmirror.com/unpipe@1.0.0: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==, registry: https://registry.npmjs.org/, tarball: https://registry.npmmirror.com/unpipe/-/unpipe-1.0.0.tgz} diff --git a/src/modules/aggregator/index.ts b/src/modules/aggregator/index.ts index fd47a6d..ee75a2e 100644 --- a/src/modules/aggregator/index.ts +++ b/src/modules/aggregator/index.ts @@ -14,61 +14,34 @@ import { FulfillOffersReq, } from '@/types'; +/** + * Trading aggregator. Get actions you need to trade a NFT. + */ export class Aggregator implements AggregatorInterface { constructor(private client: HTTPClient, private config: Config, private utils: Utils) {} - /** - * - * - details: {@link } - * @param params {@link } - * @returns Promise<{@link }> - */ createOffers = async (params: CreateOffersReq): Promise => { const res = await this.post('/create-offers', params); return this.response(res); }; - /** - * - * - details: {@link } - * @param params {@link any} - * @returns Promise<{@link any}> - */ fulfillOffers = async (params: FulfillOffersReq): Promise => { const res = await this.post('/fulfill-offers', params); return this.response(res); }; - /** - * - * - details: {@link } - * @param params {@link any} - * @returns Promise<{@link any}> - */ cancelOrders = async (params: CancelOrdersReq): Promise => { const res = await this.post('/cancel-orders', params); return this.response(res); }; - /** - * - * - details: {@link } - * @param params {@link any} - * @returns Promise<{@link any}> - */ createListings = async (params: CreateListingsReq): Promise => { const data = await this.post('/create-listings', params); return this.response(data); }; - /** - * buy nfts - * - details: {@link } - * @param params {@link FulfillListingsReq} - * @returns Promise<{@link }> - */ fulfillListings = async (params: FulfillListingsReq): Promise => { const data = await this.post('/fulfill-listings', params); return this.response(data); diff --git a/src/modules/config/index.ts b/src/modules/config/index.ts index af42181..d50a48a 100644 --- a/src/modules/config/index.ts +++ b/src/modules/config/index.ts @@ -1,5 +1,10 @@ import { Config, EVMChain } from '@/types'; +/** + * Set config's default values + * @param option {@link Partial} + * @returns Config {@link Config} + */ export function ensureConfig(option: Partial): Config { const baseUrl = 'https://data-api.nftgo.io'; @@ -11,8 +16,5 @@ export function ensureConfig(option: Partial): Config { ...option, }; - // TODO: field validation such as chian and base url - // e.g. config.baseUrl.test(/^https:\/\/*/,) - return config; } diff --git a/src/modules/order-fetcher/index.ts b/src/modules/order-fetcher/index.ts index 6dfc70d..43c965e 100644 --- a/src/modules/order-fetcher/index.ts +++ b/src/modules/order-fetcher/index.ts @@ -10,6 +10,9 @@ import { OrderFetcherApiResponse, } from '@/types'; +/** + * Api sdk getting orders, including listings and offers + */ export class OrderFetcher implements OrderFetcherInterface { constructor(private client: HTTPClient, private config: Config) {} diff --git a/src/modules/utils/action/processor/common/index.ts b/src/modules/utils/action/processor/common/index.ts index 08b4878..b2e6732 100644 --- a/src/modules/utils/action/processor/common/index.ts +++ b/src/modules/utils/action/processor/common/index.ts @@ -1,2 +1,2 @@ -export * from './sign-info'; +export * from './promised-send-transaction'; export * from './sign-order-data'; diff --git a/src/modules/utils/action/processor/common/promised-send-transaction.ts b/src/modules/utils/action/processor/common/promised-send-transaction.ts new file mode 100644 index 0000000..2118754 --- /dev/null +++ b/src/modules/utils/action/processor/common/promised-send-transaction.ts @@ -0,0 +1,39 @@ +import { ProcessTransactionCallBacks, Transaction, TxData } from '@/types'; +import { ethers } from 'ethers'; +import { SafeAny } from 'src/types/safe-any'; +import { TransactionConfig } from 'web3-core'; + +type SendTransactionFn = + | ((params: TransactionConfig) => Transaction) + | ((params: Partial) => Transaction); + +/** + * Wrapped send transaction function with a promise + * @param params transaction params {@link TxData} + * @param sendTransaction send transaction function {@link SendTransactionFn} + * @param callBacks callbacks in every step of a transaction {@link ProcessTransactionCallBacks} + * @returns Promise + */ +export async function promisedSendTransaction( + params: TxData, + sendTransaction: SendTransactionFn, + callBacks?: ProcessTransactionCallBacks +): Promise { + return new Promise((resolve, reject) => { + sendTransaction(params as SafeAny) + .on('transactionHash', callBacks?.onTransaction) + .on('error', err => { + callBacks?.onError?.(err); + reject(new Error(err.message)); + }) + .on('receipt', receipt => { + callBacks?.onReceipt?.(receipt); + const error = receipt?.logs.length === 0 || !receipt?.status; + if (error) { + reject(new Error('approved sign failed')); + } else { + resolve(true); + } + }); + }); +} diff --git a/src/modules/utils/action/processor/common/sign-info.ts b/src/modules/utils/action/processor/common/sign-info.ts deleted file mode 100644 index 8a2141f..0000000 --- a/src/modules/utils/action/processor/common/sign-info.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Transaction } from '@/types'; -import { SafeAny } from 'src/types/safe-any'; - -type SendTransactionFn = (params: SafeAny) => Transaction; - -export async function signInfo(params: SafeAny, sendTransaction: SendTransactionFn): Promise { - return new Promise((resolve, reject) => { - sendTransaction(params) - .on('error', err => { - reject(new Error(err.message)); - }) - .on('receipt', receipt => { - const error = receipt?.logs.length === 0 || !receipt?.status; - if (error) { - reject(new Error('approved sign failed')); - } else { - resolve(true); - } - }); - }); -} diff --git a/src/modules/utils/action/processor/common/sign-order-data.ts b/src/modules/utils/action/processor/common/sign-order-data.ts index 8d2a8ad..eadd9bf 100644 --- a/src/modules/utils/action/processor/common/sign-order-data.ts +++ b/src/modules/utils/action/processor/common/sign-order-data.ts @@ -3,6 +3,12 @@ import { arrayify } from 'ethers/lib/utils'; import { Signer } from 'ethers'; import { TypedDataSigner } from '@ethersproject/abstract-signer'; +/** + * sign order data + * @param data order data need to be signed {@link SignData} + * @param signer ethers signer + * @returns signature string + */ export async function signOrderData(data: SignData, signer: Signer & TypedDataSigner): Promise { const { domain, types, value } = data; diff --git a/src/modules/utils/action/processor/index.ts b/src/modules/utils/action/processor/index.ts index ee1b953..3d08ee0 100644 --- a/src/modules/utils/action/processor/index.ts +++ b/src/modules/utils/action/processor/index.ts @@ -9,8 +9,9 @@ import { HTTPClient, InternalUtils, ProcessPassThroughActionParams, + ProcessTransactionCallBacks, } from '@/types'; -import { signInfo, signOrderData } from './common'; +import { promisedSendTransaction, signOrderData } from './common'; import { PostOrderHandler } from '../../post-order'; export class AggregateActionProcessor implements ActionProcessor { @@ -32,23 +33,26 @@ export class AggregateActionProcessor implements ActionProcessor { return Promise.reject(new Error('no match action name')); } - async processTransactionAction(action: AggregatorAction) { + async processTransactionAction( + action: AggregatorAction, + callBacks?: ProcessTransactionCallBacks + ) { const { name, data } = action; const { txData, safeMode } = data; if (!txData) { throw new Error('txData is required'); } if (name === 'nft-approval') { - return await signInfo(txData, this.utils.sendTransaction); + return await promisedSendTransaction(txData, this.utils.sendTransaction, callBacks); } else if (name === 'accept-listing') { if (safeMode) { - return await signInfo(txData, this.utils.sendSafeModeTransaction); + return await promisedSendTransaction(txData, this.utils.sendSafeModeTransaction, callBacks); } else { - return await signInfo(txData, this.utils.sendTransaction); + return await promisedSendTransaction(txData, this.utils.sendTransaction, callBacks); } // other name case: currency-wrapping currency-approval } else { - return await signInfo(txData, this.utils.sendTransaction); + return await promisedSendTransaction(txData, this.utils.sendTransaction, callBacks); } } @@ -72,9 +76,7 @@ export class AggregateActionProcessor implements ActionProcessor { }); } - async processControllerAction( - action: AggregatorAction - ): Promise[]> { + async processControllerAction(action: AggregatorAction) { const { data } = action; const { payload, endpoint, method } = data; diff --git a/src/modules/utils/action/task/index.ts b/src/modules/utils/action/task/index.ts index 6142eb2..d1f6c16 100644 --- a/src/modules/utils/action/task/index.ts +++ b/src/modules/utils/action/task/index.ts @@ -11,6 +11,11 @@ export type CreateTaskOption = { updateTask?: (actions: AggregatorAction[]) => void; }; +/** + * Change actions to tasks with processor we provided + * @param option {@link CreateTaskOption} + * @returns task {@link SignatureActionTask} + */ export function createTask(option: CreateTaskOption): ActionTask { const { action, index, processor } = option; switch (action.kind) { diff --git a/src/modules/utils/action/task/template.ts b/src/modules/utils/action/task/template.ts index 7f92fa0..3d452ef 100644 --- a/src/modules/utils/action/task/template.ts +++ b/src/modules/utils/action/task/template.ts @@ -11,7 +11,7 @@ export abstract class ActionTaskTemplate implements Action status: ActionTaskStatus = 'ready'; pre: ActionTask | null = null; error: Error | null = null; - result: ProcessPassThroughActionParams | null = null; + result: ProcessPassThroughActionParams | boolean | null = null; constructor(public action: AggregatorAction, public index: number, protected processor: ActionProcessor) {} execute = async () => { try { @@ -22,5 +22,5 @@ export abstract class ActionTaskTemplate implements Action this.status = 'fail'; } }; - protected abstract run(): Promise; + protected abstract run(): Promise; } diff --git a/src/modules/utils/blur-auth.ts b/src/modules/utils/blur-auth.ts index c417646..540e29d 100644 --- a/src/modules/utils/blur-auth.ts +++ b/src/modules/utils/blur-auth.ts @@ -1,16 +1,13 @@ import { BaseException } from '@/exceptions'; -import { HTTPClient, Config, AggregatorApiStatusResponse, BlurAuthenticator, BlurAuthenticatorParams } from '@/types'; - -interface BlurAuthChallenge { - expiresOn: string; - hmac: string; - message: string; - walletAddress: string; -} - -interface BlurAuthLoginParams extends BlurAuthChallenge { - signature: string; -} +import { + HTTPClient, + Config, + AggregatorApiStatusResponse, + BlurAuthenticator, + BlurAuthenticatorParams, + BlurAuthChallenge, + BlurAuthLoginParams, +} from '@/types'; interface Signer { signMessage: (message: string) => Promise; @@ -35,12 +32,12 @@ export class BlurMarketAuthenticator implements BlurAuthenticator { return this.config.baseUrl + '/utils/v1/blur'; } - private async getAuthSignature(message: string) { + async getAuthSignature(message: string): Promise { const signature = this.signer.signMessage(message); return signature; } - private async getAuthChallenge(address: string) { + async getAuthChallenge(address: string): Promise { const { code, msg, data } = await this.httpClient.post< AggregatorApiStatusResponse, { address: string } @@ -57,7 +54,7 @@ export class BlurMarketAuthenticator implements BlurAuthenticator { return data; } - private async signBlurAuthChallenge(params: BlurAuthLoginParams): Promise { + async signBlurAuthChallenge(params: BlurAuthLoginParams): Promise { const { code, msg, data } = await this.httpClient.post< AggregatorApiStatusResponse<{ blurAuth: string }>, BlurAuthLoginParams diff --git a/src/modules/utils/ethereum/index.ts b/src/modules/utils/ethereum/index.ts deleted file mode 100644 index d076b39..0000000 --- a/src/modules/utils/ethereum/index.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { UtilsException } from '@/exceptions'; -import { Config } from '@/types'; -import Web3 from 'web3'; -import { ethers } from 'ethers'; - -// TODO: use chain lib instate of specific lib -export class EthereumLib { - web3?: Web3; - ethersWallet?: ethers.providers.Web3Provider; - ethersSigner?: ethers.Signer; - - constructor(private config: Config) { - const provider = this.config.web3Provider ?? Reflect.get(globalThis, 'ethereum'); - const walletConfig = this.config?.walletConfig; - if (provider) { - this.web3 = new Web3(provider); - - this.ethersWallet = new ethers.providers.Web3Provider(provider); - if (walletConfig) { - if (typeof walletConfig.address !== 'string') { - throw UtilsException.invalidParamError('walletConfig.address'); - } - if (typeof walletConfig.privateKey !== 'string') { - throw UtilsException.invalidParamError('walletConfig.privateKey'); - } - this.ethersSigner = new ethers.Wallet( - walletConfig.privateKey, - new ethers.providers.JsonRpcProvider(provider.host) - ); - this.web3.eth.accounts.wallet.add(walletConfig); - } else { - this.ethersSigner = this.ethersWallet.getSigner(0); - } - } - } -} diff --git a/src/modules/utils/index.ts b/src/modules/utils/index.ts index 94b6021..f5911dc 100644 --- a/src/modules/utils/index.ts +++ b/src/modules/utils/index.ts @@ -3,9 +3,15 @@ import { InternalAggregatorUtils } from './internal-utils'; import { BrowserActionTaskExecutor } from './action'; import { AggregateActionProcessor } from './action/processor'; -export function createUtils(config: Config, http: HTTPClient): Utils { - const internalUtils = new InternalAggregatorUtils(config, http); - const processor = new AggregateActionProcessor(internalUtils, config, http); +/** + + * @param config same config with sdk {@link Config} + * @param httpClient http request functions {@link HTTPClient} + * @returns utils {@link Utils} + */ +export function createUtils(config: Config, httpClient: HTTPClient): Utils { + const internalUtils = new InternalAggregatorUtils(config, httpClient); + const processor = new AggregateActionProcessor(internalUtils, config, httpClient); internalUtils.createActionExecutor = (actions: AggregatorAction[]) => { return new BrowserActionTaskExecutor(actions, processor); diff --git a/src/modules/utils/internal-utils.ts b/src/modules/utils/internal-utils.ts index 4839e28..bee837b 100644 --- a/src/modules/utils/internal-utils.ts +++ b/src/modules/utils/internal-utils.ts @@ -30,50 +30,53 @@ import { SafeAny } from 'src/types/safe-any'; export class InternalAggregatorUtils implements InternalUtils { private provider?: provider; private walletConfig?: WalletConfig; - public _ethersProvider: ethers.providers.Web3Provider; - public _ethersSigner: SafeAny; - public _web3Instance: Web3; + public _ethersProvider?: ethers.providers.Web3Provider; + public _ethersSigner?: SafeAny; + public _web3Instance?: Web3; public account: string | undefined = this.walletConfig?.address; public blurAccessToken: string | undefined; - private TRANSFER_TOPIC: string; - private TRANSFER_BATCH_TOPIC: string; - private TRANSFER_SINGLE_TOPIC: string; - private PUNK_TRANSFER_TOPIC: string; - private PUNK_BOUGHT_TOPIC: string; - public blurAuthenticator: BlurAuthenticator; - public x2y2Authenticator: X2Y2Authenticator; + private TRANSFER_TOPIC?: string; + private TRANSFER_BATCH_TOPIC?: string; + private TRANSFER_SINGLE_TOPIC?: string; + private PUNK_TRANSFER_TOPIC?: string; + private PUNK_BOUGHT_TOPIC?: string; + public blurAuthenticator?: BlurAuthenticator; + public x2y2Authenticator?: X2Y2Authenticator; public processor?: ActionProcessor | undefined; constructor(config: Config, client: HTTPClient) { this.provider = config.web3Provider; this.walletConfig = config.walletConfig; + if (this.provider) { + this._web3Instance = new Web3(this.provider || (globalThis as SafeAny)?.ethereum); + this.x2y2Authenticator = new X2Y2MarketplaceAuthenticator(this._web3Instance); - this._web3Instance = new Web3(this.provider || (globalThis as SafeAny)?.ethereum); - this.x2y2Authenticator = new X2Y2MarketplaceAuthenticator(this._web3Instance); - - this._ethersProvider = new ethers.providers.Web3Provider(this.provider || (globalThis as SafeAny)?.ethereum); - if (this.walletConfig) { + this._ethersProvider = new ethers.providers.Web3Provider(this.provider || (globalThis as SafeAny)?.ethereum); + this._web3Instance.eth.getAccounts().then(accounts => { + this._ethersSigner = this._ethersProvider?.getSigner(accounts[0]); + this.blurAuthenticator = new BlurMarketAuthenticator(this._ethersSigner, client, config); + }); + } else if (this.walletConfig) { if (typeof this.walletConfig?.address !== 'string') { throw UtilsException.invalidParamError('walletConfig.address'); } if (typeof this.walletConfig?.privateKey !== 'string') { throw UtilsException.invalidParamError('walletConfig.privateKey'); } + this._ethersSigner = new ethers.Wallet( + this.walletConfig.privateKey, + new ethers.providers.JsonRpcProvider((this.provider as SafeAny).host) + ); - this._ethersSigner = this.provider - ? new ethers.Wallet( - this.walletConfig.privateKey, - new ethers.providers.JsonRpcProvider((this.provider as SafeAny).host) - ) - : this._ethersProvider.getSigner(this.walletConfig?.address); - - this._web3Instance.eth.accounts.wallet.add(this.walletConfig as WalletConfig); + this._web3Instance?.eth.accounts.wallet.add(this.walletConfig as WalletConfig); + this.blurAuthenticator = new BlurMarketAuthenticator(this._ethersSigner, client, config); + } else { + this.blurAuthenticator = new BlurMarketAuthenticator(this._ethersSigner, client, config); } - this.blurAuthenticator = new BlurMarketAuthenticator(this._ethersSigner, client, config); this.TRANSFER_TOPIC = this._web3Instance?.eth.abi.encodeEventSignature(ERC721ABI.transfer); - this.TRANSFER_BATCH_TOPIC = this._web3Instance.eth.abi.encodeEventSignature(ERC1155ABI.batchTransfer); - this.TRANSFER_SINGLE_TOPIC = this._web3Instance.eth.abi.encodeEventSignature(ERC1155ABI.singleTransfer); - this.PUNK_TRANSFER_TOPIC = this._web3Instance.eth.abi.encodeEventSignature(CryptoPunkABI.transfer); - this.PUNK_BOUGHT_TOPIC = this._web3Instance.eth.abi.encodeEventSignature(CryptoPunkABI.bought); + this.TRANSFER_BATCH_TOPIC = this._web3Instance?.eth.abi.encodeEventSignature(ERC1155ABI.batchTransfer); + this.TRANSFER_SINGLE_TOPIC = this._web3Instance?.eth.abi.encodeEventSignature(ERC1155ABI.singleTransfer); + this.PUNK_TRANSFER_TOPIC = this._web3Instance?.eth.abi.encodeEventSignature(CryptoPunkABI.transfer); + this.PUNK_BOUGHT_TOPIC = this._web3Instance?.eth.abi.encodeEventSignature(CryptoPunkABI.bought); } createActionExecutor?: (actions: AggregatorAction[]) => ActionTaskExecutor; @@ -83,7 +86,7 @@ export class InternalAggregatorUtils implements InternalUtils { const intervalId = setInterval(async () => { try { const res = await this._web3Instance?.eth?.getTransactionReceipt(hash); - if (res === null) { + if (res === null || res === undefined) { return; } clearInterval(intervalId); @@ -116,64 +119,64 @@ export class InternalAggregatorUtils implements InternalUtils { break; } else { // 721 - decodedEventLog = this._web3Instance.eth.abi.decodeLog( + decodedEventLog = this._web3Instance?.eth.abi.decodeLog( ERC721ABI.transfer.inputs ?? [], log.data, log.topics.slice(1) // without the topic[0] if its a non-anonymous event, otherwise with topic[0]. ); contract = log.address; - tokenId = decodedEventLog.tokenId.toString(); - to = decodedEventLog.to; + tokenId = decodedEventLog?.tokenId.toString(); + to = decodedEventLog?.to; amount = 1; } break; case this.TRANSFER_BATCH_TOPIC: // batch 1155 - decodedEventLog = this._web3Instance.eth.abi.decodeLog( + decodedEventLog = this._web3Instance?.eth.abi.decodeLog( ERC1155ABI.batchTransfer.inputs ?? [], log.data, log.topics.slice(1) ); contract = log.address; - tokenId = decodedEventLog.ids[0]; - amount = parseInt(decodedEventLog.value); // value代表成交的数量 - to = decodedEventLog.to; + tokenId = decodedEventLog?.ids[0]; + amount = parseInt(decodedEventLog?.value ?? '0'); // value代表成交的数量 + to = decodedEventLog?.to; is1155 = true; break; case this.TRANSFER_SINGLE_TOPIC: // single 1155 - decodedEventLog = this._web3Instance.eth.abi.decodeLog( + decodedEventLog = this._web3Instance?.eth.abi.decodeLog( ERC1155ABI.singleTransfer.inputs ?? [], log.data, log.topics.slice(1) ); contract = log.address; - tokenId = decodedEventLog.id.toString(); - to = decodedEventLog.to; + tokenId = decodedEventLog?.id.toString(); + to = decodedEventLog?.to; is1155 = true; amount = 1; break; case this.PUNK_TRANSFER_TOPIC: // punk - decodedEventLog = this._web3Instance.eth.abi.decodeLog( + decodedEventLog = this._web3Instance?.eth.abi.decodeLog( CryptoPunkABI.transfer.inputs ?? [], log.data, log.topics.slice(1) ); contract = log.address; - tokenId = decodedEventLog.punkIndex.toString(); - to = decodedEventLog.to; + tokenId = decodedEventLog?.punkIndex.toString(); + to = decodedEventLog?.to; amount = 1; break; case this.PUNK_BOUGHT_TOPIC: - decodedEventLog = this._web3Instance.eth.abi.decodeLog( + decodedEventLog = this._web3Instance?.eth.abi.decodeLog( CryptoPunkABI.bought.inputs ?? [], log.data, log.topics.slice(1) ); contract = log.address; - tokenId = decodedEventLog.punkIndex.toString(); - to = decodedEventLog.toAddress; + tokenId = decodedEventLog?.punkIndex.toString(); + to = decodedEventLog?.toAddress; break; default: amount = 0; @@ -194,18 +197,18 @@ export class InternalAggregatorUtils implements InternalUtils { const transactionInstance = new SendTransaction(); // safe mode need more transaction detail than normal, including nonce, gasLimit, type and etc. // https://docs.ethers.io/v5/api/providers/types/#providers-TransactionRequest - this._web3Instance.eth.getTransactionCount(transactionConfig.from as string).then(nonce => { + this._web3Instance?.eth.getTransactionCount(transactionConfig.from as string).then(nonce => { transactionConfig.value = BigNumber.isBigNumber(transactionConfig.value) ? transactionConfig.value : (BigNumber.from(transactionConfig.value) as SafeAny); transactionConfig.nonce = nonce; transactionConfig.type = 2; const priorityFee = BigNumber.from(transactionConfig?.maxPriorityFeePerGas || 2000000000); - this._web3Instance.eth.getGasPrice().then(gasPrice => { + this._web3Instance?.eth.getGasPrice().then(gasPrice => { transactionConfig.maxFeePerGas = transactionConfig?.maxFeePerGas || priorityFee.add(BigNumber.from(gasPrice)); transactionConfig.maxPriorityFeePerGas = transactionConfig?.maxPriorityFeePerGas || priorityFee; // eth_sign only accetp 32byte data - const unsignedTransactionHash = this._web3Instance.utils.keccak256( + const unsignedTransactionHash = this._web3Instance?.utils.keccak256( ethers.utils.serializeTransaction(transactionConfig) ); const flashBotsSendTx = (signedTrx: string) => { @@ -224,8 +227,8 @@ export class InternalAggregatorUtils implements InternalUtils { }); }; // Client - if ((globalThis as SafeAny).ethereum) { - this._web3Instance.eth + if ((globalThis as SafeAny).ethereum && unsignedTransactionHash) { + this._web3Instance?.eth .sign(unsignedTransactionHash, transactionConfig.from as string) .then(async signedTransaction => { const signedTrx = ethers.utils.serializeTransaction(transactionConfig, signedTransaction); @@ -237,14 +240,14 @@ export class InternalAggregatorUtils implements InternalUtils { .finally(() => { transactionInstance.finallyHandler?.(); }); - } else { + } else if (unsignedTransactionHash) { // Server try { - const signedTransaction = this._web3Instance.eth.accounts.sign( + const signedTransaction = this._web3Instance?.eth.accounts.sign( unsignedTransactionHash, this.walletConfig?.privateKey as string ); - const signedTrx = ethers.utils.serializeTransaction(transactionConfig, signedTransaction.signature); + const signedTrx = ethers.utils.serializeTransaction(transactionConfig, signedTransaction?.signature); flashBotsSendTx(signedTrx); } catch (error) { transactionInstance.errorHandler?.(error as SafeAny); @@ -265,75 +268,81 @@ export class InternalAggregatorUtils implements InternalUtils { throw UtilsException.invalidParamError('transactionConfig.from', 'Buyer address must equal to wallet address'); } const transactionInstance = new SendTransaction(); - this._web3Instance.eth - .estimateGas({ - data: transactionConfig.data, - value: transactionConfig.value, - from: transactionConfig.from, - to: transactionConfig.to, - }) - .then(estimateGas => { - // some wallet(eg: coinbase wallet) will inject providers object into window, which provide all providers available in current browser - transactionConfig.gas = BigNumber.from(estimateGas).toHexString(); - if (typeof (globalThis as SafeAny)?.ethereum === 'object') { - let finalProvider = (globalThis as SafeAny)?.ethereum as SafeAny; - if (finalProvider?.providers && (this._web3Instance.currentProvider as SafeAny)?.isMetaMask) { - finalProvider = finalProvider?.providers.filter( - (provider: { isMetaMask: boolean }) => provider.isMetaMask - )[0]; - } - finalProvider - ?.request({ - method: 'eth_sendTransaction', - params: [transactionConfig], - }) - .then((hash: string) => { - transactionInstance.transactionHashHandler?.(hash); - this.inspectTransaction({ hash }).on('receipt', receipt => { + const send = () => { + // some wallet(eg: coinbase wallet) will inject providers object into window, which provide all providers available in current browser + if (typeof (globalThis as SafeAny)?.ethereum === 'object') { + let finalProvider = (globalThis as SafeAny)?.ethereum as SafeAny; + if (finalProvider?.providers && (this._web3Instance?.currentProvider as SafeAny)?.isMetaMask) { + finalProvider = finalProvider?.providers.filter( + (provider: { isMetaMask: boolean }) => provider.isMetaMask + )[0]; + } + finalProvider + ?.request({ + method: 'eth_sendTransaction', + params: [transactionConfig], + }) + .then((hash: string) => { + transactionInstance.transactionHashHandler?.(hash); + this.inspectTransaction({ hash }).on('receipt', receipt => { + transactionInstance.receiptHandler?.(receipt); + }); + }) + .catch((error: Error) => { + transactionInstance.errorHandler?.(error); + }) + .finally(() => { + transactionInstance.finally(); + }); + } else { + this._web3Instance?.eth.accounts + .signTransaction(transactionConfig, this.walletConfig?.privateKey as string) + .then(signedTransaction => { + this._web3Instance?.eth + .sendSignedTransaction(signedTransaction.rawTransaction as string) + .on('transactionHash', hash => { + transactionInstance.transactionHashHandler?.(hash); + }) + .on('receipt', receipt => { transactionInstance.receiptHandler?.(receipt); + }) + .on('error', error => { + transactionInstance.errorHandler?.(error); + }) + .finally(() => { + transactionInstance.finallyHandler?.(); }); - }) - .catch((error: Error) => { - transactionInstance.errorHandler?.(error); - }) - .finally(() => { - transactionInstance.finally(); - }); - } else { - this._web3Instance.eth.accounts - .signTransaction(transactionConfig, this.walletConfig?.privateKey as string) - .then(signedTransaction => { - this._web3Instance.eth - .sendSignedTransaction(signedTransaction.rawTransaction as string) - .on('transactionHash', hash => { - transactionInstance.transactionHashHandler?.(hash); - }) - .on('receipt', receipt => { - transactionInstance.receiptHandler?.(receipt); - }) - .on('error', error => { - transactionInstance.errorHandler?.(error); - }) - .finally(() => { - transactionInstance.finallyHandler?.(); - }); - }); - } - }); + }); + } + }; + if (!transactionConfig?.gas) { + this._web3Instance?.eth + .estimateGas({ + data: transactionConfig.data, + value: transactionConfig.value, + from: transactionConfig.from, + to: transactionConfig.to, + }) + .then(estimateGas => { + transactionConfig.gas = BigNumber.from(estimateGas).toHexString(); + send(); + }); + } else { + send(); + } return transactionInstance; }; - signMessage = async (message: string): Promise => { - if ((globalThis as SafeAny).ethereum) { - const provider = (globalThis as SafeAny).ethereum; - const accounts = await provider.request({ method: 'eth_requestAccounts' }); - const account = accounts[0]; + signMessage = async (message: string): Promise => { + if ((globalThis as SafeAny).ethereum && this._web3Instance) { + const accounts = await this._web3Instance.eth.getAccounts(); + const account = accounts?.[0]; const signature = await this._web3Instance.eth.personal.sign(message, account, ''); return signature; } else { // server side - const signResult = this._web3Instance.eth.accounts.sign(message, this.walletConfig?.privateKey as string); - return signResult.signature; + const signResult = this._web3Instance?.eth.accounts.sign(message, this.walletConfig?.privateKey as string); + return signResult?.signature; } }; diff --git a/src/modules/utils/is-invalid-param.ts b/src/modules/utils/is-invalid-param.ts deleted file mode 100644 index d7f174c..0000000 --- a/src/modules/utils/is-invalid-param.ts +++ /dev/null @@ -1,19 +0,0 @@ -export function isInvalidParam(param: unknown) { - if (typeof param === 'number') { - return false; - } - - if ( - param === undefined || - param === null || - param === 'null' || - param === 'undefined' || - typeof param === 'boolean' - ) { - return true; - } - - const contentStr = typeof param === 'string' ? param : JSON.stringify(param); - - return contentStr.length === 0 || contentStr === '{}' || contentStr === '[]'; -} diff --git a/src/types/action/action.ts b/src/types/action/action.ts index fee75f6..9b4ad29 100644 --- a/src/types/action/action.ts +++ b/src/types/action/action.ts @@ -1,7 +1,7 @@ import { SafeAny } from '../safe-any'; /** - * actions witch trade aggregate response for frontend developer to process user interaction + * Actions which trade aggregate response for frontend developer to process user interaction */ export type AggregatorAction = T extends ActionKind ? { @@ -61,6 +61,9 @@ export type SignatureActionInfo = { body: object; }; +/** + * Pass through means pass payload to a NFTGo data api endpoint + */ export type PassThroughActionInfo = { orderIndexes: number[]; endpoint: string; @@ -68,6 +71,9 @@ export type PassThroughActionInfo = { payload: SafeAny; }; +/** + * All action can be divided into four action kinds {@link ActionKind} + */ export enum ActionName { AcceptOffer = 'accept-offer', AcceptListing = 'accept-listing', diff --git a/src/types/action/executor.ts b/src/types/action/executor.ts index 0e6a02d..0d4ba38 100644 --- a/src/types/action/executor.ts +++ b/src/types/action/executor.ts @@ -1,11 +1,21 @@ import { ActionTask } from './task'; +/** + * Convert actions to tasks and provide an `execute` function that can complete all tasks step by step + */ export interface ActionTaskExecutor { + /** + * Execute tasks step by step + * @param options {@link ExecuteOptions} + */ execute(options?: ExecuteOptions): Promise; [Symbol.iterator]: () => Generator; } export interface ExecuteOptions { + /** + * Callback after every task executed + */ onTaskExecuted: TaskExecutedHandle; } diff --git a/src/types/action/processor.ts b/src/types/action/processor.ts index e3ae1b9..2675713 100644 --- a/src/types/action/processor.ts +++ b/src/types/action/processor.ts @@ -1,17 +1,64 @@ import { SafeAny } from '../safe-any'; +import { TransactionHashHandler, ReceiptHandler, ErrorHandler } from '../utils'; import { ActionKind, AggregatorAction } from './action'; +/** + * Callbacks in processing transaction + */ +export interface ProcessTransactionCallBacks { + /** + * Callback after transaction been sent + */ + onTransaction: TransactionHashHandler; + /** + * Callback after transaction completed + */ + onReceipt: ReceiptHandler; + /** + * Callback after any error occurred before transaction completed + */ + onError: ErrorHandler; +} + +/** + * Processors for all kinds of actions + */ export interface ActionProcessor { + /** + * Process signature action, return a string signature + * @param action signature action {@link AggregatorAction}{@link ActionKind.Signature} + * @returns Promise + */ processSignatureAction: (action: AggregatorAction) => Promise; - processTransactionAction: (action: AggregatorAction) => Promise; + /** + * Process signature action, return true if transaction complete + * @param action transaction action {@link AggregatorAction}{@link ActionKind.Transaction} + * @param callbacks Callbacks in processing transaction {@link ProcessTransactionCallBacks} + * @returns Promise + */ + processTransactionAction: ( + action: AggregatorAction, + callbacks?: ProcessTransactionCallBacks + ) => Promise; + /** + * Process pass through action. For now, it means request a NFTGo data api with ProcessPassThroughActionParams + * @param action pass through action {@link AggregatorAction}{@link ActionKind.PassThrough} + * @param params {@link ProcessPassThroughActionParams} + * @returns Promise + */ processPassThroughAction: ( action: AggregatorAction, params: ProcessPassThroughActionParams ) => Promise; - processControllerAction(action: AggregatorAction): Promise[]>; + /** + * Process controller action. It process a http request which returns actions need to be processed + * @param action controller action {@link AggregatorAction}{@link ActionKind.Controller} + * @returns Promise[]> + */ + processControllerAction: (action: AggregatorAction) => Promise[]>; } export type ProcessPassThroughActionParams = { diff --git a/src/types/aggregator/aggregator.ts b/src/types/aggregator/aggregator.ts index 9adddee..191b652 100644 --- a/src/types/aggregator/aggregator.ts +++ b/src/types/aggregator/aggregator.ts @@ -5,42 +5,42 @@ import { AggregatorResponse } from './response'; export interface AggregatorInterface { /** - * - * - details: {@link } - * @param params {@link } - * @returns Promise<{@link }> + * Get the actions you need to execute to create offers + * - details: {@link https://docs.nftgo.io/reference/post_trade-v1-nft-create-offers} + * @param params {@link CreateOffersReq} + * @returns Promise<{@link AggregatorResponse}> */ createOffers(params: CreateOffersReq): Promise; /** - * - * - details: {@link } - * @param params {@link any} - * @returns Promise<{@link any}> + * Get the actions you need to execute to fulfill offers + * - details: {@link https://docs.nftgo.io/reference/post_trade-v1-nft-fulfill-offers} + * @param params {@link FulfillOffersReq} + * @returns Promise<{@link AggregatorResponse}> */ fulfillOffers(params: FulfillOffersReq): Promise; /** - * - * - details: {@link } - * @param params {@link any} - * @returns Promise<{@link any}> + * Get the actions you need to execute to cancel orders + * - details: {@link https://docs.nftgo.io/reference/post_trade-v1-nft-cancel-orders} + * @param params {@link CancelOrdersReq} + * @returns Promise<{@link AggregatorResponse}> */ cancelOrders(params: CancelOrdersReq): Promise; /** - * - * - details: {@link } - * @param params {@link any} - * @returns Promise<{@link any}> + * Get the actions you need to execute to create listings + * - details: {@link https://docs.nftgo.io/reference/post_trade-v1-nft-create-listings} + * @param params {@link CreateListingsReq} + * @returns Promise<{@link AggregatorResponse}> */ createListings(params: CreateListingsReq): Promise; /** - * buy nfts - * - details: {@link } + * Get the actions you need to execute to fulfill listings + * - details: {@link https://docs.nftgo.io/reference/post_trade-v1-nft-fulfill-listings} * @param params {@link FulfillListingsReq} - * @returns Promise<{@link }> + * @returns Promise<{@link AggregatorResponse}> */ fulfillListings(params: FulfillListingsReq): Promise; } diff --git a/src/types/aggregator/cancel.ts b/src/types/aggregator/cancel.ts index 37f29af..567590a 100644 --- a/src/types/aggregator/cancel.ts +++ b/src/types/aggregator/cancel.ts @@ -1,7 +1,7 @@ import { Order } from '../order'; /** - * cancel orders + * cancel orders request params */ export interface CancelOrdersReq { callerAddress: string; diff --git a/src/types/aggregator/create.ts b/src/types/aggregator/create.ts index bcef48d..9282f4a 100644 --- a/src/types/aggregator/create.ts +++ b/src/types/aggregator/create.ts @@ -1,8 +1,5 @@ import { OrderKind, Orderbook } from '../order'; -/** - * create listings - */ /** * CreateListingV1RequestParam */ @@ -86,7 +83,7 @@ export interface CreateOfferInput { */ token?: string; /** - * Bid on a particular collection with collection-id. Example: + * Bid on a particular collection with collection-contract. Example: * `0x8d04a8c79ceb0889bdd12acdf3fa9d207ed3ff63 */ collection?: string; diff --git a/src/types/authenticator/index.ts b/src/types/authenticator/index.ts index 075a522..2a34036 100644 --- a/src/types/authenticator/index.ts +++ b/src/types/authenticator/index.ts @@ -7,7 +7,22 @@ export type BlurAuthenticatorParams = { force?: boolean; }; -export type BlurAuthenticator = Authenticator; +export interface BlurAuthChallenge { + expiresOn: string; + hmac: string; + message: string; + walletAddress: string; +} + +export interface BlurAuthLoginParams extends BlurAuthChallenge { + signature: string; +} + +export type BlurAuthenticator = Authenticator & { + signBlurAuthChallenge: (params: BlurAuthLoginParams) => Promise; + getAuthChallenge(address: string): Promise; + getAuthSignature(message: string): Promise; +}; export type X2Y2AuthenticatorParams = { address: string; diff --git a/src/types/config.ts b/src/types/config.ts index 0fbaaad..0627c80 100644 --- a/src/types/config.ts +++ b/src/types/config.ts @@ -1,7 +1,6 @@ import { Agent } from 'https'; import { provider } from 'web3-core'; -// # user-land interface , core should implement this export enum EVMChain { ETHEREUM = 'ethereum', SEPOLIA = 'sepolia', @@ -12,15 +11,45 @@ export interface WalletConfig { privateKey: string; } +/** + * SDK Config + */ export interface Config { + /** + * Data api base url. Default as https://data-api.nftgo.io + */ baseUrl: string; + /** + * EVM chain. ETHEREUM as Default + */ chain: EVMChain; + /** + * NFTGo Data api key. Get one form https://nftgo.io/developers + */ apiKey?: string; + /** + * Web3 wallet config. Ignore web3Provider if walletConfig has been set + */ walletConfig?: WalletConfig; + /** + * Web3 provider. Will be ignored if walletConfig has been set + */ web3Provider?: provider; + /** + * Opensea api key. Used to post orders to Opensea + */ openSeaApiKeyConfig?: ApiKeyConfig; + /** + * LooksRare api key. Used to post orders to LooksRare + */ looksRareApiKeyConfig?: ApiKeyConfig; + /** + * X2Y2 api key. Used to post orders to X2Y2 + */ x2y2ApiKeyConfig?: ApiKeyConfig; + /** + * Http proxy agent. + */ agent?: Agent; } diff --git a/src/types/order-fetcher.ts b/src/types/order-fetcher.ts index 60b0620..31071f9 100644 --- a/src/types/order-fetcher.ts +++ b/src/types/order-fetcher.ts @@ -1,9 +1,24 @@ import { Order, OrderKind, OrderType } from './order'; +/** + * Response template for all order fetcher api + */ export interface OrderFetcherApiResponse { + /** + * Response code + */ code: string; + /** + * Response data. Specified by every api + */ data: T; + /** + * Response message + */ msg: string; + /** + * Http status code + */ statusCode: number; } @@ -11,7 +26,13 @@ export interface OrderFetcherApiResponse { * TokenPrice */ export interface TokenPrice { + /** + * Detail of token amount + */ amount: TokenAmount; + /** + * Detail of token currency + */ currency: TokenCurrency; } @@ -19,9 +40,21 @@ export interface TokenPrice { * TokenAmount */ export interface TokenAmount { + /** + * Token amount in decimal + */ decimal: number; + /** + * Token amount in platform token + */ platform: number | null; + /** + * Token amount in the smallest denomination + */ raw: string; + /** + * Amount in USD + */ usd: number | null; } @@ -29,9 +62,21 @@ export interface TokenAmount { * TokenCurrency */ export interface TokenCurrency { + /** + * Chain of the currency + */ chain: string; + /** + * Contract address of the currency + */ contractAddress: string; + /** + * The smallest denomination for the currency + */ decimals: number; + /** + * Token symbol + */ symbol: string; } @@ -65,22 +110,70 @@ export enum MarketId { * ListingOrderDTO */ export interface ListingOrderDTO { + /** + * Listing associated NFT contract address + */ contractAddress: string; + /** + * Time that order will expire + */ expiration: number; + /** + * False means order can be fulfilled by anyone + */ isPrivate: boolean; + /** + * Listing's maker address + */ maker: string; + /** + * The marketplace uniqueId that order belongs to + * {@link MarketId} + */ marketId: MarketId; + /** + * Time that order is crreated + */ orderCreateTime?: number; + /** + * Time that order will expire + */ orderExpirationTime?: number; orderGeneratedTime: number; + /** + * Unique order id. Shared between marketplaces + */ orderId: string; + /** + * Unique order hash. Provided and used by NFTGo + */ orderHash: string; + /** + * Order price + * {@link TokenPrice} + */ price: TokenPrice; quantityFilled: number; + /** + * Number of tokens remaining for this listing + */ quantityRemaining: number; + /** + * Order's status + * {@link OrderStatus} + */ status: OrderStatus; + /** + * Listing's taker address, generally points to zero address implies any address can fulfill the listing + */ taker: string; + /** + * Listing associated NFT token ID + */ tokenId: string; + /** + * Number of tokens when listing was created + */ totalQuantity: number; } @@ -88,22 +181,74 @@ export interface ListingOrderDTO { * OfferDTO */ export interface OfferDTO { + /** + * Offer associated NFT contract address + */ contractAddress: string; + /** + * Describes the offer kind, this can be token, contract or trait offer. + */ criteria: string; + /** + * False means order can be fulfilled by anyone + */ isPrivate: boolean; + /** + * Offer's marketplace protocol + * {@link OrderKind} + */ kind: OrderKind; + /** + * Offer's maker address + */ maker: string; + /** + * The marketplace uniqueId that order belongs to + * {@link MarketId} + */ marketId: string; - orderCreateTime: number; + /** + * Time that order is crreated + */ + orderCreateTime?: number; + /** + * Time that order will expire + */ orderExpirationTime: number; + /** + * Unique order id. Shared between marketplaces + */ orderId: string; + /** + * Unique order hash. Provided and used by NFTGo + */ orderHash: string; + /** + * Offer price + * {@link TokenPrice} + */ price: TokenPrice; + /** + * Number of tokens remaining for this offer + */ quantityRemaining: number; rawData?: string; + /** + * Offer's status + * {@link OrderStatus} + */ status: OrderStatus; + /** + * Offer's taker address, generally points to zero address implies any address can fulfill the offer + */ taker: string; + /** + * Offer associated NFT token ID + */ tokenId?: string; + /** + * Number of tokens when offer was created + */ totalQuantity: number; } @@ -136,10 +281,11 @@ export interface OrdersFetcherResp { listingDTOs: ListingOrderDTO[]; offerDTOs: OfferDTO[]; } + export interface OrderFetcherInterface { /** - * Return listings and offers of a contract - * - details: {@link } + * Return listings and offers of a collection by contract + * - details: {@link https://docs.nftgo.io/reference/post_orderbook-v1-orders-get-orders-by-contract} * @param params {@link GetOrdersByContractReq} * @returns Promise<{@link OrdersFetcherResp}> */ @@ -147,23 +293,23 @@ export interface OrderFetcherInterface { /** * Return listings and offers of a NFT - * - details: {@link } + * - details: {@link https://docs.nftgo.io/reference/post_orderbook-v1-orders-get-orders-by-nft} * @param params {@link GetOrdersByNftsReq} * @returns Promise<{@link OrdersFetcherResp}> */ getOrdersByNFT(params: GetOrdersByNftsReq): Promise; /** - * Return listings and offers of an order - * - details: {@link } + * Return listings and offers by order ids + * - details: {@link https://docs.nftgo.io/reference/post_orderbook-v1-orders-get-orders-by-ids} * @param params {@link GetOrdersByIdsReq} * @returns Promise<{@link OrdersFetcherResp}> */ getOrdersByIds(params: GetOrdersByIdsReq): Promise; /** - * Return listings and offers of a maker - * - details: {@link } + * Return listings and offers of a wallet address + * - details: {@link https://docs.nftgo.io/reference/post_orderbook-v1-orders-get-orders-by-maker} * @param params {@link GetOrdersByMakerReq} * @returns Promise<{@link OrdersFetcherResp}> */ diff --git a/src/types/utils.ts b/src/types/utils.ts index 3a81d53..0e8ce92 100644 --- a/src/types/utils.ts +++ b/src/types/utils.ts @@ -1,17 +1,17 @@ -import { ActionKind, ActionProcessor, ActionTaskExecutor, AggregatorAction } from './action'; import { ethers } from 'ethers'; import { Log, TransactionConfig, TransactionReceipt } from 'web3-core'; import { BlurAuthenticator, X2Y2Authenticator } from './authenticator'; -import { SafeAny } from './safe-any'; +import { ActionKind, AggregatorAction } from './action/action'; +import { ActionTaskExecutor } from './action/executor'; +import { ActionProcessor } from './action/processor'; export interface InternalUtils { - blurAuthenticator: BlurAuthenticator; - x2y2Authenticator: X2Y2Authenticator; + blurAuthenticator?: BlurAuthenticator; + x2y2Authenticator?: X2Y2Authenticator; createActionExecutor?: (actions: AggregatorAction[]) => ActionTaskExecutor; /** * Decode transaction log, return contract, token id, trading amount, buyer - * - details: {@link } * @param log {@link Log} single log returned by send transaction method * @returns res {@link DecodeLogRes} */ @@ -19,31 +19,35 @@ export interface InternalUtils { processor?: ActionProcessor; /** * Send transaction with safe mode, using flash bot - * - details: {@link } * @param transactionConfig {@link https://docs.ethers.io/v5/api/providers/types/#providers-TransactionRequest} transaction config * @returns transaction {@link Transaction} */ sendSafeModeTransaction(transactionConfig: Partial): Transaction; /** * Send transaction - * - details: {@link } * @param transactionConfig {@link https://web3js.readthedocs.io/en/v1.8.2/web3-eth.html#sendtransaction} transaction config * @returns transaction {@link Transaction} */ sendTransaction(transactionConfig: TransactionConfig): Transaction; /** - * inspect a transaction - * - details: {@link } + * Inspect a transaction * @param params {@link InspectTransactionParams} transaction hash, inspect interval * @returns transaction {@link Transaction} */ inspectTransaction(params: InspectTransactionParams): Transaction; - // standard sign message - signMessage(message: string): Promise; + /** + * Standard sign message + * @param message string + * @returns Promise + */ + signMessage: (message: string) => Promise; - // TODO: signer - getSigner(): SafeAny; + /** + * Get ehters signer + * @returns ethers.providers.JsonRpcSigner | ethers.Wallet + */ + getSigner: () => ethers.providers.JsonRpcSigner | ethers.Wallet; } export interface Utils extends InternalUtils { diff --git a/tsconfig.json b/tsconfig.json index e971885..04da3cd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -34,8 +34,5 @@ }, "include": [ "src", - "__test__", - "./node_modules/types-bn/index.d.ts", - "./node_modules/types-ethereumjs-util/index.d.ts", ] } diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 0000000..c6df2d1 --- /dev/null +++ b/typedoc.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["./src/types/index.ts"], + "plugin": ["typedoc-plugin-markdown"], + "out": "docs/type", +}