Giter Club home page Giter Club logo

iexec-sdk's Introduction

iExec SDK logo

iExec SDK

npm version npm version license Twitter Follow

The iExec SDK is a CLI and a JS library that allows easy interactions with iExec decentralized marketplace in order to run off-chain computations.

Library

The iExec javascript SDK can be imported in your frontend or backend JS project.

install

npm install iexec

import

import { IExec } from 'iexec';

Check the documentation

CLI

The iExec SDK comes with a command line interface enabling interactions with the decentralized marketplace from a terminal.

install

npm install -g iexec

# check commands
iexec help

Check the documentation

Changelog

Find changes in the CHANGELOG

Resources

iexec-sdk's People

Contributors

0xalexbel avatar andrewjknox avatar cedric25 avatar cristianolongoodhl avatar gfedak avatar izimio avatar julienbrg avatar lodygens avatar luaroncrew avatar miminoux avatar pierrejeanjacquot avatar sulliwane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iexec-sdk's Issues

Check to perform on commands

When a command is badly entered (for example: iexec suMBit) no errors are shown in the console. Shouldn't it return an error saying the command is not correct?

More obvious result when a job is finished.

Currently when a job is submitted in the dappstore, once the result is available, it is not very obvious (only a small line says that it is finished), it may be better to have a more obvious feedback.

The partner instant exchange SimpleSwap.io

Hi,

I am Nicolas, the manager at SimpleSwap.io, an instant cryptocurrency exchange.

We present a simple and easy-to-use platform that works without registration and limits and allows users to make swaps in just two clicks.

We successfully support RLC on our service for a long time and we have been exchanging RLC for more than 200 coins to our customers. I tried to find contact with your team but without results.

I'm sorry that I invaded here, but maybe you can tell me where I can turn. I would like to make contact so we can have an interaction.

Add depositFor support in `iexec account`

depositFor is new feature of the PoCo's Escrow that allows for deposit onto someone's else account. This should be supported by the SDK through a option.

Proposed behaviour

  • iexec account deposit xxx → call deposit(xxx) to move xxx nRLC to the user's account
  • iexec account deposit xxx --for yyy → call depositFor(xxx,yyy) to move xxx nRLC to yyy's account

Currently only the first point is implemented.

VM log for Launch worker

I often get this ERROR in the VM log when I start the worker. I am not sure if it is significant ?

