elective-stereophonic
elective-stereophonic
NxtLib - a typed .NET API wrapper for NXT singapore
Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest Stable Nxt Client: Nxt 1.12.2

Pages: 1 [2] 3  All

Author Topic: NxtLib - a typed .NET API wrapper for NXT  (Read 24991 times)

NxtSwe

  • Hero Member
  • *****
  • Karma: +124/-9
  • Offline Offline
  • Posts: 657
    • View Profile
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #20 on: September 30, 2015, 12:24:34 pm »

Hi,

is there a update planned for the NRS Version 1.5.15 or 1.6.0 (e)?

I would be grateful.  ;D

Hello,

Thanks for your feedback!
I have been planning on this for weeks, currently IRL is eating up all my available time and energy.

Whenever I do have some spare time I do some work in the master branch of the github repo, if you need something particular you can have a look there. But I cannot give any date on when I will have a new version out.
I am currently targeting 1.6.0e.
Logged
Check out the NxtLib, the .NET Framework API for the Nxt platform.

NxtSwe

  • Hero Member
  • *****
  • Karma: +124/-9
  • Offline Offline
  • Posts: 657
    • View Profile
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #21 on: September 30, 2015, 12:34:42 pm »

Hi NxtSwe,

Just saw it for the first time... Great job you did there! (very professional coding).

But I have one question:

Why didn't you use Web API?

It has a built-in json serializer/deserializer, it considered best practice today, also fully integrated with REST, and easy to consume and work with.

Hi and thanx!

Web API is, to my knowledge, used on the server side, to provide content to a consuming client.
This wrapper is functioning as a client calling NXT's HTTP-interface, so I am not sure in what way I would be using Web API. Maybe I'm missing something, if so feel free to explain further.
Logged
Check out the NxtLib, the .NET Framework API for the Nxt platform.

Hagbard

  • Newbie
  • *
  • Karma: +0/-0
  • Offline Offline
  • Posts: 2
    • View Profile
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #22 on: September 30, 2015, 02:25:47 pm »

Hi,

is there a update planned for the NRS Version 1.5.15 or 1.6.0 (e)?

I would be grateful.  ;D

Hello,

Thanks for your feedback!
I have been planning on this for weeks, currently IRL is eating up all my available time and energy.

Whenever I do have some spare time I do some work in the master branch of the github repo, if you need something particular you can have a look there. But I cannot give any date on when I will have a new version out.
I am currently targeting 1.6.0e.

Hi NxtSwe,

thanks for your fast feedback. I'll wait...

btw: You did a great job!
Logged

artik123

  • Jr. Member
  • **
  • Karma: +5/-0
  • Offline Offline
  • Posts: 51
    • View Profile
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #23 on: October 01, 2015, 11:15:25 am »

Hi NxtSwe,

Just saw it for the first time... Great job you did there! (very professional coding).

But I have one question:

Why didn't you use Web API?

It has a built-in json serializer/deserializer, it considered best practice today, also fully integrated with REST, and easy to consume and work with.

Hi and thanx!

Web API is, to my knowledge, used on the server side, to provide content to a consuming client.
This wrapper is functioning as a client calling NXT's HTTP-interface, so I am not sure in what way I would be using Web API. Maybe I'm missing something, if so feel free to explain further.

Yes, it’s true. It is used on the server side.

