@aptos-labs/ts-sdk 1.6.0 → 1.8.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/browser/index.d.ts +133 -9
- package/dist/browser/index.global.js +32 -30
- package/dist/browser/index.global.js.map +1 -1
- package/dist/common/index.d.ts +133 -9
- package/dist/common/index.js +28 -26
- package/dist/common/index.js.map +1 -1
- package/dist/esm/api/account.mjs +1 -1
- package/dist/esm/api/ans.mjs +1 -1
- 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/event.d.mts +14 -1
- package/dist/esm/api/event.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.mjs +1 -1
- package/dist/esm/api/staking.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/sign.mjs.map +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/index.mjs +1 -1
- package/dist/esm/bcs/serializable/movePrimitives.mjs +1 -1
- package/dist/esm/bcs/serializable/moveStructs.mjs +1 -1
- package/dist/esm/chunk-2DNPRIS5.mjs +2 -0
- package/dist/esm/chunk-2DNPRIS5.mjs.map +1 -0
- package/dist/esm/{chunk-SIV47YF6.mjs → chunk-2H5Z5EHH.mjs} +2 -2
- package/dist/esm/{chunk-SIV47YF6.mjs.map → chunk-2H5Z5EHH.mjs.map} +1 -1
- package/dist/esm/{chunk-CR2ZNHVS.mjs → chunk-2WFMD6C6.mjs} +2 -2
- package/dist/esm/{chunk-4HULEADT.mjs → chunk-4M46AWXX.mjs} +2 -2
- package/dist/esm/{chunk-I7MXWMCV.mjs → chunk-6SRENFWH.mjs} +2 -2
- package/dist/esm/{chunk-3KTTMSMK.mjs → chunk-AFPJ2XXN.mjs} +2 -2
- package/dist/esm/chunk-CVEJHRAU.mjs +2 -0
- package/dist/esm/chunk-CVEJHRAU.mjs.map +1 -0
- package/dist/esm/chunk-ENDUXRTK.mjs +2 -0
- package/dist/esm/chunk-ENDUXRTK.mjs.map +1 -0
- package/dist/esm/{chunk-SFAHLWOK.mjs → chunk-ENKMOALS.mjs} +2 -2
- package/dist/esm/{chunk-T5JEOKV6.mjs → chunk-EUHPML5E.mjs} +2 -2
- package/dist/esm/{chunk-YJAE5RPX.mjs → chunk-FRLPX47J.mjs} +2 -2
- package/dist/esm/{chunk-TEKLKVZK.mjs → chunk-GD4ULEBC.mjs} +2 -2
- package/dist/esm/{chunk-3DM36HLF.mjs → chunk-GD5TZLBF.mjs} +2 -2
- package/dist/esm/{chunk-IKCBGNRD.mjs → chunk-JJ6Y35DF.mjs} +2 -2
- package/dist/esm/{chunk-MHWDJSMB.mjs → chunk-JQVT2K7G.mjs} +2 -2
- package/dist/esm/{chunk-7XJZHT63.mjs → chunk-KJGQ4ILY.mjs} +2 -2
- package/dist/esm/{chunk-W4PVDONT.mjs → chunk-LATJGGVX.mjs} +2 -2
- package/dist/esm/chunk-LHJSG5NE.mjs +2 -0
- package/dist/esm/chunk-LHJSG5NE.mjs.map +1 -0
- package/dist/esm/{chunk-XFMRYLII.mjs → chunk-M3WNE7MU.mjs} +2 -2
- package/dist/esm/chunk-MEPX7Z2Z.mjs +2 -0
- package/dist/esm/{chunk-3UYBNX3P.mjs.map → chunk-MEPX7Z2Z.mjs.map} +1 -1
- package/dist/esm/{chunk-FG6RKPA7.mjs → chunk-PIXE7MN5.mjs} +2 -2
- package/dist/esm/chunk-PJNPLRPR.mjs +2 -0
- package/dist/esm/chunk-PJNPLRPR.mjs.map +1 -0
- package/dist/esm/{chunk-QN3TJQIU.mjs → chunk-PMWH5IGI.mjs} +2 -2
- package/dist/esm/chunk-Q3HAJVCM.mjs +2 -0
- package/dist/esm/chunk-Q3HAJVCM.mjs.map +1 -0
- package/dist/esm/{chunk-X47DR2C3.mjs → chunk-Q5HK3U64.mjs} +2 -2
- package/dist/esm/{chunk-T5IFXLOP.mjs → chunk-QGIJNA37.mjs} +2 -2
- package/dist/esm/{chunk-TJJSQSO3.mjs → chunk-QRQAR6XO.mjs} +2 -2
- package/dist/esm/{chunk-QW5W2DWF.mjs → chunk-R56OJ4XC.mjs} +2 -2
- package/dist/esm/chunk-S3FBGS3W.mjs +2 -0
- package/dist/esm/chunk-S3FBGS3W.mjs.map +1 -0
- package/dist/esm/{chunk-BQSE5HHW.mjs → chunk-S4SEFF4K.mjs} +3 -1
- package/dist/esm/chunk-S4SEFF4K.mjs.map +1 -0
- package/dist/esm/chunk-S64WKSMI.mjs +2 -0
- package/dist/esm/chunk-S64WKSMI.mjs.map +1 -0
- package/dist/esm/{chunk-2RZSI3B6.mjs → chunk-SPOHAEHR.mjs} +2 -2
- package/dist/esm/{chunk-T7U4YWE7.mjs → chunk-SRZTA6QH.mjs} +2 -2
- package/dist/esm/{chunk-S4QKXXBT.mjs → chunk-SXIFL5DQ.mjs} +2 -2
- package/dist/esm/{chunk-S4QKXXBT.mjs.map → chunk-SXIFL5DQ.mjs.map} +1 -1
- package/dist/esm/{chunk-4HSVC56Q.mjs → chunk-V2FPYAK7.mjs} +2 -2
- package/dist/esm/{chunk-LOEBNFNC.mjs → chunk-VKZCIGKY.mjs} +2 -2
- package/dist/esm/{chunk-YE3DZD6T.mjs → chunk-VPQ46CAO.mjs} +2 -2
- package/dist/esm/{chunk-U53N6WW2.mjs → chunk-W4UDMBMU.mjs} +2 -2
- package/dist/esm/chunk-XBVORX5O.mjs +2 -0
- package/dist/esm/chunk-XBVORX5O.mjs.map +1 -0
- package/dist/esm/{chunk-PD5I66D6.mjs → chunk-XZYPAQCU.mjs} +2 -2
- package/dist/esm/{chunk-F7H662U6.mjs → chunk-Y4AKS4CY.mjs} +2 -2
- package/dist/esm/{chunk-WKSKGVBV.mjs → chunk-YL2EDK5M.mjs} +2 -2
- package/dist/esm/chunk-YL2EDK5M.mjs.map +1 -0
- 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.mjs +1 -1
- package/dist/esm/core/accountAddress.mjs +1 -1
- package/dist/esm/core/authenticationKey.mjs +1 -1
- package/dist/esm/core/crypto/anyPublicKey.mjs +1 -1
- package/dist/esm/core/crypto/anySignature.mjs +1 -1
- package/dist/esm/core/crypto/asymmetricCrypto.mjs +1 -1
- package/dist/esm/core/crypto/ed25519.mjs +1 -1
- package/dist/esm/core/crypto/index.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/secp256k1.mjs +1 -1
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/account.d.mts +1 -1
- package/dist/esm/internal/account.mjs +1 -1
- package/dist/esm/internal/ans.d.mts +1 -1
- package/dist/esm/internal/ans.mjs +1 -1
- package/dist/esm/internal/coin.d.mts +3 -3
- package/dist/esm/internal/coin.mjs +1 -1
- package/dist/esm/internal/digitalAsset.d.mts +6 -6
- package/dist/esm/internal/digitalAsset.mjs +1 -1
- package/dist/esm/internal/event.d.mts +8 -3
- package/dist/esm/internal/event.mjs +1 -1
- package/dist/esm/internal/faucet.d.mts +3 -3
- package/dist/esm/internal/faucet.mjs +1 -1
- package/dist/esm/internal/fungibleAsset.d.mts +1 -1
- package/dist/esm/internal/fungibleAsset.mjs +1 -1
- package/dist/esm/internal/general.mjs +1 -1
- package/dist/esm/internal/staking.d.mts +2 -2
- package/dist/esm/internal/staking.mjs +1 -1
- package/dist/esm/internal/transaction.mjs +1 -1
- package/dist/esm/internal/transactionSubmission.d.mts +3 -3
- package/dist/esm/internal/transactionSubmission.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.d.mts +1 -1
- package/dist/esm/transactions/index.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/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/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.d.mts +7 -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/transactionBuilder.d.mts +3 -3
- package/dist/esm/transactions/transactionBuilder/transactionBuilder.mjs +1 -1
- package/dist/esm/transactions/typeTag/index.d.mts +1 -0
- package/dist/esm/transactions/typeTag/index.mjs +1 -1
- package/dist/esm/transactions/typeTag/parser.mjs +1 -1
- package/dist/esm/transactions/types.d.mts +9 -1
- package/dist/esm/types/generated/operations.d.mts +6 -0
- package/dist/esm/types/generated/queries.d.mts +6 -6
- package/dist/esm/types/generated/queries.mjs +1 -1
- package/dist/esm/types/generated/types.d.mts +594 -56
- package/dist/esm/types/generated/types.mjs +1 -1
- package/dist/esm/types/generated/types.mjs.map +1 -1
- package/dist/esm/types/index.d.mts +35 -6
- package/dist/esm/types/index.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/digitalAsset.ts +4 -4
- package/src/api/event.ts +27 -1
- package/src/internal/coin.ts +9 -4
- package/src/internal/digitalAsset.ts +197 -60
- package/src/internal/event.ts +33 -1
- package/src/internal/fungibleAsset.ts +15 -3
- package/src/internal/queries/currentTokenOwnershipFieldsFragment.graphql +1 -0
- package/src/internal/queries/getTokenData.graphql +1 -0
- package/src/internal/transactionSubmission.ts +40 -14
- package/src/transactions/management/transactionWorker.ts +9 -5
- package/src/transactions/transactionBuilder/transactionBuilder.ts +9 -19
- package/src/transactions/typeTag/index.ts +4 -0
- package/src/transactions/typeTag/parser.ts +1 -1
- package/src/transactions/types.ts +11 -0
- package/src/types/generated/operations.ts +6 -0
- package/src/types/generated/queries.ts +2 -0
- package/src/types/generated/types.ts +662 -55
- package/src/types/index.ts +40 -4
- package/src/version.ts +1 -1
- package/dist/esm/chunk-223IHRAD.mjs +0 -2
- package/dist/esm/chunk-223IHRAD.mjs.map +0 -1
- package/dist/esm/chunk-3UYBNX3P.mjs +0 -2
- package/dist/esm/chunk-5FERAW7D.mjs +0 -2
- package/dist/esm/chunk-5FERAW7D.mjs.map +0 -1
- package/dist/esm/chunk-6GL6X2IR.mjs +0 -2
- package/dist/esm/chunk-6GL6X2IR.mjs.map +0 -1
- package/dist/esm/chunk-ALFESCPU.mjs +0 -2
- package/dist/esm/chunk-ALFESCPU.mjs.map +0 -1
- package/dist/esm/chunk-BQSE5HHW.mjs.map +0 -1
- package/dist/esm/chunk-CBLQTKVM.mjs +0 -2
- package/dist/esm/chunk-CBLQTKVM.mjs.map +0 -1
- package/dist/esm/chunk-HI6QP2FB.mjs +0 -2
- package/dist/esm/chunk-HI6QP2FB.mjs.map +0 -1
- package/dist/esm/chunk-KXLDXZWI.mjs +0 -2
- package/dist/esm/chunk-KXLDXZWI.mjs.map +0 -1
- package/dist/esm/chunk-SUIDAC5B.mjs +0 -2
- package/dist/esm/chunk-SUIDAC5B.mjs.map +0 -1
- package/dist/esm/chunk-WKSKGVBV.mjs.map +0 -1
- package/dist/esm/chunk-Z67MKEK7.mjs +0 -2
- package/dist/esm/chunk-Z67MKEK7.mjs.map +0 -1
- /package/dist/esm/{chunk-CR2ZNHVS.mjs.map → chunk-2WFMD6C6.mjs.map} +0 -0
- /package/dist/esm/{chunk-4HULEADT.mjs.map → chunk-4M46AWXX.mjs.map} +0 -0
- /package/dist/esm/{chunk-I7MXWMCV.mjs.map → chunk-6SRENFWH.mjs.map} +0 -0
- /package/dist/esm/{chunk-3KTTMSMK.mjs.map → chunk-AFPJ2XXN.mjs.map} +0 -0
- /package/dist/esm/{chunk-SFAHLWOK.mjs.map → chunk-ENKMOALS.mjs.map} +0 -0
- /package/dist/esm/{chunk-T5JEOKV6.mjs.map → chunk-EUHPML5E.mjs.map} +0 -0
- /package/dist/esm/{chunk-YJAE5RPX.mjs.map → chunk-FRLPX47J.mjs.map} +0 -0
- /package/dist/esm/{chunk-TEKLKVZK.mjs.map → chunk-GD4ULEBC.mjs.map} +0 -0
- /package/dist/esm/{chunk-3DM36HLF.mjs.map → chunk-GD5TZLBF.mjs.map} +0 -0
- /package/dist/esm/{chunk-IKCBGNRD.mjs.map → chunk-JJ6Y35DF.mjs.map} +0 -0
- /package/dist/esm/{chunk-MHWDJSMB.mjs.map → chunk-JQVT2K7G.mjs.map} +0 -0
- /package/dist/esm/{chunk-7XJZHT63.mjs.map → chunk-KJGQ4ILY.mjs.map} +0 -0
- /package/dist/esm/{chunk-W4PVDONT.mjs.map → chunk-LATJGGVX.mjs.map} +0 -0
- /package/dist/esm/{chunk-XFMRYLII.mjs.map → chunk-M3WNE7MU.mjs.map} +0 -0
- /package/dist/esm/{chunk-FG6RKPA7.mjs.map → chunk-PIXE7MN5.mjs.map} +0 -0
- /package/dist/esm/{chunk-QN3TJQIU.mjs.map → chunk-PMWH5IGI.mjs.map} +0 -0
- /package/dist/esm/{chunk-X47DR2C3.mjs.map → chunk-Q5HK3U64.mjs.map} +0 -0
- /package/dist/esm/{chunk-T5IFXLOP.mjs.map → chunk-QGIJNA37.mjs.map} +0 -0
- /package/dist/esm/{chunk-TJJSQSO3.mjs.map → chunk-QRQAR6XO.mjs.map} +0 -0
- /package/dist/esm/{chunk-QW5W2DWF.mjs.map → chunk-R56OJ4XC.mjs.map} +0 -0
- /package/dist/esm/{chunk-2RZSI3B6.mjs.map → chunk-SPOHAEHR.mjs.map} +0 -0
- /package/dist/esm/{chunk-T7U4YWE7.mjs.map → chunk-SRZTA6QH.mjs.map} +0 -0
- /package/dist/esm/{chunk-4HSVC56Q.mjs.map → chunk-V2FPYAK7.mjs.map} +0 -0
- /package/dist/esm/{chunk-LOEBNFNC.mjs.map → chunk-VKZCIGKY.mjs.map} +0 -0
- /package/dist/esm/{chunk-YE3DZD6T.mjs.map → chunk-VPQ46CAO.mjs.map} +0 -0
- /package/dist/esm/{chunk-U53N6WW2.mjs.map → chunk-W4UDMBMU.mjs.map} +0 -0
- /package/dist/esm/{chunk-PD5I66D6.mjs.map → chunk-XZYPAQCU.mjs.map} +0 -0
- /package/dist/esm/{chunk-F7H662U6.mjs.map → chunk-Y4AKS4CY.mjs.map} +0 -0
|
@@ -252,15 +252,17 @@ declare enum TransactionResponseType {
|
|
|
252
252
|
User = "user_transaction",
|
|
253
253
|
Genesis = "genesis_transaction",
|
|
254
254
|
BlockMetadata = "block_metadata_transaction",
|
|
255
|
-
StateCheckpoint = "state_checkpoint_transaction"
|
|
255
|
+
StateCheckpoint = "state_checkpoint_transaction",
|
|
256
|
+
Validator = "validator_transaction"
|
|
256
257
|
}
|
|
257
258
|
type TransactionResponse = PendingTransactionResponse | CommittedTransactionResponse;
|
|
258
|
-
type CommittedTransactionResponse = UserTransactionResponse | GenesisTransactionResponse | BlockMetadataTransactionResponse | StateCheckpointTransactionResponse;
|
|
259
|
+
type CommittedTransactionResponse = UserTransactionResponse | GenesisTransactionResponse | BlockMetadataTransactionResponse | StateCheckpointTransactionResponse | ValidatorTransactionResponse;
|
|
259
260
|
declare function isPendingTransactionResponse(response: TransactionResponse): response is PendingTransactionResponse;
|
|
260
261
|
declare function isUserTransactionResponse(response: TransactionResponse): response is UserTransactionResponse;
|
|
261
262
|
declare function isGenesisTransactionResponse(response: TransactionResponse): response is GenesisTransactionResponse;
|
|
262
263
|
declare function isBlockMetadataTransactionResponse(response: TransactionResponse): response is BlockMetadataTransactionResponse;
|
|
263
264
|
declare function isStateCheckpointTransactionResponse(response: TransactionResponse): response is StateCheckpointTransactionResponse;
|
|
265
|
+
declare function isValidatorTransactionResponse(response: TransactionResponse): response is ValidatorTransactionResponse;
|
|
264
266
|
type PendingTransactionResponse = {
|
|
265
267
|
type: TransactionResponseType.Pending;
|
|
266
268
|
hash: string;
|
|
@@ -278,7 +280,7 @@ type UserTransactionResponse = {
|
|
|
278
280
|
hash: string;
|
|
279
281
|
state_change_hash: string;
|
|
280
282
|
event_root_hash: string;
|
|
281
|
-
state_checkpoint_hash
|
|
283
|
+
state_checkpoint_hash: string | null;
|
|
282
284
|
gas_used: string;
|
|
283
285
|
/**
|
|
284
286
|
* Whether the transaction was successful
|
|
@@ -339,7 +341,7 @@ type BlockMetadataTransactionResponse = {
|
|
|
339
341
|
hash: string;
|
|
340
342
|
state_change_hash: string;
|
|
341
343
|
event_root_hash: string;
|
|
342
|
-
state_checkpoint_hash
|
|
344
|
+
state_checkpoint_hash: string | null;
|
|
343
345
|
gas_used: string;
|
|
344
346
|
/**
|
|
345
347
|
* Whether the transaction was successful
|
|
@@ -378,7 +380,30 @@ type StateCheckpointTransactionResponse = {
|
|
|
378
380
|
hash: string;
|
|
379
381
|
state_change_hash: string;
|
|
380
382
|
event_root_hash: string;
|
|
381
|
-
state_checkpoint_hash
|
|
383
|
+
state_checkpoint_hash: string | null;
|
|
384
|
+
gas_used: string;
|
|
385
|
+
/**
|
|
386
|
+
* Whether the transaction was successful
|
|
387
|
+
*/
|
|
388
|
+
success: boolean;
|
|
389
|
+
/**
|
|
390
|
+
* The VM status of the transaction, can tell useful information in a failure
|
|
391
|
+
*/
|
|
392
|
+
vm_status: string;
|
|
393
|
+
accumulator_root_hash: string;
|
|
394
|
+
/**
|
|
395
|
+
* Final state of resources changed by the transaction
|
|
396
|
+
*/
|
|
397
|
+
changes: Array<WriteSetChange>;
|
|
398
|
+
timestamp: string;
|
|
399
|
+
};
|
|
400
|
+
type ValidatorTransactionResponse = {
|
|
401
|
+
type: TransactionResponseType.Validator;
|
|
402
|
+
version: string;
|
|
403
|
+
hash: string;
|
|
404
|
+
state_change_hash: string;
|
|
405
|
+
event_root_hash: string;
|
|
406
|
+
state_checkpoint_hash: string | null;
|
|
382
407
|
gas_used: string;
|
|
383
408
|
/**
|
|
384
409
|
* Whether the transaction was successful
|
|
@@ -393,6 +418,10 @@ type StateCheckpointTransactionResponse = {
|
|
|
393
418
|
* Final state of resources changed by the transaction
|
|
394
419
|
*/
|
|
395
420
|
changes: Array<WriteSetChange>;
|
|
421
|
+
/**
|
|
422
|
+
* The events emitted by the validator transaction
|
|
423
|
+
*/
|
|
424
|
+
events: Array<Event>;
|
|
396
425
|
timestamp: string;
|
|
397
426
|
};
|
|
398
427
|
/**
|
|
@@ -901,4 +930,4 @@ type GenerateAccountWithSingleSignerSecp256k1Key = {
|
|
|
901
930
|
};
|
|
902
931
|
type GenerateAccount = GenerateAccountWithEd25519 | GenerateAccountWithSingleSignerSecp256k1Key;
|
|
903
932
|
|
|
904
|
-
export { AccountAuthenticatorVariant, type AccountData, type AccountSignature, type AnyNumber, AnyPublicKeyVariant, AnySignatureVariant, type AptosRequest, type AptosSettings, type AuthenticationKeyScheme, type Block, type BlockMetadataTransactionResponse, type Client, type ClientConfig, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type DecodedTableData, type DeletedTableData, DeriveScheme, type DirectWriteSet, type EntryFunctionPayloadResponse, type Event, type EventGuid, type GasEstimation, type GenerateAccount, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenesisPayload, type GenesisTransactionResponse, type HexInput, type InputViewRequestData, type LedgerInfo, type LedgerVersionArg, MimeType, MoveAbility, type MoveAddressType, type MoveFunction, type MoveFunctionGenericTypeParam, type MoveFunctionId, MoveFunctionVisibility, type MoveModule, type MoveModuleBytecode, type MoveModuleId, type MoveObjectType, type MoveOptionType, type MoveResource, type MoveScriptBytecode, type MoveStruct, type MoveStructField, type MoveStructId, type MoveStructType, type MoveType, type MoveUint128Type, type MoveUint16Type, type MoveUint256Type, type MoveUint32Type, type MoveUint64Type, type MoveUint8Type, type MoveValue, type MultisigPayloadResponse, OrderBy, type OrderByArg, type PaginationArgs, type PendingTransactionResponse, RoleType, type ScriptPayloadResponse, ScriptTransactionArgumentVariants, type ScriptWriteSet, SigningScheme, SigningSchemeInput, type StateCheckpointTransactionResponse, type TableItemRequest, TokenStandard, type TokenStandardArg, TransactionAuthenticatorVariant, type TransactionEd25519Signature, type TransactionFeePayerSignature, type TransactionMultiAgentSignature, type TransactionMultiEd25519Signature, type TransactionPayloadResponse, TransactionPayloadVariants, type TransactionResponse, TransactionResponseType, type TransactionSecp256k1Signature, type TransactionSignature, TransactionVariants, TypeTagVariants, type Uint128, type Uint16, type Uint256, type Uint32, type Uint64, type Uint8, type UserTransactionResponse, type ViewRequest, type WaitForTransactionOptions, type WhereArg, type WriteSet, type WriteSetChange, type WriteSetChangeDeleteModule, type WriteSetChangeDeleteResource, type WriteSetChangeDeleteTableItem, type WriteSetChangeWriteModule, type WriteSetChangeWriteResource, type WriteSetChangeWriteTableItem, isBlockMetadataTransactionResponse, isEd25519Signature, isFeePayerSignature, isGenesisTransactionResponse, isMultiAgentSignature, isMultiEd25519Signature, isPendingTransactionResponse, isSecp256k1Signature, isStateCheckpointTransactionResponse, isUserTransactionResponse };
|
|
933
|
+
export { AccountAuthenticatorVariant, type AccountData, type AccountSignature, type AnyNumber, AnyPublicKeyVariant, AnySignatureVariant, type AptosRequest, type AptosSettings, type AuthenticationKeyScheme, type Block, type BlockMetadataTransactionResponse, type Client, type ClientConfig, type ClientRequest, type ClientResponse, type CommittedTransactionResponse, type DecodedTableData, type DeletedTableData, DeriveScheme, type DirectWriteSet, type EntryFunctionPayloadResponse, type Event, type EventGuid, type GasEstimation, type GenerateAccount, type GenerateAccountWithEd25519, type GenerateAccountWithSingleSignerSecp256k1Key, type GenesisPayload, type GenesisTransactionResponse, type HexInput, type InputViewRequestData, type LedgerInfo, type LedgerVersionArg, MimeType, MoveAbility, type MoveAddressType, type MoveFunction, type MoveFunctionGenericTypeParam, type MoveFunctionId, MoveFunctionVisibility, type MoveModule, type MoveModuleBytecode, type MoveModuleId, type MoveObjectType, type MoveOptionType, type MoveResource, type MoveScriptBytecode, type MoveStruct, type MoveStructField, type MoveStructId, type MoveStructType, type MoveType, type MoveUint128Type, type MoveUint16Type, type MoveUint256Type, type MoveUint32Type, type MoveUint64Type, type MoveUint8Type, type MoveValue, type MultisigPayloadResponse, OrderBy, type OrderByArg, type PaginationArgs, type PendingTransactionResponse, RoleType, type ScriptPayloadResponse, ScriptTransactionArgumentVariants, type ScriptWriteSet, SigningScheme, SigningSchemeInput, type StateCheckpointTransactionResponse, type TableItemRequest, TokenStandard, type TokenStandardArg, TransactionAuthenticatorVariant, type TransactionEd25519Signature, type TransactionFeePayerSignature, type TransactionMultiAgentSignature, type TransactionMultiEd25519Signature, type TransactionPayloadResponse, TransactionPayloadVariants, type TransactionResponse, TransactionResponseType, type TransactionSecp256k1Signature, type TransactionSignature, TransactionVariants, TypeTagVariants, type Uint128, type Uint16, type Uint256, type Uint32, type Uint64, type Uint8, type UserTransactionResponse, type ValidatorTransactionResponse, type ViewRequest, type WaitForTransactionOptions, type WhereArg, type WriteSet, type WriteSetChange, type WriteSetChangeDeleteModule, type WriteSetChangeDeleteResource, type WriteSetChangeDeleteTableItem, type WriteSetChangeWriteModule, type WriteSetChangeWriteResource, type WriteSetChangeWriteTableItem, isBlockMetadataTransactionResponse, isEd25519Signature, isFeePayerSignature, isGenesisTransactionResponse, isMultiAgentSignature, isMultiEd25519Signature, isPendingTransactionResponse, isSecp256k1Signature, isStateCheckpointTransactionResponse, isUserTransactionResponse, isValidatorTransactionResponse };
|
package/dist/esm/types/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-
|
|
1
|
+
import{A,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-CVEJHRAU.mjs";import"../chunk-4WPQQPUF.mjs";import"../chunk-FVA2OPG4.mjs";export{g as AccountAuthenticatorVariant,h as AnyPublicKeyVariant,i as AnySignatureVariant,A as DeriveScheme,a as MimeType,w as MoveAbility,v as MoveFunctionVisibility,x as RoleType,c as ScriptTransactionArgumentVariants,y as SigningScheme,z as SigningSchemeInput,f as TransactionAuthenticatorVariant,d as TransactionPayloadVariants,j as TransactionResponseType,e as TransactionVariants,b as TypeTagVariants,n as isBlockMetadataTransactionResponse,q as isEd25519Signature,t as isFeePayerSignature,m as isGenesisTransactionResponse,s as isMultiAgentSignature,u as isMultiEd25519Signature,k as isPendingTransactionResponse,r as isSecp256k1Signature,o as isStateCheckpointTransactionResponse,l as isUserTransactionResponse,p as isValidatorTransactionResponse};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/version.d.mts
CHANGED
package/dist/esm/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-MEPX7Z2Z.mjs";import"./chunk-FVA2OPG4.mjs";export{a as VERSION};
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/package.json
CHANGED
package/src/api/digitalAsset.ts
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
burnDigitalAssetTransaction,
|
|
22
22
|
CreateCollectionOptions,
|
|
23
23
|
createCollectionTransaction,
|
|
24
|
-
|
|
24
|
+
freezeDigitalAssetTransferTransaction,
|
|
25
25
|
getCollectionData,
|
|
26
26
|
getCollectionId,
|
|
27
27
|
getCurrentDigitalAssetOwnership,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
setDigitalAssetNameTransaction,
|
|
38
38
|
setDigitalAssetURITransaction,
|
|
39
39
|
transferDigitalAssetTransaction,
|
|
40
|
-
|
|
40
|
+
unfreezeDigitalAssetTransferTransaction,
|
|
41
41
|
updateDigitalAssetPropertyTransaction,
|
|
42
42
|
updateDigitalAssetTypedPropertyTransaction,
|
|
43
43
|
} from "../internal/digitalAsset";
|
|
@@ -331,7 +331,7 @@ export class DigitalAsset {
|
|
|
331
331
|
digitalAssetType?: MoveStructId;
|
|
332
332
|
options?: InputGenerateTransactionOptions;
|
|
333
333
|
}) {
|
|
334
|
-
return
|
|
334
|
+
return freezeDigitalAssetTransferTransaction({ aptosConfig: this.config, ...args });
|
|
335
335
|
}
|
|
336
336
|
|
|
337
337
|
/**
|
|
@@ -348,7 +348,7 @@ export class DigitalAsset {
|
|
|
348
348
|
digitalAssetType?: MoveStructId;
|
|
349
349
|
options?: InputGenerateTransactionOptions;
|
|
350
350
|
}) {
|
|
351
|
-
return
|
|
351
|
+
return unfreezeDigitalAssetTransferTransaction({ aptosConfig: this.config, ...args });
|
|
352
352
|
}
|
|
353
353
|
|
|
354
354
|
/**
|
package/src/api/event.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
// Copyright © Aptos Foundation
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
getAccountEventsByCreationNumber,
|
|
6
|
+
getAccountEventsByEventType,
|
|
7
|
+
getModuleEventsByEventType,
|
|
8
|
+
getEvents,
|
|
9
|
+
} from "../internal/event";
|
|
5
10
|
import { AnyNumber, GetEventsResponse, MoveStructId, OrderByArg, PaginationArgs, WhereArg } from "../types";
|
|
6
11
|
import { EventsBoolExp } from "../types/generated/types";
|
|
7
12
|
import { AccountAddressInput } from "../core";
|
|
@@ -15,6 +20,27 @@ import { waitForIndexerOnVersion } from "./utils";
|
|
|
15
20
|
export class Event {
|
|
16
21
|
constructor(readonly config: AptosConfig) {}
|
|
17
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Get module events by event type
|
|
25
|
+
*
|
|
26
|
+
* @param args.eventType - The event type
|
|
27
|
+
* @param args.minimumLedgerVersion Optional ledger version to sync up to, before querying
|
|
28
|
+
*
|
|
29
|
+
* @returns Promise<GetEventsResponse>
|
|
30
|
+
*/
|
|
31
|
+
async getModuleEventsByEventType(args: {
|
|
32
|
+
eventType: MoveStructId;
|
|
33
|
+
minimumLedgerVersion?: AnyNumber;
|
|
34
|
+
options?: PaginationArgs & OrderByArg<GetEventsResponse[0]>;
|
|
35
|
+
}): Promise<GetEventsResponse> {
|
|
36
|
+
await waitForIndexerOnVersion({
|
|
37
|
+
config: this.config,
|
|
38
|
+
minimumLedgerVersion: args.minimumLedgerVersion,
|
|
39
|
+
processorType: ProcessorType.EVENTS_PROCESSOR,
|
|
40
|
+
});
|
|
41
|
+
return getModuleEventsByEventType({ aptosConfig: this.config, ...args });
|
|
42
|
+
}
|
|
43
|
+
|
|
18
44
|
/**
|
|
19
45
|
* Get events by creation number and an account address
|
|
20
46
|
*
|
package/src/internal/coin.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { AptosConfig } from "../api/aptosConfig";
|
|
2
2
|
import { AccountAddressInput } from "../core";
|
|
3
|
-
import { InputGenerateTransactionOptions, SimpleTransaction } from "../transactions/types";
|
|
3
|
+
import { EntryFunctionABI, InputGenerateTransactionOptions, SimpleTransaction } from "../transactions/types";
|
|
4
4
|
import { AnyNumber, MoveStructId } from "../types";
|
|
5
5
|
import { APTOS_COIN } from "../utils/const";
|
|
6
6
|
import { generateTransaction } from "./transactionSubmission";
|
|
7
|
+
import { TypeTagAddress, TypeTagU64 } from "../transactions";
|
|
8
|
+
|
|
9
|
+
const coinTransferAbi: EntryFunctionABI = {
|
|
10
|
+
typeParameters: [{ constraints: [] }],
|
|
11
|
+
parameters: [new TypeTagAddress(), new TypeTagU64()],
|
|
12
|
+
};
|
|
7
13
|
|
|
8
14
|
export async function transferCoinTransaction(args: {
|
|
9
15
|
aptosConfig: AptosConfig;
|
|
@@ -15,16 +21,15 @@ export async function transferCoinTransaction(args: {
|
|
|
15
21
|
}): Promise<SimpleTransaction> {
|
|
16
22
|
const { aptosConfig, sender, recipient, amount, coinType, options } = args;
|
|
17
23
|
const coinStructType = coinType ?? APTOS_COIN;
|
|
18
|
-
|
|
24
|
+
return generateTransaction({
|
|
19
25
|
aptosConfig,
|
|
20
26
|
sender,
|
|
21
27
|
data: {
|
|
22
28
|
function: "0x1::aptos_account::transfer_coins",
|
|
23
29
|
typeArguments: [coinStructType],
|
|
24
30
|
functionArguments: [recipient, amount],
|
|
31
|
+
abi: coinTransferAbi,
|
|
25
32
|
},
|
|
26
33
|
options,
|
|
27
34
|
});
|
|
28
|
-
|
|
29
|
-
return transaction;
|
|
30
35
|
}
|