publish Package Transaction
abstract suspend fun publishPackageTransaction(account: AccountAddressInput, metadataBytes: HexInput, moduleBytecode: List<HexInput>, options: InputGenerateTransactionOptions = InputGenerateTransactionOptions()): SimpleTransaction
Generates a transaction to publish a move package to chain.
To get the metadataBytes
and byteCode
, can compile using Aptos CLI with command aptos move compile --save-metadata ...
,
Parameters
account
The publisher account
metadata Bytes
The package metadata bytes
module Bytecode
An array of the bytecode of each module in the package in compiler output order