      })
        }

        async function wasiKeyvalueStoreBucketSet(tx, rx, bucket, key, value) {
            const text = new TextEncoder();

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

            const keyBuf = text.encode(key);
            if (keyBuf.length > 127) throw 'this example currentl