00:00:14.521032 VMMDev: Guest Log: 06:10:33.089339 main vbglR3GuestCtrlDetectPeekGetCancelSupport: Supported (#1)
00:00:14.521117 ASSERT_GUEST_LOGREL F:\tinderbox\win-6.0\src\VBox\HostServices\GuestControl\VBoxGuestControlSvc.cpp(1119) int __cdecl GstCtrlService::clientMakeMeMaster(struct ClientState *,struct VBOXHGCMCALLHANDLE_TYPEDEF *,unsigned int): fRequestor != VMMDEV_REQUESTOR_LEGACY
00:00:14.521127 Outdated VBoxGuest w/o requestor support. Please update!
00:00:14.571359 VMMDev: Guest Log: 06:10:33.139651 main Error: Failed to become guest control master: VERR_VERSION_MISMATCH
00:00:14.571537 VMMDev: Guest Log: 06:10:33.139853 main Error: Service 'control' failed to initialize: VERR_VERSION_MISMATCH
00:00:14.571643 VMMDev: Guest Log: 06:10:33.139961 main Session 0 is about to close ...
00:00:14.571677 VMMDev: Guest Log: 06:10:33.139999 main Stopping all guest processes ...
00:00:14.571713 VMMDev: Guest Log: 06:10:33.140035 main Closing all guest files ... when I startup the VM

license

what is the license of this repo?

SDK v1.6.4 installation fail

Cher iExec,

i've been trying to install the latest version of your SDK (1.6.4) through npm's npm -g install iexec but it seems to always fail. I tried the installer on different systems: Windows 8, Mac, and even on the KataKoda's server instance.

Here is the error log:

6156 verbose stack Error: [email protected] install: `node-gyp rebuild`
6156 verbose stack Exit status 1
6156 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
6156 verbose stack     at emitTwo (events.js:126:13)
6156 verbose stack     at EventEmitter.emit (events.js:214:7)
6156 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
6156 verbose stack     at emitTwo (events.js:126:13)
6156 verbose stack     at ChildProcess.emit (events.js:214:7)
6156 verbose stack     at maybeClose (internal/child_process.js:925:16)
6156 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
6157 verbose pkgid [email protected]
6158 verbose cwd D:\Elias_OUSGHIR\Images\Création\prog\iexec-test
6159 verbose Windows_NT 6.3.9600
6160 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "-g" "install" "iexec"
6161 verbose node v8.9.4
6162 verbose npm  v5.6.0
6163 error code ELIFECYCLE
6164 error errno 1
6165 error [email protected] install: `node-gyp rebuild`
6165 error Exit status 1
6166 error Failed at the [email protected] install script.

Do you have any idea what's going on? I'm looking forward to test your SDK.
Merci d'avance!

Edit: Version 1.6.3 installed successfully

Quotes missing on the command line

SDK 2.2.37

`iexec sgx encryptedpush --application 0x2f3422f2805693cf741ee32707d57923ef6fa55f
ℹ using chain [kovan]
⠀⢐ ▶ encrypting data from /home/james/iexecdev/iexecsgxdemo/sgx/inputs and uploading
"cmdline": --sessionID 123456789/application --secretManagementService XX.XX --url https://transfer.sh/JiB9u/scone-upload

✔ data encrypted and uploaded
`

Quotes missing on the command line

Cannot read property 'getCookieByJWT'

$ iexec scheduler show
result in an error :

ℹ using chain [kovan]
⢀⠀ ▶ showing version...

✖ command "iexec scheduler show" failed with TypeError: Cannot read property 'getCookieByJWT' of undefined

iexec orderbook workerpool filter problem

At the marketplace in CAT 4 two different worker pools posted orders.
When I am trying to get order book of a worker pool with SDK, it returns orders of all worker pools.

finer control over iexec-sdk or over gateway.iex.ec

It would be useful for devs to have a finer access to the iexec-sdk, such as filters that we could add in commands, for instance if I want a specific workerpool's worker count:
iexec workerpool show 0xADDRESS --filter getWorkersCount

Another way to do this would be through https://gateway.iex.ec , we could access this info by requesting parameters in:
https://gateway.iex.ec/workerpool?addr=0xADDRESS
or something like that.

This issue was also requested by a beta-tester on Slack:
other issuer

Callback stdout usage possible for docker app

When an application is dockerise. Today, the result is always a zip file. For some apps, the stdout is needed in the smart contract after the bridge callback.

If the docker execution produces only a stdout file. This stdout will be pushed into the smart contract.
If the docker execution produces more than one files. It will be a zip as a result as today.

UnhandledPromiseRejectionWarning of http://localhost:8545 when using Kovan node

If I try to execute an iExec SDK command on Kovan using an Infura node (for instance) while my local node 8545 is shutdown, I get an UnhandledPromiseRejectionWarning.

$ iexec workerpool deploy --chain kovan
ℹ using chain [kovan]
⢀⠀ ▶ deploying workerpool...(node:12227) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: [ethjs-provider-http] Invalid JSON RPC response from provider
    host: http://localhost:8545
    response:  ""
    responseURL: undefined
    status: 0
    statusText: 
  
(node:12227) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
✔ Deployed new workerpool at address 0x0blabla

I have the same situation when Infura isn't reachable and I'm using a local node (UnhandledPromiseRejectionWarning on Infura).

Thanks ;)

"iexec account login" failed when passing SDK environment from one machine to another

Subject: "iexec account login" failed when passing SDK environment from one machine to another

Situation:

$> ls
account.json
chain.json
iexec.json
wallet.json
$> iexec account login
ℹ using chain [dev]
⢀⠀ ▶ logging into iExec...

✖ command "iexec account login" failed with TypeError: Cannot read property 'getTypedMessage' of undefined

Patch to solve it:

cp wallet.json wallet.json.back
rm all (but not wallet.json.back)
iexec init
rm wallet.json
mv wallet.json.back wallet.json
iexec account login

