Skip to content

@pumpkin-plugins/signing API / sign / signWasm

Function: signWasm() ​

signWasm(wasm, metadata, secretKeyHex): Buffer

Defined in: sign.ts:99

Signs a wasm binary the way Pumpkin verifies it. Existing signing sections are replaced.

Parameters ​

wasm ​

Uint8Array

The binary to sign.

metadata ​

SigningMetadata

What to embed; only the documented fields are written, in order.

secretKeyHex ​

string

The 32-byte seed as 64 hex characters.

Returns ​

Buffer

The binary with pumpkin.metadata and wasm_signature sections appended.

Throws ​

When the key is malformed or the bytes aren't a wasm binary.

Pumpkin Plugins documentation