install

suspend fun install(wasmBytes: ByteArray, source: String, signer: KeyPair, network: Network, rpcUrl: String): String

Upload contract WASM code (ADVANCED - Step 1 of 2).

This is a power-user method for two-step deployment when you need to:

  • Reuse the same WASM for multiple contract instances

  • Inspect the WASM ID before deployment

  • Separate upload and deployment transactions

Most developers should use the one-step deploy method instead.

Returns the WASM ID (hash) as a hex string which can be used with deployFromWasmId. Includes duplicate detection - if WASM already installed, returns existing ID.

Return

WASM ID as hex string (ready to use)

Parameters

wasmBytes

The compiled contract WASM code

source

Source account for the transaction

signer

KeyPair for signing

network

Network to upload to

rpcUrl

RPC server URL

Samples