Skip to main content

SerialTransactionExecutor

@iota/iota-sdk


@iota/iota-sdk / transactions / SerialTransactionExecutor

Class: SerialTransactionExecutor

Defined in: sdk/typescript/src/transactions/executor/serial.ts:15

Constructors

Constructor

new SerialTransactionExecutor(__namedParameters): SerialTransactionExecutor

Defined in: sdk/typescript/src/transactions/executor/serial.ts:21

Parameters

__namedParameters

Omit<ObjectCacheOptions, "address"> & object

Returns

SerialTransactionExecutor

Methods

applyEffects()

applyEffects(effects): Promise<void>

Defined in: sdk/typescript/src/transactions/executor/serial.ts:40

Parameters

effects
$kind

"V1"

V1

{ auxDataDigest: string | null; changedObjects: [string, { idOperation: EnumOutputShapeWithKeys<{ Created: true; Deleted: true; None: true; }, "None" | "Created" | "Deleted">; inputState: EnumOutputShapeWithKeys<{ Exist: [[string, string], EnumOutputShapeWithKeys<{ AddressOwner: string; Immutable: true; ObjectOwner: string; Shared: { initialSharedVersion: ...; }; }, "AddressOwner" | "ObjectOwner" | "Shared" | "Immutable">]; NotExist: true; }, "NotExist" | "Exist">; outputState: EnumOutputShapeWithKeys<{ NotExist: true; ObjectWrite: [string, EnumOutputShapeWithKeys<{ AddressOwner: string; Immutable: true; ObjectOwner: string; Shared: { initialSharedVersion: ...; }; }, "AddressOwner" | "ObjectOwner" | "Shared" | "Immutable">]; PackageWrite: [string, string]; }, "NotExist" | "ObjectWrite" | "PackageWrite">; }][]; dependencies: string[]; eventsDigest: string | null; executedEpoch: string; gasObjectIndex: number | null; gasUsed: { computationCost: string; computationCostBurned: string; nonRefundableStorageFee: string; storageCost: string; storageRebate: string; }; lamportVersion: string; status: EnumOutputShapeWithKeys<{ Failed: { command: string | null; error: EnumOutputShapeWithKeys<{ AddressDeniedForCoin: { address: string; coinType: string; }; ArityMismatch: true; CertificateDenied: true; CircularObjectOwnership: { object: string; }; CoinBalanceOverflow: true; CoinTypeGlobalPause: { coinType: string; }; CommandArgumentError: { argIdx: number; kind: EnumOutputShapeWithKeys<{ IndexOutOfBounds: { idx: ...; }; InvalidArgumentToPrivateEntryFunction: true; InvalidBCSBytes: true; InvalidGasCoinUsage: true; InvalidObjectByMutRef: true; InvalidObjectByValue: true; InvalidResultArity: { resultIdx: ...; }; InvalidUsageOfPureArg: true; InvalidValueUsage: true; SecondaryIndexOutOfBounds: { resultIdx: ...; secondaryIdx: ...; }; SharedObjectOperationNotAllowed: true; TypeMismatch: true; }, "TypeMismatch" | "InvalidBCSBytes" | "InvalidUsageOfPureArg" | "InvalidArgumentToPrivateEntryFunction" | "IndexOutOfBounds" | "SecondaryIndexOutOfBounds" | "InvalidResultArity" | "InvalidGasCoinUsage" | "InvalidValueUsage" | "InvalidObjectByValue" | "InvalidObjectByMutRef" | "SharedObjectOperationNotAllowed">; }; EffectsTooLarge: { currentSize: string; maxSize: string; }; ExecutionCancelledDueToRandomnessUnavailable: true; ExecutionCancelledDueToSharedObjectCongestion: { congestedObjects: string[]; }; FeatureNotYetSupported: true; FunctionNotFound: true; InputObjectDeleted: true; InsufficientCoinBalance: true; InsufficientGas: true; InvalidGasObject: true; InvalidPublicFunctionReturnType: { idx: number; }; InvalidTransferObject: true; InvariantViolation: true; IotaMoveVerificationError: true; IotaMoveVerificationTimedout: true; MoveAbort: [{ function: number; functionName: string | null; instruction: number; module: { address: string; name: string; }; }, string]; MoveObjectTooBig: { maxObjectSize: string; objectSize: string; }; MovePackageTooBig: { maxObjectSize: string; objectSize: string; }; MovePrimitiveRuntimeError: { function: number; functionName: string | null; instruction: number; module: { address: string; name: string; }; } | null; NonEntryFunctionInvoked: true; PackageUpgradeError: { upgradeError: EnumOutputShapeWithKeys<{ DigestDoesNotMatch: { digest: ...; }; IncompatibleUpgrade: true; NotAPackage: { objectId: ...; }; PackageIDDoesNotMatch: { packageId: ...; ticketId: ...; }; UnableToFetchPackage: { packageId: ...; }; UnknownUpgradePolicy: { policy: ...; }; }, "UnableToFetchPackage" | "NotAPackage" | "IncompatibleUpgrade" | "DigestDoesNotMatch" | "UnknownUpgradePolicy" | "PackageIDDoesNotMatch">; }; PublishErrorNonZeroAddress: true; PublishUpgradeDependencyDowngrade: true; PublishUpgradeMissingDependency: true; SharedObjectOperationNotAllowed: true; TypeArgumentError: { argumentIdx: number; kind: EnumOutputShapeWithKeys<{ ConstraintNotSatisfied: true; TypeNotFound: true; }, "TypeNotFound" | "ConstraintNotSatisfied">; }; TypeArityMismatch: true; UnusedValueWithoutDrop: { resultIdx: number; secondaryIdx: number; }; VMInvariantViolation: true; VMVerificationOrDeserializationError: true; WrittenObjectsTooLarge: { currentSize: string; maxSize: string; }; }, "PackageUpgradeError" | "CommandArgumentError" | "SharedObjectOperationNotAllowed" | "TypeArgumentError" | "InsufficientGas" | "InvalidGasObject" | "InvariantViolation" | "FeatureNotYetSupported" | "MoveObjectTooBig" | "MovePackageTooBig" | "CircularObjectOwnership" | "InsufficientCoinBalance" | "CoinBalanceOverflow" | "PublishErrorNonZeroAddress" | "IotaMoveVerificationError" | "MovePrimitiveRuntimeError" | "MoveAbort" | "VMVerificationOrDeserializationError" | "VMInvariantViolation" | "FunctionNotFound" | "ArityMismatch" | "TypeArityMismatch" | "NonEntryFunctionInvoked" | "UnusedValueWithoutDrop" | "InvalidPublicFunctionReturnType" | "InvalidTransferObject" | "EffectsTooLarge" | "PublishUpgradeMissingDependency" | "PublishUpgradeDependencyDowngrade" | "WrittenObjectsTooLarge" | "CertificateDenied" | "IotaMoveVerificationTimedout" | "InputObjectDeleted" | "ExecutionCancelledDueToSharedObjectCongestion" | "AddressDeniedForCoin" | "CoinTypeGlobalPause" | "ExecutionCancelledDueToRandomnessUnavailable">; }; Success: true; }, "Success" | "Failed">; transactionDigest: string; unchangedSharedObjects: [string, EnumOutputShapeWithKeys<{ Cancelled: string; MutateDeleted: string; PerEpochConfig: true; ReadDeleted: string; ReadOnlyRoot: [string, string]; }, "ReadOnlyRoot" | "MutateDeleted" | "ReadDeleted" | "Cancelled" | "PerEpochConfig">][]; } = TransactionEffectsV1

