Author Topic: BitShares ASP.NET Web API  (Read 3386 times)

0 Members and 1 Guest are viewing this topic.

Offline amencon

  • Sr. Member
  • ****
  • Posts: 227
    • View Profile
Use cases:

+ Full web api, to administrate your wallet remotely as you said, easily from a web page. Security is a concern, so I would limit what it can be done.

+ The web api would allow you to do integrate with a web wallet, you could use angularjs and even "reuse" the code from the main wallet.

+ A restricted web api can be used for security, adding an extra barrier to break to get into the wallet.

+ The service can be used as the generic interface class for anything :) (An Exchange, a bot, e-commerce)

Mainly you have .net and bitshares the world is your oyster. (same as nodejs, python, c++ )

Just make your life easier and make sure is portable (mono, linux)
Yeah originally I was going to limit the API to only respond to "GET" requests but collating that list of commands seemed like a lot of work unless others actually wanted to use the service.  Unfortunately the sticking point in my mind is how does anyone trust the API information considering it moves through my server first?  In theory couldn't I change data or have my own client version that returns bad results?  It's true there wouldn't be much financial incentive if the API didn't accept any input commands and manage any wallets for others though.

If there is a way to overcome the trust issue I could see how it could be very useful.  Who wants to have to run their own heavyweight client for every little website they want to make that needs some client information, right?

Thanks for the ideas and the heads up on VNext/MVC 6, didn't realize a new version was coming out and I like the idea of them merging the frameworks and making it cloud friendly.

Offline betax

  • Hero Member
  • *****
  • Posts: 808
    • View Profile
Use cases:

+ Full web api, to administrate your wallet remotely as you said, easily from a web page. Security is a concern, so I would limit what it can be done.

+ The web api would allow you to do integrate with a web wallet, you could use angularjs and even "reuse" the code from the main wallet.

+ A restricted web api can be used for security, adding an extra barrier to break to get into the wallet.

+ The service can be used as the generic interface class for anything :) (An Exchange, a bot, e-commerce)

Mainly you have .net and bitshares the world is your oyster. (same as nodejs, python, c++ )

Just make your life easier and make sure is portable (mono, linux)
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline amencon

  • Sr. Member
  • ****
  • Posts: 227
    • View Profile
Nice... may want to avoid using popups to display result.
Hmm true, the home page was more of an afterthought but your right the pop up is completely pointless, I've tweaked it to return the URL and result in the page.

That's great, you could port it to VNext so it can run in linux. Your service can be reused too if you want to create a bot.
Interesting, I've actually never heard of VNext but I'll definitely check it out.  You see any good use cases in particular for this service?

+5% ... thanks for open sourcing it!!
Of course man.  I'm a big proponent of open source, I just wish I could do the same for a lot of my other work, not that it's groundbreaking or anything.

So now that I know how to communicate with the client in .NET, the question is what kind of web app would people like to see?  Awhile ago of course I thought of doing something similar to bitsharesblocks.com, but svk has done such an awesome job with it I didn't see any reason trying to copy it.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
+5% ... thanks for open sourcing it!!

Offline betax

  • Hero Member
  • *****
  • Posts: 808
    • View Profile
That's great, you could port it to VNext so it can run in linux. Your service can be reused too if you want to create a bot.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline bytemaster

Nice... may want to avoid using popups to display result.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline amencon

  • Sr. Member
  • ****
  • Posts: 227
    • View Profile
So I had some extra time last weekend and decided I'd finally get around to building the .NET API for a bitshares client.  This killed 2 birds with 1 stone for me since I've been wanting to build something with the .NET Web API framework as well as figuring out how to communicate with the BitShares client.

You can find the info page at: bitsharesapi.info
API URL structure is **http://bitsharesapi.info/api/commands/<command>?paramString=<parameterString?>** (or you can go to the info page and fill in the text boxes to see an example in a pop up window).

So what is this good for?  Probably nothing, I suppose a quick way you can get info from a bitshares client remotely if you trust me.  Mostly a side project for my own edification and I might use it to build sites in the future hosted on machines without a local client running, though if someone is using .NET and they think the code might help them with their own project I've thrown up the project files on GitHub here: https://github.com/amenconi/BitSharesDotNetAPI

Thanks.

testz: Edit post, fix github link.
« Last Edit: November 07, 2014, 06:41:38 am by testz »