But at the moment, when I use NRS, my PC is both used as a client and as a server.
The server is running in the background 24/7(forging) and I use the client (Wesley's GUI) whenever needed.
(btw, self-hosting is done very easily with Web API).

Besides that, with Web API -
1. Responses to the client can be handled at the HTTP level (404 – resource not found, 401 unauthorized etc…).
2. Client will probably be on the same computer but it doesn’t have to.
3. There will probably be one client, but the server can support multiple clients.
4. Client could also be on a non .Net machine.
5. Versioning can be done also at the HTTP level, without polluting the data.
    (For instance, you might want to support different NRS versions at the same time.)
6. Easiness – Client just sees beforehand the REST calls that he can make and have a documentations explaining what each one does. (Some of it is a built in functionality in Web API)
7. Encapsulation - Web API interfacing the server and doesn’t expose unneeded classes to the client, not more than needed. Client doesn’t have to know anything more than needed about your server.
8. Flexibility – Client & Server are disconnected from each other. Helps also to prevent code merging/collisions between client developer/s and server developer/s.
9. Testing of the server could be done very easily that way, using PostMan, Fiddler or browser debugger.
10. Web API provides media-type formatters for both JSON and XML (built in).


I personally used it with excellent results using AngularJS as a client.
« Last Edit: October 01, 2015, 11:13:55 pm by artik123 »
Logged

NxtSwe

  • Hero Member
  • *****
  • Karma: +124/-9
  • Offline Offline
  • Posts: 657
    • View Profile
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #24 on: October 02, 2015, 07:08:00 am »

Hi NxtSwe,

Just saw it for the first time... Great job you did there! (very professional coding).

But I have one question:

Why didn't you use Web API?

It has a built-in json serializer/deserializer, it considered best practice today, also fully integrated with REST, and easy to consume and work with.

Hi and thanx!

Web API is, to my knowledge, used on the server side, to provide content to a consuming client.
This wrapper is functioning as a client calling NXT's HTTP-interface, so I am not sure in what way I would be using Web API. Maybe I'm missing something, if so feel free to explain further.

Yes, it’s true. It is used on the server side.

But at the moment, when I use NRS, my PC is both used as a client and as a server.
The server is running in the background 24/7(forging) and I use the client (Wesley's GUI) whenever needed.
(btw, self-hosting is done very easily with Web API).

Besides that, with Web API -
1. Responses to the client can be handled at the HTTP level (404 – resource not found, 401 unauthorized etc…).
2. Client will probably be on the same computer but it doesn’t have to.
3. There will probably be one client, but the server can support multiple clients.
4. Client could also be on a non .Net machine.
5. Versioning can be done also at the HTTP level, without polluting the data.
    (For instance, you might want to support different NRS versions at the same time.)
6. Easiness – Client just sees beforehand the REST calls that he can make and have a documentations explaining what each one does. (Some of it is a built in functionality in Web API)
7. Encapsulation - Web API interfacing the server and doesn’t expose unneeded classes to the client, not more than needed. Client doesn’t have to know anything more than needed about your server.
8. Flexibility – Client & Server are disconnected from each other. Helps also to prevent code merging/collisions between client developer/s and server developer/s.
9. Testing of the server could be done very easily that way, using PostMan, Fiddler or browser debugger.
10. Web API provides media-type formatters for both JSON and XML (built in).


I personally used it with excellent results using AngularJS as a client.

Hi,
Thank you for your feedback!
So, in essence this would be your setup:
  • You have the NRS running as a separate application, providing a HTTP API.
  • Then you would host a Web API, providing a Restful HTTP API, which is acting as a layer between NRS and the end client.
  • Then you would have your client(s) call the Web API.

I do see some benefints in your points above, for example responses on http level and supporting multiple NRS versions at once. Especially the last one, since I've heard a people complaining about maintaining their NRS applications with constantly changing API. However there are drawbacks as well, the most obvious one being you need to host your Web API somewhere, you can't just create an .NET application that calls the NRS directly.

Anyway, your point is taken. However it will not be implemented by me in any time soon I'm afraid.
You are very welcome to do it yourself, and if you want to use the NxtLib code in some way, go ahead, it's free for everyone to use in any way they please (even sell it).
Logged
Check out the NxtLib, the .NET Framework API for the Nxt platform.

NxtSwe

  • Hero Member
  • *****
  • Karma: +124/-9
  • Offline Offline
  • Posts: 657
    • View Profile
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #25 on: October 09, 2015, 01:53:08 pm »

New version out 1.1.4.
Supports latest (experimental) version 1.6.1e.

Looooooooooots of changes were made between 1.5.9 and 1.6 (damn productive NXT core devs!), so I'm sure upgrading will break your existing application.
I will do my best to keep this up to date from now on.

Please let me know if there's any bugs or problems.
Logged
Check out the NxtLib, the .NET Framework API for the Nxt platform.

NxtSwe

  • Hero Member
  • *****
  • Karma: +124/-9
  • Offline Offline
  • Posts: 657
    • View Profile
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #26 on: October 24, 2015, 09:16:39 pm »

New version out, 1.1.5

Still supporting NRS version 1.6.1e

Major change in this release is that it now supports .NET Platform 5.0, in addition to .NET Framework 4.5.
.NET Platform 5.0 is needed to develop Windows 10 Universal Apps (Win 10 Desktop/Tablet/Phone/Iot, Xbox, Surface).
In addition to that:

- Updated code to be using C# 6.0 features
- Now using Visual Studio 2015 project (xproj/project.json instead of csproj)
- Amount now implements IComparable
- Updated to latest Newtonsoft.Json (v7.0.1)
- Added PostData to BaseReply, for a ... happier debug experience

https://github.com/libertyswede/NxtLib/releases/tag/v1.1.5
« Last Edit: October 24, 2015, 09:19:04 pm by NxtSwe »
Logged
Check out the NxtLib, the .NET Framework API for the Nxt platform.

NxtSwe

  • Hero Member
  • *****
  • Karma: +124/-9
  • Offline Offline
  • Posts: 657
    • View Profile
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #27 on: November 06, 2015, 10:53:16 am »

New version out, 1.1.6 with support of NRS version 1.6.2

The big news in this release is that you can now sign transactions, encrypt, decrypt, comress/decompress messages without ever having to have your secret phrase leave your local process. This means you can develop applications that use public nodes, without having to trust them with your secret phrase, and you can do everything the NXT api has to offer. Everything except forging that is, as that requires you to send the secret phrase over to the running NRS application.

Major changes
  • Added local message encryption and decryption. This means that you can now encrypt, decrypt, compress, decompress messages and sign a transaction without the secret phrase ever leaving your process. Everything is fully compatible with NXT encrypted messages.
  • Updated api to reflect changes in NRS 1.6.2.
  • Added Account class, that is being used in all API's. Accepts both unsigned long account id or account rs as string.
  • Makeover of the send message functionality to be more streamlined and look alike LocalCrypto encryption functions.

Minor changes
  • BinaryHexString now implements IEquatable.
  • Added implicit conversion from string or byte array to BinaryHexString.
  • Added implicit conversion to GetTransactionLocator, CurrencyLocator and AliasLocator.
  • Changed the exception to InvalidReedSolomonAddressException if conversion from/to RS address fails.
  • Large internal refactoring and restructuring to make maintenance less time consuming.
  • Added sample command line program LocalEncryptAndSignMessage.
  • Bugfixes.
Logged
Check out the NxtLib, the .NET Framework API for the Nxt platform.

yassin54

  • Hero Member
  • *****
  • Karma: +240/-14
  • Offline Offline
  • Posts: 2503
  • I am Homer, Sorry my english is Bad!!
    • View Profile

NxtSwe

  • Hero Member
  • *****
  • Karma: +124/-9
  • Offline Offline
  • Posts: 657
    • View Profile
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #29 on: November 06, 2015, 11:11:27 am »

Tweeted!! https://twitter.com/MagicNxt/status/662586611675348992 ;)
Thanx!
Does this mean I [finally] have to create a twitter acc? :P
Logged
Check out the NxtLib, the .NET Framework API for the Nxt platform.

yassin54

  • Hero Member
  • *****
  • Karma: +240/-14
  • Offline Offline
  • Posts: 2503
  • I am Homer, Sorry my english is Bad!!
    • View Profile
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #30 on: November 06, 2015, 11:14:15 am »

Tweeted!! https://twitter.com/MagicNxt/status/662586611675348992 ;)
Thanx!
Does this mean I [finally] have to create a twitter acc? :P
You are welcome!!  ;D
I follow you and tweeted yur tweet!!  8) 8)
« Last Edit: November 06, 2015, 11:17:23 am by yassin54 »
Logged

