ord icon indicating copy to clipboard operation
ord copied to clipboard

how can i make ord cli interacting with my website

Open SharinganKazekage opened this issue 1 year ago • 9 comments

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

SharinganKazekage avatar May 03 '23 09:05 SharinganKazekage

Actually no, ord wallet client not provide external api

zhwindy avatar May 04 '23 08:05 zhwindy

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 :)

GaloisField2718 avatar May 16 '23 03:05 GaloisField2718

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

ghost avatar May 19 '23 00:05 ghost

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.

M1chlCZ avatar Jun 08 '23 08:06 M1chlCZ

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

ghost avatar Jun 08 '23 13:06 ghost

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...

M1chlCZ avatar Jun 08 '23 13:06 M1chlCZ

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

ghost avatar Jun 08 '23 13:06 ghost

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 : )

M1chlCZ avatar Jun 08 '23 13:06 M1chlCZ

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

ghost avatar Jun 08 '23 14:06 ghost

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

raphjaph avatar Aug 10 '23 11:08 raphjaph