@aptos-labs/ts-sdk 3.1.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/{account-Bb5REyaT.d.ts → account-CmEgDBH6.d.ts} +1 -1
- package/dist/common/chunk-6MMUUJHX.js.map +1 -1
- package/dist/common/cli/index.d.ts +1 -1
- package/dist/common/cli/index.js.map +1 -1
- package/dist/common/index.d.ts +6 -203
- package/dist/common/index.js +32 -51
- package/dist/common/index.js.map +1 -1
- package/dist/esm/account/AbstractKeylessAccount.mjs +1 -1
- package/dist/esm/account/AbstractedAccount.mjs +1 -1
- package/dist/esm/account/Account.mjs +1 -1
- package/dist/esm/account/AccountUtils.mjs +1 -1
- package/dist/esm/account/DerivableAbstractedAccount.mjs +1 -1
- package/dist/esm/account/Ed25519Account.mjs +1 -1
- package/dist/esm/account/EphemeralKeyPair.mjs +1 -1
- package/dist/esm/account/FederatedKeylessAccount.mjs +1 -1
- package/dist/esm/account/KeylessAccount.mjs +1 -1
- package/dist/esm/account/MultiEd25519Account.mjs +1 -1
- package/dist/esm/account/MultiKeyAccount.mjs +1 -1
- package/dist/esm/account/SingleKeyAccount.mjs +1 -1
- package/dist/esm/account/index.mjs +1 -1
- package/dist/esm/account/utils.mjs +1 -1
- package/dist/esm/api/account/abstraction.mjs +1 -1
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.mjs +1 -1
- package/dist/esm/api/aptos.d.mts +0 -2
- package/dist/esm/api/aptos.mjs +1 -1
- package/dist/esm/api/coin.mjs +1 -1
- package/dist/esm/api/digitalAsset.mjs +1 -1
- package/dist/esm/api/faucet.mjs +1 -1
- package/dist/esm/api/fungibleAsset.mjs +1 -1
- package/dist/esm/api/general.mjs +1 -1
- package/dist/esm/api/index.d.mts +0 -1
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/keyless.mjs +1 -1
- package/dist/esm/api/object.mjs +1 -1
- package/dist/esm/api/staking.mjs +1 -1
- package/dist/esm/api/table.mjs +1 -1
- package/dist/esm/api/transaction.mjs +1 -1
- package/dist/esm/api/transactionSubmission/build.mjs +1 -1
- package/dist/esm/api/transactionSubmission/management.mjs +1 -1
- package/dist/esm/api/transactionSubmission/sign.mjs +1 -1
- package/dist/esm/api/transactionSubmission/simulate.mjs +1 -1
- package/dist/esm/api/transactionSubmission/submit.mjs +1 -1
- package/dist/esm/api/utils.mjs +1 -1
- package/dist/esm/bcs/deserializer.mjs +1 -1
- package/dist/esm/bcs/index.mjs +1 -1
- package/dist/esm/bcs/serializable/entryFunctionBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/fixedBytes.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/bcs/serializer.mjs +1 -1
- package/dist/esm/{chunk-XIQFX5FV.mjs → chunk-2XQKGWHQ.mjs} +2 -2
- package/dist/esm/{chunk-QQEK2GJC.mjs → chunk-3BMZKCLH.mjs} +2 -2
- package/dist/esm/{chunk-EPMBZCYJ.mjs → chunk-4JT5AESZ.mjs} +2 -2
- package/dist/esm/chunk-55Q7BSZT.mjs +6 -0
- package/dist/esm/chunk-55Q7BSZT.mjs.map +1 -0
- package/dist/esm/{chunk-PQS3II2E.mjs → chunk-6JYQ5P36.mjs} +2 -2
- package/dist/esm/chunk-6SLY7UV2.mjs +2 -0
- package/dist/esm/{chunk-4R4AI5RT.mjs.map → chunk-6SLY7UV2.mjs.map} +1 -1
- package/dist/esm/{chunk-6Y6ZO7TS.mjs → chunk-6WDVDEQZ.mjs} +2 -2
- package/dist/esm/{chunk-YFFDF22R.mjs → chunk-7DQDJ2SA.mjs} +2 -2
- package/dist/esm/{chunk-ZMT2M6YT.mjs → chunk-B563XRSZ.mjs} +2 -2
- package/dist/esm/{chunk-NII5Q32W.mjs → chunk-BPWSOC2Y.mjs} +2 -2
- package/dist/esm/chunk-CW35YAMN.mjs +2 -0
- package/dist/esm/{chunk-NJN3EAOM.mjs → chunk-EBMEXURY.mjs} +2 -2
- package/dist/esm/{chunk-FBCXUC7J.mjs → chunk-EF4FA5I6.mjs} +2 -2
- package/dist/esm/{chunk-6PKBXYG3.mjs → chunk-FGFLPH5K.mjs} +2 -2
- package/dist/esm/{chunk-UCBUUH5M.mjs → chunk-FLZPUYXQ.mjs} +2 -2
- package/dist/esm/{chunk-BUUV6B4P.mjs → chunk-HNBVYE3N.mjs} +2 -2
- package/dist/esm/{chunk-AQQEQB35.mjs → chunk-HZVN4JSO.mjs} +2 -2
- package/dist/esm/{chunk-QGFWOGAV.mjs → chunk-K43K3YG7.mjs} +2 -2
- package/dist/esm/{chunk-FWGLACJS.mjs → chunk-MSMFHPDT.mjs} +2 -2
- package/dist/esm/{chunk-WLUXOUZH.mjs → chunk-MT2RJ7H3.mjs} +2 -2
- package/dist/esm/{chunk-PRUQZNAP.mjs → chunk-N6YTF76Q.mjs} +2 -2
- package/dist/esm/{chunk-E6IUB35J.mjs → chunk-NF73V673.mjs} +2 -2
- package/dist/esm/{chunk-C6JRJNK3.mjs → chunk-ORMOQWWH.mjs} +2 -2
- package/dist/esm/{chunk-DW6WLD2B.mjs → chunk-PLI53ZU6.mjs} +2 -2
- package/dist/esm/{chunk-6MWXV62C.mjs → chunk-Q4W3WJ2U.mjs} +2 -2
- package/dist/esm/{chunk-GYVSI3TS.mjs → chunk-RGKRCZ36.mjs} +2 -2
- package/dist/esm/{chunk-IXYGZ57N.mjs → chunk-TOBQ5UE6.mjs} +2 -2
- package/dist/esm/{chunk-RFQFTIOA.mjs → chunk-UQZTHVWC.mjs} +2 -2
- package/dist/esm/{chunk-GRB6YSIT.mjs → chunk-V6C6NWFU.mjs} +2 -2
- package/dist/esm/{chunk-Z6KQX6VX.mjs → chunk-WCMW2L3P.mjs} +2 -2
- package/dist/esm/{chunk-BYINW7I2.mjs → chunk-WSR5EBJM.mjs} +2 -2
- package/dist/esm/chunk-XJJVJOX5.mjs +2 -0
- package/dist/esm/{chunk-OYH2T6V5.mjs → chunk-XKUIMGKU.mjs} +2 -2
- package/dist/esm/{chunk-THUSLDD6.mjs → chunk-XYXBAU4J.mjs} +2 -2
- package/dist/esm/cli/index.mjs +1 -1
- package/dist/esm/cli/localNode.mjs +1 -1
- package/dist/esm/client/core.mjs +1 -1
- package/dist/esm/client/get.mjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/post.mjs +1 -1
- package/dist/esm/core/account/index.mjs +1 -1
- package/dist/esm/core/account/utils/address.mjs +1 -1
- package/dist/esm/core/account/utils/index.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/abstraction.mjs +1 -1
- package/dist/esm/core/crypto/deserializationUtils.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/ephemeral.mjs +1 -1
- package/dist/esm/core/crypto/federatedKeyless.mjs +1 -1
- package/dist/esm/core/crypto/index.mjs +1 -1
- package/dist/esm/core/crypto/keyless.mjs +1 -1
- package/dist/esm/core/crypto/multiEd25519.mjs +1 -1
- package/dist/esm/core/crypto/multiKey.mjs +1 -1
- package/dist/esm/core/crypto/privateKey.mjs +1 -1
- package/dist/esm/core/crypto/proof.mjs +1 -1
- package/dist/esm/core/crypto/publicKey.mjs +1 -1
- package/dist/esm/core/crypto/secp256k1.mjs +1 -1
- package/dist/esm/core/crypto/signature.mjs +1 -1
- package/dist/esm/core/crypto/singleKey.mjs +1 -1
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/errors/index.mjs +1 -1
- package/dist/esm/index.d.mts +0 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/abstraction.mjs +1 -1
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +19 -8
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/keyless.mjs +1 -1
- package/dist/esm/internal/object.mjs +1 -1
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/table.mjs +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.mjs +1 -1
- package/dist/esm/internal/utils/index.mjs +1 -1
- package/dist/esm/internal/utils/utils.mjs +1 -1
- package/dist/esm/internal/view.mjs +1 -1
- package/dist/esm/transactions/authenticator/account.mjs +1 -1
- package/dist/esm/transactions/authenticator/index.mjs +1 -1
- package/dist/esm/transactions/authenticator/transaction.mjs +1 -1
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/transactions/instances/chainId.mjs +1 -1
- package/dist/esm/transactions/instances/identifier.mjs +1 -1
- package/dist/esm/transactions/instances/index.mjs +1 -1
- package/dist/esm/transactions/instances/moduleId.mjs +1 -1
- package/dist/esm/transactions/instances/multiAgentTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rawTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/rotationProofChallenge.mjs +1 -1
- package/dist/esm/transactions/instances/signedTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/simpleTransaction.mjs +1 -1
- package/dist/esm/transactions/instances/transactionPayload.mjs +1 -1
- package/dist/esm/transactions/management/accountSequenceNumber.mjs +1 -1
- package/dist/esm/transactions/management/index.mjs +1 -1
- package/dist/esm/transactions/management/transactionWorker.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/helpers.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/index.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/remoteAbi.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/signingMessage.mjs +1 -1
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.d.mts +2 -2
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/types/index.mjs +1 -1
- package/dist/esm/types/indexer.d.mts +1 -1
- package/dist/esm/utils/helpers.mjs +1 -1
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils/normalizeBundle.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/src/api/aptos.ts +10 -9
- package/src/internal/ans.ts +19 -8
- package/src/version.ts +1 -1
- package/dist/esm/api/event.d.mts +0 -193
- package/dist/esm/api/event.mjs +0 -2
- package/dist/esm/api/event.mjs.map +0 -1
- package/dist/esm/chunk-4R4AI5RT.mjs +0 -2
- package/dist/esm/chunk-HPQMAP7O.mjs +0 -2
- package/dist/esm/chunk-I4NMWLUZ.mjs +0 -6
- package/dist/esm/chunk-I4NMWLUZ.mjs.map +0 -1
- package/dist/esm/chunk-OYUW6ZN2.mjs +0 -2
- package/dist/esm/internal/event.d.mts +0 -82
- package/dist/esm/internal/event.mjs +0 -2
- package/dist/esm/internal/event.mjs.map +0 -1
- package/src/api/event.ts +0 -230
- package/src/internal/event.ts +0 -166
- /package/dist/esm/{chunk-XIQFX5FV.mjs.map → chunk-2XQKGWHQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-QQEK2GJC.mjs.map → chunk-3BMZKCLH.mjs.map} +0 -0
- /package/dist/esm/{chunk-EPMBZCYJ.mjs.map → chunk-4JT5AESZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-PQS3II2E.mjs.map → chunk-6JYQ5P36.mjs.map} +0 -0
- /package/dist/esm/{chunk-6Y6ZO7TS.mjs.map → chunk-6WDVDEQZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-YFFDF22R.mjs.map → chunk-7DQDJ2SA.mjs.map} +0 -0
- /package/dist/esm/{chunk-ZMT2M6YT.mjs.map → chunk-B563XRSZ.mjs.map} +0 -0
- /package/dist/esm/{chunk-NII5Q32W.mjs.map → chunk-BPWSOC2Y.mjs.map} +0 -0
- /package/dist/esm/{chunk-HPQMAP7O.mjs.map → chunk-CW35YAMN.mjs.map} +0 -0
- /package/dist/esm/{chunk-NJN3EAOM.mjs.map → chunk-EBMEXURY.mjs.map} +0 -0
- /package/dist/esm/{chunk-FBCXUC7J.mjs.map → chunk-EF4FA5I6.mjs.map} +0 -0
- /package/dist/esm/{chunk-6PKBXYG3.mjs.map → chunk-FGFLPH5K.mjs.map} +0 -0
- /package/dist/esm/{chunk-UCBUUH5M.mjs.map → chunk-FLZPUYXQ.mjs.map} +0 -0
- /package/dist/esm/{chunk-BUUV6B4P.mjs.map → chunk-HNBVYE3N.mjs.map} +0 -0
- /package/dist/esm/{chunk-AQQEQB35.mjs.map → chunk-HZVN4JSO.mjs.map} +0 -0
- /package/dist/esm/{chunk-QGFWOGAV.mjs.map → chunk-K43K3YG7.mjs.map} +0 -0
- /package/dist/esm/{chunk-FWGLACJS.mjs.map → chunk-MSMFHPDT.mjs.map} +0 -0
- /package/dist/esm/{chunk-WLUXOUZH.mjs.map → chunk-MT2RJ7H3.mjs.map} +0 -0
- /package/dist/esm/{chunk-PRUQZNAP.mjs.map → chunk-N6YTF76Q.mjs.map} +0 -0
- /package/dist/esm/{chunk-E6IUB35J.mjs.map → chunk-NF73V673.mjs.map} +0 -0
- /package/dist/esm/{chunk-C6JRJNK3.mjs.map → chunk-ORMOQWWH.mjs.map} +0 -0
- /package/dist/esm/{chunk-DW6WLD2B.mjs.map → chunk-PLI53ZU6.mjs.map} +0 -0
- /package/dist/esm/{chunk-6MWXV62C.mjs.map → chunk-Q4W3WJ2U.mjs.map} +0 -0
- /package/dist/esm/{chunk-GYVSI3TS.mjs.map → chunk-RGKRCZ36.mjs.map} +0 -0
- /package/dist/esm/{chunk-IXYGZ57N.mjs.map → chunk-TOBQ5UE6.mjs.map} +0 -0
- /package/dist/esm/{chunk-RFQFTIOA.mjs.map → chunk-UQZTHVWC.mjs.map} +0 -0
- /package/dist/esm/{chunk-GRB6YSIT.mjs.map → chunk-V6C6NWFU.mjs.map} +0 -0
- /package/dist/esm/{chunk-Z6KQX6VX.mjs.map → chunk-WCMW2L3P.mjs.map} +0 -0
- /package/dist/esm/{chunk-BYINW7I2.mjs.map → chunk-WSR5EBJM.mjs.map} +0 -0
- /package/dist/esm/{chunk-OYUW6ZN2.mjs.map → chunk-XJJVJOX5.mjs.map} +0 -0
- /package/dist/esm/{chunk-OYH2T6V5.mjs.map → chunk-XKUIMGKU.mjs.map} +0 -0
- /package/dist/esm/{chunk-THUSLDD6.mjs.map → chunk-XYXBAU4J.mjs.map} +0 -0
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { A as AptosConfig, d7 as MoveStructId, bO as PaginationArgs, bR as OrderByArg, m as AccountAddressInput, bM as AnyNumber, bS as WhereArg } from '../account--Q9z_xMN.mjs';
|
|
2
|
-
import { GetEventsResponse } from '../types/indexer.mjs';
|
|
3
|
-
import { EventsBoolExp } from '../types/generated/types.mjs';
|
|
4
|
-
import '../utils/apiEndpoints.mjs';
|
|
5
|
-
import '../utils/const.mjs';
|
|
6
|
-
import '../core/common.mjs';
|
|
7
|
-
import '../types/generated/operations.mjs';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* This file contains the underlying implementations for exposed API surface in
|
|
11
|
-
* the {@link api/event}. By moving the methods out into a separate file,
|
|
12
|
-
* other namespaces and processes can access these methods without depending on the entire
|
|
13
|
-
* event namespace and without having a dependency cycle error.
|
|
14
|
-
* @group Implementation
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Retrieves events associated with a specific module event type.
|
|
19
|
-
* This function allows you to filter events based on the event type and pagination options.
|
|
20
|
-
*
|
|
21
|
-
* @param args - The arguments for retrieving module events.
|
|
22
|
-
* @param args.aptosConfig - The configuration object for Aptos.
|
|
23
|
-
* @param args.eventType - The MoveStructId representing the type of event to retrieve.
|
|
24
|
-
* @param [args.options] - Optional pagination and ordering parameters for the event retrieval.
|
|
25
|
-
* @group Implementation
|
|
26
|
-
*/
|
|
27
|
-
declare function getModuleEventsByEventType(args: {
|
|
28
|
-
aptosConfig: AptosConfig;
|
|
29
|
-
eventType: MoveStructId;
|
|
30
|
-
options?: PaginationArgs & OrderByArg<GetEventsResponse[0]>;
|
|
31
|
-
}): Promise<GetEventsResponse>;
|
|
32
|
-
/**
|
|
33
|
-
* Retrieve events associated with a specific account and creation number.
|
|
34
|
-
*
|
|
35
|
-
* @param args - The parameters for retrieving account events.
|
|
36
|
-
* @param args.aptosConfig - The configuration settings for the Aptos client.
|
|
37
|
-
* @param args.accountAddress - The address of the account for which events are being retrieved.
|
|
38
|
-
* @param args.creationNumber - The creation number to filter events.
|
|
39
|
-
* @param args.options - Optional pagination and ordering parameters for the event retrieval.
|
|
40
|
-
* @group Implementation
|
|
41
|
-
*/
|
|
42
|
-
declare function getAccountEventsByCreationNumber(args: {
|
|
43
|
-
aptosConfig: AptosConfig;
|
|
44
|
-
accountAddress: AccountAddressInput;
|
|
45
|
-
creationNumber: AnyNumber;
|
|
46
|
-
options?: PaginationArgs & OrderByArg<GetEventsResponse[0]>;
|
|
47
|
-
}): Promise<GetEventsResponse>;
|
|
48
|
-
/**
|
|
49
|
-
* Retrieves events associated with a specific account and event type.
|
|
50
|
-
*
|
|
51
|
-
* @param args - The parameters for retrieving account events.
|
|
52
|
-
* @param args.aptosConfig - The configuration for connecting to the Aptos blockchain.
|
|
53
|
-
* @param args.accountAddress - The address of the account for which to retrieve events.
|
|
54
|
-
* @param args.eventType - The type of event to filter by.
|
|
55
|
-
* @param args.options - Optional pagination and ordering parameters for the event retrieval.
|
|
56
|
-
* @group Implementation
|
|
57
|
-
*/
|
|
58
|
-
declare function getAccountEventsByEventType(args: {
|
|
59
|
-
aptosConfig: AptosConfig;
|
|
60
|
-
accountAddress: AccountAddressInput;
|
|
61
|
-
eventType: MoveStructId;
|
|
62
|
-
options?: PaginationArgs & OrderByArg<GetEventsResponse[0]>;
|
|
63
|
-
}): Promise<GetEventsResponse>;
|
|
64
|
-
/**
|
|
65
|
-
* Retrieves a list of events based on specified filtering and pagination options.
|
|
66
|
-
*
|
|
67
|
-
* @param args - The arguments for retrieving events.
|
|
68
|
-
* @param args.aptosConfig - The configuration for connecting to the Aptos network.
|
|
69
|
-
* @param [args.options] - Optional parameters for pagination and filtering.
|
|
70
|
-
* @param [args.options.offset] - The number of records to skip before starting to collect the result set.
|
|
71
|
-
* @param [args.options.limit] - The maximum number of records to return.
|
|
72
|
-
* @param [args.options.orderBy] - Defines the order in which to return the events.
|
|
73
|
-
* @param [args.options.where] - Conditions to filter the events.
|
|
74
|
-
* @param [args.options.where.indexed_type] - Filters events by the indexed type.
|
|
75
|
-
* @group Implementation
|
|
76
|
-
*/
|
|
77
|
-
declare function getEvents(args: {
|
|
78
|
-
aptosConfig: AptosConfig;
|
|
79
|
-
options?: PaginationArgs & OrderByArg<GetEventsResponse[0]> & WhereArg<EventsBoolExp>;
|
|
80
|
-
}): Promise<GetEventsResponse>;
|
|
81
|
-
|
|
82
|
-
export { getAccountEventsByCreationNumber, getAccountEventsByEventType, getEvents, getModuleEventsByEventType };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{hd as a,id as b,jd as c,kd as d}from"../chunk-I4NMWLUZ.mjs";import"../chunk-G3MHXDYA.mjs";import"../chunk-RFQFTIOA.mjs";import"../chunk-XIQFX5FV.mjs";import"../chunk-UYVPNUH3.mjs";import"../chunk-A5L76YP7.mjs";import"../chunk-OYH2T6V5.mjs";import"../chunk-PRUQZNAP.mjs";import"../chunk-EPMBZCYJ.mjs";import"../chunk-5HXLZHDW.mjs";import"../chunk-GOXRBEIJ.mjs";import"../chunk-OYUW6ZN2.mjs";import"../chunk-NECL5FCQ.mjs";import"../chunk-4QMXOWHP.mjs";import"../chunk-FBCXUC7J.mjs";import"../chunk-FWGLACJS.mjs";import"../chunk-QGFWOGAV.mjs";import"../chunk-DPW6ELCQ.mjs";import"../chunk-C3Q23D22.mjs";import"../chunk-ROT6S6BM.mjs";import"../chunk-BYINW7I2.mjs";import"../chunk-Z6KQX6VX.mjs";import"../chunk-QREVMGQZ.mjs";import"../chunk-V3MBJJTL.mjs";import"../chunk-KJH4KKG6.mjs";import"../chunk-6PKBXYG3.mjs";import"../chunk-AQQEQB35.mjs";import"../chunk-QQEK2GJC.mjs";import"../chunk-GRB6YSIT.mjs";import"../chunk-DW6WLD2B.mjs";import"../chunk-YOZBVVKL.mjs";import"../chunk-THUSLDD6.mjs";import"../chunk-UL777LTI.mjs";import"../chunk-Y7ZQTLH4.mjs";import"../chunk-7ECCT6PK.mjs";import"../chunk-NII5Q32W.mjs";import"../chunk-PQS3II2E.mjs";import"../chunk-E6IUB35J.mjs";import"../chunk-HGLO5LDS.mjs";import"../chunk-HPQMAP7O.mjs";import"../chunk-6Y6ZO7TS.mjs";import"../chunk-FZY4PMEE.mjs";import"../chunk-6MWXV62C.mjs";import"../chunk-C6JRJNK3.mjs";import"../chunk-IXYGZ57N.mjs";import"../chunk-WLUXOUZH.mjs";import"../chunk-UCBUUH5M.mjs";import"../chunk-4RXKALLC.mjs";import"../chunk-JCFTAG5Z.mjs";import"../chunk-YFFDF22R.mjs";import"../chunk-BUUV6B4P.mjs";import"../chunk-GYVSI3TS.mjs";import"../chunk-FD6FGKYY.mjs";import"../chunk-IJE2LVZG.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-NJN3EAOM.mjs";import"../chunk-56CNRT2K.mjs";import"../chunk-STY74NUA.mjs";import"../chunk-IF4UU2MT.mjs";import"../chunk-4R4AI5RT.mjs";import"../chunk-KDMSOCZY.mjs";export{b as getAccountEventsByCreationNumber,c as getAccountEventsByEventType,d as getEvents,a as getModuleEventsByEventType};
|
|
2
|
-
//# sourceMappingURL=event.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/src/api/event.ts
DELETED
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
// Copyright © Aptos Foundation
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
getAccountEventsByCreationNumber,
|
|
6
|
-
getAccountEventsByEventType,
|
|
7
|
-
getModuleEventsByEventType,
|
|
8
|
-
getEvents,
|
|
9
|
-
} from "../internal/event";
|
|
10
|
-
import { AnyNumber, GetEventsResponse, MoveStructId, OrderByArg, PaginationArgs, WhereArg } from "../types";
|
|
11
|
-
import { EventsBoolExp } from "../types/generated/types";
|
|
12
|
-
import { AccountAddressInput } from "../core";
|
|
13
|
-
import { ProcessorType } from "../utils/const";
|
|
14
|
-
import { AptosConfig } from "./aptosConfig";
|
|
15
|
-
import { waitForIndexerOnVersion } from "./utils";
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* A class to query all `Event` Aptos related queries.
|
|
19
|
-
* @group Event
|
|
20
|
-
*/
|
|
21
|
-
export class Event {
|
|
22
|
-
/**
|
|
23
|
-
* Initializes a new instance of the Aptos client with the provided configuration.
|
|
24
|
-
*
|
|
25
|
-
* @param config - The configuration settings for the Aptos client.
|
|
26
|
-
* @param config.network - The network to connect to (e.g., Testnet, Mainnet).
|
|
27
|
-
* @param config.nodeUrl - The URL of the Aptos node to connect to.
|
|
28
|
-
* @param config.faucetUrl - The URL of the faucet to use for funding accounts.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```typescript
|
|
32
|
-
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
33
|
-
*
|
|
34
|
-
* async function runExample() {
|
|
35
|
-
* // Create a new Aptos client with Testnet configuration
|
|
36
|
-
* const config = new AptosConfig({ network: Network.TESTNET }); // Specify your own network if needed
|
|
37
|
-
* const aptos = new Aptos(config);
|
|
38
|
-
*
|
|
39
|
-
* console.log("Aptos client initialized:", aptos);
|
|
40
|
-
* }
|
|
41
|
-
* runExample().catch(console.error);
|
|
42
|
-
* ```
|
|
43
|
-
* @group Event
|
|
44
|
-
*/
|
|
45
|
-
constructor(readonly config: AptosConfig) {}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Retrieve module events based on a specified event type.
|
|
49
|
-
* This function allows you to query for events that are associated with a particular module event type in the Aptos blockchain.
|
|
50
|
-
*
|
|
51
|
-
* @param args - The arguments for retrieving module events.
|
|
52
|
-
* @param args.eventType - The event type to filter the results.
|
|
53
|
-
* @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.
|
|
54
|
-
* @param args.options - Optional pagination and ordering parameters for the event results.
|
|
55
|
-
*
|
|
56
|
-
* @returns Promise<GetEventsResponse> - A promise that resolves to the retrieved events.
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```typescript
|
|
60
|
-
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
61
|
-
*
|
|
62
|
-
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
63
|
-
* const aptos = new Aptos(config);
|
|
64
|
-
*
|
|
65
|
-
* async function runExample() {
|
|
66
|
-
* // Retrieve module events for a specific event type
|
|
67
|
-
* const events = await aptos.getModuleEventsByEventType({
|
|
68
|
-
* eventType: "0x1::transaction_fee::FeeStatement", // specify the event type
|
|
69
|
-
* minimumLedgerVersion: 1, // optional: specify minimum ledger version if needed
|
|
70
|
-
* });
|
|
71
|
-
*
|
|
72
|
-
* console.log(events); // log the retrieved events
|
|
73
|
-
* }
|
|
74
|
-
* runExample().catch(console.error);
|
|
75
|
-
* ```
|
|
76
|
-
* @group Event
|
|
77
|
-
*/
|
|
78
|
-
async getModuleEventsByEventType(args: {
|
|
79
|
-
eventType: MoveStructId;
|
|
80
|
-
minimumLedgerVersion?: AnyNumber;
|
|
81
|
-
options?: PaginationArgs & OrderByArg<GetEventsResponse[0]>;
|
|
82
|
-
}): Promise<GetEventsResponse> {
|
|
83
|
-
await waitForIndexerOnVersion({
|
|
84
|
-
config: this.config,
|
|
85
|
-
minimumLedgerVersion: args.minimumLedgerVersion,
|
|
86
|
-
processorType: ProcessorType.EVENTS_PROCESSOR,
|
|
87
|
-
});
|
|
88
|
-
return getModuleEventsByEventType({ aptosConfig: this.config, ...args });
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Retrieve events associated with a specific account address and creation number.
|
|
93
|
-
*
|
|
94
|
-
* @param args - The parameters for retrieving account events.
|
|
95
|
-
* @param args.accountAddress - The account address to query events for.
|
|
96
|
-
* @param args.creationNumber - The event creation number to filter the events.
|
|
97
|
-
* @param args.minimumLedgerVersion - Optional minimum ledger version to sync up to before querying.
|
|
98
|
-
*
|
|
99
|
-
* @returns Promise<GetEventsResponse>
|
|
100
|
-
*
|
|
101
|
-
* @example
|
|
102
|
-
* ```typescript
|
|
103
|
-
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
104
|
-
*
|
|
105
|
-
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
106
|
-
* const aptos = new Aptos(config);
|
|
107
|
-
*
|
|
108
|
-
* async function runExample() {
|
|
109
|
-
* // Get events for the account at creation number 0
|
|
110
|
-
* const events = await aptos.getAccountEventsByCreationNumber({
|
|
111
|
-
* accountAddress: "0x1", // replace with a real account address
|
|
112
|
-
* creationNumber: 0,
|
|
113
|
-
* });
|
|
114
|
-
*
|
|
115
|
-
* console.log(events);
|
|
116
|
-
* }
|
|
117
|
-
* runExample().catch(console.error);
|
|
118
|
-
* ```
|
|
119
|
-
* @group Event
|
|
120
|
-
*/
|
|
121
|
-
async getAccountEventsByCreationNumber(args: {
|
|
122
|
-
accountAddress: AccountAddressInput;
|
|
123
|
-
creationNumber: AnyNumber;
|
|
124
|
-
minimumLedgerVersion?: AnyNumber;
|
|
125
|
-
}): Promise<GetEventsResponse> {
|
|
126
|
-
await waitForIndexerOnVersion({
|
|
127
|
-
config: this.config,
|
|
128
|
-
minimumLedgerVersion: args.minimumLedgerVersion,
|
|
129
|
-
processorType: ProcessorType.EVENTS_PROCESSOR,
|
|
130
|
-
});
|
|
131
|
-
return getAccountEventsByCreationNumber({ aptosConfig: this.config, ...args });
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Retrieve events associated with a specific account address and event type.
|
|
136
|
-
*
|
|
137
|
-
* @param args.accountAddress - The account address to query events for.
|
|
138
|
-
* @param args.eventType - The type of event to filter by.
|
|
139
|
-
* @param args.minimumLedgerVersion - Optional ledger version to sync up to before querying.
|
|
140
|
-
* @param args.options - Optional pagination and ordering parameters for the event query.
|
|
141
|
-
*
|
|
142
|
-
* @returns Promise<GetEventsResponse>
|
|
143
|
-
*
|
|
144
|
-
* @example
|
|
145
|
-
* ```typescript
|
|
146
|
-
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
147
|
-
*
|
|
148
|
-
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
149
|
-
* const aptos = new Aptos(config);
|
|
150
|
-
*
|
|
151
|
-
* async function runExample() {
|
|
152
|
-
* // Get events for a specific account and event type
|
|
153
|
-
* const events = await aptos.getAccountEventsByEventType({
|
|
154
|
-
* accountAddress: "0x1", // replace with a real account address
|
|
155
|
-
* eventType: "0x1::transaction_fee::FeeStatement", // replace with a real event type
|
|
156
|
-
* minimumLedgerVersion: 1, // optional, specify if needed
|
|
157
|
-
* });
|
|
158
|
-
*
|
|
159
|
-
* console.log(events);
|
|
160
|
-
* }
|
|
161
|
-
* runExample().catch(console.error);
|
|
162
|
-
* ```
|
|
163
|
-
* @group Event
|
|
164
|
-
*/
|
|
165
|
-
async getAccountEventsByEventType(args: {
|
|
166
|
-
accountAddress: AccountAddressInput;
|
|
167
|
-
eventType: MoveStructId;
|
|
168
|
-
minimumLedgerVersion?: AnyNumber;
|
|
169
|
-
options?: PaginationArgs & OrderByArg<GetEventsResponse[0]>;
|
|
170
|
-
}): Promise<GetEventsResponse> {
|
|
171
|
-
await waitForIndexerOnVersion({
|
|
172
|
-
config: this.config,
|
|
173
|
-
minimumLedgerVersion: args.minimumLedgerVersion,
|
|
174
|
-
processorType: ProcessorType.EVENTS_PROCESSOR,
|
|
175
|
-
});
|
|
176
|
-
return getAccountEventsByEventType({ aptosConfig: this.config, ...args });
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Retrieve all events from the Aptos blockchain.
|
|
181
|
-
* An optional `where` clause can be provided to filter the results based on specific criteria.
|
|
182
|
-
*
|
|
183
|
-
* @param args Optional parameters for the query.
|
|
184
|
-
* @param args.minimumLedgerVersion Optional ledger version to sync up to before querying.
|
|
185
|
-
* @param args.options Optional pagination and filtering options.
|
|
186
|
-
* @param args.options.where Optional condition to filter events.
|
|
187
|
-
* @param args.options.offset Optional pagination offset.
|
|
188
|
-
* @param args.options.limit Optional maximum number of events to return.
|
|
189
|
-
* @param args.options.orderBy Optional ordering of the results.
|
|
190
|
-
*
|
|
191
|
-
* @returns GetEventsQuery response type containing the events.
|
|
192
|
-
*
|
|
193
|
-
* @example
|
|
194
|
-
* ```typescript
|
|
195
|
-
* import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
|
|
196
|
-
*
|
|
197
|
-
* const config = new AptosConfig({ network: Network.TESTNET });
|
|
198
|
-
* const aptos = new Aptos(config);
|
|
199
|
-
*
|
|
200
|
-
* async function runExample() {
|
|
201
|
-
* // Retrieve all events
|
|
202
|
-
* const events = await aptos.getEvents();
|
|
203
|
-
*
|
|
204
|
-
* // Retrieve events with filtering by account address
|
|
205
|
-
* const whereCondition = {
|
|
206
|
-
* account_address: { _eq: "0x123" }, // replace with a real account address
|
|
207
|
-
* };
|
|
208
|
-
* const filteredEvents = await aptos.getEvents({
|
|
209
|
-
* options: { where: whereCondition },
|
|
210
|
-
* });
|
|
211
|
-
*
|
|
212
|
-
* console.log(events);
|
|
213
|
-
* console.log(filteredEvents);
|
|
214
|
-
* }
|
|
215
|
-
* runExample().catch(console.error);
|
|
216
|
-
* ```
|
|
217
|
-
* @group Event
|
|
218
|
-
*/
|
|
219
|
-
async getEvents(args?: {
|
|
220
|
-
minimumLedgerVersion?: AnyNumber;
|
|
221
|
-
options?: PaginationArgs & OrderByArg<GetEventsResponse[0]> & WhereArg<EventsBoolExp>;
|
|
222
|
-
}): Promise<GetEventsResponse> {
|
|
223
|
-
await waitForIndexerOnVersion({
|
|
224
|
-
config: this.config,
|
|
225
|
-
minimumLedgerVersion: args?.minimumLedgerVersion,
|
|
226
|
-
processorType: ProcessorType.EVENTS_PROCESSOR,
|
|
227
|
-
});
|
|
228
|
-
return getEvents({ aptosConfig: this.config, ...args });
|
|
229
|
-
}
|
|
230
|
-
}
|
package/src/internal/event.ts
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
// Copyright © Aptos Foundation
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* This file contains the underlying implementations for exposed API surface in
|
|
6
|
-
* the {@link api/event}. By moving the methods out into a separate file,
|
|
7
|
-
* other namespaces and processes can access these methods without depending on the entire
|
|
8
|
-
* event namespace and without having a dependency cycle error.
|
|
9
|
-
* @group Implementation
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { AptosConfig } from "../api/aptosConfig";
|
|
13
|
-
import { AccountAddress, AccountAddressInput } from "../core";
|
|
14
|
-
import { AnyNumber, GetEventsResponse, PaginationArgs, MoveStructId, OrderByArg, WhereArg } from "../types";
|
|
15
|
-
import { GetEventsQuery } from "../types/generated/operations";
|
|
16
|
-
import { GetEvents } from "../types/generated/queries";
|
|
17
|
-
import { EventsBoolExp, InputMaybe } from "../types/generated/types";
|
|
18
|
-
import { queryIndexer } from "./general";
|
|
19
|
-
|
|
20
|
-
const MAX_EVENT_TYPE_LENGTH = 300;
|
|
21
|
-
const checkEventTypeLength = (eventType?: InputMaybe<string>) => {
|
|
22
|
-
if (eventType && eventType.length > MAX_EVENT_TYPE_LENGTH) {
|
|
23
|
-
throw new Error(`Event type length exceeds the maximum length of ${MAX_EVENT_TYPE_LENGTH}`);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Retrieves events associated with a specific module event type.
|
|
29
|
-
* This function allows you to filter events based on the event type and pagination options.
|
|
30
|
-
*
|
|
31
|
-
* @param args - The arguments for retrieving module events.
|
|
32
|
-
* @param args.aptosConfig - The configuration object for Aptos.
|
|
33
|
-
* @param args.eventType - The MoveStructId representing the type of event to retrieve.
|
|
34
|
-
* @param [args.options] - Optional pagination and ordering parameters for the event retrieval.
|
|
35
|
-
* @group Implementation
|
|
36
|
-
*/
|
|
37
|
-
export async function getModuleEventsByEventType(args: {
|
|
38
|
-
aptosConfig: AptosConfig;
|
|
39
|
-
eventType: MoveStructId;
|
|
40
|
-
options?: PaginationArgs & OrderByArg<GetEventsResponse[0]>;
|
|
41
|
-
}): Promise<GetEventsResponse> {
|
|
42
|
-
const { aptosConfig, eventType, options } = args;
|
|
43
|
-
|
|
44
|
-
const whereCondition: EventsBoolExp = {
|
|
45
|
-
_or: [
|
|
46
|
-
// EventHandle events
|
|
47
|
-
{ account_address: { _eq: eventType.split("::")[0] } },
|
|
48
|
-
// Module events
|
|
49
|
-
{
|
|
50
|
-
account_address: { _eq: "0x0000000000000000000000000000000000000000000000000000000000000000" },
|
|
51
|
-
sequence_number: { _eq: 0 },
|
|
52
|
-
creation_number: { _eq: 0 },
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
indexed_type: { _eq: eventType },
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
return getEvents({ aptosConfig, options: { ...options, where: whereCondition } });
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Retrieve events associated with a specific account and creation number.
|
|
63
|
-
*
|
|
64
|
-
* @param args - The parameters for retrieving account events.
|
|
65
|
-
* @param args.aptosConfig - The configuration settings for the Aptos client.
|
|
66
|
-
* @param args.accountAddress - The address of the account for which events are being retrieved.
|
|
67
|
-
* @param args.creationNumber - The creation number to filter events.
|
|
68
|
-
* @param args.options - Optional pagination and ordering parameters for the event retrieval.
|
|
69
|
-
* @group Implementation
|
|
70
|
-
*/
|
|
71
|
-
export async function getAccountEventsByCreationNumber(args: {
|
|
72
|
-
aptosConfig: AptosConfig;
|
|
73
|
-
accountAddress: AccountAddressInput;
|
|
74
|
-
creationNumber: AnyNumber;
|
|
75
|
-
options?: PaginationArgs & OrderByArg<GetEventsResponse[0]>;
|
|
76
|
-
}): Promise<GetEventsResponse> {
|
|
77
|
-
const { accountAddress, aptosConfig, creationNumber, options } = args;
|
|
78
|
-
const address = AccountAddress.from(accountAddress);
|
|
79
|
-
|
|
80
|
-
const whereCondition: EventsBoolExp = {
|
|
81
|
-
account_address: { _eq: address.toStringLong() },
|
|
82
|
-
creation_number: { _eq: creationNumber },
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
return getEvents({ aptosConfig, options: { ...options, where: whereCondition } });
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Retrieves events associated with a specific account and event type.
|
|
90
|
-
*
|
|
91
|
-
* @param args - The parameters for retrieving account events.
|
|
92
|
-
* @param args.aptosConfig - The configuration for connecting to the Aptos blockchain.
|
|
93
|
-
* @param args.accountAddress - The address of the account for which to retrieve events.
|
|
94
|
-
* @param args.eventType - The type of event to filter by.
|
|
95
|
-
* @param args.options - Optional pagination and ordering parameters for the event retrieval.
|
|
96
|
-
* @group Implementation
|
|
97
|
-
*/
|
|
98
|
-
export async function getAccountEventsByEventType(args: {
|
|
99
|
-
aptosConfig: AptosConfig;
|
|
100
|
-
accountAddress: AccountAddressInput;
|
|
101
|
-
eventType: MoveStructId;
|
|
102
|
-
options?: PaginationArgs & OrderByArg<GetEventsResponse[0]>;
|
|
103
|
-
}): Promise<GetEventsResponse> {
|
|
104
|
-
const { accountAddress, aptosConfig, eventType, options } = args;
|
|
105
|
-
const address = AccountAddress.from(accountAddress).toStringLong();
|
|
106
|
-
|
|
107
|
-
const whereCondition: EventsBoolExp = {
|
|
108
|
-
account_address: { _eq: address },
|
|
109
|
-
indexed_type: { _eq: eventType },
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
return getEvents({ aptosConfig, options: { ...options, where: whereCondition } });
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Retrieves a list of events based on specified filtering and pagination options.
|
|
117
|
-
*
|
|
118
|
-
* @param args - The arguments for retrieving events.
|
|
119
|
-
* @param args.aptosConfig - The configuration for connecting to the Aptos network.
|
|
120
|
-
* @param [args.options] - Optional parameters for pagination and filtering.
|
|
121
|
-
* @param [args.options.offset] - The number of records to skip before starting to collect the result set.
|
|
122
|
-
* @param [args.options.limit] - The maximum number of records to return.
|
|
123
|
-
* @param [args.options.orderBy] - Defines the order in which to return the events.
|
|
124
|
-
* @param [args.options.where] - Conditions to filter the events.
|
|
125
|
-
* @param [args.options.where.indexed_type] - Filters events by the indexed type.
|
|
126
|
-
* @group Implementation
|
|
127
|
-
*/
|
|
128
|
-
export async function getEvents(args: {
|
|
129
|
-
aptosConfig: AptosConfig;
|
|
130
|
-
options?: PaginationArgs & OrderByArg<GetEventsResponse[0]> & WhereArg<EventsBoolExp>;
|
|
131
|
-
}): Promise<GetEventsResponse> {
|
|
132
|
-
const { aptosConfig, options } = args;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Checks the length of event types based on the provided filtering options.
|
|
136
|
-
*
|
|
137
|
-
* @param options - The options for querying event types.
|
|
138
|
-
* @param options.where - The conditions to filter the event types.
|
|
139
|
-
* @param options.where.indexed_type - The indexed type to filter by.
|
|
140
|
-
* @param options.where.indexed_type._eq - The specific value to match for the indexed type.
|
|
141
|
-
* @param options.offset - The number of items to skip before starting to collect the result set.
|
|
142
|
-
* @param options.limit - The maximum number of items to return.
|
|
143
|
-
* @param options.orderBy - The criteria to sort the results.
|
|
144
|
-
* @group Implementation
|
|
145
|
-
*/
|
|
146
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
147
|
-
checkEventTypeLength(options?.where?.indexed_type?._eq);
|
|
148
|
-
|
|
149
|
-
const graphqlQuery = {
|
|
150
|
-
query: GetEvents,
|
|
151
|
-
variables: {
|
|
152
|
-
where_condition: options?.where,
|
|
153
|
-
offset: options?.offset,
|
|
154
|
-
limit: options?.limit,
|
|
155
|
-
order_by: options?.orderBy,
|
|
156
|
-
},
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
const data = await queryIndexer<GetEventsQuery>({
|
|
160
|
-
aptosConfig,
|
|
161
|
-
query: graphqlQuery,
|
|
162
|
-
originMethod: "getEvents",
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
return data.events;
|
|
166
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|