SOLVED

[iExec Explorer] unable to claim deal without tasks

"iexec app run" failed with Web3ProviderSendError: [...] always failing transaction

"iexec app run" failed with Web3ProviderSendError: gas required exceeds allowance:

ℹ using chain [goerli]
✔ deal submitted with dealid 0x6e55fa8f4e427570aad5ca7adcf03692129ee99c771dd300e75ba9eed6f045e9
vendredi 21 février 2020, 15:26:46 (UTC+0100)
ℹ using chain [goerli]
⠈⢙ ▶ submitting deal

✖ command "iexec app run" failed with Web3ProviderSendError: gas required exceeds allowance (8000000) or always failing transaction
vendredi 21 février 2020, 15:27:30 (UTC+0100)
ℹ using chain [goerli]
⠉⠙ ▶ submitting deal

✖ command "iexec app run" failed with Web3ProviderSendError: gas required exceeds allowance (8000000) or always failing transaction
vendredi 21 février 2020, 15:28:15 (UTC+0100)
ℹ using chain [goerli]
⠉⠩ ▶ submitting deal

✖ command "iexec app run" failed with Web3ProviderSendError: gas required exceeds allowance (8000000) or always failing transaction
vendredi 21 février 2020, 15:29:00 (UTC+0100)
ℹ using chain [goerli]
⠉⠙ ▶ submitting deal

✖ command "iexec app run" failed with Web3ProviderSendError: gas required exceeds allowance (8000000) or always failing transaction
vendredi 21 février 2020, 15:29:46 (UTC+0100)
ℹ using chain [goerli]
✔ deal submitted with dealid 0xea03d1c413a7298b62f9eb863c091e0206204b2a9b1976a38bf6b706f4f8dd64
vendredi 21 février 2020, 15:30:45 (UTC+0100)
ℹ using chain [goerli]
✔ deal submitted with dealid 0x8f8c0c48c969b684db46711702dbe20f5efce0ea714ba5491fa350d5495b10cf
vendredi 21 février 2020, 15:31:50 (UTC+0100)

🎁 @PierreJeanjacquot

Isn't a big issue for me, just wanted to report it (similar to #81) ;)

sendETH did not work

With 2.2.8 sendETH did not work :

$ iexec wallet sendETH --to 0xF487fE0b04beDd03Dea15Ab441B8053cD947B78C 1
ℹ using chain [kovan]
✖ command "iexec wallet sendETH" failed with TypeError: Cannot destructure property `error` of 'undefined' or 'null'.

Allow only a smart contract to run an app

Following a discussion with one of the dev, there is apparently no way to ensure that an app deployed to iExec is only launchable from a specific smart contract in order to be sure that some conditions are met before executing the app.

Local test for app developers

is there a plan to make it easy to deploy local test nets? deploying the contratcs locally should be relatively easy but for example having the abiility to deploy a private worker pool to do our tests would be amazing

Incomplete deposit using the Docker image

I followed the installation instructions and tried to deposit my first RLC to my account as explained in the README.

After running iexec account deposit 200, a transaction happened (my ETH balance got debited) but neither RLC got debited from my wallet nor credited to my account. The command kept running indefinitely and I had to terminate it eventually.

Meanwhile, using the iexeccommand installed with npm lead to a successful completion.

[iExec Explorer][Feature request] Claim all tasks functionality

Today I had to claim 34 tasks manually... Thanks to My activity it was not very difficult to find them all, but filters by tasks state would help.
After finding all tasks in STARTED state which were started by me, I had 34 tabs where I had to manually click on claim and confirm transaction via metamask.

It's not first time I do these kind of stuff, that is why I wanted to request functionality which will automate claiming all possible tasks with one button (probably with confirming multiple transactions via metamask, if there are no batch support).

[iExec Explorer][enchancement] Add functionality to see all apps requests

Similar to what was implemented on activity tab for user, it would be nice to allow explorer users to see history of application runs. Right now only total run count is shown.
Could be implemented in form of table with deals filtered by this application id on the application page (activated by click on run count or dedicated button next to it)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.