diff --git a/test/package-lock.json b/test/package-lock.json index deb901b..3119a8a 100644 --- a/test/package-lock.json +++ b/test/package-lock.json @@ -1,18 +1,20 @@ { - "name": "test", + "name": "test-component", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "test", + "name": "test-component", "version": "1.0.0", "license": "ISC", + "dependencies": { + "@types/node": "^20.14.2" + }, "devDependencies": { "@bytecodealliance/componentize-js": "^0.8.3", "@bytecodealliance/jco": "^1.2.4", "@rollup/plugin-typescript": "^11.1.6", - "esbuild": "0.21.3", "rollup": "^4.18.0", "tslib": "^2.6.2", "typescript": "^5.4.5" @@ -197,374 +199,6 @@ "wizer-win32-x64": "wizer" } }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.3.tgz", - "integrity": "sha512-yTgnwQpFVYfvvo4SvRFB0SwrW8YjOxEoT7wfMT7Ol5v7v5LDNvSGo67aExmxOb87nQNeWPVvaGBNfQ7BXcrZ9w==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.3.tgz", - "integrity": "sha512-bviJOLMgurLJtF1/mAoJLxDZDL6oU5/ztMHnJQRejbJrSc9FFu0QoUoFhvi6qSKJEw9y5oGyvr9fuDtzJ30rNQ==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.3.tgz", - "integrity": "sha512-c+ty9necz3zB1Y+d/N+mC6KVVkGUUOcm4ZmT5i/Fk5arOaY3i6CA3P5wo/7+XzV8cb4GrI/Zjp8NuOQ9Lfsosw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.3.tgz", - "integrity": "sha512-JReHfYCRK3FVX4Ra+y5EBH1b9e16TV2OxrPAvzMsGeES0X2Ndm9ImQRI4Ket757vhc5XBOuGperw63upesclRw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.3.tgz", - "integrity": "sha512-U3fuQ0xNiAkXOmQ6w5dKpEvXQRSpHOnbw7gEfHCRXPeTKW9sBzVck6C5Yneb8LfJm0l6le4NQfkNPnWMSlTFUQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.3.tgz", - "integrity": "sha512-3m1CEB7F07s19wmaMNI2KANLcnaqryJxO1fXHUV5j1rWn+wMxdUYoPyO2TnAbfRZdi7ADRwJClmOwgT13qlP3Q==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.3.tgz", - "integrity": "sha512-fsNAAl5pU6wmKHq91cHWQT0Fz0vtyE1JauMzKotrwqIKAswwP5cpHUCxZNSTuA/JlqtScq20/5KZ+TxQdovU/g==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.3.tgz", - "integrity": "sha512-tci+UJ4zP5EGF4rp8XlZIdq1q1a/1h9XuronfxTMCNBslpCtmk97Q/5qqy1Mu4zIc0yswN/yP/BLX+NTUC1bXA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.3.tgz", - "integrity": "sha512-f6kz2QpSuyHHg01cDawj0vkyMwuIvN62UAguQfnNVzbge2uWLhA7TCXOn83DT0ZvyJmBI943MItgTovUob36SQ==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.3.tgz", - "integrity": "sha512-vvG6R5g5ieB4eCJBQevyDMb31LMHthLpXTc2IGkFnPWS/GzIFDnaYFp558O+XybTmYrVjxnryru7QRleJvmZ6Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.3.tgz", - "integrity": "sha512-HjCWhH7K96Na+66TacDLJmOI9R8iDWDDiqe17C7znGvvE4sW1ECt9ly0AJ3dJH62jHyVqW9xpxZEU1jKdt+29A==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.3.tgz", - "integrity": "sha512-BGpimEccmHBZRcAhdlRIxMp7x9PyJxUtj7apL2IuoG9VxvU/l/v1z015nFs7Si7tXUwEsvjc1rOJdZCn4QTU+Q==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.3.tgz", - "integrity": "sha512-5rMOWkp7FQGtAH3QJddP4w3s47iT20hwftqdm7b+loe95o8JU8ro3qZbhgMRy0VuFU0DizymF1pBKkn3YHWtsw==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.3.tgz", - "integrity": "sha512-h0zj1ldel89V5sjPLo5H1SyMzp4VrgN1tPkN29TmjvO1/r0MuMRwJxL8QY05SmfsZRs6TF0c/IDH3u7XYYmbAg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.3.tgz", - "integrity": "sha512-dkAKcTsTJ+CRX6bnO17qDJbLoW37npd5gSNtSzjYQr0svghLJYGYB0NF1SNcU1vDcjXLYS5pO4qOW4YbFama4A==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.3.tgz", - "integrity": "sha512-vnD1YUkovEdnZWEuMmy2X2JmzsHQqPpZElXx6dxENcIwTu+Cu5ERax6+Ke1QsE814Zf3c6rxCfwQdCTQ7tPuXA==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.3.tgz", - "integrity": "sha512-IOXOIm9WaK7plL2gMhsWJd+l2bfrhfilv0uPTptoRoSb2p09RghhQQp9YY6ZJhk/kqmeRt6siRdMSLLwzuT0KQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.3.tgz", - "integrity": "sha512-uTgCwsvQ5+vCQnqM//EfDSuomo2LhdWhFPS8VL8xKf+PKTCrcT/2kPPoWMTs22aB63MLdGMJiE3f1PHvCDmUOw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.3.tgz", - "integrity": "sha512-vNAkR17Ub2MgEud2Wag/OE4HTSI6zlb291UYzHez/psiKarp0J8PKGDnAhMBcHFoOHMXHfExzmjMojJNbAStrQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.3.tgz", - "integrity": "sha512-W8H9jlGiSBomkgmouaRoTXo49j4w4Kfbl6I1bIdO/vT0+0u4f20ko3ELzV3hPI6XV6JNBVX+8BC+ajHkvffIJA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.3.tgz", - "integrity": "sha512-EjEomwyLSCg8Ag3LDILIqYCZAq/y3diJ04PnqGRgq8/4O3VNlXyMd54j/saShaN4h5o5mivOjAzmU6C3X4v0xw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.3.tgz", - "integrity": "sha512-WGiE/GgbsEwR33++5rzjiYsKyHywE8QSZPF7Rfx9EBfK3Qn3xyR6IjyCr5Uk38Kg8fG4/2phN7sXp4NPWd3fcw==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.3.tgz", - "integrity": "sha512-xRxC0jaJWDLYvcUvjQmHCJSfMrgmUuvsoXgDeU/wTorQ1ngDdUBuFtgY3W1Pc5sprGAvZBtWdJX7RPg/iZZUqA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", @@ -885,6 +519,14 @@ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, + "node_modules/@types/node": { + "version": "20.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", + "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", + "dependencies": { + "undici-types": "~5.26.4" + } + }, "node_modules/acorn": { "version": "8.11.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", @@ -1000,44 +642,6 @@ "integrity": "sha512-i1gCgmR9dCl6Vil6UKPI/trA69s08g/syhiDK9TG0Nf1RJjjFI+AzoWW7sPufzkgYAn861skuCwJa0pIIHYxvg==", "dev": true }, - "node_modules/esbuild": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.3.tgz", - "integrity": "sha512-Kgq0/ZsAPzKrbOjCQcjoSmPoWhlcVnGAUo7jvaLHoxW1Drto0KGkR1xBNg2Cp43b9ImvxmPEJZ9xkfcnqPsfBw==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.3", - "@esbuild/android-arm": "0.21.3", - "@esbuild/android-arm64": "0.21.3", - "@esbuild/android-x64": "0.21.3", - "@esbuild/darwin-arm64": "0.21.3", - "@esbuild/darwin-x64": "0.21.3", - "@esbuild/freebsd-arm64": "0.21.3", - "@esbuild/freebsd-x64": "0.21.3", - "@esbuild/linux-arm": "0.21.3", - "@esbuild/linux-arm64": "0.21.3", - "@esbuild/linux-ia32": "0.21.3", - "@esbuild/linux-loong64": "0.21.3", - "@esbuild/linux-mips64el": "0.21.3", - "@esbuild/linux-ppc64": "0.21.3", - "@esbuild/linux-riscv64": "0.21.3", - "@esbuild/linux-s390x": "0.21.3", - "@esbuild/linux-x64": "0.21.3", - "@esbuild/netbsd-x64": "0.21.3", - "@esbuild/openbsd-x64": "0.21.3", - "@esbuild/sunos-x64": "0.21.3", - "@esbuild/win32-arm64": "0.21.3", - "@esbuild/win32-ia32": "0.21.3", - "@esbuild/win32-x64": "0.21.3" - } - }, "node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", @@ -1426,6 +1030,11 @@ "engines": { "node": ">=14.17" } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" } } } diff --git a/test/package.json b/test/package.json index e3d90ad..2886693 100644 --- a/test/package.json +++ b/test/package.json @@ -1,10 +1,9 @@ { - "name": "test", + "name": "test-component", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", "stub": "jco transpile wit --no-namespaced-exports --stub --name index -o src && rm src/index.js && mv src/index.d.ts src/index.ts", "build": "tsc && rollup -c", "package": "jco componentize -w wit -o out/golem-ts-tests.wasm out/build.js" @@ -16,9 +15,11 @@ "@bytecodealliance/componentize-js": "^0.8.3", "@bytecodealliance/jco": "^1.2.4", "@rollup/plugin-typescript": "^11.1.6", - "esbuild": "0.21.3", "rollup": "^4.18.0", "tslib": "^2.6.2", "typescript": "^5.4.5" + }, + "dependencies": { + "@types/node": "^20.14.2" } } diff --git a/test/src/index.ts b/test/src/index.ts index abed32b..f4d895f 100644 --- a/test/src/index.ts +++ b/test/src/index.ts @@ -1,46 +1,63 @@ -import { fallibleTransaction, infallibleTransaction, Operation, operation, OperationErrors, Result } from 'golem-ts'; -import { GolemTsApi } from './interfaces/golem-ts-api.js'; +import { GolemItApi } from './interfaces/golem-it-api.js'; +import { + useRetryPolicy, + executeWithDrop, + oplogCommit, + atomically, + withIdempotenceMode, + withPersistenceLevel, + operation, + Result, + Operation, + infallibleTransaction, +} from 'golem-ts'; -export const api: typeof GolemTsApi = { - process: (a: bigint) => { - const result = infallibleTransaction(tx => { - const resultA = tx.execute(operationOne, a); - const resultB = resultA.flatMap(a => tx.execute(operationTwo, a)); - return resultB - }); - if (result.isOk) { - return result.value; - } else { - console.log(`Error: ${result.error}`); - return "Error"; - } +export const api: typeof GolemItApi = { + failWithCustomMaxRetries, + explicitCommit, + fallibleTransactionTest() { + return false; }, - processFallible: (a: bigint) => { - type Error = OperationErrors<[typeof neverFailsOperation, typeof alwaysFailsOperation]>; - const result = fallibleTransaction(tx => { - const resultA = tx.execute(neverFailsOperation, a); - const resultB = resultA.flatMap(num => tx.execute(alwaysFailsOperation, num)); - return resultB; - }); + infallibleTransactionTest, +}; - if (result.isOk) { - return result.value.toString(); - } else { - const message = typeof result.error === "string" ? result.error : JSON.stringify(result.error); - return `Error ${message}`; - } - } +function failWithCustomMaxRetries(maxRetries: number): void { + const retryPolicy = { + maxAttempts: maxRetries, + minDelay: BigInt(1000), + maxDelay: BigInt(1000), + multiplier: 1, + }; + const retry = useRetryPolicy(retryPolicy); + executeWithDrop([retry], () => { + throw new Error('Fail now'); + }); } -const operationOne: Operation = operation( - (input: bigint) => { +function explicitCommit(replicas: number): void { + const now = new Date(); + console.log(`Starting commit with ${replicas} replicas at ${now}`); + oplogCommit(replicas); + console.log('Finished commit'); +} + +function infallibleTransactionTest(): number { + const result = infallibleTransaction(tx => { + const result = tx.execute(operationOne, undefined); + return tx.execute(operationTwo, result) + }); + return result; +} + +const operationOne = operation( + (_: void) => { const random = Math.floor(Math.random() * 10); - if (random < 5) { - console.log(`OperationOne | input: ${input} | random ${random} | negative input detected`) - return Result.err("input cannot be negative"); + if (random < 4) { + console.log(`OperationOne error | random ${random}`) + return Result.err("random was < 4"); } else { console.log(`OperationOne | incrementing input by 1`) - return Result.ok(input + BigInt(1)); + return Result.ok(random); } }, (input, result) => { @@ -50,17 +67,15 @@ const operationOne: Operation = operation( ); const operationTwo = operation( - (input: bigint) => { - const random = Math.floor(Math.random() * 10); - if (random < 8) { - console.log(`OperationTwo | input: ${input} | input too large`) + (input: number) => { + if (input < 7) { + console.log(`OperationTwo error | input ${input}`) return Result.err( { - code: "invalid_random", - message: "random number not = 9" + code: "invalid_num", + message: "Random number < 7" }); } else { - console.log(`OperationTwo | input: ${input} | converting input to string`) - return Result.ok("Valid BigInt: " + input.toString()); + return Result.ok(input); } }, (input, result) => { diff --git a/test/src/interfaces/golem-it-api.d.ts b/test/src/interfaces/golem-it-api.d.ts new file mode 100644 index 0000000..d62359f --- /dev/null +++ b/test/src/interfaces/golem-it-api.d.ts @@ -0,0 +1,6 @@ +export namespace GolemItApi { + export function failWithCustomMaxRetries(maxRetries: number): void; + export function explicitCommit(replicas: number): void; + export function fallibleTransactionTest(): boolean; + export function infallibleTransactionTest(): number; +} diff --git a/test/src/interfaces/golem-ts-api.d.ts b/test/src/interfaces/golem-ts-api.d.ts deleted file mode 100644 index 64be043..0000000 --- a/test/src/interfaces/golem-ts-api.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export namespace GolemTsApi { - export function process(a: bigint): string; - export function processFallible(a: bigint): string; -} diff --git a/test/tsconfig.json b/test/tsconfig.json index b7b91fa..8457960 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -1,12 +1,13 @@ { "compilerOptions": { - "target": "ES2017", - "outDir": "./test/out", + "target": "ES2020", + "outDir": "./out", "rootDir": "../", - "lib": ["es2022", "dom"], + "lib": ["ES2020"], + "types": ["node"], "baseUrl": ".", "paths": { - "golem-ts": ["../lib"] + "golem-ts": ["../lib/src/index.ts"] }, "moduleResolution": "node", }, diff --git a/test/wit/main.wit b/test/wit/main.wit index d934c3b..a83044e 100644 --- a/test/wit/main.wit +++ b/test/wit/main.wit @@ -1,11 +1,14 @@ -package golem:ts; +package golem:it; interface api { - process: func(a: u64) -> string; - process-fallible: func(a: u64) -> string; + fail-with-custom-max-retries: func(max-retries: u32) -> (); + explicit-commit: func(replicas: u8) -> (); + + fallible-transaction-test: func() -> bool; + infallible-transaction-test: func() -> u32; } -world test { +world golem-ts-tests { import golem:api/host@0.2.0; export api; -} +} \ No newline at end of file