Skip to main content

Class: AbstractClient

moralis-monorepo / @moralisweb3/common-aptos-utils / AbstractClient

Class: AbstractClient

@moralisweb3/common-aptos-utils.AbstractClient

Table of contents

Properties

Constructors

Methods

Properties

accounts

Readonly accounts: Object

Type declaration

NameType
getAccount(request: GetAccountOperationRequest) => Promise<AptosGetAccountResponse>
getAccountModule(request: GetAccountModuleOperationRequest) => Promise<AptosGetAccountModuleResponse>
getAccountModules(request: GetAccountModulesOperationRequest) => Promise<AptosGetAccountModuleResponse[]>
getAccountResource(request: GetAccountResourceOperationRequest) => Promise<AptosGetAccountResourceResponse>
getAccountResources(request: GetAccountResourcesOperationRequest) => Promise<AptosGetAccountResourceResponse[]>
getEventsByCreationNumber(request: GetEventsByCreationNumberOperationRequest) => Promise<AptosGetEventsByCreationNumberResponse[]>
getEventsByEventHandle(request: GetEventsByEventHandleOperationRequest) => Promise<AptosGetEventsByEventHandleResponse[]>

blocks

Readonly blocks: Object

Type declaration

NameType
getBlockByHeight(request: GetBlockByHeightOperationRequest) => Promise<AptosBlock>
getBlockByVersion(request: GetBlockByVersionOperationRequest) => Promise<AptosBlock>

coins

Readonly coins: Object

Type declaration

NameType
getCoinInfoByCoinTypeHashes(request: GetCoinInfoByCoinTypeHashesOperationRequest) => Promise<AptosCoinInfoDto[]>
getCoinTransfersByBlockHeights(request: GetCoinTransfersByBlockHeightsOperationRequest) => Promise<AptosGetCoinTransfersByBlockHeightsResponse>
getCoinTransfersByCoinType(request: GetCoinTransfersByCoinTypeOperationRequest) => Promise<AptosGetCoinTransfersByCoinTypeResponse>
getCoinTransfersByOwnerAddresses(request: GetCoinTransfersByOwnerAddressesOperationRequest) => Promise<AptosGetCoinTransfersByOwnerAddressesResponse>
getCoinsByCreators(request: GetCoinsByCreatorsOperationRequest) => Promise<AptosGetCoinsByCreatorsResponse>
getCoinsByNameRange(request: GetCoinsByNameRangeOperationRequest) => Promise<AptosGetCoinsByNameRangeResponse>
getCoinsBySymbolRange(request: GetCoinsBySymbolRangeOperationRequest) => Promise<AptosGetCoinsBySymbolRangeResponse>
getLatestCoins(request: GetLatestCoinsOperationRequest) => Promise<AptosGetLatestCoinsResponse>
getTopHoldersByCoin(request: GetTopHoldersByCoinOperationRequest) => Promise<AptosGetTopHoldersByCoinResponse>

collections

Readonly collections: Object

Type declaration

NameType
getNFTCollections(request: GetNFTCollectionsOperationRequest) => Promise<AptosNFTCollectionsByNameRangeResponse>
getNFTCollectionsByCreator(request: GetNFTCollectionsByCreatorOperationRequest) => Promise<AptosNFTCollectionsByCreatorResponse>
getNFTCollectionsByIds(request: GetNFTCollectionsByIdsOperationRequest) => Promise<AptosNFTCollectionItemResponse[]>

nfts

Readonly nfts: Object

Type declaration

