Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can i make ord cli interacting with my website #2060

Closed
ghost opened this issue May 3, 2023 · 10 comments
Closed

how can i make ord cli interacting with my website #2060

ghost opened this issue May 3, 2023 · 10 comments

Comments

@ghost
Copy link

ghost commented May 3, 2023

hey any idea how can i make ord cli interacting with my website ? i have my own node right now

@zhwindy
Copy link

zhwindy commented May 4, 2023

Actually no, ord wallet client not provide external api

@GaloisField2718
Copy link

Maybe running a js or python script from your website which can make command in ord.

I think about it but maybe there are vulnerabilities which should be considered. Nevertheless, in localhost it can be possible to have a first try.

Interested to chat about it :)

@ghost
Copy link
Author

ghost commented May 19, 2023

Maybe running a js or python script from your website which can make command in ord.

I think about it but maybe there are vulnerabilities which should be considered. Nevertheless, in localhost it can be possible to have a first try.

Interested to chat about it :)

I created and make it interact with my website, don't do that people would run malicious code in your server

@M1chlCZ
Copy link

M1chlCZ commented Jun 8, 2023

There is no issue with making calls to cli (through some custom API], which will then return JSON, so you can then parse it and show it as needed.

@ghost
Copy link
Author

ghost commented Jun 8, 2023

There is no issue with making calls to cli (through some custom API], which will then return JSON, so you can then parse it and show it as needed.

how

@M1chlCZ
Copy link

M1chlCZ commented Jun 8, 2023

There is no issue with making calls to cli (through some custom API], which will then return JSON, so you can then parse it and show it as needed.

how

Normally call it from something like javascript:

var exec = require('child_process').exec;

exec('ord wallet inscriptions',
    function (error, stdout, stderr) {
        var result = JSON.stringify(stdout)
		-- use data gathered --
        console.log('stderr: ' + stderr);
        if (error !== null) {
             console.log('exec error: ' + error);
        }
    });

Granted, I suck at JS, I copied first stackoverflow solution

Simple...

@ghost
Copy link
Author

ghost commented Jun 8, 2023

There is no issue with making calls to cli (through some custom API], which will then return JSON, so you can then parse it and show it as needed.

how

Normally call it from something like javascript:

var exec = require('child_process').exec;

exec('ord wallet inscriptions',
    function (error, stdout, stderr) {
        var result = JSON.stringify(stdout)
		-- use data gathered --
        console.log('stderr: ' + stderr);
        if (error !== null) {
             console.log('exec error: ' + error);
        }
    });

Granted, I suck at JS, I copied first stackoverflow solution

Simple...

there is a library in python subprocess, maybe i can use it you think? it allow to interact with command

@M1chlCZ
Copy link

M1chlCZ commented Jun 8, 2023

There is no issue with making calls to cli (through some custom API], which will then return JSON, so you can then parse it and show it as needed.

how

Normally call it from something like javascript:

var exec = require('child_process').exec;

exec('ord wallet inscriptions',
    function (error, stdout, stderr) {
        var result = JSON.stringify(stdout)
		-- use data gathered --
        console.log('stderr: ' + stderr);
        if (error !== null) {
             console.log('exec error: ' + error);
        }
    });

Granted, I suck at JS, I copied first stackoverflow solution
Simple...

there is a library in python subprocess, maybe i can use it you think? it allow to interact with command

You cat use absolutely any language, which allows you to interact with system. So Python will absolutely work : )

@ghost
Copy link
Author

ghost commented Jun 8, 2023

There is no issue with making calls to cli (through some custom API], which will then return JSON, so you can then parse it and show it as needed.

how

Normally call it from something like javascript:

var exec = require('child_process').exec;

exec('ord wallet inscriptions',
    function (error, stdout, stderr) {
        var result = JSON.stringify(stdout)
		-- use data gathered --
        console.log('stderr: ' + stderr);
        if (error !== null) {
             console.log('exec error: ' + error);
        }
    });

Granted, I suck at JS, I copied first stackoverflow solution
Simple...

there is a library in python subprocess, maybe i can use it you think? it allow to interact with command

You cat use absolutely any language, which allows you to interact with system. So Python will absolutely work : )

thanks a lot

@raphjaph
Copy link
Collaborator

We've started work on a JSON API and will add enpoints over the next couple weeks: #2250

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants