diff --git a/aqua-examples/price-oracle/air-scripts/get_crypto_prices.get_prices_par.air b/aqua-examples/price-oracle/air-scripts/get_crypto_prices.get_prices_par.air deleted file mode 100644 index 5185697..0000000 --- a/aqua-examples/price-oracle/air-scripts/get_crypto_prices.get_prices_par.air +++ /dev/null @@ -1,47 +0,0 @@ -(xor - (seq - (seq - (seq - (seq - (call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-) - (call %init_peer_id% ("getDataSrv" "payload") [] payload) - ) - (call %init_peer_id% ("getDataSrv" "ns_pairs") [] ns_pairs) - ) - (fold ns_pairs p - (par - (seq - (seq - (call -relay- ("op" "noop") []) - (xor - (seq - (call p.$.node! ("op" "string_to_b58") [p.$.node!] k) - (fold payload d - (seq - (seq - (call p.$.node! ("peer" "timestamp_ms") [] ts_ms) - (call p.$.node! (p.$.service_id! "price_getter") [d.$.coin! d.$.currency! ts_ms] $prices) - ) - (next d) - ) - ) - ) - (seq - (call -relay- ("op" "noop") []) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) - ) - ) - ) - (call %init_peer_id% ("op" "noop") []) - ) - (next p) - ) - ) - ) - (xor - (call %init_peer_id% ("callbackSrv" "response") [$prices]) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2]) - ) - ) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3]) -) diff --git a/aqua-examples/price-oracle/air-scripts/get_crypto_prices.get_prices_par_2.air b/aqua-examples/price-oracle/air-scripts/get_crypto_prices.get_prices_par_2.air deleted file mode 100644 index a124f90..0000000 --- a/aqua-examples/price-oracle/air-scripts/get_crypto_prices.get_prices_par_2.air +++ /dev/null @@ -1,39 +0,0 @@ -(xor - (seq - (seq - (seq - (call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-) - (call %init_peer_id% ("getDataSrv" "payload") [] payload) - ) - (fold payload p - (par - (seq - (seq - (call -relay- ("op" "noop") []) - (xor - (seq - (seq - (call p.$.node! ("op" "string_to_b58") [p.$.node!] k) - (call p.$.node! ("peer" "timestamp_ms") [] ts_ms) - ) - (call p.$.node! (p.$.service_id! "price_getter") [p.$.coin! p.$.currency! ts_ms] $prices) - ) - (seq - (call -relay- ("op" "noop") []) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) - ) - ) - ) - (call %init_peer_id% ("op" "noop") []) - ) - (next p) - ) - ) - ) - (xor - (call %init_peer_id% ("callbackSrv" "response") [$prices]) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2]) - ) - ) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3]) -) diff --git a/aqua-examples/price-oracle/air-scripts/get_crypto_prices.get_prices_seq.air b/aqua-examples/price-oracle/air-scripts/get_crypto_prices.get_prices_seq.air deleted file mode 100644 index c05841c..0000000 --- a/aqua-examples/price-oracle/air-scripts/get_crypto_prices.get_prices_seq.air +++ /dev/null @@ -1,47 +0,0 @@ -(xor - (seq - (seq - (seq - (seq - (call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-) - (call %init_peer_id% ("getDataSrv" "payloads") [] payloads) - ) - (call %init_peer_id% ("getDataSrv" "ns_pairs") [] ns_pairs) - ) - (fold ns_pairs p - (seq - (seq - (seq - (call -relay- ("op" "noop") []) - (xor - (seq - (call p.$.node! ("op" "string_to_b58") [p.$.node!] k) - (fold payloads d - (seq - (seq - (call p.$.node! ("peer" "timestamp_ms") [] ts_ms) - (call p.$.node! (p.$.service_id! "price_getter") [d.$.coin! d.$.currency! ts_ms] $prices) - ) - (next d) - ) - ) - ) - (seq - (call -relay- ("op" "noop") []) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) - ) - ) - ) - (call -relay- ("op" "noop") []) - ) - (next p) - ) - ) - ) - (xor - (call %init_peer_id% ("callbackSrv" "response") [$prices]) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2]) - ) - ) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3]) -) diff --git a/aqua-examples/price-oracle/data/deployed_services.json b/aqua-examples/price-oracle/data/deployed_services.json index 473abd7..7c5311f 100644 --- a/aqua-examples/price-oracle/data/deployed_services.json +++ b/aqua-examples/price-oracle/data/deployed_services.json @@ -1,30 +1,22 @@ -[ - { - "service": "price_getter", - "deployed": [ - "12D3KooWCMr9mU894i8JXAFqpgoFtx6qnV1LFPSfVc3Y34N4h4LS", - "c315073d-4311-4db3-be57-8f154f032d28" - ] - }, - { - "service": "price_getter", - "deployed": [ - "12D3KooWFEwNWcHqi9rtsmDhsYcDbRUCDXH84RC4FW6UfsFWaoHi", - "25f9123a-f386-4cb2-9c1e-bb7c247c9c09" - ] - }, - { - "service": "mean", - "deployed": [ - "12D3KooWCMr9mU894i8JXAFqpgoFtx6qnV1LFPSfVc3Y34N4h4LS", - "dd47389f-25d9-4870-a2a9-909359e73580" - ] - }, - { - "service": "mean", - "deployed": [ - "12D3KooWFEwNWcHqi9rtsmDhsYcDbRUCDXH84RC4FW6UfsFWaoHi", - "b2790307-055e-41ca-9640-3c41856d464b" - ] - } -] \ No newline at end of file +{ + "price_getter": [ + { + "node": "12D3KooWCMr9mU894i8JXAFqpgoFtx6qnV1LFPSfVc3Y34N4h4LS", + "service_id": "c315073d-4311-4db3-be57-8f154f032d28" + }, + { + "node": "12D3KooWFEwNWcHqi9rtsmDhsYcDbRUCDXH84RC4FW6UfsFWaoHi", + "service_id": "25f9123a-f386-4cb2-9c1e-bb7c247c9c09" + } + ], + "mean": [ + { + "node": "12D3KooWCMr9mU894i8JXAFqpgoFtx6qnV1LFPSfVc3Y34N4h4LS", + "service_id": "dd47389f-25d9-4870-a2a9-909359e73580" + }, + { + "node": "12D3KooWFEwNWcHqi9rtsmDhsYcDbRUCDXH84RC4FW6UfsFWaoHi", + "service_id": "b2790307-055e-41ca-9640-3c41856d464b" + } + ] +} \ No newline at end of file diff --git a/aqua-examples/price-oracle/package.json b/aqua-examples/price-oracle/package.json deleted file mode 100644 index e89e41a..0000000 --- a/aqua-examples/price-oracle/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "price-oracle", - "version": "0.1.0", - "description": "Fluence Price Oracle Demo", - "main": "./dist/index.js", - "typings": "./dist/index.d.ts", - "files": [ - "dist/*" - ], - "bic": [ - "client-peer/*", - "*.aqua", - "package-lock.json" - ], - "dependencies": { - "@fluencelabs/aqua-lib": "^0.1.9", - "@fluencelabs/fluence": "^0.9.53", - "@fluencelabs/fluence-network-environment": "^1.0.10", - "it-all": "^1.0.5" - }, - "scripts": { - "compile-aqua": "aqua-cli -i . -o ./client-peer", - "prebuild": "npm run compile-aqua", - "build": "tsc", - "prestart:local": "npm run build", - "start:local": "node client-peer/dist/index.js local", - "prestart:remote": "npm run build", - "start:remote": "node client-peer/dist/index.js testnet", - "start": "npm run start:remote" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/fluencelabs/examples/aqua-examples/price-oracle" - }, - "keywords": [ - "aqua", - "fluence" - ], - "author": "Fluence Labs", - "license": "MIT", - "bugs": { - "url": "git+https://github.com/fluencelabs/examples/issues" - }, - "homepage": "git+https://github.com/fluencelabs/examples/aqua-examples/price-oracle#readme", - "devDependencies": { - "@fluencelabs/aqua-cli": "0.1.9-163", - "typescript": "^3.9.5" - } -} \ No newline at end of file diff --git a/aqua-examples/price-oracle/tsconfig.json b/aqua-examples/price-oracle/tsconfig.json deleted file mode 100644 index cda2c54..0000000 --- a/aqua-examples/price-oracle/tsconfig.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - // "lib": [], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - "outDir": "./client-peer/dist", /* Redirect output structure to the directory. */ - "rootDir": "./client-peer", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */ - "skipLibCheck": true, /* Skip type checking of declaration files. */ - "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ - } -} \ No newline at end of file