@mojito-inc/core-service
Version:
Mojito Core API service for auction, payment, token
1,803 lines (1,756 loc) • 97.7 kB
TypeScript
import React, { FC } from 'react';
import { ApolloClient, NormalizedCacheObject, ErrorPolicy, DefaultContext, FetchPolicy } from '@apollo/client';
interface CoreServiceProviderProps {
children: React.ReactNode;
client?: ApolloClient<NormalizedCacheObject>;
uri?: string;
token?: string;
}
type SessionStatus = 'Active' | 'Expired';
declare const CoreServiceProvider: FC<CoreServiceProviderProps>;
interface Response<T> {
data?: T;
networkStatus?: number;
}
interface QueryOptions {
errorPolicy?: ErrorPolicy;
context?: DefaultContext;
fetchPolicy?: FetchPolicy;
pollInterval?: number;
notifyOnNetworkStatusChange?: boolean;
returnPartialData?: boolean;
partialRefetch?: boolean;
canonizeResults?: boolean;
}
interface MutationOptions {
errorPolicy?: ErrorPolicy;
awaitRefetchQueries?: boolean;
}
interface MarketplaceUser {
id: string;
avatar: string;
username: string;
}
interface BidsItemData {
id: string;
marketplaceAuctionLotId: string;
currentBid: number;
maximumBid: number;
userId: string;
amount: number;
isCurrent: number;
createdAt: Date;
deletedAt: Date;
marketplaceUser: MarketplaceUser;
isMine: number;
buyersPremium: number;
overheadPremium: number;
finalPrice: number;
txHash: string;
tax: number;
walletAddress: string;
txStatus: string;
}
declare enum MarketplaceCollectionItemStatus {
Active = "Active",
Completed = "Completed",
Hidden = "Hidden",
Preview = "Preview"
}
interface MetaData$4 {
name: string;
description: string;
image: string;
animationURL?: string;
openSeaImageURL?: string;
animationFormat?: string;
animationType?: string;
}
interface Network {
id: string;
name: string;
chainID: number;
}
interface NFTAttributes {
traitType: string;
traitValue: string;
}
interface NFTDetail {
contractAddress: string;
tokenId: string;
tokenType: string;
network: Network;
metadata: MetaData$4;
nftTokenId: string;
nftAttributes: NFTAttributes[];
}
interface DetailsInfo {
id: string;
totalUnits: number;
perWalletLimit: number;
startDate: string;
endDate: string;
claimingType: string;
totalAvailableUnits: number;
}
interface NetworkDetails {
id: string;
name: string;
chainID: number;
isTestnet: boolean;
}
interface CollectionDetails {
tokenType: string;
network: NetworkDetails;
}
interface CollectionItemByClaimCode {
id: string;
name: string;
status: string;
slug: string;
collectionId: string;
asset?: {
currentVersion: {
cdnUrl: string;
};
};
collectionDetails?: CollectionDetails;
deliveryMethod?: string;
description?: string;
saleType: string;
isRedeemedCode: boolean;
isOnchain: boolean;
NFTDetails: NFTDetail[];
details: DetailsInfo;
}
interface AuctionData {
collectionItemById?: {
id: string;
name: string;
artist: {
artistName: string;
};
status: MarketplaceCollectionItemStatus;
marketplaceTokenId: string;
collectionSlug: string;
slug: string;
collectionId: string;
saleType: string;
paymentCurrencyId: string;
isOnchain: boolean;
NFTDetails: {
contractAddress: string;
tokenId: number;
tokenType: string;
network: Network;
networkID: string;
owner: string;
metadata: MetaData$4;
nftAttributes: NFTAttributes[];
artist: {
id: string;
description: string;
artistName: string;
};
nftTokenId: string;
};
isReserved: boolean;
details: {
totalUnits: number;
perWalletLimit: number;
claimingType: string;
totalAvailableUnits: number;
id: string;
startingBid: string;
startDate: string;
endDate: string;
currentBid: {
userId: string;
maximumBid: number;
currentBid: number;
isMine: boolean;
walletAddress: string;
marketplaceUser: MarketplaceUser;
};
myBid: {
currentBid: number;
maximumBid: number;
};
bids: BidsItemData[];
marketplaceAuctionOnChainSettings: {
endTransactionHash: string;
};
};
};
}
type AuctionByClaimCodeData = {
collectionItemByClaimCode?: CollectionItemByClaimCode;
};
interface OnChainBidResponse {
verifyOnchainBid?: {
orgID: string;
networkID: string;
amount: number;
tax: number;
onChainAuctionContractAddress: string;
commissionFee: number;
platformFee: number;
};
}
interface MarketplaceAuctionLot {
id: string;
lotNumber: number;
marketplaceCollectionItemId: string;
startingBid: number;
reservePrice: number;
reserveMet: number;
previewDate: Date;
startDate: Date;
endDate: Date;
status: MarketplaceCollectionItemStatus;
currentBid: BidsItemData;
myBid: BidsItemData;
isOnchainAuction: number;
}
interface ConfirmOnChainBidResponse {
confirmOnchainBid?: {
amount?: number;
tax: number;
isCurrent?: boolean;
};
}
interface CreateMarketplaceAuctionBidResponse {
createMarketplaceAuctionBid?: {
id: string;
marketplaceAuctionLotId: string;
transactionHash: string;
amount: number;
};
}
interface AuctionDetailsParam {
id: string;
}
interface AuctionDetailsByClaimCodeParam {
claimCode: string;
}
interface VerifyOnChainBidParam {
lotID: string;
orgID: string;
walletAddress: string;
amount: number;
}
interface ConfirmOnChainBidParam {
lotID: string;
orgID: string;
walletAddress: string;
amount: number;
tax: number;
txhash: string;
commissionFee: number;
platformFee: number;
}
interface CreateMarketplaceAuctionBidParam {
marketplaceAuctionLotId: string;
amount: number;
}
interface AuctionService {
/**
* Returns auction Details
*
* @remarks
* This method is part of auction module, fetch auction details
*
* @param param - param {@link OnChainBidResponse}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link AuctionData} auction data
*
*/
auctionDetails: (param: AuctionDetailsParam, options?: QueryOptions) => Promise<Response<AuctionData>>;
/**
* Returns auction by claim code Details
*
* @remarks
* This method is part of auction module, fetch auction by claim code details
*
* @param param - param {@link OnChainBidResponse}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link AuctionByClaimCodeData} auction by claim code data
*
*/
auctionDetailsByClaimCode: (param: AuctionDetailsByClaimCodeParam, options?: QueryOptions) => Promise<Response<AuctionByClaimCodeData>>;
/**
* Returns On ChainBid Details
*
* @remarks
* This method is part of auction module, verify on chain bid
*
* @param param - param {@link OnChainBidResponse}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link OnChainBidResponse} On ChainBid data
*
*/
verifyOnChainBid: (param: VerifyOnChainBidParam, options?: QueryOptions) => Promise<Response<OnChainBidResponse>>;
/**
* Returns ConfirmOnChainBidResponse confirm On ChainBid
*
* @remarks
* This method is part of auction module, confirm on chain bid
*
* @param param - param {@link ConfirmOnChainBidParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link ConfirmOnChainBidResponse} BidsItem Data
*
*/
confirmOnChainBid: (param: ConfirmOnChainBidParam, options?: QueryOptions) => Promise<Response<ConfirmOnChainBidResponse>>;
/**
* Returns CreateMarketplaceAuctionBidResponse on create marketplace auction bid
*
* @remarks
* This method is part of auction module, create marketplace auction bid
*
* @param param - param {@link CreateMarketplaceAuctionBidParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link CreateMarketplaceAuctionBidResponse} BidsItem Data
*
*/
createMarketplaceAuctionBid: (param: CreateMarketplaceAuctionBidParam, options?: QueryOptions) => Promise<Response<CreateMarketplaceAuctionBidResponse>>;
}
/**
* Returns auction & bid service
*
* @remarks
* This method is part of auction service
*
* @returns {@link AuctionService} auction details service
*
*/
declare const useAuction: () => AuctionService;
interface RedeemClaimableCodeData {
redeemClaimableCode?: {
success?: boolean;
};
}
interface RedeemEarnableItemData {
redeemEarnableItem: {
redeemInitiated: boolean;
invoiceID: string;
claimVoucher?: {
voucherID: string;
claimExtension: string;
tokenUri: string;
claimer: string;
expiryTime: string;
signature: string;
};
};
}
interface RedeemEarnableCodeData {
redeemEarnableCode: {
redeemInitiated: boolean;
invoiceID: string;
};
}
interface MetaData$3 {
name: string;
description: string;
image: string;
}
interface NFTDetails {
title?: string;
description?: string;
onChainId?: string;
contractAddress?: string;
balance?: string;
metadataJSON?: string;
networkId?: string;
networkChainID?: number;
tokenMetadata?: MetaData$3;
}
interface InvoiceItems {
collectionTitle: string;
collectionItemTitle: string;
collectionItemImage: string;
collectionItemDescription: string;
transactionHash: string;
transactionStatus: string;
nftDetails: NFTDetails[];
}
interface GetInvoiceDetailsData {
invoiceID: string;
invoiceNumber: number;
internalUserID: string;
userName: string;
status: string;
items: InvoiceItems[];
}
interface GetClaimInvoiceDetailData {
getInvoiceDetails: GetInvoiceDetailsData;
}
interface GetContractDetailsData {
getContractDetails: {
id: string;
networkID: string;
contractName: string;
contractAddress: string;
version: string;
contractABIFileURL: string;
};
}
interface CompleteOnchainClaimData {
completeOnchainClaim: boolean;
}
interface CanRedeemClaimableData {
canRedeemClaimableItem: boolean;
}
interface CanRedeemClaimableV2Data {
canRedeemClaimableItemV2: {
canRedeem: boolean;
latestInvoice: {
invoiceID: string;
status: string;
onChainTokenId: number;
invoiceCreatedAt: string;
};
};
}
interface RedeemClaimableCodeParam {
code: string;
destAddr: string;
}
interface GateInput {
ruleId: string;
contractAddress: string;
tokenId: string;
ownerWallet: string;
}
interface RedeemEarnableItemParam {
claimableItemId: string;
destAddr?: string;
gating?: GateInput;
}
interface GetClaimInvoiceDetailParam {
invoiceID: string;
}
interface RedeemEarnableCodeParam {
code: string;
destAddr: string;
}
interface GetContractDetailsParam {
orgId: string;
networkId: string;
contractType: string;
}
interface CompleteOnchainClaimParam {
invoiceId: string;
txHash: string;
}
interface CanRedeemClaimableParam {
claimableItemID: string;
destAddr: string;
}
interface ClaimService {
/**
* Returns the redeem claim code
*
* @remarks
* This method is part of redeem claim code
*
* @param param - redeem claim code {@link RedeemClaimableCodeParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link RedeemClaimableCodeData} claim code status (success)
*
*/
redeemClaimableCode: (param: RedeemClaimableCodeParam, options?: QueryOptions) => Promise<Response<RedeemClaimableCodeData>>;
/**
* Returns the redeem claim code
*
* @remarks
* This method is part of redeem claim code
*
* @param param - redeem claim code {@link RedeemEarnableCodeParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link RedeemEarnableCodeData} claim code status (success)
*
*/
redeemEarnableCode: (param: RedeemEarnableCodeParam, options?: QueryOptions) => Promise<Response<RedeemEarnableCodeData>>;
/**
* Returns the status of Redeem Initiated
*
* @remarks
* This method is part of redeem earnable item
*
* @param param - redeem earnable item {@link RedeemEarnableItemParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link RedeemEarnableItemData} redeem earnable item status
*
*/
redeemEarnableItem: (param: RedeemEarnableItemParam, options?: MutationOptions) => Promise<Response<RedeemEarnableItemData>>;
/**
* Returns Invoice detail
*
* @remarks
* This method is part of getting invoice detail
*
* @param param - invoice id {@link GetClaimInvoiceDetailParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link GetClaimInvoiceDetailData} invoice detail
*
*/
getInvoiceDetails: (param: GetClaimInvoiceDetailParam, options?: QueryOptions) => Promise<Response<GetClaimInvoiceDetailData>>;
/**
* Returns contract details
*
* @remarks
* This method is part of getting contract detail
*
* @param param - contract param {@link GetContractDetailsParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link GetContractDetailsData} contract details
*
*/
getContractDetails: (param: GetContractDetailsParam, options?: QueryOptions) => Promise<Response<GetContractDetailsData>>;
/**
* Returns the boolean
*
* @remarks
* This method is part of complete onchain claim
*
* @param param - complete onchain claim {@link CompleteOnchainClaimParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link CompleteOnchainClaimData} complete onchain claim status
*
*/
completeOnchainClaim: (param: CompleteOnchainClaimParam, options?: MutationOptions) => Promise<Response<CompleteOnchainClaimData>>;
/**
* Returns the boolean
*
* @remarks
* This method is part of claim service
*
* @param param - param {@link CanRedeemClaimableParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link CanRedeemClaimableData} redeem data
*
*/
canRedeemClaimableItem: (param: CanRedeemClaimableParam, options?: QueryOptions) => Promise<Response<CanRedeemClaimableData>>;
/**
* Returns the invoice object
*
* @remarks
* This method is part of claim service
*
* @param param - param {@link CanRedeemClaimableParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link CanRedeemClaimableV2Data} redeem data
*
*/
canRedeemClaimableItemV2: (param: CanRedeemClaimableParam, options?: QueryOptions) => Promise<Response<CanRedeemClaimableV2Data>>;
}
/**
* Returns redeem code service
*
* @remarks
* This method is part of the web3 claim token
*
* @returns {@link ClaimService} redeem code service
*
*/
declare const useClaims: () => ClaimService;
declare enum CryptoCurrencyCode {
ETH = "ETH",
MATIC = "MATIC",
WETH = "WETH",
WMATIC = "WMATIC",
AR = "AR",
EUR = "EUR",
VIN = "VIN",
SOL = "SOL"
}
declare enum CurrencyCode {
USD = "USD",
EUR = "EUR",
ETH = "ETH",
MATIC = "MATIC",
WETH = "WETH",
WMATIC = "WMATIC",
AR = "AR",
BTC = "BTC",
USDC = "USDC",
USDT = "USDT",
SOL = "SOL",
VIN = "VIN"
}
interface GetUSDConversionParam {
cryptoCurrencyCode: CryptoCurrencyCode;
}
interface GetSupportedCurrenciesParam {
nftTokenId: string;
orgId: string;
}
interface GetConversionRateParam {
toCurrency: CurrencyCode;
fromCurrecny: CurrencyCode;
}
interface USDConversionData {
getUSDPrice?: {
amount: string;
currency: string;
base: string;
};
}
interface SupportedCurrencyData {
id: string;
name: string;
networkId: string;
symbol: string;
contractAddress: string;
secondaryMarketplaceContractAddress: string;
network: {
id: string;
name: string;
chainID: number;
wethAddress: string;
paymentCurrency: string;
};
}
interface GetSupportedCurrenciesData {
getSupportedCurrencies?: SupportedCurrencyData[];
}
interface GetConversionRateData {
getConversionRate?: {
rate: number;
base: CurrencyCode;
currency: CurrencyCode;
};
}
interface ConversionService {
/**
* Returns the usd conversion from crypto
*
* @remarks
* This method is part of currency conversion
*
* @param param - param {@link GetUSDConversionParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link USDConversionData} claim code status (success)
*
*/
getUSDConversion: (param: GetUSDConversionParam, options?: QueryOptions) => Promise<Response<USDConversionData>>;
/**
* Returns the conversion of any currency
*
* @remarks
* This method is part of currency conversion
*
* @param param - param {@link GetConversionRateParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link GetConversionRateData} conversion currency response
*
*/
getConversionRate: (param: GetConversionRateParam, options?: QueryOptions) => Promise<Response<GetConversionRateData>>;
/**
* Returns the supported currency list
*
* @remarks
* This method is part of currency conversion
*
* @param param - param {@link GetSupportedCurrenciesParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link GetSupportedCurrenciesData} supported currency data
*
*/
getSupportedCurrency: (param: GetSupportedCurrenciesParam, options?: QueryOptions) => Promise<Response<GetSupportedCurrenciesData>>;
}
/**
* Returns the currency conversion service
*
* @remarks
* This method is part of the currency conversion service
*
* @returns {@link ConversionService} signature service
*
*/
declare const useConversion: () => ConversionService;
interface LoginWithSignatureData {
loginWithSignature?: {
token?: string;
tokenType?: string;
__typename?: string;
};
}
interface GetSignatureData {
getSignatureMessage?: string;
}
interface SignUpWithSignatureData {
signUpWithSignature?: {
token?: string;
tokenType?: string;
jwtRefreshToken?: string;
};
}
interface GetSignatureParam {
orgId: string;
walletAddress: string;
networkID: string;
}
interface LoginWithSignatureParam {
chainId: number;
challenge: string;
orgId: string;
signature: string;
signer: string;
}
interface SignUpWithSignatureParam {
chainId: number;
challenge: string;
orgId: string;
signature: string;
signer: string;
firstName: string;
lastName: string;
email: string;
}
interface SignatureService {
/**
* Returns the signature message
*
* @remarks
* This method is part of the web3 signature message
*
* @param param - param {@link GetSignatureParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link GetSignatureData} signature data
*
*/
getSignatureMessage: (param: GetSignatureParam, options?: QueryOptions) => Promise<Response<GetSignatureData>>;
/**
* Returns the login with signature
*
* @remarks
* This method is part of the web3 login signature message & signer
*
* @param param - login with signature message {@link GetSignatureParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link LoginWithSignatureData} signature data
*
*/
loginWithSignature: (param: LoginWithSignatureParam, options?: MutationOptions) => Promise<Response<LoginWithSignatureData>>;
/**
* Returns the signUp with signature
*
* @remarks
* This method is part of the web3 signUp signature message & signer
*
* @param param - SignUp with Signature Param {@link SignUpWithSignatureParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link SignUpWithSignatureData} signUp with signature data
*
*/
signUpWithSignature: (param: SignUpWithSignatureParam, options?: MutationOptions) => Promise<Response<SignUpWithSignatureData>>;
}
/**
* Returns the signature message service & login
*
* @remarks
* This method is part of the web3 signature message
*
* @returns {@link SignatureService} signature service
*
*/
declare const useSignature: () => SignatureService;
declare enum KycStatusEnum {
none = "None",
pending = "Pending",
level1 = "Level1",
level2 = "Level2",
clear = "Clear",
failed1 = "Failed1",
failed2 = "Failed2"
}
interface GetUserData {
me?: {
id: string;
user?: {
name: string;
username: string;
email: string;
};
userOrgs?: {
id: string;
role: string;
organizationId: string;
organization?: {
purchaseLimitWithoutKYC: number;
};
externalUserId: string;
kycStatus: KycStatusEnum;
w8Form: boolean;
isBlacklisted: boolean;
bidAllowed: boolean;
username: string;
avatar: string;
profilePic: string;
reason: string;
settings: string;
}[];
};
}
interface UpdateUserOrgSettingsData {
updateUserOrgSettings: {
id: string;
username: string;
avatar: string;
};
}
interface GetUserParam {
orgId: string;
}
interface UpdateUserOrgSettingsParam {
userOrgId: string;
username: string;
avatar: string;
settingsJson?: string;
profilePic?: string;
}
interface UserService {
/**
* Returns user Details
*
* @remarks
* This method is part of user module, fetch current user details
*
* @param param - param {@link GetUserParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link GetUserData} current user data
*
*/
getUser: (param: GetUserParam, options?: QueryOptions) => Promise<Response<GetUserData>>;
/**
* Returns updated user details
*
* @remarks
* This method is part of user module, update user details
*
* @param param - param {@link UpdateUserOrgSettingsParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link UpdateUserOrgSettingsData} user org settings Data
*
*/
updateUserOrgSettings: (param: UpdateUserOrgSettingsParam, options?: QueryOptions) => Promise<Response<UpdateUserOrgSettingsData>>;
}
/**
* Returns user service
*
* @remarks
* This method is part of user service
*
* @returns {@link UserService} user details service
*
*/
declare const useUser: () => UserService;
interface ApplicantData {
id: string;
firstName: string;
lastName: string;
email?: string;
dob?: string;
href?: string;
idNumbers?: {
type: string;
value: string;
stateCode: string;
};
address?: {
flatNumber?: string;
buildingNumber?: string;
buildingName?: string;
street?: string;
subStreet?: string;
town?: string;
postcode?: string;
country?: string;
line1?: string;
line2?: string;
line3?: string;
state?: string;
};
}
interface GetApplicantData {
getApplicant: ApplicantData;
}
interface CreateApplicantData {
createApplicant: ApplicantData;
}
interface UpdateApplicantData {
updateApplicant: ApplicantData;
}
interface GetSDKTokenData {
getSDKToken: {
token: string;
};
}
interface CreateCheckData {
createCheck: {
id: string;
success: string;
};
}
interface InputParam {
firstName: string;
lastName: string;
email?: string;
dob?: string;
address?: {
flatNumber?: string;
buildingNumber?: string;
buildingName?: string;
street?: string;
subStreet?: string;
town?: string;
postcode: string;
country: string;
line1?: string;
line2?: string;
line3?: string;
state?: string;
};
}
interface CreateApplicantParam {
orgID: string;
input: InputParam;
}
interface UpdateApplicantParam {
applicantID: string;
input: InputParam;
}
interface GetApplicantParam {
organizationID: string;
}
interface GetSDKTokenParam {
applicantID: string;
referrer: string;
}
interface CreateCheckParam {
applicantID: string;
}
interface KYCService {
/**
* Returns applicant details
*
* @remarks
* This method is part of KYC module, create applicant
*
* @param param - param {@link OnChainBidResponse}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link CreateApplicantData} applicant data
*
*/
createApplicant: (param: CreateApplicantParam, options?: QueryOptions) => Promise<Response<CreateApplicantData>>;
/**
* Returns applicant details
*
* @remarks
* This method is part of KYC module, update applicant
*
* @param param - param {@link OnChainBidResponse}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link UpdateApplicantData} applicant data
*
*/
updateApplicant: (param: UpdateApplicantParam, options?: QueryOptions) => Promise<Response<UpdateApplicantData>>;
/**
* Returns applicant details
*
* @remarks
* This method is part of KYC module, fetch applicant details
*
* @param param - param {@link OnChainBidResponse}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link GetApplicantData} applicant data
*
*/
getApplicant: (param: GetApplicantParam, options?: QueryOptions) => Promise<Response<GetApplicantData>>;
/**
* Returns token details
*
* @remarks
* This method is part of KYC module, fetch SDK token details
*
* @param param - param {@link OnChainBidResponse}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link GetSDKTokenData} token data
*
*/
getSDKToken: (param: GetSDKTokenParam, options?: QueryOptions) => Promise<Response<GetSDKTokenData>>;
/**
* Returns success response
*
* @remarks
* This method is part of KYC module, create check
*
* @param param - param {@link OnChainBidResponse}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link CreateCheckData} success response
*
*/
createCheck: (param: CreateCheckParam, options?: QueryOptions) => Promise<Response<CreateCheckData>>;
}
/**
* Returns KYC service
*
* @remarks
* This method is part of KYC service
*
* @returns {@link KYCService} KYC details service
*
*/
declare const useKYC: () => KYCService;
interface NetworkData {
id: string;
name: string;
chainID: number;
isTestnet: boolean;
}
interface GetSupportedNetworksData {
getSupportedNetworks: NetworkData[];
}
interface ConnectExternalWalletData {
connectExternalWallet: boolean;
}
interface NFTPriceData {
value: number;
unit: string;
type: string;
}
interface MetaData$2 {
name: string;
description: string;
image: string;
animationURL?: string;
openSeaImageURL?: string;
animationFormat?: string;
animationType?: string;
downloadVideo?: string;
video: string;
}
declare enum TokenStatus$1 {
NEW = "NEW",
ENQUIRY_PENDING = "ENQUIRY_PENDING",
OPEN_FOR_SALE = "OPEN_FOR_SALE",
SALE_PENDING = "SALE_PENDING"
}
interface TokenData {
contractAddress: string;
id: string;
network: string;
networkID: string;
tokenType: string;
balance: string;
title: string;
description: string;
tokenURI: string;
timeLastUpdated: string;
nftTokenId: string;
mintedAt: string;
status: TokenStatus$1;
listedAt: string;
editionNumber: number;
mediaSourceURL: string;
mediaSourceExtension: string;
mediaSourceType: string;
metadata: MetaData$2;
contractName: string;
artistName: string;
price: {
buyNowPrice: NFTPriceData[];
lastPurchasedPrice: NFTPriceData[];
makeOfferHighestPrice: NFTPriceData[];
makeOfferLatestPrice: NFTPriceData[];
};
listedOrderInfo: {
id: string;
listedCurrency: {
contractAddress: string;
};
price: NFTPriceData[];
};
owner?: string;
latestOffer: {
price: NFTPriceData[];
};
isBuyNowEnabled: boolean;
isMakeOfferEnabled: boolean;
isOfferExist: boolean;
}
interface RequestObjectData {
networkID: string;
prevPageKey: string;
nextPageKey: string;
count: number;
totalCount: number;
}
interface GetActiveWalletsContentData {
getActiveWalletsContent: {
tokens?: TokenData[];
requestObj?: RequestObjectData;
};
}
interface GetSupportedNetworksParam {
orgId: string;
includeTestnets: boolean;
}
interface ConnectExternalWalletParam {
signature: string;
message: string;
address: string;
orgID: string;
networkID: string;
}
declare enum ActiveWalletSort {
RECENTLY_LISTED = "recently_listed",
RECENTLY_MINTED = "recently_minted",
INITIALLY_MINTED = "initially_minted",
PRICE_LOW_TO_HIGH = "price_low_to_high",
PRICE_HIGH_TO_LOW = "price_high_to_low",
MOST_SAVED = "most_saved",
PURCHASED_FROM_ORG = "purchased_from_org"
}
interface ActiveWalletFilter {
search?: string;
sort?: ActiveWalletSort;
}
declare enum CurrencyCodeFiat {
USD = "USD",
EUR = "EUR"
}
type InvoiceFilterInputData = {
dropID?: string;
listingID?: string;
};
interface GetActiveWalletsContentParam {
walletAddress: string;
networkId: string;
orgID: string;
filters?: ActiveWalletFilter;
nextPageKey?: string;
refreshCache?: boolean;
currency?: CurrencyCodeFiat;
nftContractAddress?: string[];
itemFilter?: InvoiceFilterInputData;
}
interface ConnectWalletService {
/**
* Returns the active wallet data
*
* @remarks
* This method is part of connect wallet
*
* @param param - param {@link GetActiveWalletsContentParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link GetActiveWalletsContentData} wallet data
*
*/
getActiveWalletsContent: (param: GetActiveWalletsContentParam, options?: QueryOptions) => Promise<Response<GetActiveWalletsContentData>>;
/**
* Returns the supported network list
*
* @remarks
* This method is part of connect wallet
*
* @param param - param {@link GetSupportedNetworksParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link GetSupportedNetworksData} supported network data
*
*/
getSupportedNetworks: (param: GetSupportedNetworksParam, options?: QueryOptions) => Promise<Response<GetSupportedNetworksData>>;
/**
* Returns the boolean wallet connected or not
*
* @remarks
* This method is part of connect wallet
*
* @param param - param {@link ConnectExternalWalletParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link ConnectExternalWalletData} get boolean
*
*/
connectExternalWallet: (param: ConnectExternalWalletParam, options?: QueryOptions) => Promise<Response<ConnectExternalWalletData>>;
}
/**
* Returns the connect wallet service
*
* @remarks
* This method is part of the connect wallet service
*
* @returns {@link ConnectWalletService} connect wallet service
*
*/
declare const useConnectWallet: () => ConnectWalletService;
declare enum TokenType$2 {
erc721 = "ERC721",
erc1155 = "ERC1155"
}
interface CreateSignatureToListNFTForSaleParam {
orgId: string;
nftTokenId: string;
tokenType: string;
quantity: number;
nftOwnerAddress: string;
fixedPrice: number;
paymentToken: string;
currencyId: string;
}
interface SubmitProofOfApprovalParam {
orgID: string;
nftTokenId: string;
signature: string;
quantity?: number;
fixedPrice?: number;
paymentToken?: string;
currencyId?: string;
creatorFee?: number;
listingReceipt?: string;
currency?: CurrencyCodeFiat;
}
interface RemoveListingParam {
nftTokenId: string;
orgID: string;
currency?: CurrencyCodeFiat;
signature?: string;
}
interface InitiateRemoveListingParam {
nftTokenId: string;
orgId: string;
}
interface UpdateTokenListingParam {
orgId: string;
nftTokenId: string;
fixedPrice: number;
signature: string;
}
interface EditTokenListingParam {
orgId: string;
nftTokenId: string;
fixedPrice: number;
}
declare enum NFTOrderType$1 {
listing = "LISTING",
offer = "OFFER"
}
interface bubbleGumListArgParams {
price: number;
isCnft: boolean;
isVin: boolean;
dataHash: string;
creatorHash: string;
nonce: number;
index: number;
root?: string;
proof?: string[];
isUpdate: boolean;
}
interface BubbleGumListParams {
seller: string;
sellerTokenAccount: string;
mintAccount: string;
systemProgram: string;
tokenProgram: string;
rent: string;
bubblegumProgram: string;
compressionProgram: string;
treeAuthority: string;
leafOwner: string;
previousLeafDelegate: string;
newLeafDelegate: string;
logWrapper: string;
merkleTree: string;
listDiscriminator: number[];
metadataId: string;
listingReceipt: string;
bubblegumListArg: bubbleGumListArgParams;
}
interface bubblegumMakeOfferArg {
offerAmount: number;
isCnft: boolean;
isVin: boolean;
expirationTime: number;
nonce: number;
index: number;
}
interface BubblegumMakeOfferParams {
buyer: string;
buyerTokenAccount: string;
offerEscrow: string;
mintAccount: string;
metadataId: string;
offer: string;
systemProgram: string;
tokenProgram: string;
makeOfferDiscriminator: number[];
seller?: string;
bubblegumMakeOfferArg: bubblegumMakeOfferArg;
totalActiveOfferAmount?: number;
}
interface CreateSignatureToListNFTForSaleData {
createSignatureToListNFTForSale: {
messageToSign: string;
order: {
id: string;
nftTokenId: string;
tokenContract: string;
tokenId: string;
tokenType: TokenType$2;
quantity: number;
nftOwnerAddress: string;
fixedPrice: number;
paymentToken: string;
orderType: NFTOrderType$1;
};
isSigningRequired: boolean;
isNonEVM: boolean;
bubblegumListParams?: BubbleGumListParams;
bubblegumMakeOfferParams?: BubblegumMakeOfferParams;
};
}
interface SubmitProofOfApprovalData {
submitProofOfApproval: string;
}
interface RemoveListingData {
removeListing: string;
}
interface InitiateRemoveListingResponseData {
seller: string;
sellerTokenAccount: string;
mintAccount: string;
metadataId: string;
systemProgram: string;
tokenProgram: string;
rent: string;
bubblegumProgram: string;
compressionProgram: string;
treeAuthority: string;
leafOwner: string;
previousLeafDelegate: string;
newLeafDelegate: string;
logWrapper: string;
merkleTree: string;
listDiscriminator: number[];
bubblegumListArg: bubbleGumListArgParams;
listingReceipt: string;
}
interface InitiateRemoveListingData {
initiateRemoveListing: InitiateRemoveListingResponseData;
}
interface UpdateTokenListingData {
updateTokenListing: string;
}
interface EditTokenListingData {
editTokenListing: BubbleGumListParams;
}
interface ListItemService {
/**
* Returns the signature message and order data
*
* @remarks
* This method is part of list item service
*
* @param param - create signature for list item {@link CreateSignatureToListNFTForSaleParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link CreateSignatureToListNFTForSaleData} signature message and order data
*
*/
createSignatureToListNFTForSale: (param: CreateSignatureToListNFTForSaleParam, options?: QueryOptions) => Promise<Response<CreateSignatureToListNFTForSaleData>>;
/**
* Returns string
*
* @remarks
* This method is part of list item service
*
* @param param - submit listing {@link SubmitProofOfApprovalParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link SubmitProofOfApprovalData} success response
*
*/
submitProofOfApproval: (param: SubmitProofOfApprovalParam, options?: QueryOptions) => Promise<Response<SubmitProofOfApprovalData>>;
/**
* Returns string
*
* @remarks
* This method is part of list item service
*
* @param param - remove listing {@link RemoveListingParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link RemoveListingData} success response
*
*/
removeListing: (param: RemoveListingParam, options?: QueryOptions) => Promise<Response<RemoveListingData>>;
/**
* Returns string
*
* @remarks
* This method is part of list item service
*
* @param param - remove listing {@link InitiateRemoveListingParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link InitiateRemoveListingData} success response
*
*/
initiateRemoveListing: (param: InitiateRemoveListingParam, options?: QueryOptions) => Promise<Response<InitiateRemoveListingData>>;
/**
* Returns string
*
* @remarks
* This method is part of list item service
*
* @param param - remove listing {@link UpdateTokenListingParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link UpdateTokenListingData} success response
*
*/
updateTokenListing: (param: UpdateTokenListingParam, options?: QueryOptions) => Promise<Response<UpdateTokenListingData>>;
/**
* Returns edit listing response
*
* @remarks
* This method is part of list item service
*
* @param param - remove listing {@link EditTokenListingParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link EditTokenListingData} success response
*
*/
editTokenListing: (param: EditTokenListingParam, options?: QueryOptions) => Promise<Response<EditTokenListingData>>;
}
/**
* Returns list item service
*
* @remarks
* This method is part of the list item service
*
* @returns {@link ListItemService} list item service
*
*/
declare const useListItem: () => ListItemService;
interface AddressData {
street1: string;
city: string;
state: string;
postalCode: string;
country: string;
currencyCode?: string;
}
interface GetTaxQuoteData {
getTaxQuote: {
verifiedAddress: AddressData;
taxablePrice: number;
totalTaxedPrice: number;
totalTaxAmount: number;
};
}
interface TaxResponse {
cryptoTaxPrice: number;
cryptoTotalPrice: number;
USDUnitprice: number;
taxPercentage: number;
}
interface EstimateTaxAndRoyaltyFeeData {
estimateTaxAndRoyaltyFee?: {
taxPercentage: number;
royaltyFee: number;
platformFee: number;
commissionFee?: number;
taxResponse?: TaxResponse;
};
}
interface GetTaxQuoteParam {
street1: string;
city: string;
state: string;
postalCode: string;
country: string;
currencyCode?: string;
orgID: string;
taxablePrice: number;
}
declare enum TaxEstimateType {
LIST_FOR_SALE = "ListForSale",
BUY_NOW = "BuyNow",
MAKE_OFFER = "MakeOffer",
ACCEPT_OFFER = "AcceptOffer"
}
interface EstimateTaxAndRoyaltyFeeParam {
orgId: string;
orderId?: string;
nftTokenId?: string;
price?: number;
estimateType: TaxEstimateType;
country?: string;
postalCode?: string;
currency?: CurrencyCodeFiat;
}
interface FeeService {
/**
* Returns the tax and fee data
*
* @remarks
* This method is part of tax and fee service
*
* @param param - tax and fee param {@link EstimateTaxAndRoyaltyFeeParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link EstimateTaxAndRoyaltyFeeData} tax and fee data
*
*/
estimateTaxAndRoyaltyFee: (param: EstimateTaxAndRoyaltyFeeParam, options?: QueryOptions) => Promise<Response<EstimateTaxAndRoyaltyFeeData>>;
/**
* Returns tax data
*
* @remarks
* This method is part of tax and fee service
*
* @param param - tax param {@link GetTaxQuoteParam}
* @param options - graphql fetch query options {@link QueryOptions}
* @returns {@link GetTaxQuoteData} tax data
*
*/
getTaxQuote: (param: GetTaxQuoteParam, options?: QueryOptions) => Promise<Response<GetTaxQuoteData>>;
}
/**
* Returns tax and fee service
*
* @remarks
* This method is part of the tax and fee service
*
* @returns {@link FeeService} tax and fee service
*
*/
declare const useFee: () => FeeService;
interface NFTPrice$2 {
value: number;
unit: string;
type: string;
}
interface User {
id: string;
username: string;
name: string;
email: string;
avatar: string;
}
interface MetaData$1 {
name: string;
description: string;
image: string;
animationURL?: string;
openSeaImageURL?: string;
}
interface Artist {
id: string;
description: string;
artistName: string;
artistLocation: string;
artistContactEmail: string;
artistContactNumber: string;
artistWebsite: string;
slug?: string;
}
interface Registry {
ID: string;
NetworkID: string;
Network: {
name: string;
};
OrganizationID: string;
CollectionName: string;
ContractAddress: string;
IsAllTokensApproved: boolean;
MarketplaceID: string;
TotalApproved: number;
CollectionTotal: number;
ArtistID: string;
Artist: Artist;
CategoryID: string;
CreatedByUserID: string;
CreatedAt: string;
UpdatedAt: string;
}
declare enum TokenType$1 {
erc721 = "ERC721",
erc1155 = "ERC1155"
}
declare enum ListingStatus {
ACTIVE = "Active",
INACTIVE = "InActive"
}
declare enum TokenStatus {
NEW = "NEW",
ENQUIRY_PENDING = "ENQUIRY_PENDING",
OPEN_FOR_SALE = "OPEN_FOR_SALE",
SALE_PENDING = "SALE_PENDING",
STALE_OWNERSHIP = "STALE_OWNERSHIP"
}
interface AllRegistryTokens {
ID: string;
TokenName: string;
TokenID: number;
MetaData: MetaData$1;
TokenType: TokenType$1;
ListingStatus: ListingStatus;
OwnersList?: string[];
Owners: string;
RegistryId: string;
Registry: Registry;
Price: {
buyNowPrice: NFTPrice$2[];
lastPurchasedPrice: NFTPrice$2[];
makeOfferHighestPrice: NFTPrice$2[];
makeOfferLatestPrice: NFTPrice$2[];
};
Artist: Artist;
CreatedBy: string;
CreatedAt?: string;
UpdatedAt?: string;
Status?: TokenStatus;
mediaSourceURL?: string;
mediaSourceExtension?: string;
TokenURI?: string;
NFTTokenID?: string;
MintedAt?: string;
networkID?: string;
editionNumber?: number;
TokenOwnerAddress?: string;
nftContractName?: string;
networkName?: string;
latestOffer?: {
price: NFTPrice$2[];
};
listedOrderInfo?: {
id: string;
listedCurrency: {
contractAddress: string;
};
price: NFTPrice$2[];
};
isBuyNowEnabled?: boolean;
isMakeOfferEnabled?: boolean;
isOfferExist?: boolean;
offerOrder?: {
id: string;
nftTokenId: string;
fixedPrice: number;
offerExpiryDate: string;
price: NFTPrice$2[];
};
offerOrderId?: string;
}
interface GetAllRegistryTokensData {
getAllRegistryTokens?: {
data: AllRegistryTokens[];
totalCount: number;
user: User | null;
latestSoldPrice?: NFTPrice$2[];
highestSoldPrice?: NFTPrice$2[];
lowestSoldPrice?: NFTPrice$2[];
};
}
interface GetAllRegistryTokensV2Data {
getAllRegistryTokensV2?: {
data: AllRegistryTokens[];
totalCount: number;
user: User | null;
latestSoldPrice?: NFTPrice$2[];
highestSoldPrice?: NFTPrice$2[];
lowestSoldPrice?: NFTPrice$2[];
};
}
interface RegistryCollections {
ID: string;
CollectionName: string;
ContractAddress: string;
collectionDescription?: string;
collectionImage?: string;
ContractType: string;
CollectionTotal: number;
Network: {
id: string;
name: string;
chainID: number;
};
}
interface GetRegistryCollectionsData {
getRegistriesV1?: {
totalCount: number;
data: RegistryCollections[];
};
}
interface NFTPrice$1 {
value: number;
unit: string;
type: string;
}
interface OrderData {
id: string;
nftTokenId: string;
tokenId: string;
tokenContract: string;
quantity: number;
nftOwnerAddress: string;
fixedPrice: number;
price: NFTPrice$1[];
nftToken: {
id: string;
name?: string;
deployed?: boolean;
tokenMetadata?: {
name: string;
description: string;
image: string;
};
nftContractID: string;
};
}
interface BubbleGumParams {
buyer: string;
seller: string;
buyerTokenAccount: string;
sellerTokenAccount: string;
systemProgram: string;
tokenProgram: string;
bubblegumProgram: string;
compressionProgram: string;
treeAuthority: string;
leafOwner: string;
leafDelegate: string;
newLeafDelegate: string;
logWrapper: string;
merkleTree: string;
buyDiscriminator: number[];
marketplaceAddress: string;
mintAccount: string;
buyerVinTokenAccount: string;
sellerVinTokenAccount: string;
commissionVinTokenAccount: string;
platformVinTokenAccount: string;
initializeAccount: string;
metadataId: string;
listing: string;
bubblegumArg: {
amount: number;
dataHash: string;
creatorHash: string;
nonce: number;
index: number;
root?: string;
proof?: string[];
};
offer: string;
offerEscrow: string;
delegateAuthority?: string;
acceptOfferDiscriminator: number[];
}
interface InitiateBuyNFTData {
initiateBuyNFT?: {
proofOfApproval: string;
order: OrderData;
Network?: {
id: string;
name: string;