EvilDave

  • Hero Member
  • *****
  • Karma: +341/-40
  • Offline Offline
  • Posts: 1789
    • View Profile
    • NXT Foundation
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #31 on: November 06, 2015, 02:14:32 pm »

Tweeted!! https://twitter.com/MagicNxt/status/662586611675348992 ;)
Thanx!
Does this mean I [finally] have to create a twitter acc? :P

Yep...
and I just re-tweeted it, so get tweeting !
Logged
Nulli Dei, nulli Reges, solum NXT
NXT Donations: NXT-BNZB-9V8M-XRPW-3S3WD
We will ride eternal, shiny and chrome!

NxtSwe

  • Hero Member
  • *****
  • Karma: +124/-9
  • Offline Offline
  • Posts: 657
    • View Profile
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #32 on: November 16, 2015, 11:17:27 am »

New version out, 1.1.8 still supporting NRS version 1.6.2

No major changes.

Changes
  • Generate Token (missing feature in previous release)
  • Decode Token (missing feature in previous release)
  • Added Password Generator, with support for variable bit strength (128 is default). The same logic and dictionary as NRS is being used.
  • Refactoring in NxtLib.Local namespace, splitting LocalCrypto into several classes to separate their logic.
  • Various bug fixes and code clean ups.

https://github.com/libertyswede/NxtLib/releases/tag/v1.1.8
https://www.nuget.org/packages/NxtLib/
« Last Edit: November 16, 2015, 11:42:34 am by NxtSwe »
Logged
Check out the NxtLib, the .NET Framework API for the Nxt platform.

