elective-stereophonic
elective-stereophonic
sign transaction with PHP
Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest Stable Nxt Client: Nxt 1.12.2

Author Topic: sign transaction with PHP  (Read 1808 times)

xchrix

  • Guest
sign transaction with PHP
« on: November 25, 2014, 01:55:11 pm »

is there a php library for signing transactions local with PHP?

when i use the sendMoney api without the secretPhrase i get unsigned transaction bytes. then i have to sign it with my secretPhrase and broadcast the transaction with the broadcastTransaction API call. this is how myNXT wallet is doing it and its the right way i guess. they used a javascript library for signing the bytes. unfortunately i dont know how todo this in PHP and havent found anything. anybody here already done this?

i will help to create a little library. PHP is mostly used on servers so its a good idea to have a NXT library with the most needed functions.
Logged

Tosch110

  • Hero Member
  • *****
  • Karma: +211/-18
  • Offline Offline
  • Posts: 2365
    • View Profile
Re: sign transaction with PHP
« Reply #1 on: November 25, 2014, 02:07:32 pm »

Maybe this helps you already, I have put some snippets to use the DGS with PHP:

https://nxtforum.org/nxtpeers/dgs-php-codesnippets/

In the API documentation you find the signTransaction and broadcastTransaction API:

http://localhost:7876/test?requestTag=TRANSACTIONS

xchrix

  • Guest
Re: sign transaction with PHP
« Reply #2 on: November 25, 2014, 04:16:31 pm »

tosch unfortunately i am not able to find anything i need in your snippets. you are sending the secretPhrase to the API of the NXT daemon. i dont want to do this. i get back an unsigned transaction and want to sign in locally with my secretphrase. so the NXT daemon (could be a public node) doesnt get my secrtePhrase but it gets the signed transaction to broadcast it. this is working. i just need to know HOW to sign the unsigned transaction with PHP. there is wokring code in javascript but its hard to convert javascript code into PHP
Logged

xchrix

  • Guest
Re: sign transaction with PHP
« Reply #3 on: February 17, 2016, 10:05:22 pm »

just as reference to a good way for implementing this with PHP discussing it here
https://nxtforum.org/api-discussion/local-tx-signing-short-manual-%28python%29/msg209782/#msg209782
Logged
 

elective-stereophonic
elective-stereophonic
assembly
assembly