Skip to main content

Class: SerialTransactionExecutor

Constructors

Constructor

new SerialTransactionExecutor(__namedParameters): SerialTransactionExecutor

Parameters

__namedParameters

Omit<ObjectCacheOptions, "address"> & object

Returns

SerialTransactionExecutor

Methods

applyEffects()

applyEffects(effects): Promise<void>

Parameters

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; } = TransactionEffectsV1

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"> = ExecutionStatus

V1.executedEpoch

string = ...

V1.gasUsed

{ computationCost: string; computationCostBurned: string; storageCost: string; storageRebate: string; nonRefundableStorageFee: string; } = GasCostSummary

V1.gasUsed.computationCost

string = ...

V1.gasUsed.computationCostBurned

string = ...

V1.gasUsed.storageCost

string = ...

V1.gasUsed.storageRebate

string = ...

V1.gasUsed.nonRefundableStorageFee

string = ...

V1.transactionDigest

string = ObjectDigest

V1.gasObjectIndex

number | null = ...

V1.eventsDigest

string | null = ...

V1.dependencies

string[] = ...

V1.lamportVersion

string = ...

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">; }][] = ...

V1.unchangedSharedObjects

[string, EnumOutputShapeWithKeys<{ ReadOnlyRoot: [string, string]; MutateDeleted: string; ReadDeleted: string; Cancelled: string; PerEpochConfig: true; }, "ReadOnlyRoot" | "MutateDeleted" | "ReadDeleted" | "Cancelled" | "PerEpochConfig">][] = ...

V1.auxDataDigest

string | null = ...

Returns

Promise<void>


buildTransaction()

buildTransaction(transaction): Promise<Uint8Array>

Parameters

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

transaction

Uint8Array | Transaction

options?

IotaTransactionBlockResponseOptions

additionalSignatures?

string[] = []

Returns

Promise<{ digest: string; effects: string; data: IotaTransactionBlockResponse; }>