yassin54

  • Hero Member
  • *****
  • Karma: +240/-14
  • Offline Offline
  • Posts: 2503
  • I am Homer, Sorry my english is Bad!!
    • View Profile
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #33 on: November 16, 2015, 11:40:10 am »

Tweeted!  ;D

NxtSwe

  • Hero Member
  • *****
  • Karma: +124/-9
  • Offline Offline
  • Posts: 657
    • View Profile
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #34 on: November 16, 2015, 11:49:37 am »

Tweeted!  ;D
Damn you're fast.
Have you got possibility to update the version number in your tweet?
I updated my post above to say v1.1.8 instead, since I had to do an emergency release due to sending out the wrong dll in 1.1.7.
So v1.1.7 should not be used.
Logged
Check out the NxtLib, the .NET Framework API for the Nxt platform.

yassin54

  • Hero Member
  • *****
  • Karma: +240/-14
  • Offline Offline
  • Posts: 2503
  • I am Homer, Sorry my english is Bad!!
    • View Profile
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #35 on: November 16, 2015, 12:27:27 pm »

Have you got possibility to update the version number in your tweet?
sorry i can not update my tweet  :-\
i think it is not problem
I will be slower  :D
Sorry again.

NxtSwe

  • Hero Member
  • *****
  • Karma: +124/-9
  • Offline Offline
  • Posts: 657
    • View Profile
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #36 on: November 27, 2015, 01:05:56 pm »

New version out, 1.1.9.
Added support for .NET Framework 4.0 in addition to already existing support for .NET Framework 4.5 and .NET Platform 5.0.

https://www.nuget.org/packages/NxtLib/
https://github.com/libertyswede/NxtLib/releases/tag/v1.1.9
Logged
Check out the NxtLib, the .NET Framework API for the Nxt platform.

yassin54

  • Hero Member
  • *****
  • Karma: +240/-14
  • Offline Offline
  • Posts: 2503
  • I am Homer, Sorry my english is Bad!!
    • View Profile
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #37 on: November 27, 2015, 02:52:57 pm »

OutSL

  • Sr. Member
  • ****
  • Karma: +60/-0
  • Offline Offline
  • Posts: 332
  • Banned!
    • View Profile
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #38 on: November 27, 2015, 07:02:27 pm »

New version out, 1.1.9.
Added support for .NET Framework 4.0 in addition to already existing support for .NET Framework 4.5 and .NET Platform 5.0.

https://www.nuget.org/packages/NxtLib/
https://github.com/libertyswede/NxtLib/releases/tag/v1.1.9

Thank you for this sublime work  :D
currently used to attempt an implementation of NXT in virtual worlds based on OpenSimulator.org software

thank's again & @++
Logged
Thank you for your financial help, your donations will be used in the R&D related to the implementation of NXT in the virtual worlds running under OpenSimulator.org | Donations Box : NXT-PC8Q-ZW86-7UYK-CC4XJ
Visit The NXT Community Virtal World! Your NXT 3D Chat Service

NxtSwe

  • Hero Member
  • *****
  • Karma: +124/-9
  • Offline Offline
  • Posts: 657
    • View Profile
Re: NxtLib - a typed .NET API wrapper for NXT
« Reply #39 on: April 08, 2016, 07:33:16 pm »

New version out, 1.1.12.

- Added support for new and updated API functions, now supporting NRS 1.8.1
- Added support for GetSharedKey to LocalMessageService

https://www.nuget.org/packages/NxtLib/
https://github.com/libertyswede/NxtLib/releases/tag/v1.1.12
Logged
Check out the NxtLib, the .NET Framework API for the Nxt platform.
Pages: 1 [2] 3  All
 

elective-stereophonic
elective-stereophonic
assembly
assembly