@aptos-labs/ts-sdk 7.2.0 → 7.4.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/LICENSE +43 -43
- package/README.md +36 -20
- package/dist/account/AbstractKeylessAccount.d.ts.map +1 -1
- package/dist/account/AbstractKeylessAccount.js.map +1 -1
- package/dist/account/AbstractedAccount.d.ts.map +1 -1
- package/dist/account/Account.d.ts.map +1 -1
- package/dist/account/Account.js.map +1 -1
- package/dist/account/AccountUtils.js.map +1 -1
- package/dist/account/DerivableAbstractedAccount.d.ts.map +1 -1
- package/dist/account/DerivableAbstractedAccount.js.map +1 -1
- package/dist/account/Ed25519Account.d.ts.map +1 -1
- package/dist/account/EphemeralKeyPair.d.ts.map +1 -1
- package/dist/account/EphemeralKeyPair.js.map +1 -1
- package/dist/account/FederatedKeylessAccount.d.ts.map +1 -1
- package/dist/account/KeylessAccount.d.ts.map +1 -1
- package/dist/account/MultiEd25519Account.d.ts.map +1 -1
- package/dist/account/MultiKeyAccount.d.ts.map +1 -1
- package/dist/account/SingleKeyAccount.d.ts.map +1 -1
- package/dist/account/SingleKeyAccount.js.map +1 -1
- package/dist/api/account/abstraction.d.ts +10 -0
- package/dist/api/account/abstraction.d.ts.map +1 -1
- package/dist/api/account/abstraction.js +19 -6
- package/dist/api/account/abstraction.js.map +1 -1
- package/dist/api/account.d.ts.map +1 -1
- package/dist/api/account.js.map +1 -1
- package/dist/api/ans.d.ts +9 -0
- package/dist/api/ans.d.ts.map +1 -1
- package/dist/api/ans.js +5 -0
- package/dist/api/ans.js.map +1 -1
- package/dist/api/aptos.d.ts.map +1 -1
- package/dist/api/aptosConfig.d.ts +12 -0
- package/dist/api/aptosConfig.d.ts.map +1 -1
- package/dist/api/aptosConfig.js +13 -0
- package/dist/api/aptosConfig.js.map +1 -1
- package/dist/api/coin.d.ts +2 -0
- package/dist/api/coin.d.ts.map +1 -1
- package/dist/api/coin.js +1 -0
- package/dist/api/coin.js.map +1 -1
- package/dist/api/digitalAsset.d.ts +30 -0
- package/dist/api/digitalAsset.d.ts.map +1 -1
- package/dist/api/digitalAsset.js +15 -0
- package/dist/api/digitalAsset.js.map +1 -1
- package/dist/api/faucet.d.ts.map +1 -1
- package/dist/api/faucet.js.map +1 -1
- package/dist/api/fungibleAsset.d.ts +4 -0
- package/dist/api/fungibleAsset.d.ts.map +1 -1
- package/dist/api/fungibleAsset.js +2 -0
- package/dist/api/fungibleAsset.js.map +1 -1
- package/dist/api/general.d.ts.map +1 -1
- package/dist/api/keyless.d.ts +38 -1
- package/dist/api/keyless.d.ts.map +1 -1
- package/dist/api/keyless.js +29 -1
- package/dist/api/keyless.js.map +1 -1
- package/dist/api/object.d.ts.map +1 -1
- package/dist/api/object.js.map +1 -1
- package/dist/api/staking.d.ts.map +1 -1
- package/dist/api/staking.js.map +1 -1
- package/dist/api/table.d.ts.map +1 -1
- package/dist/api/transaction.d.ts +41 -1
- package/dist/api/transaction.d.ts.map +1 -1
- package/dist/api/transaction.js +42 -2
- package/dist/api/transaction.js.map +1 -1
- package/dist/api/transactionSubmission/build.d.ts +7 -5
- package/dist/api/transactionSubmission/build.d.ts.map +1 -1
- package/dist/api/transactionSubmission/build.js +13 -5
- package/dist/api/transactionSubmission/build.js.map +1 -1
- package/dist/api/transactionSubmission/management.d.ts.map +1 -1
- package/dist/api/transactionSubmission/sign.d.ts.map +1 -1
- package/dist/api/transactionSubmission/simulate.d.ts +7 -3
- package/dist/api/transactionSubmission/simulate.d.ts.map +1 -1
- package/dist/api/transactionSubmission/simulate.js +7 -3
- package/dist/api/transactionSubmission/simulate.js.map +1 -1
- package/dist/api/transactionSubmission/submit.d.ts.map +1 -1
- package/dist/bcs/deserializer.d.ts.map +1 -1
- package/dist/bcs/serializable/entryFunctionBytes.d.ts.map +1 -1
- package/dist/bcs/serializable/fixedBytes.d.ts.map +1 -1
- package/dist/bcs/serializable/movePrimitives.d.ts.map +1 -1
- package/dist/bcs/serializable/moveStructs.d.ts +72 -28
- package/dist/bcs/serializable/moveStructs.d.ts.map +1 -1
- package/dist/bcs/serializable/moveStructs.js +76 -28
- package/dist/bcs/serializable/moveStructs.js.map +1 -1
- package/dist/bcs/serializer.d.ts.map +1 -1
- package/dist/bcs/serializer.js.map +1 -1
- package/dist/cli/localNode.d.ts.map +1 -1
- package/dist/cli/localNode.js +16 -3
- package/dist/cli/localNode.js.map +1 -1
- package/dist/cli/move.d.ts.map +1 -1
- package/dist/cli/move.js.map +1 -1
- package/dist/client/core.d.ts +3 -0
- package/dist/client/core.d.ts.map +1 -1
- package/dist/client/core.js +116 -9
- package/dist/client/core.js.map +1 -1
- package/dist/core/account/utils/address.d.ts.map +1 -1
- package/dist/core/accountAddress.d.ts.map +1 -1
- package/dist/core/accountAddress.js.map +1 -1
- package/dist/core/authenticationKey.d.ts.map +1 -1
- package/dist/core/authenticationKey.js.map +1 -1
- package/dist/core/common.d.ts.map +1 -1
- package/dist/core/crypto/abstraction.d.ts.map +1 -1
- package/dist/core/crypto/ed25519.d.ts.map +1 -1
- package/dist/core/crypto/ed25519.js.map +1 -1
- package/dist/core/crypto/encryption/ciphertext.d.ts.map +1 -1
- package/dist/core/crypto/encryption/symmetric.d.ts.map +1 -1
- package/dist/core/crypto/encryption/symmetric.js.map +1 -1
- package/dist/core/crypto/ephemeral.d.ts.map +1 -1
- package/dist/core/crypto/federatedKeyless.d.ts.map +1 -1
- package/dist/core/crypto/hdKey.d.ts.map +1 -1
- package/dist/core/crypto/keyless.d.ts.map +1 -1
- package/dist/core/crypto/keyless.js.map +1 -1
- package/dist/core/crypto/multiEd25519.d.ts.map +1 -1
- package/dist/core/crypto/multiEd25519.js.map +1 -1
- package/dist/core/crypto/multiKey.d.ts.map +1 -1
- package/dist/core/crypto/multiKey.js.map +1 -1
- package/dist/core/crypto/privateKey.d.ts.map +1 -1
- package/dist/core/crypto/privateKey.js.map +1 -1
- package/dist/core/crypto/publicKey.d.ts.map +1 -1
- package/dist/core/crypto/secp256k1.d.ts.map +1 -1
- package/dist/core/crypto/secp256k1.js.map +1 -1
- package/dist/core/crypto/secp256r1.d.ts.map +1 -1
- package/dist/core/crypto/secp256r1.js.map +1 -1
- package/dist/core/crypto/signature.d.ts.map +1 -1
- package/dist/core/crypto/singleKey.d.ts.map +1 -1
- package/dist/core/crypto/singleKey.js.map +1 -1
- package/dist/core/crypto/utils.d.ts.map +1 -1
- package/dist/core/hex.d.ts.map +1 -1
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/functions/keyless.d.ts +1 -1
- package/dist/functions/keyless.d.ts.map +1 -1
- package/dist/functions/keyless.js +1 -1
- package/dist/functions/keyless.js.map +1 -1
- package/dist/functions/transaction.d.ts +1 -1
- package/dist/functions/transaction.d.ts.map +1 -1
- package/dist/functions/transaction.js +1 -1
- package/dist/functions/transaction.js.map +1 -1
- package/dist/internal/abstraction.d.ts +35 -0
- package/dist/internal/abstraction.d.ts.map +1 -1
- package/dist/internal/abstraction.js +38 -3
- package/dist/internal/abstraction.js.map +1 -1
- package/dist/internal/account.d.ts +6 -0
- package/dist/internal/account.d.ts.map +1 -1
- package/dist/internal/account.js +55 -37
- package/dist/internal/account.js.map +1 -1
- package/dist/internal/ans.d.ts +11 -0
- package/dist/internal/ans.d.ts.map +1 -1
- package/dist/internal/ans.js +18 -6
- package/dist/internal/ans.js.map +1 -1
- package/dist/internal/coin.d.ts +2 -0
- package/dist/internal/coin.d.ts.map +1 -1
- package/dist/internal/coin.js +3 -1
- package/dist/internal/coin.js.map +1 -1
- package/dist/internal/digitalAsset.d.ts +30 -0
- package/dist/internal/digitalAsset.d.ts.map +1 -1
- package/dist/internal/digitalAsset.js +45 -15
- package/dist/internal/digitalAsset.js.map +1 -1
- package/dist/internal/fungibleAsset.d.ts +4 -0
- package/dist/internal/fungibleAsset.d.ts.map +1 -1
- package/dist/internal/fungibleAsset.js +6 -2
- package/dist/internal/fungibleAsset.js.map +1 -1
- package/dist/internal/keyless.d.ts +39 -1
- package/dist/internal/keyless.d.ts.map +1 -1
- package/dist/internal/keyless.js +71 -13
- package/dist/internal/keyless.js.map +1 -1
- package/dist/internal/transaction.d.ts +24 -1
- package/dist/internal/transaction.d.ts.map +1 -1
- package/dist/internal/transaction.js +125 -4
- package/dist/internal/transaction.js.map +1 -1
- package/dist/internal/transactionSubmission.d.ts +2 -0
- package/dist/internal/transactionSubmission.d.ts.map +1 -1
- package/dist/internal/transactionSubmission.js +3 -1
- package/dist/internal/transactionSubmission.js.map +1 -1
- package/dist/transactions/authenticator/account.d.ts.map +1 -1
- package/dist/transactions/authenticator/transaction.d.ts.map +1 -1
- package/dist/transactions/instances/chainId.d.ts.map +1 -1
- package/dist/transactions/instances/encryptedPayload.d.ts.map +1 -1
- package/dist/transactions/instances/encryptedPayload.js.map +1 -1
- package/dist/transactions/instances/identifier.d.ts.map +1 -1
- package/dist/transactions/instances/moduleId.d.ts.map +1 -1
- package/dist/transactions/instances/multiAgentTransaction.d.ts.map +1 -1
- package/dist/transactions/instances/rawTransaction.d.ts.map +1 -1
- package/dist/transactions/instances/rotationProofChallenge.d.ts.map +1 -1
- package/dist/transactions/instances/signedTransaction.d.ts.map +1 -1
- package/dist/transactions/instances/simpleTransaction.d.ts.map +1 -1
- package/dist/transactions/instances/transactionPayload.d.ts.map +1 -1
- package/dist/transactions/management/accountSequenceNumber.d.ts.map +1 -1
- package/dist/transactions/management/asyncQueue.d.ts.map +1 -1
- package/dist/transactions/management/transactionWorker.d.ts +10 -6
- package/dist/transactions/management/transactionWorker.d.ts.map +1 -1
- package/dist/transactions/management/transactionWorker.js +28 -24
- package/dist/transactions/management/transactionWorker.js.map +1 -1
- package/dist/transactions/transactionBuilder/index.d.ts +1 -0
- package/dist/transactions/transactionBuilder/index.d.ts.map +1 -1
- package/dist/transactions/transactionBuilder/index.js +1 -0
- package/dist/transactions/transactionBuilder/index.js.map +1 -1
- package/dist/transactions/transactionBuilder/scriptAbi.d.ts +10 -0
- package/dist/transactions/transactionBuilder/scriptAbi.d.ts.map +1 -0
- package/dist/transactions/transactionBuilder/scriptAbi.js +863 -0
- package/dist/transactions/transactionBuilder/scriptAbi.js.map +1 -0
- package/dist/transactions/transactionBuilder/structEnumParser.d.ts.map +1 -1
- package/dist/transactions/transactionBuilder/structEnumParser.js.map +1 -1
- package/dist/transactions/transactionBuilder/transactionBuilder.d.ts +7 -2
- package/dist/transactions/transactionBuilder/transactionBuilder.d.ts.map +1 -1
- package/dist/transactions/transactionBuilder/transactionBuilder.js +65 -1
- package/dist/transactions/transactionBuilder/transactionBuilder.js.map +1 -1
- package/dist/transactions/typeTag/index.d.ts.map +1 -1
- package/dist/transactions/typeTag/index.js.map +1 -1
- package/dist/transactions/typeTag/parser.d.ts.map +1 -1
- package/dist/transactions/typeTag/parser.js.map +1 -1
- package/dist/transactions/types.d.ts +9 -4
- package/dist/transactions/types.d.ts.map +1 -1
- package/dist/types/generated/queries.d.ts.map +1 -1
- package/dist/types/generated/queries.js.map +1 -1
- package/dist/types/keyless.d.ts +2 -2
- package/dist/types/keyless.d.ts.map +1 -1
- package/dist/types/types.d.ts +7 -2
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/types.js.map +1 -1
- package/dist/utils/const.d.ts +11 -0
- package/dist/utils/const.d.ts.map +1 -1
- package/dist/utils/const.js +11 -0
- package/dist/utils/const.js.map +1 -1
- package/dist/utils/helpers.d.ts.map +1 -1
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/runtime.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +27 -25
- package/src/api/account/abstraction.ts +23 -6
- package/src/api/ans.ts +9 -0
- package/src/api/aptosConfig.ts +14 -0
- package/src/api/coin.ts +2 -0
- package/src/api/digitalAsset.ts +30 -0
- package/src/api/fungibleAsset.ts +4 -0
- package/src/api/keyless.ts +39 -1
- package/src/api/transaction.ts +48 -1
- package/src/api/transactionSubmission/build.ts +16 -6
- package/src/api/transactionSubmission/simulate.ts +7 -3
- package/src/bcs/serializable/moveStructs.ts +80 -28
- package/src/cli/localNode.ts +17 -3
- package/src/client/core.ts +150 -10
- package/src/functions/keyless.ts +1 -0
- package/src/functions/transaction.ts +1 -0
- package/src/internal/abstraction.ts +41 -3
- package/src/internal/account.ts +60 -38
- package/src/internal/ans.ts +24 -6
- package/src/internal/coin.ts +4 -1
- package/src/internal/digitalAsset.ts +60 -9
- package/src/internal/fungibleAsset.ts +8 -2
- package/src/internal/keyless.ts +91 -14
- package/src/internal/transaction.ts +154 -4
- package/src/internal/transactionSubmission.ts +4 -1
- package/src/transactions/management/transactionWorker.ts +35 -23
- package/src/transactions/transactionBuilder/index.ts +1 -0
- package/src/transactions/transactionBuilder/scriptAbi.ts +1145 -0
- package/src/transactions/transactionBuilder/transactionBuilder.ts +97 -6
- package/src/transactions/types.ts +10 -4
- package/src/types/keyless.ts +2 -2
- package/src/types/types.ts +8 -2
- package/src/utils/const.ts +12 -0
- package/src/version.ts +1 -1
|
@@ -2,6 +2,7 @@ import { Bool, U128, U16, U256, U32, U64, U8, I8, I16, I32, I64, I128, I256 } fr
|
|
|
2
2
|
import { Serializable, Serializer } from "../serializer.js";
|
|
3
3
|
import { Deserializable, Deserializer } from "../deserializer.js";
|
|
4
4
|
import { AnyNumber, HexInput } from "../../types/index.js";
|
|
5
|
+
import { AccountAddress, AccountAddressInput } from "../../core/accountAddress.js";
|
|
5
6
|
import { EntryFunctionArgument, TransactionArgument } from "../../transactions/instances/transactionArgument.js";
|
|
6
7
|
/**
|
|
7
8
|
* This class is the Aptos Typescript SDK representation of a Move `vector<T>`,
|
|
@@ -289,6 +290,20 @@ export declare class MoveVector<T extends Serializable & EntryFunctionArgument>
|
|
|
289
290
|
* @category BCS
|
|
290
291
|
*/
|
|
291
292
|
static MoveString(values: Array<string>): MoveVector<MoveString>;
|
|
293
|
+
/**
|
|
294
|
+
* Factory method to generate a MoveVector<AccountAddress> from an array of `AccountAddressInput` values.
|
|
295
|
+
*
|
|
296
|
+
* @param values - The values used to fill the MoveVector.
|
|
297
|
+
* @returns A MoveVector<AccountAddress> with the inner values.
|
|
298
|
+
*
|
|
299
|
+
* @example
|
|
300
|
+
* ```typescript
|
|
301
|
+
* const v = MoveVector.Address(["0x1", "0x2"]);
|
|
302
|
+
* ```
|
|
303
|
+
* @group Implementation
|
|
304
|
+
* @category BCS
|
|
305
|
+
*/
|
|
306
|
+
static Address(values: Array<AccountAddressInput>): MoveVector<AccountAddress>;
|
|
292
307
|
/**
|
|
293
308
|
* Serializes the current object using the provided serializer.
|
|
294
309
|
* This function will serialize the value if it is present.
|
|
@@ -395,13 +410,14 @@ export declare class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
395
410
|
isSome(): boolean;
|
|
396
411
|
serialize(serializer: Serializer): void;
|
|
397
412
|
/**
|
|
398
|
-
* Factory method to generate a MoveOption<U8> from a `number` or `
|
|
413
|
+
* Factory method to generate a MoveOption<U8> from a `number`, `undefined`, or `null`.
|
|
399
414
|
*
|
|
400
415
|
* @example
|
|
401
416
|
* MoveOption.U8(1).isSome() === true;
|
|
402
417
|
* MoveOption.U8().isSome() === false;
|
|
403
418
|
* MoveOption.U8(undefined).isSome() === false;
|
|
404
|
-
*
|
|
419
|
+
* MoveOption.U8(null).isSome() === false;
|
|
420
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
405
421
|
* the resulting MoveOption's .isSome() method will return false.
|
|
406
422
|
* @returns a MoveOption<U8> with an inner value `value`
|
|
407
423
|
* @group Implementation
|
|
@@ -409,13 +425,14 @@ export declare class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
409
425
|
*/
|
|
410
426
|
static U8(value?: number | null): MoveOption<U8>;
|
|
411
427
|
/**
|
|
412
|
-
* Factory method to generate a MoveOption<U16> from a `number` or `
|
|
428
|
+
* Factory method to generate a MoveOption<U16> from a `number`, `undefined`, or `null`.
|
|
413
429
|
*
|
|
414
430
|
* @example
|
|
415
431
|
* MoveOption.U16(1).isSome() === true;
|
|
416
432
|
* MoveOption.U16().isSome() === false;
|
|
417
433
|
* MoveOption.U16(undefined).isSome() === false;
|
|
418
|
-
*
|
|
434
|
+
* MoveOption.U16(null).isSome() === false;
|
|
435
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
419
436
|
* the resulting MoveOption's .isSome() method will return false.
|
|
420
437
|
* @returns a MoveOption<U16> with an inner value `value`
|
|
421
438
|
* @group Implementation
|
|
@@ -423,13 +440,14 @@ export declare class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
423
440
|
*/
|
|
424
441
|
static U16(value?: number | null): MoveOption<U16>;
|
|
425
442
|
/**
|
|
426
|
-
* Factory method to generate a MoveOption<U32> from a `number` or `
|
|
443
|
+
* Factory method to generate a MoveOption<U32> from a `number`, `undefined`, or `null`.
|
|
427
444
|
*
|
|
428
445
|
* @example
|
|
429
446
|
* MoveOption.U32(1).isSome() === true;
|
|
430
447
|
* MoveOption.U32().isSome() === false;
|
|
431
448
|
* MoveOption.U32(undefined).isSome() === false;
|
|
432
|
-
*
|
|
449
|
+
* MoveOption.U32(null).isSome() === false;
|
|
450
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
433
451
|
* the resulting MoveOption's .isSome() method will return false.
|
|
434
452
|
* @returns a MoveOption<U32> with an inner value `value`
|
|
435
453
|
* @group Implementation
|
|
@@ -437,13 +455,14 @@ export declare class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
437
455
|
*/
|
|
438
456
|
static U32(value?: number | null): MoveOption<U32>;
|
|
439
457
|
/**
|
|
440
|
-
* Factory method to generate a MoveOption<U64> from a `number
|
|
458
|
+
* Factory method to generate a MoveOption<U64> from a `number`, `bigint`, `undefined`, or `null`.
|
|
441
459
|
*
|
|
442
460
|
* @example
|
|
443
461
|
* MoveOption.U64(1).isSome() === true;
|
|
444
462
|
* MoveOption.U64().isSome() === false;
|
|
445
463
|
* MoveOption.U64(undefined).isSome() === false;
|
|
446
|
-
*
|
|
464
|
+
* MoveOption.U64(null).isSome() === false;
|
|
465
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
447
466
|
* the resulting MoveOption's .isSome() method will return false.
|
|
448
467
|
* @returns a MoveOption<U64> with an inner value `value`
|
|
449
468
|
* @group Implementation
|
|
@@ -451,13 +470,14 @@ export declare class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
451
470
|
*/
|
|
452
471
|
static U64(value?: AnyNumber | null): MoveOption<U64>;
|
|
453
472
|
/**
|
|
454
|
-
* Factory method to generate a MoveOption<U128> from a `number
|
|
473
|
+
* Factory method to generate a MoveOption<U128> from a `number`, `bigint`, `undefined`, or `null`.
|
|
455
474
|
*
|
|
456
475
|
* @example
|
|
457
476
|
* MoveOption.U128(1).isSome() === true;
|
|
458
477
|
* MoveOption.U128().isSome() === false;
|
|
459
478
|
* MoveOption.U128(undefined).isSome() === false;
|
|
460
|
-
*
|
|
479
|
+
* MoveOption.U128(null).isSome() === false;
|
|
480
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
461
481
|
* the resulting MoveOption's .isSome() method will return false.
|
|
462
482
|
* @returns a MoveOption<U128> with an inner value `value`
|
|
463
483
|
* @group Implementation
|
|
@@ -465,13 +485,14 @@ export declare class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
465
485
|
*/
|
|
466
486
|
static U128(value?: AnyNumber | null): MoveOption<U128>;
|
|
467
487
|
/**
|
|
468
|
-
* Factory method to generate a MoveOption<U256> from a `number
|
|
488
|
+
* Factory method to generate a MoveOption<U256> from a `number`, `bigint`, `undefined`, or `null`.
|
|
469
489
|
*
|
|
470
490
|
* @example
|
|
471
491
|
* MoveOption.U256(1).isSome() === true;
|
|
472
492
|
* MoveOption.U256().isSome() === false;
|
|
473
493
|
* MoveOption.U256(undefined).isSome() === false;
|
|
474
|
-
*
|
|
494
|
+
* MoveOption.U256(null).isSome() === false;
|
|
495
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
475
496
|
* the resulting MoveOption's .isSome() method will return false.
|
|
476
497
|
* @returns a MoveOption<U256> with an inner value `value`
|
|
477
498
|
* @group Implementation
|
|
@@ -479,13 +500,14 @@ export declare class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
479
500
|
*/
|
|
480
501
|
static U256(value?: AnyNumber | null): MoveOption<U256>;
|
|
481
502
|
/**
|
|
482
|
-
* Factory method to generate a MoveOption<Bool> from a `boolean` or `
|
|
503
|
+
* Factory method to generate a MoveOption<Bool> from a `boolean`, `undefined`, or `null`.
|
|
483
504
|
*
|
|
484
505
|
* @example
|
|
485
506
|
* MoveOption.Bool(true).isSome() === true;
|
|
486
507
|
* MoveOption.Bool().isSome() === false;
|
|
487
508
|
* MoveOption.Bool(undefined).isSome() === false;
|
|
488
|
-
*
|
|
509
|
+
* MoveOption.Bool(null).isSome() === false;
|
|
510
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
489
511
|
* the resulting MoveOption's .isSome() method will return false.
|
|
490
512
|
* @returns a MoveOption<Bool> with an inner value `value`
|
|
491
513
|
* @group Implementation
|
|
@@ -493,13 +515,14 @@ export declare class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
493
515
|
*/
|
|
494
516
|
static Bool(value?: boolean | null): MoveOption<Bool>;
|
|
495
517
|
/**
|
|
496
|
-
* Factory method to generate a MoveOption<I8> from a `number` or `
|
|
518
|
+
* Factory method to generate a MoveOption<I8> from a `number`, `undefined`, or `null`.
|
|
497
519
|
*
|
|
498
520
|
* @example
|
|
499
521
|
* MoveOption.I8(1).isSome() === true;
|
|
500
522
|
* MoveOption.I8().isSome() === false;
|
|
501
523
|
* MoveOption.I8(undefined).isSome() === false;
|
|
502
|
-
*
|
|
524
|
+
* MoveOption.I8(null).isSome() === false;
|
|
525
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
503
526
|
* the resulting MoveOption's .isSome() method will return false.
|
|
504
527
|
* @returns a MoveOption<I8> with an inner value `value`
|
|
505
528
|
* @group Implementation
|
|
@@ -507,13 +530,14 @@ export declare class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
507
530
|
*/
|
|
508
531
|
static I8(value?: number | null): MoveOption<I8>;
|
|
509
532
|
/**
|
|
510
|
-
* Factory method to generate a MoveOption<I16> from a `number` or `
|
|
533
|
+
* Factory method to generate a MoveOption<I16> from a `number`, `undefined`, or `null`.
|
|
511
534
|
*
|
|
512
535
|
* @example
|
|
513
536
|
* MoveOption.I16(1).isSome() === true;
|
|
514
537
|
* MoveOption.I16().isSome() === false;
|
|
515
538
|
* MoveOption.I16(undefined).isSome() === false;
|
|
516
|
-
*
|
|
539
|
+
* MoveOption.I16(null).isSome() === false;
|
|
540
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
517
541
|
* the resulting MoveOption's .isSome() method will return false.
|
|
518
542
|
* @returns a MoveOption<I16> with an inner value `value`
|
|
519
543
|
* @group Implementation
|
|
@@ -521,13 +545,14 @@ export declare class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
521
545
|
*/
|
|
522
546
|
static I16(value?: number | null): MoveOption<I16>;
|
|
523
547
|
/**
|
|
524
|
-
* Factory method to generate a MoveOption<I32> from a `number` or `
|
|
548
|
+
* Factory method to generate a MoveOption<I32> from a `number`, `undefined`, or `null`.
|
|
525
549
|
*
|
|
526
550
|
* @example
|
|
527
551
|
* MoveOption.I32(1).isSome() === true;
|
|
528
552
|
* MoveOption.I32().isSome() === false;
|
|
529
553
|
* MoveOption.I32(undefined).isSome() === false;
|
|
530
|
-
*
|
|
554
|
+
* MoveOption.I32(null).isSome() === false;
|
|
555
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
531
556
|
* the resulting MoveOption's .isSome() method will return false.
|
|
532
557
|
* @returns a MoveOption<I32> with an inner value `value`
|
|
533
558
|
* @group Implementation
|
|
@@ -535,13 +560,14 @@ export declare class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
535
560
|
*/
|
|
536
561
|
static I32(value?: number | null): MoveOption<I32>;
|
|
537
562
|
/**
|
|
538
|
-
* Factory method to generate a MoveOption<I64> from a `number
|
|
563
|
+
* Factory method to generate a MoveOption<I64> from a `number`, `bigint`, `undefined`, or `null`.
|
|
539
564
|
*
|
|
540
565
|
* @example
|
|
541
566
|
* MoveOption.I64(1).isSome() === true;
|
|
542
567
|
* MoveOption.I64().isSome() === false;
|
|
543
568
|
* MoveOption.I64(undefined).isSome() === false;
|
|
544
|
-
*
|
|
569
|
+
* MoveOption.I64(null).isSome() === false;
|
|
570
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
545
571
|
* the resulting MoveOption's .isSome() method will return false.
|
|
546
572
|
* @returns a MoveOption<I64> with an inner value `value`
|
|
547
573
|
* @group Implementation
|
|
@@ -549,13 +575,14 @@ export declare class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
549
575
|
*/
|
|
550
576
|
static I64(value?: AnyNumber | null): MoveOption<I64>;
|
|
551
577
|
/**
|
|
552
|
-
* Factory method to generate a MoveOption<I128> from a `number
|
|
578
|
+
* Factory method to generate a MoveOption<I128> from a `number`, `bigint`, `undefined`, or `null`.
|
|
553
579
|
*
|
|
554
580
|
* @example
|
|
555
581
|
* MoveOption.I128(1).isSome() === true;
|
|
556
582
|
* MoveOption.I128().isSome() === false;
|
|
557
583
|
* MoveOption.I128(undefined).isSome() === false;
|
|
558
|
-
*
|
|
584
|
+
* MoveOption.I128(null).isSome() === false;
|
|
585
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
559
586
|
* the resulting MoveOption's .isSome() method will return false.
|
|
560
587
|
* @returns a MoveOption<I128> with an inner value `value`
|
|
561
588
|
* @group Implementation
|
|
@@ -563,13 +590,14 @@ export declare class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
563
590
|
*/
|
|
564
591
|
static I128(value?: AnyNumber | null): MoveOption<I128>;
|
|
565
592
|
/**
|
|
566
|
-
* Factory method to generate a MoveOption<I256> from a `number
|
|
593
|
+
* Factory method to generate a MoveOption<I256> from a `number`, `bigint`, `undefined`, or `null`.
|
|
567
594
|
*
|
|
568
595
|
* @example
|
|
569
596
|
* MoveOption.I256(1).isSome() === true;
|
|
570
597
|
* MoveOption.I256().isSome() === false;
|
|
571
598
|
* MoveOption.I256(undefined).isSome() === false;
|
|
572
|
-
*
|
|
599
|
+
* MoveOption.I256(null).isSome() === false;
|
|
600
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
573
601
|
* the resulting MoveOption's .isSome() method will return false.
|
|
574
602
|
* @returns a MoveOption<I256> with an inner value `value`
|
|
575
603
|
* @group Implementation
|
|
@@ -577,20 +605,36 @@ export declare class MoveOption<T extends Serializable & EntryFunctionArgument>
|
|
|
577
605
|
*/
|
|
578
606
|
static I256(value?: AnyNumber | null): MoveOption<I256>;
|
|
579
607
|
/**
|
|
580
|
-
* Factory method to generate a MoveOption<MoveString> from a `string` or `
|
|
608
|
+
* Factory method to generate a MoveOption<MoveString> from a `string`, `undefined`, or `null`.
|
|
581
609
|
*
|
|
582
610
|
* @example
|
|
583
611
|
* MoveOption.MoveString("hello").isSome() === true;
|
|
584
612
|
* MoveOption.MoveString("").isSome() === true;
|
|
585
613
|
* MoveOption.MoveString().isSome() === false;
|
|
586
614
|
* MoveOption.MoveString(undefined).isSome() === false;
|
|
587
|
-
*
|
|
615
|
+
* MoveOption.MoveString(null).isSome() === false;
|
|
616
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
588
617
|
* the resulting MoveOption's .isSome() method will return false.
|
|
589
618
|
* @returns a MoveOption<MoveString> with an inner value `value`
|
|
590
619
|
* @group Implementation
|
|
591
620
|
* @category BCS
|
|
592
621
|
*/
|
|
593
622
|
static MoveString(value?: string | null): MoveOption<MoveString>;
|
|
623
|
+
/**
|
|
624
|
+
* Factory method to generate a MoveOption<AccountAddress> from an `AccountAddressInput`, `undefined`, or `null`.
|
|
625
|
+
*
|
|
626
|
+
* @example
|
|
627
|
+
* MoveOption.Address("0x1").isSome() === true;
|
|
628
|
+
* MoveOption.Address().isSome() === false;
|
|
629
|
+
* MoveOption.Address(undefined).isSome() === false;
|
|
630
|
+
* MoveOption.Address(null).isSome() === false;
|
|
631
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
632
|
+
* the resulting MoveOption's .isSome() method will return false.
|
|
633
|
+
* @returns a MoveOption<AccountAddress> with an inner value `value`
|
|
634
|
+
* @group Implementation
|
|
635
|
+
* @category BCS
|
|
636
|
+
*/
|
|
637
|
+
static Address(value?: AccountAddressInput | null): MoveOption<AccountAddress>;
|
|
594
638
|
static deserialize<U extends Serializable & EntryFunctionArgument>(deserializer: Deserializer, cls: Deserializable<U>): MoveOption<U>;
|
|
595
639
|
}
|
|
596
640
|
//# sourceMappingURL=moveStructs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moveStructs.d.ts","sourceRoot":"","sources":["../../../src/bcs/serializable/moveStructs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACzG,OAAO,EAAE,YAAY,EAAE,UAAU,EAAqC,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAqC,MAAM,sBAAsB,CAAC;AAE9F,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,qDAAqD,CAAC;AAGjH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,qBAAa,UAAU,CAAC,CAAC,SAAS,YAAY,GAAG,qBAAqB,CACpE,SAAQ,YACR,YAAW,mBAAmB;IAEvB,MAAM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C,IAAI,CAAC,CAEtD;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAEtD;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,UAAU,CAAC,UAAU,CAAC,CAE/D;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAAG,UAAU,CAAC,cAAc,CAAC,CAI7E;IAED,MAAM,CAAC,WAAW,CAAC,CAAC,SAAS,YAAY,GAAG,qBAAqB,EAC/D,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC,GACrB,UAAU,CAAC,CAAC,CAAC,CAGf;CACF"}
|
|
@@ -5,6 +5,7 @@ import { Serializable, serializeEntryFunctionBytesCompat } from "../serializer.j
|
|
|
5
5
|
import { Deserializer } from "../deserializer.js";
|
|
6
6
|
import { ScriptTransactionArgumentVariants } from "../../types/index.js";
|
|
7
7
|
import { Hex } from "../../core/hex.js";
|
|
8
|
+
import { AccountAddress } from "../../core/accountAddress.js";
|
|
8
9
|
import { TEXT_ENCODER } from "../../utils/const.js";
|
|
9
10
|
/**
|
|
10
11
|
* This class is the Aptos Typescript SDK representation of a Move `vector<T>`,
|
|
@@ -353,6 +354,22 @@ export class MoveVector extends Serializable {
|
|
|
353
354
|
static MoveString(values) {
|
|
354
355
|
return new MoveVector(values.map((v) => new MoveString(v)));
|
|
355
356
|
}
|
|
357
|
+
/**
|
|
358
|
+
* Factory method to generate a MoveVector<AccountAddress> from an array of `AccountAddressInput` values.
|
|
359
|
+
*
|
|
360
|
+
* @param values - The values used to fill the MoveVector.
|
|
361
|
+
* @returns A MoveVector<AccountAddress> with the inner values.
|
|
362
|
+
*
|
|
363
|
+
* @example
|
|
364
|
+
* ```typescript
|
|
365
|
+
* const v = MoveVector.Address(["0x1", "0x2"]);
|
|
366
|
+
* ```
|
|
367
|
+
* @group Implementation
|
|
368
|
+
* @category BCS
|
|
369
|
+
*/
|
|
370
|
+
static Address(values) {
|
|
371
|
+
return new MoveVector(values.map((v) => AccountAddress.from(v)));
|
|
372
|
+
}
|
|
356
373
|
serialize(serializer) {
|
|
357
374
|
serializer.serializeVector(this.values);
|
|
358
375
|
}
|
|
@@ -516,13 +533,14 @@ export class MoveOption extends Serializable {
|
|
|
516
533
|
this.vec.serialize(serializer);
|
|
517
534
|
}
|
|
518
535
|
/**
|
|
519
|
-
* Factory method to generate a MoveOption<U8> from a `number` or `
|
|
536
|
+
* Factory method to generate a MoveOption<U8> from a `number`, `undefined`, or `null`.
|
|
520
537
|
*
|
|
521
538
|
* @example
|
|
522
539
|
* MoveOption.U8(1).isSome() === true;
|
|
523
540
|
* MoveOption.U8().isSome() === false;
|
|
524
541
|
* MoveOption.U8(undefined).isSome() === false;
|
|
525
|
-
*
|
|
542
|
+
* MoveOption.U8(null).isSome() === false;
|
|
543
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
526
544
|
* the resulting MoveOption's .isSome() method will return false.
|
|
527
545
|
* @returns a MoveOption<U8> with an inner value `value`
|
|
528
546
|
* @group Implementation
|
|
@@ -532,13 +550,14 @@ export class MoveOption extends Serializable {
|
|
|
532
550
|
return new MoveOption(value !== null && value !== undefined ? new U8(value) : undefined);
|
|
533
551
|
}
|
|
534
552
|
/**
|
|
535
|
-
* Factory method to generate a MoveOption<U16> from a `number` or `
|
|
553
|
+
* Factory method to generate a MoveOption<U16> from a `number`, `undefined`, or `null`.
|
|
536
554
|
*
|
|
537
555
|
* @example
|
|
538
556
|
* MoveOption.U16(1).isSome() === true;
|
|
539
557
|
* MoveOption.U16().isSome() === false;
|
|
540
558
|
* MoveOption.U16(undefined).isSome() === false;
|
|
541
|
-
*
|
|
559
|
+
* MoveOption.U16(null).isSome() === false;
|
|
560
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
542
561
|
* the resulting MoveOption's .isSome() method will return false.
|
|
543
562
|
* @returns a MoveOption<U16> with an inner value `value`
|
|
544
563
|
* @group Implementation
|
|
@@ -548,13 +567,14 @@ export class MoveOption extends Serializable {
|
|
|
548
567
|
return new MoveOption(value !== null && value !== undefined ? new U16(value) : undefined);
|
|
549
568
|
}
|
|
550
569
|
/**
|
|
551
|
-
* Factory method to generate a MoveOption<U32> from a `number` or `
|
|
570
|
+
* Factory method to generate a MoveOption<U32> from a `number`, `undefined`, or `null`.
|
|
552
571
|
*
|
|
553
572
|
* @example
|
|
554
573
|
* MoveOption.U32(1).isSome() === true;
|
|
555
574
|
* MoveOption.U32().isSome() === false;
|
|
556
575
|
* MoveOption.U32(undefined).isSome() === false;
|
|
557
|
-
*
|
|
576
|
+
* MoveOption.U32(null).isSome() === false;
|
|
577
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
558
578
|
* the resulting MoveOption's .isSome() method will return false.
|
|
559
579
|
* @returns a MoveOption<U32> with an inner value `value`
|
|
560
580
|
* @group Implementation
|
|
@@ -564,13 +584,14 @@ export class MoveOption extends Serializable {
|
|
|
564
584
|
return new MoveOption(value !== null && value !== undefined ? new U32(value) : undefined);
|
|
565
585
|
}
|
|
566
586
|
/**
|
|
567
|
-
* Factory method to generate a MoveOption<U64> from a `number
|
|
587
|
+
* Factory method to generate a MoveOption<U64> from a `number`, `bigint`, `undefined`, or `null`.
|
|
568
588
|
*
|
|
569
589
|
* @example
|
|
570
590
|
* MoveOption.U64(1).isSome() === true;
|
|
571
591
|
* MoveOption.U64().isSome() === false;
|
|
572
592
|
* MoveOption.U64(undefined).isSome() === false;
|
|
573
|
-
*
|
|
593
|
+
* MoveOption.U64(null).isSome() === false;
|
|
594
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
574
595
|
* the resulting MoveOption's .isSome() method will return false.
|
|
575
596
|
* @returns a MoveOption<U64> with an inner value `value`
|
|
576
597
|
* @group Implementation
|
|
@@ -580,13 +601,14 @@ export class MoveOption extends Serializable {
|
|
|
580
601
|
return new MoveOption(value !== null && value !== undefined ? new U64(value) : undefined);
|
|
581
602
|
}
|
|
582
603
|
/**
|
|
583
|
-
* Factory method to generate a MoveOption<U128> from a `number
|
|
604
|
+
* Factory method to generate a MoveOption<U128> from a `number`, `bigint`, `undefined`, or `null`.
|
|
584
605
|
*
|
|
585
606
|
* @example
|
|
586
607
|
* MoveOption.U128(1).isSome() === true;
|
|
587
608
|
* MoveOption.U128().isSome() === false;
|
|
588
609
|
* MoveOption.U128(undefined).isSome() === false;
|
|
589
|
-
*
|
|
610
|
+
* MoveOption.U128(null).isSome() === false;
|
|
611
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
590
612
|
* the resulting MoveOption's .isSome() method will return false.
|
|
591
613
|
* @returns a MoveOption<U128> with an inner value `value`
|
|
592
614
|
* @group Implementation
|
|
@@ -596,13 +618,14 @@ export class MoveOption extends Serializable {
|
|
|
596
618
|
return new MoveOption(value !== null && value !== undefined ? new U128(value) : undefined);
|
|
597
619
|
}
|
|
598
620
|
/**
|
|
599
|
-
* Factory method to generate a MoveOption<U256> from a `number
|
|
621
|
+
* Factory method to generate a MoveOption<U256> from a `number`, `bigint`, `undefined`, or `null`.
|
|
600
622
|
*
|
|
601
623
|
* @example
|
|
602
624
|
* MoveOption.U256(1).isSome() === true;
|
|
603
625
|
* MoveOption.U256().isSome() === false;
|
|
604
626
|
* MoveOption.U256(undefined).isSome() === false;
|
|
605
|
-
*
|
|
627
|
+
* MoveOption.U256(null).isSome() === false;
|
|
628
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
606
629
|
* the resulting MoveOption's .isSome() method will return false.
|
|
607
630
|
* @returns a MoveOption<U256> with an inner value `value`
|
|
608
631
|
* @group Implementation
|
|
@@ -612,13 +635,14 @@ export class MoveOption extends Serializable {
|
|
|
612
635
|
return new MoveOption(value !== null && value !== undefined ? new U256(value) : undefined);
|
|
613
636
|
}
|
|
614
637
|
/**
|
|
615
|
-
* Factory method to generate a MoveOption<Bool> from a `boolean` or `
|
|
638
|
+
* Factory method to generate a MoveOption<Bool> from a `boolean`, `undefined`, or `null`.
|
|
616
639
|
*
|
|
617
640
|
* @example
|
|
618
641
|
* MoveOption.Bool(true).isSome() === true;
|
|
619
642
|
* MoveOption.Bool().isSome() === false;
|
|
620
643
|
* MoveOption.Bool(undefined).isSome() === false;
|
|
621
|
-
*
|
|
644
|
+
* MoveOption.Bool(null).isSome() === false;
|
|
645
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
622
646
|
* the resulting MoveOption's .isSome() method will return false.
|
|
623
647
|
* @returns a MoveOption<Bool> with an inner value `value`
|
|
624
648
|
* @group Implementation
|
|
@@ -628,13 +652,14 @@ export class MoveOption extends Serializable {
|
|
|
628
652
|
return new MoveOption(value !== null && value !== undefined ? new Bool(value) : undefined);
|
|
629
653
|
}
|
|
630
654
|
/**
|
|
631
|
-
* Factory method to generate a MoveOption<I8> from a `number` or `
|
|
655
|
+
* Factory method to generate a MoveOption<I8> from a `number`, `undefined`, or `null`.
|
|
632
656
|
*
|
|
633
657
|
* @example
|
|
634
658
|
* MoveOption.I8(1).isSome() === true;
|
|
635
659
|
* MoveOption.I8().isSome() === false;
|
|
636
660
|
* MoveOption.I8(undefined).isSome() === false;
|
|
637
|
-
*
|
|
661
|
+
* MoveOption.I8(null).isSome() === false;
|
|
662
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
638
663
|
* the resulting MoveOption's .isSome() method will return false.
|
|
639
664
|
* @returns a MoveOption<I8> with an inner value `value`
|
|
640
665
|
* @group Implementation
|
|
@@ -644,13 +669,14 @@ export class MoveOption extends Serializable {
|
|
|
644
669
|
return new MoveOption(value !== null && value !== undefined ? new I8(value) : undefined);
|
|
645
670
|
}
|
|
646
671
|
/**
|
|
647
|
-
* Factory method to generate a MoveOption<I16> from a `number` or `
|
|
672
|
+
* Factory method to generate a MoveOption<I16> from a `number`, `undefined`, or `null`.
|
|
648
673
|
*
|
|
649
674
|
* @example
|
|
650
675
|
* MoveOption.I16(1).isSome() === true;
|
|
651
676
|
* MoveOption.I16().isSome() === false;
|
|
652
677
|
* MoveOption.I16(undefined).isSome() === false;
|
|
653
|
-
*
|
|
678
|
+
* MoveOption.I16(null).isSome() === false;
|
|
679
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
654
680
|
* the resulting MoveOption's .isSome() method will return false.
|
|
655
681
|
* @returns a MoveOption<I16> with an inner value `value`
|
|
656
682
|
* @group Implementation
|
|
@@ -660,13 +686,14 @@ export class MoveOption extends Serializable {
|
|
|
660
686
|
return new MoveOption(value !== null && value !== undefined ? new I16(value) : undefined);
|
|
661
687
|
}
|
|
662
688
|
/**
|
|
663
|
-
* Factory method to generate a MoveOption<I32> from a `number` or `
|
|
689
|
+
* Factory method to generate a MoveOption<I32> from a `number`, `undefined`, or `null`.
|
|
664
690
|
*
|
|
665
691
|
* @example
|
|
666
692
|
* MoveOption.I32(1).isSome() === true;
|
|
667
693
|
* MoveOption.I32().isSome() === false;
|
|
668
694
|
* MoveOption.I32(undefined).isSome() === false;
|
|
669
|
-
*
|
|
695
|
+
* MoveOption.I32(null).isSome() === false;
|
|
696
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
670
697
|
* the resulting MoveOption's .isSome() method will return false.
|
|
671
698
|
* @returns a MoveOption<I32> with an inner value `value`
|
|
672
699
|
* @group Implementation
|
|
@@ -676,13 +703,14 @@ export class MoveOption extends Serializable {
|
|
|
676
703
|
return new MoveOption(value !== null && value !== undefined ? new I32(value) : undefined);
|
|
677
704
|
}
|
|
678
705
|
/**
|
|
679
|
-
* Factory method to generate a MoveOption<I64> from a `number
|
|
706
|
+
* Factory method to generate a MoveOption<I64> from a `number`, `bigint`, `undefined`, or `null`.
|
|
680
707
|
*
|
|
681
708
|
* @example
|
|
682
709
|
* MoveOption.I64(1).isSome() === true;
|
|
683
710
|
* MoveOption.I64().isSome() === false;
|
|
684
711
|
* MoveOption.I64(undefined).isSome() === false;
|
|
685
|
-
*
|
|
712
|
+
* MoveOption.I64(null).isSome() === false;
|
|
713
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
686
714
|
* the resulting MoveOption's .isSome() method will return false.
|
|
687
715
|
* @returns a MoveOption<I64> with an inner value `value`
|
|
688
716
|
* @group Implementation
|
|
@@ -692,13 +720,14 @@ export class MoveOption extends Serializable {
|
|
|
692
720
|
return new MoveOption(value !== null && value !== undefined ? new I64(value) : undefined);
|
|
693
721
|
}
|
|
694
722
|
/**
|
|
695
|
-
* Factory method to generate a MoveOption<I128> from a `number
|
|
723
|
+
* Factory method to generate a MoveOption<I128> from a `number`, `bigint`, `undefined`, or `null`.
|
|
696
724
|
*
|
|
697
725
|
* @example
|
|
698
726
|
* MoveOption.I128(1).isSome() === true;
|
|
699
727
|
* MoveOption.I128().isSome() === false;
|
|
700
728
|
* MoveOption.I128(undefined).isSome() === false;
|
|
701
|
-
*
|
|
729
|
+
* MoveOption.I128(null).isSome() === false;
|
|
730
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
702
731
|
* the resulting MoveOption's .isSome() method will return false.
|
|
703
732
|
* @returns a MoveOption<I128> with an inner value `value`
|
|
704
733
|
* @group Implementation
|
|
@@ -708,13 +737,14 @@ export class MoveOption extends Serializable {
|
|
|
708
737
|
return new MoveOption(value !== null && value !== undefined ? new I128(value) : undefined);
|
|
709
738
|
}
|
|
710
739
|
/**
|
|
711
|
-
* Factory method to generate a MoveOption<I256> from a `number
|
|
740
|
+
* Factory method to generate a MoveOption<I256> from a `number`, `bigint`, `undefined`, or `null`.
|
|
712
741
|
*
|
|
713
742
|
* @example
|
|
714
743
|
* MoveOption.I256(1).isSome() === true;
|
|
715
744
|
* MoveOption.I256().isSome() === false;
|
|
716
745
|
* MoveOption.I256(undefined).isSome() === false;
|
|
717
|
-
*
|
|
746
|
+
* MoveOption.I256(null).isSome() === false;
|
|
747
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
718
748
|
* the resulting MoveOption's .isSome() method will return false.
|
|
719
749
|
* @returns a MoveOption<I256> with an inner value `value`
|
|
720
750
|
* @group Implementation
|
|
@@ -724,14 +754,15 @@ export class MoveOption extends Serializable {
|
|
|
724
754
|
return new MoveOption(value !== null && value !== undefined ? new I256(value) : undefined);
|
|
725
755
|
}
|
|
726
756
|
/**
|
|
727
|
-
* Factory method to generate a MoveOption<MoveString> from a `string` or `
|
|
757
|
+
* Factory method to generate a MoveOption<MoveString> from a `string`, `undefined`, or `null`.
|
|
728
758
|
*
|
|
729
759
|
* @example
|
|
730
760
|
* MoveOption.MoveString("hello").isSome() === true;
|
|
731
761
|
* MoveOption.MoveString("").isSome() === true;
|
|
732
762
|
* MoveOption.MoveString().isSome() === false;
|
|
733
763
|
* MoveOption.MoveString(undefined).isSome() === false;
|
|
734
|
-
*
|
|
764
|
+
* MoveOption.MoveString(null).isSome() === false;
|
|
765
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
735
766
|
* the resulting MoveOption's .isSome() method will return false.
|
|
736
767
|
* @returns a MoveOption<MoveString> with an inner value `value`
|
|
737
768
|
* @group Implementation
|
|
@@ -740,6 +771,23 @@ export class MoveOption extends Serializable {
|
|
|
740
771
|
static MoveString(value) {
|
|
741
772
|
return new MoveOption(value !== null && value !== undefined ? new MoveString(value) : undefined);
|
|
742
773
|
}
|
|
774
|
+
/**
|
|
775
|
+
* Factory method to generate a MoveOption<AccountAddress> from an `AccountAddressInput`, `undefined`, or `null`.
|
|
776
|
+
*
|
|
777
|
+
* @example
|
|
778
|
+
* MoveOption.Address("0x1").isSome() === true;
|
|
779
|
+
* MoveOption.Address().isSome() === false;
|
|
780
|
+
* MoveOption.Address(undefined).isSome() === false;
|
|
781
|
+
* MoveOption.Address(null).isSome() === false;
|
|
782
|
+
* @param value the value used to fill the MoveOption. If `value` is undefined or null
|
|
783
|
+
* the resulting MoveOption's .isSome() method will return false.
|
|
784
|
+
* @returns a MoveOption<AccountAddress> with an inner value `value`
|
|
785
|
+
* @group Implementation
|
|
786
|
+
* @category BCS
|
|
787
|
+
*/
|
|
788
|
+
static Address(value) {
|
|
789
|
+
return new MoveOption(value !== null && value !== undefined ? AccountAddress.from(value) : undefined);
|
|
790
|
+
}
|
|
743
791
|
static deserialize(deserializer, cls) {
|
|
744
792
|
const vector = MoveVector.deserialize(deserializer, cls);
|
|
745
793
|
return new MoveOption(vector.values[0]);
|