function wasiKeyvalueStoreBucketGet(tx, rx, bucket, key) {
            const text = new TextEncoder();

            if (bucket.length > 127) throw 'this example currently does not support buckets longer than 127 bytes - open a PR!';

            const keyBuf = text.encode(key);
            if (keyBuf.length > 127) throw 'this example currently does not support keys longer than 127 bytes - open a PR!';

            const payloadBytes = 2 + bucket.length + keyBuf.length;
            if (payloadBytes > 127) th