Class: SerialTransactionExecutor
Constructors
Constructor
new SerialTransactionExecutor(__namedParameters): SerialTransactionExecutor;
Parameters
| Parameter | Type |
|---|---|
__namedParameters | Omit<ObjectCacheOptions, "address"> & object |
Returns
SerialTransactionExecutor
Methods
applyEffects()
applyEffects(effects): Promise<void>;
Parameters
| Parameter | Type |
|---|---|
effects | { $kind: "V1"; V1: { status: EnumOutputShapeWithKeys<{ Success: true; Failed: { error: EnumOutputShapeWithKeys<{ InsufficientGas: true; InvalidGasObject: true; InvariantViolation: true; FeatureNotYetSupported: true; MoveObjectTooBig: { objectSize: string; maxObjectSize: string; }; MovePackageTooBig: { objectSize: string; maxObjectSize: string; }; CircularObjectOwnership: { object: string; }; InsufficientCoinBalance: true; CoinBalanceOverflow: true; PublishErrorNonZeroAddress: true; IotaMoveVerificationError: true; MovePrimitiveRuntimeError: | { module: { address: string; name: string; }; function: number; instruction: number; functionName: string | null; } | null; MoveAbort: [{ module: { address: string; name: string; }; function: number; instruction: number; functionName: string | null; }, string]; VMVerificationOrDeserializationError: true; VMInvariantViolation: true; FunctionNotFound: true; ArityMismatch: true; TypeArityMismatch: true; NonEntryFunctionInvoked: true; CommandArgumentError: { argIdx: number; kind: EnumOutputShapeWithKeys<{ TypeMismatch: true; InvalidBCSBytes: true; InvalidUsageOfPureArg: true; InvalidArgumentToPrivateEntryFunction: true; IndexOutOfBounds: { idx: ...; }; SecondaryIndexOutOfBounds: { resultIdx: ...; secondaryIdx: ...; }; InvalidResultArity: { resultIdx: ...; }; InvalidGasCoinUsage: true; InvalidValueUsage: true; InvalidObjectByValue: true; InvalidObjectByMutRef: true; SharedObjectOperationNotAllowed: true; }, | "TypeMismatch" | "InvalidBCSBytes" | "InvalidUsageOfPureArg" | "InvalidArgumentToPrivateEntryFunction" | "IndexOutOfBounds" | "SecondaryIndexOutOfBounds" | "InvalidResultArity" | "InvalidGasCoinUsage" | "InvalidValueUsage" | "InvalidObjectByValue" | "InvalidObjectByMutRef" | "SharedObjectOperationNotAllowed">; }; TypeArgumentError: { argumentIdx: number; kind: EnumOutputShapeWithKeys<{ TypeNotFound: true; ConstraintNotSatisfied: true; }, "TypeNotFound" | "ConstraintNotSatisfied">; }; UnusedValueWithoutDrop: { resultIdx: number; secondaryIdx: number; }; InvalidPublicFunctionReturnType: { idx: number; }; InvalidTransferObject: true; EffectsTooLarge: { currentSize: string; maxSize: string; }; PublishUpgradeMissingDependency: true; PublishUpgradeDependencyDowngrade: true; PackageUpgradeError: { upgradeError: EnumOutputShapeWithKeys<{ UnableToFetchPackage: { packageId: ...; }; NotAPackage: { objectId: ...; }; IncompatibleUpgrade: true; DigestDoesNotMatch: { digest: ...; }; UnknownUpgradePolicy: { policy: ...; }; PackageIDDoesNotMatch: { packageId: ...; ticketId: ...; }; }, | "UnableToFetchPackage" | "NotAPackage" | "IncompatibleUpgrade" | "DigestDoesNotMatch" | "UnknownUpgradePolicy" | "PackageIDDoesNotMatch">; }; WrittenObjectsTooLarge: { currentSize: string; maxSize: string; }; CertificateDenied: true; IotaMoveVerificationTimedout: true; SharedObjectOperationNotAllowed: true; InputObjectDeleted: true; ExecutionCancelledDueToSharedObjectCongestion: { congestedObjects: string[]; }; AddressDeniedForCoin: { address: string; coinType: string; }; CoinTypeGlobalPause: { coinType: string; }; ExecutionCancelledDueToRandomnessUnavailable: true; }, | "InsufficientGas" | "InvalidGasObject" | "InvariantViolation" | "FeatureNotYetSupported" | "MoveObjectTooBig" | "MovePackageTooBig" | "CircularObjectOwnership" | "InsufficientCoinBalance" | "CoinBalanceOverflow" | "PublishErrorNonZeroAddress" | "IotaMoveVerificationError" | "MovePrimitiveRuntimeError" | "MoveAbort" | "VMVerificationOrDeserializationError" | "VMInvariantViolation" | "FunctionNotFound" | "ArityMismatch" | "TypeArityMismatch" | "NonEntryFunctionInvoked" | "CommandArgumentError" | "SharedObjectOperationNotAllowed" | "TypeArgumentError" | "UnusedValueWithoutDrop" | "InvalidPublicFunctionReturnType" | "InvalidTransferObject" | "EffectsTooLarge" | "PublishUpgradeMissingDependency" | "PublishUpgradeDependencyDowngrade" | "PackageUpgradeError" | "WrittenObjectsTooLarge" | "CertificateDenied" | "IotaMoveVerificationTimedout" | "InputObjectDeleted" | "ExecutionCancelledDueToSharedObjectCongestion" | "AddressDeniedForCoin" | "CoinTypeGlobalPause" | "ExecutionCancelledDueToRandomnessUnavailable">; command: string | null; }; }, "Success" | "Failed">; executedEpoch: string; gasUsed: { computationCost: string; computationCostBurned: string; storageCost: string; storageRebate: string; nonRefundableStorageFee: string; }; transactionDigest: string; gasObjectIndex: number | null; eventsDigest: string | null; dependencies: string[]; lamportVersion: string; changedObjects: [string, { inputState: EnumOutputShapeWithKeys<{ NotExist: true; Exist: [[string, string], EnumOutputShapeWithKeys<{ AddressOwner: string; ObjectOwner: string; Shared: { initialSharedVersion: ...; }; Immutable: true; }, "AddressOwner" | "ObjectOwner" | "Shared" | "Immutable">]; }, "NotExist" | "Exist">; outputState: EnumOutputShapeWithKeys<{ NotExist: true; ObjectWrite: [string, EnumOutputShapeWithKeys<{ AddressOwner: string; ObjectOwner: string; Shared: { initialSharedVersion: ...; }; Immutable: true; }, "AddressOwner" | "ObjectOwner" | "Shared" | "Immutable">]; PackageWrite: [string, string]; }, "NotExist" | "ObjectWrite" | "PackageWrite">; idOperation: EnumOutputShapeWithKeys<{ None: true; Created: true; Deleted: true; }, "None" | "Created" | "Deleted">; }][]; unchangedSharedObjects: [string, EnumOutputShapeWithKeys<{ ReadOnlyRoot: [string, string]; MutateDeleted: string; ReadDeleted: string; Cancelled: string; PerEpochConfig: true; }, | "ReadOnlyRoot" | "MutateDeleted" | "ReadDeleted" | "Cancelled" | "PerEpochConfig">][]; auxDataDigest: string | null; }; } |
effects.$kind | "V1" |
effects.V1 | { status: EnumOutputShapeWithKeys<{ Success: true; Failed: { error: EnumOutputShapeWithKeys<{ InsufficientGas: true; InvalidGasObject: true; InvariantViolation: true; FeatureNotYetSupported: true; MoveObjectTooBig: { objectSize: string; maxObjectSize: string; }; MovePackageTooBig: { objectSize: string; maxObjectSize: string; }; CircularObjectOwnership: { object: string; }; InsufficientCoinBalance: true; CoinBalanceOverflow: true; PublishErrorNonZeroAddress: true; IotaMoveVerificationError: true; MovePrimitiveRuntimeError: | { module: { address: string; name: string; }; function: number; instruction: number; functionName: string | null; } | null; MoveAbort: [{ module: { address: string; name: string; }; function: number; instruction: number; functionName: string | null; }, string]; VMVerificationOrDeserializationError: true; VMInvariantViolation: true; FunctionNotFound: true; ArityMismatch: true; TypeArityMismatch: true; NonEntryFunctionInvoked: true; CommandArgumentError: { argIdx: number; kind: EnumOutputShapeWithKeys<{ TypeMismatch: true; InvalidBCSBytes: true; InvalidUsageOfPureArg: true; InvalidArgumentToPrivateEntryFunction: true; IndexOutOfBounds: { idx: ...; }; SecondaryIndexOutOfBounds: { resultIdx: ...; secondaryIdx: ...; }; InvalidResultArity: { resultIdx: ...; }; InvalidGasCoinUsage: true; InvalidValueUsage: true; InvalidObjectByValue: true; InvalidObjectByMutRef: true; SharedObjectOperationNotAllowed: true; }, | "TypeMismatch" | "InvalidBCSBytes" | "InvalidUsageOfPureArg" | "InvalidArgumentToPrivateEntryFunction" | "IndexOutOfBounds" | "SecondaryIndexOutOfBounds" | "InvalidResultArity" | "InvalidGasCoinUsage" | "InvalidValueUsage" | "InvalidObjectByValue" | "InvalidObjectByMutRef" | "SharedObjectOperationNotAllowed">; }; TypeArgumentError: { argumentIdx: number; kind: EnumOutputShapeWithKeys<{ TypeNotFound: true; ConstraintNotSatisfied: true; }, "TypeNotFound" | "ConstraintNotSatisfied">; }; UnusedValueWithoutDrop: { resultIdx: number; secondaryIdx: number; }; InvalidPublicFunctionReturnType: { idx: number; }; InvalidTransferObject: true; EffectsTooLarge: { currentSize: string; maxSize: string; }; PublishUpgradeMissingDependency: true; PublishUpgradeDependencyDowngrade: true; PackageUpgradeError: { upgradeError: EnumOutputShapeWithKeys<{ UnableToFetchPackage: { packageId: ...; }; NotAPackage: { objectId: ...; }; IncompatibleUpgrade: true; DigestDoesNotMatch: { digest: ...; }; UnknownUpgradePolicy: { policy: ...; }; PackageIDDoesNotMatch: { packageId: ...; ticketId: ...; }; }, | "UnableToFetchPackage" | "NotAPackage" | "IncompatibleUpgrade" | "DigestDoesNotMatch" | "UnknownUpgradePolicy" | "PackageIDDoesNotMatch">; }; WrittenObjectsTooLarge: { currentSize: string; maxSize: string; }; CertificateDenied: true; IotaMoveVerificationTimedout: true; SharedObjectOperationNotAllowed: true; InputObjectDeleted: true; ExecutionCancelledDueToSharedObjectCongestion: { congestedObjects: string[]; }; AddressDeniedForCoin: { address: string; coinType: string; }; CoinTypeGlobalPause: { coinType: string; }; ExecutionCancelledDueToRandomnessUnavailable: true; }, | "InsufficientGas" | "InvalidGasObject" | "InvariantViolation" | "FeatureNotYetSupported" | "MoveObjectTooBig" | "MovePackageTooBig" | "CircularObjectOwnership" | "InsufficientCoinBalance" | "CoinBalanceOverflow" | "PublishErrorNonZeroAddress" | "IotaMoveVerificationError" | "MovePrimitiveRuntimeError" | "MoveAbort" | "VMVerificationOrDeserializationError" | "VMInvariantViolation" | "FunctionNotFound" | "ArityMismatch" | "TypeArityMismatch" | "NonEntryFunctionInvoked" | "CommandArgumentError" | "SharedObjectOperationNotAllowed" | "TypeArgumentError" | "UnusedValueWithoutDrop" | "InvalidPublicFunctionReturnType" | "InvalidTransferObject" | "EffectsTooLarge" | "PublishUpgradeMissingDependency" | "PublishUpgradeDependencyDowngrade" | "PackageUpgradeError" | "WrittenObjectsTooLarge" | "CertificateDenied" | "IotaMoveVerificationTimedout" | "InputObjectDeleted" | "ExecutionCancelledDueToSharedObjectCongestion" | "AddressDeniedForCoin" | "CoinTypeGlobalPause" | "ExecutionCancelledDueToRandomnessUnavailable">; command: string | null; }; }, "Success" | "Failed">; executedEpoch: string; gasUsed: { computationCost: string; computationCostBurned: string; storageCost: string; storageRebate: string; nonRefundableStorageFee: string; }; transactionDigest: string; gasObjectIndex: number | null; eventsDigest: string | null; dependencies: string[]; lamportVersion: string; changedObjects: [string, { inputState: EnumOutputShapeWithKeys<{ NotExist: true; Exist: [[string, string], EnumOutputShapeWithKeys<{ AddressOwner: string; ObjectOwner: string; Shared: { initialSharedVersion: ...; }; Immutable: true; }, "AddressOwner" | "ObjectOwner" | "Shared" | "Immutable">]; }, "NotExist" | "Exist">; outputState: EnumOutputShapeWithKeys<{ NotExist: true; ObjectWrite: [string, EnumOutputShapeWithKeys<{ AddressOwner: string; ObjectOwner: string; Shared: { initialSharedVersion: ...; }; Immutable: true; }, "AddressOwner" | "ObjectOwner" | "Shared" | "Immutable">]; PackageWrite: [string, string]; }, "NotExist" | "ObjectWrite" | "PackageWrite">; idOperation: EnumOutputShapeWithKeys<{ None: true; Created: true; Deleted: true; }, "None" | "Created" | "Deleted">; }][]; unchangedSharedObjects: [string, EnumOutputShapeWithKeys<{ ReadOnlyRoot: [string, string]; MutateDeleted: string; ReadDeleted: string; Cancelled: string; PerEpochConfig: true; }, | "ReadOnlyRoot" | "MutateDeleted" | "ReadDeleted" | "Cancelled" | "PerEpochConfig">][]; auxDataDigest: string | null; } |
effects.V1.status | EnumOutputShapeWithKeys<{ Success: true; Failed: { error: EnumOutputShapeWithKeys<{ InsufficientGas: true; InvalidGasObject: true; InvariantViolation: true; FeatureNotYetSupported: true; MoveObjectTooBig: { objectSize: string; maxObjectSize: string; }; MovePackageTooBig: { objectSize: string; maxObjectSize: string; }; CircularObjectOwnership: { object: string; }; InsufficientCoinBalance: true; CoinBalanceOverflow: true; PublishErrorNonZeroAddress: true; IotaMoveVerificationError: true; MovePrimitiveRuntimeError: | { module: { address: string; name: string; }; function: number; instruction: number; functionName: string | null; } | null; MoveAbort: [{ module: { address: string; name: string; }; function: number; instruction: number; functionName: string | null; }, string]; VMVerificationOrDeserializationError: true; VMInvariantViolation: true; FunctionNotFound: true; ArityMismatch: true; TypeArityMismatch: true; NonEntryFunctionInvoked: true; CommandArgumentError: { argIdx: number; kind: EnumOutputShapeWithKeys<{ TypeMismatch: true; InvalidBCSBytes: true; InvalidUsageOfPureArg: true; InvalidArgumentToPrivateEntryFunction: true; IndexOutOfBounds: { idx: ...; }; SecondaryIndexOutOfBounds: { resultIdx: ...; secondaryIdx: ...; }; InvalidResultArity: { resultIdx: ...; }; InvalidGasCoinUsage: true; InvalidValueUsage: true; InvalidObjectByValue: true; InvalidObjectByMutRef: true; SharedObjectOperationNotAllowed: true; }, | "TypeMismatch" | "InvalidBCSBytes" | "InvalidUsageOfPureArg" | "InvalidArgumentToPrivateEntryFunction" | "IndexOutOfBounds" | "SecondaryIndexOutOfBounds" | "InvalidResultArity" | "InvalidGasCoinUsage" | "InvalidValueUsage" | "InvalidObjectByValue" | "InvalidObjectByMutRef" | "SharedObjectOperationNotAllowed">; }; TypeArgumentError: { argumentIdx: number; kind: EnumOutputShapeWithKeys<{ TypeNotFound: true; ConstraintNotSatisfied: true; }, "TypeNotFound" | "ConstraintNotSatisfied">; }; UnusedValueWithoutDrop: { resultIdx: number; secondaryIdx: number; }; InvalidPublicFunctionReturnType: { idx: number; }; InvalidTransferObject: true; EffectsTooLarge: { currentSize: string; maxSize: string; }; PublishUpgradeMissingDependency: true; PublishUpgradeDependencyDowngrade: true; PackageUpgradeError: { upgradeError: EnumOutputShapeWithKeys<{ UnableToFetchPackage: { packageId: ...; }; NotAPackage: { objectId: ...; }; IncompatibleUpgrade: true; DigestDoesNotMatch: { digest: ...; }; UnknownUpgradePolicy: { policy: ...; }; PackageIDDoesNotMatch: { packageId: ...; ticketId: ...; }; }, | "UnableToFetchPackage" | "NotAPackage" | "IncompatibleUpgrade" | "DigestDoesNotMatch" | "UnknownUpgradePolicy" | "PackageIDDoesNotMatch">; }; WrittenObjectsTooLarge: { currentSize: string; maxSize: string; }; CertificateDenied: true; IotaMoveVerificationTimedout: true; SharedObjectOperationNotAllowed: true; InputObjectDeleted: true; ExecutionCancelledDueToSharedObjectCongestion: { congestedObjects: string[]; }; AddressDeniedForCoin: { address: string; coinType: string; }; CoinTypeGlobalPause: { coinType: string; }; ExecutionCancelledDueToRandomnessUnavailable: true; }, | "InsufficientGas" | "InvalidGasObject" | "InvariantViolation" | "FeatureNotYetSupported" | "MoveObjectTooBig" | "MovePackageTooBig" | "CircularObjectOwnership" | "InsufficientCoinBalance" | "CoinBalanceOverflow" | "PublishErrorNonZeroAddress" | "IotaMoveVerificationError" | "MovePrimitiveRuntimeError" | "MoveAbort" | "VMVerificationOrDeserializationError" | "VMInvariantViolation" | "FunctionNotFound" | "ArityMismatch" | "TypeArityMismatch" | "NonEntryFunctionInvoked" | "CommandArgumentError" | "SharedObjectOperationNotAllowed" | "TypeArgumentError" | "UnusedValueWithoutDrop" | "InvalidPublicFunctionReturnType" | "InvalidTransferObject" | "EffectsTooLarge" | "PublishUpgradeMissingDependency" | "PublishUpgradeDependencyDowngrade" | "PackageUpgradeError" | "WrittenObjectsTooLarge" | "CertificateDenied" | "IotaMoveVerificationTimedout" | "InputObjectDeleted" | "ExecutionCancelledDueToSharedObjectCongestion" | "AddressDeniedForCoin" | "CoinTypeGlobalPause" | "ExecutionCancelledDueToRandomnessUnavailable">; command: string | null; }; }, "Success" | "Failed"> |
effects.V1.executedEpoch | string |
effects.V1.gasUsed | { computationCost: string; computationCostBurned: string; storageCost: string; storageRebate: string; nonRefundableStorageFee: string; } |
effects.V1.gasUsed.computationCost | string |
effects.V1.gasUsed.computationCostBurned | string |
effects.V1.gasUsed.storageCost | string |
effects.V1.gasUsed.storageRebate | string |
effects.V1.gasUsed.nonRefundableStorageFee | string |
effects.V1.transactionDigest | string |
effects.V1.gasObjectIndex | number | null |
effects.V1.eventsDigest | string | null |
effects.V1.dependencies | string[] |
effects.V1.lamportVersion | string |
effects.V1.changedObjects | [string, { inputState: EnumOutputShapeWithKeys<{ NotExist: true; Exist: [[string, string], EnumOutputShapeWithKeys<{ AddressOwner: string; ObjectOwner: string; Shared: { initialSharedVersion: ...; }; Immutable: true; }, "AddressOwner" | "ObjectOwner" | "Shared" | "Immutable">]; }, "NotExist" | "Exist">; outputState: EnumOutputShapeWithKeys<{ NotExist: true; ObjectWrite: [string, EnumOutputShapeWithKeys<{ AddressOwner: string; ObjectOwner: string; Shared: { initialSharedVersion: ...; }; Immutable: true; }, "AddressOwner" | "ObjectOwner" | "Shared" | "Immutable">]; PackageWrite: [string, string]; }, "NotExist" | "ObjectWrite" | "PackageWrite">; idOperation: EnumOutputShapeWithKeys<{ None: true; Created: true; Deleted: true; }, "None" | "Created" | "Deleted">; }][] |
effects.V1.unchangedSharedObjects | [string, EnumOutputShapeWithKeys<{ ReadOnlyRoot: [string, string]; MutateDeleted: string; ReadDeleted: string; Cancelled: string; PerEpochConfig: true; }, | "ReadOnlyRoot" | "MutateDeleted" | "ReadDeleted" | "Cancelled" | "PerEpochConfig">][] |
effects.V1.auxDataDigest | string | null |
Returns
Promise<void>
buildTransaction()
buildTransaction(transaction): Promise<Uint8Array>;
Parameters
| Parameter | Type |
|---|---|
transaction | Transaction |
Returns
Promise<Uint8Array>
resetCache()
resetCache(): Promise<void>;
Returns
Promise<void>
waitForLastTransaction()
waitForLastTransaction(): Promise<void>;
Returns
Promise<void>
executeTransaction()
executeTransaction(
transaction,
options?,
additionalSignatures?): Promise<{
digest: string;
effects: string;
data: IotaTransactionBlockResponse;
}>;
Parameters
| Parameter | Type | Default value |
|---|---|---|
transaction | Uint8Array | Transaction | undefined |
options? | IotaTransactionBlockResponseOptions | undefined |
additionalSignatures? | string[] | [] |
Returns
Promise<{
digest: string;
effects: string;
data: IotaTransactionBlockResponse;
}>