V1.auxDataDigest

string | null = ...

V1.changedObjects

[string, { idOperation: EnumOutputShapeWithKeys<{ Created: true; Deleted: true; None: true; }, "None" | "Created" | "Deleted">; inputState: EnumOutputShapeWithKeys<{ Exist: [[string, string], EnumOutputShapeWithKeys<{ AddressOwner: string; Immutable: true; ObjectOwner: string; Shared: { initialSharedVersion: ...; }; }, "AddressOwner" | "ObjectOwner" | "Shared" | "Immutable">]; NotExist: true; }, "NotExist" | "Exist">; outputState: EnumOutputShapeWithKeys<{ NotExist: true; ObjectWrite: [string, EnumOutputShapeWithKeys<{ AddressOwner: string; Immutable: true; ObjectOwner: string; Shared: { initialSharedVersion: ...; }; }, "AddressOwner" | "ObjectOwner" | "Shared" | "Immutable">]; PackageWrite: [string, string]; }, "NotExist" | "ObjectWrite" | "PackageWrite">; }][] = ...

V1.dependencies

string[] = ...

V1.eventsDigest

string | null = ...

V1.executedEpoch

string = ...

V1.gasObjectIndex

number | null = ...

V1.gasUsed

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

V1.gasUsed.computationCost

