Publish a Package
How to publish a package using the TypeScript SDK.
publishPackage
function
publishPackage
functionParameters
Name
Type
senderAccount
packageMetadata
Uint8Array
modulesCode
Uint8Array[]
optionalTransactionArgs
Returns
Name
Type
Promise<TransactionResponse>
TransactionResponse
Example
The publishPackage
function requires the package metadata and module bytecode as the second and third parameter. These are obtained through the build-publish-payload
command of the Supra CLI. Once obtained, parse the JSON file for the data and pass it to the publishPackage
function.
Last updated