NameType
getNFTOwnersByCollection(request: GetNFTOwnersByCollectionOperationRequest) => Promise<AptosNFTOwnersByCollectionResponse>
getNFTOwnersByTokens(request: GetNFTOwnersByTokensOperationRequest) => Promise<AptosNFTOwnersByTokensResponse>
getNFTOwnersOfCollection(request: GetNFTOwnersOfCollectionOperationRequest) => Promise<AptosNFTOwnersOfCollectionResponse>
getNFTTransfersByCollection(request: GetNFTTransfersByCollectionOperationRequest) => Promise<AptosGetNFTTransfersByCollectionResponse>
getNFTTransfersByCreators(request: GetNFTTransfersByCreatorsOperationRequest) => Promise<AptosGetNFTTransfersByCreatorsResponse>
getNFTTransfersByIds(request: GetNFTTransfersByIdsOperationRequest) => Promise<AptosNFTTransfersByTokensResponse>
getNFTTransfersByWallets(request: GetNFTTransfersByWalletsOperationRequest) => Promise<AptosNFTTransfersByWalletsResponse>
getNFTsByCollection(request: GetNFTsByCollectionOperationRequest) => Promise<AptosNFTTokensByCollectionResponse>
getNFTsByCreators(request: GetNFTsByCreatorsOperationRequest) => Promise<AptosNFTTokensByCreatorsResponse>
getNFTsByIds(request: GetNFTsByIdsOperationRequest) => Promise<AptosNFTTokenResponse[]>

transactions

Readonly transactions: Object

Type declaration

NameType
encodeSubmission(request: EncodeSubmissionOperationRequest, body: AptosEncodeSubmissionRequestInput | AptosEncodeSubmissionRequest) => Promise<string>
estimateGasPrice(request: EstimateGasPriceOperationRequest) => Promise<AptosEstimateGasPriceResult>
getAccountTransactions(request: GetAccountTransactionsOperationRequest) => Promise<AptosGetAccountTransactionsItemValue[]>
getTransactionByHash(request: GetTransactionByHashOperationRequest) => Promise<AptosGetTransactionByHashValue>
getTransactionByVersion(request: GetTransactionByVersionOperationRequest) => Promise<AptosGetTransactionByVersionValue>
getTransactions(request: GetTransactionsOperationRequest) => Promise<AptosGetTransactionsItemValue[]>
simulateTransaction(request: SimulateTransactionOperationRequest, body: AptosSubmitTransactionRequestInput | AptosSubmitTransactionRequest) => Promise<AptosSimulateTransactionValue>
submitBatchTransactions(request: SubmitBatchTransactionsOperationRequest, body: AptosSubmitTransactionRequestInput[] | AptosSubmitTransactionRequest[]) => Promise<AptosSubmitBatchTransactionResult>
submitTransaction(request: SubmitTransactionOperationRequest, body: AptosSubmitTransactionRequestInput | AptosSubmitTransactionRequest) => Promise<AptosPendingTransaction>

wallets

Readonly wallets: Object

Type declaration

NameType
getCoinBalancesByWallets(request: GetCoinBalancesByWalletsOperationRequest) => Promise<AptosGetCoinBalancesByWalletsResponse>
getCoinTransfersByWalletAddresses(request: GetCoinTransfersByWalletAddressesOperationRequest) => Promise<AptosGetCoinTransfersByOwnerAddressesResponse>
getHistoricalCoinBalancesByWallets(request: GetHistoricalCoinBalancesByWalletsOperationRequest) => Promise<AptosGetHistoricalCoinBalancesByWalletsResponse>
getNFTByOwners(request: GetNFTByOwnersOperationRequest) => Promise<AptosNFTsByOwnersResponse>
getWalletsNFTTransfers(request: GetWalletsNFTTransfersOperationRequest) => Promise<AptosNFTTransfersByWalletsResponse>

Constructors

constructor

new AbstractClient()

Methods

createEndpoint

Protected Abstract createEndpoint<Request, RequestJSON, Response, ResponseJSON>(operation): (request: Request) => Promise<Response>

Type parameters

Name
Request
RequestJSON
Response
ResponseJSON

Parameters

NameType
operationOperationV3<Request, RequestJSON, Response, ResponseJSON, null, null>

Returns

fn

▸ (request): Promise<Response>

Parameters
NameType
requestRequest
Returns

Promise<Response>


createEndpointWithBody

Protected Abstract createEndpointWithBody<Request, RequestJSON, Response, ResponseJSON, Body, BodyJSON>(operation): (request: Request, body: Body) => Promise<Response>

Type parameters

Name
Request
RequestJSON
Response
ResponseJSON
Body
BodyJSON

Parameters

NameType
operationOperationV3<Request, RequestJSON, Response, ResponseJSON, Body, BodyJSON>

Returns

fn

▸ (request, body): Promise<Response>

Parameters
NameType
requestRequest
bodyBody
Returns

Promise<Response>