string = ...

V1.gasUsed.computationCostBurned

string = ...

V1.gasUsed.nonRefundableStorageFee

string = ...

V1.gasUsed.storageCost

string = ...

V1.gasUsed.storageRebate

string = ...

V1.lamportVersion

string = ...

V1.status

EnumOutputShapeWithKeys<{ Failed: { command: string | null; error: EnumOutputShapeWithKeys<{ AddressDeniedForCoin: { address: string; coinType: string; }; ArityMismatch: true; CertificateDenied: true; CircularObjectOwnership: { object: string; }; CoinBalanceOverflow: true; CoinTypeGlobalPause: { coinType: string; }; CommandArgumentError: { argIdx: number; kind: EnumOutputShapeWithKeys<{ IndexOutOfBounds: { idx: ...; }; InvalidArgumentToPrivateEntryFunction: true; InvalidBCSBytes: true; InvalidGasCoinUsage: true; InvalidObjectByMutRef: true; InvalidObjectByValue: true; InvalidResultArity: { resultIdx: ...; }; InvalidUsageOfPureArg: true; InvalidValueUsage: true; SecondaryIndexOutOfBounds: { resultIdx: ...; secondaryIdx: ...; }; SharedObjectOperationNotAllowed: true; TypeMismatch: true; }, "TypeMismatch" | "InvalidBCSBytes" | "InvalidUsageOfPureArg" | "InvalidArgumentToPrivateEntryFunction" | "IndexOutOfBounds" | "SecondaryIndexOutOfBounds" | "InvalidResultArity" | "InvalidGasCoinUsage" | "InvalidValueUsage" | "InvalidObjectByValue" | "InvalidObjectByMutRef" | "SharedObjectOperationNotAllowed">; }; EffectsTooLarge: { currentSize: string; maxSize: string; }; ExecutionCancelledDueToRandomnessUnavailable: true; ExecutionCancelledDueToSharedObjectCongestion: { congestedObjects: string[]; }; FeatureNotYetSupported: true; FunctionNotFound: true; InputObjectDeleted: true; InsufficientCoinBalance: true; InsufficientGas: true; InvalidGasObject: true; InvalidPublicFunctionReturnType: { idx: number; }; InvalidTransferObject: true; InvariantViolation: true; IotaMoveVerificationError: true; IotaMoveVerificationTimedout: true; MoveAbort: [{ function: number; functionName: string | null; instruction: number; module: { address: string; name: string; }; }, string]; MoveObjectTooBig: { maxObjectSize: string; objectSize: string; }; MovePackageTooBig: { maxObjectSize: string; objectSize: string; }; MovePrimitiveRuntimeError: { function: number; functionName: string | null; instruction: number; module: { address: string; name: string; }; } | null; NonEntryFunctionInvoked: true; PackageUpgradeError: { upgradeError: EnumOutputShapeWithKeys<{ DigestDoesNotMatch: { digest: ...; }; IncompatibleUpgrade: true; NotAPackage: { objectId: ...; }; PackageIDDoesNotMatch: { packageId: ...; ticketId: ...; }; UnableToFetchPackage: { packageId: ...; }; UnknownUpgradePolicy: { policy: ...; }; }, "UnableToFetchPackage" | "NotAPackage" | "IncompatibleUpgrade" | "DigestDoesNotMatch" | "UnknownUpgradePolicy" | "PackageIDDoesNotMatch">; }; PublishErrorNonZeroAddress: true; PublishUpgradeDependencyDowngrade: true; PublishUpgradeMissingDependency: true; SharedObjectOperationNotAllowed: true; TypeArgumentError: { argumentIdx: number; kind: EnumOutputShapeWithKeys<{ ConstraintNotSatisfied: true; TypeNotFound: true; }, "TypeNotFound" | "ConstraintNotSatisfied">; }; TypeArityMismatch: true; UnusedValueWithoutDrop: { resultIdx: number; secondaryIdx: number; }; VMInvariantViolation: true; VMVerificationOrDeserializationError: true; WrittenObjectsTooLarge: { currentSize: string; maxSize: string; }; }, "PackageUpgradeError" | "CommandArgumentError" | "SharedObjectOperationNotAllowed" | "TypeArgumentError" | "InsufficientGas" | "InvalidGasObject" | "InvariantViolation" | "FeatureNotYetSupported" | "MoveObjectTooBig" | "MovePackageTooBig" | "CircularObjectOwnership" | "InsufficientCoinBalance" | "CoinBalanceOverflow" | "PublishErrorNonZeroAddress" | "IotaMoveVerificationError" | "MovePrimitiveRuntimeError" | "MoveAbort" | "VMVerificationOrDeserializationError" | "VMInvariantViolation" | "FunctionNotFound" | "ArityMismatch" | "TypeArityMismatch" | "NonEntryFunctionInvoked" | "UnusedValueWithoutDrop" | "InvalidPublicFunctionReturnType" | "InvalidTransferObject" | "EffectsTooLarge" | "PublishUpgradeMissingDependency" | "PublishUpgradeDependencyDowngrade" | "WrittenObjectsTooLarge" | "CertificateDenied" | "IotaMoveVerificationTimedout" | "InputObjectDeleted" | "ExecutionCancelledDueToSharedObjectCongestion" | "AddressDeniedForCoin" | "CoinTypeGlobalPause" | "ExecutionCancelledDueToRandomnessUnavailable">; }; Success: true; }, "Success" | "Failed"> = ExecutionStatus

V1.transactionDigest

string = ObjectDigest

V1.unchangedSharedObjects

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

Returns

Promise<void>


buildTransaction()

buildTransaction(transaction): Promise<Uint8Array<ArrayBufferLike>>

Defined in: sdk/typescript/src/transactions/executor/serial.ts:57

Parameters

transaction

Transaction

Returns

Promise<Uint8Array<ArrayBufferLike>>


executeTransaction()

executeTransaction(transaction, options?, additionalSignatures?): Promise<{ data: IotaTransactionBlockResponse; digest: string; effects: string; }>

Defined in: sdk/typescript/src/transactions/executor/serial.ts:87

Parameters

transaction

Uint8Array<ArrayBufferLike> | Transaction

options?

IotaTransactionBlockResponseOptions

additionalSignatures?

string[] = []

Returns

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


resetCache()

resetCache(): Promise<void>

Defined in: sdk/typescript/src/transactions/executor/serial.ts:79

Returns

Promise<void>


waitForLastTransaction()

waitForLastTransaction(): Promise<void>

Defined in: sdk/typescript/src/transactions/executor/serial.ts:83

Returns

Promise<void>