Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 02 2018 16:07
    NishidaRyu416 closed #5
  • Mar 02 2018 16:07
    NishidaRyu416 commented #5
  • Jan 01 2018 02:09

    44uk on feature-multi-node

    refactor and create connection … __wip (compare)

  • Jan 01 2018 02:08

    44uk on feature-private-apostille

    add private apostille WIP: private audit (compare)

  • Jan 01 2018 02:07

    44uk on master

    add docs Merge branch 'docs' into develo… Merge branch 'development' (compare)

  • Jan 01 2018 02:07

    44uk on development

    add docs Merge branch 'docs' into develo… (compare)

  • Jan 01 2018 02:02

    44uk on feature-private-apostille

    (compare)

  • Jan 01 2018 02:01

    44uk on feature-private-apostille

    update readme Merge branch 'development' into… (compare)

  • Jan 01 2018 02:01

    44uk on development

    update readme (compare)

  • Jan 01 2018 02:00

    44uk on master

    add ruby 2.5 test for travis Merge branch 'travis-ruby-25' i… update readme and 1 more (compare)

  • Jan 01 2018 02:00

    44uk on travis-ruby-25

    (compare)

  • Dec 27 2017 10:23

    44uk on feature-private-apostille

    add private apostille WIP: private audit (compare)

  • Dec 27 2017 02:13

    44uk on development

    add ruby 2.5 test for travis Merge branch 'travis-ruby-25' i… (compare)

  • Dec 26 2017 23:34

    44uk on feature-private-apostille

    __wip __wip something wrong with kp.s… __wip and 1 more (compare)

  • Dec 26 2017 10:18

    44uk on travis-ruby-25

    add ruby 2.5 test for travis (compare)

  • Dec 25 2017 14:24

    44uk on fixing

    (compare)

  • Dec 25 2017 13:30

    44uk on v0.0.19

    (compare)

  • Dec 25 2017 13:17

    44uk on development

    update version 0.0.19 (compare)

  • Dec 25 2017 13:16

    44uk on master

    support /mosaic/supply endpoint Merge branch 'feature-mosaic-su… add page_size parameter to /acc… and 20 more (compare)

  • Dec 25 2017 13:12

    44uk on development

    add example mosaic/supply change node in examples Merge branch 'update-examples' … (compare)

Yoshiyuki Ieyama
@44uk
Time.now -> Time.now.utc
HaoCHEN3
@HaoCHEN3
2.png
I used this before and got the time failure error.
Yoshiyuki Ieyama
@44uk
# monkey patch
module Nis::Util
  def self.timestamp
    (Time.now.utc - NEM_EPOCH).to_i
  end
end
HaoCHEN3
@HaoCHEN3
and I got the solution from nem.
Yoshiyuki Ieyama
@44uk
Thank you for your advice. I will check later and fix this issue.
HaoCHEN3
@HaoCHEN3
I am not sure, my guess is that my nis time is not correct and cannot get the correct timestamp.
Yoshiyuki Ieyama
@44uk
and which timezone you are using?
HaoCHEN3
@HaoCHEN3
Time zone: Australia/Melbourne (AEST, +1000)
Yoshiyuki Ieyama
@44uk
OK, Thank you for information.
HaoCHEN3
@HaoCHEN3
BTW, nis-ruby is only for testnet?
Yoshiyuki Ieyama
@44uk
Not recommended for production yet. because of lack of testing, contain some bugs.
HaoCHEN3
@HaoCHEN3
cool. got it.
Yoshiyuki Ieyama
@44uk
I will create more transaction test scripts, fix bugs, do more refactoring. if you have trouble, feel free to ask me!
HaoCHEN3
@HaoCHEN3
yup, I would like to help do some testing. thanks.
Yoshiyuki Ieyama
@44uk
and I hope your product goes well :smile:
HaoCHEN3
@HaoCHEN3
thanks very much, actually, now I used prepare-announce to create and broadcast tx. it is a little unsafe so I am trying to refer your code about creating tx locally and broadcast later..
could you please share some info to create a tx and sign it when using /transfers/announce if you would like. (like ED25519 implementation)
Yoshiyuki Ieyama
@44uk
I referred to https://github.com/NemProject/nem-py and rewrited by ruby -> https://github.com/44uk/nem-rb
nis-ruby is based on it.
Yoshiyuki Ieyama
@44uk

@HaoCHEN3

I have commited debug output to development branch. If you please, try this.

# install development branch version
gem install specific_install
gem specific_install https://github.com/44uk/nis-ruby.git development

and

require 'rubygems'
require 'nis'
require 'json'

Nis.logger.level = Logger::DEBUG # enable debug output

SENDER_PRIV_KEY = "4ce5c8f9fce571db0d9ac1adf00b8d3ba0f078ed40835fd3d730a2f24b834214"
RECIPIENT_ADDRESS = "TA4TX6U5HG2MROAESH2JE5524T4ZOY2EQKQ6ELHF"

kp = Nis::Keypair.new(SENDER_PRIV_KEY)

tx = Nis::Transaction::Transfer.new(RECIPIENT_ADDRESS, 1, 'Good luck!')
nis = Nis.new(host: '54.79.36.199')
req = Nis::Request::Announce.new(tx, kp)
res = nis.transaction_announce(req)

then you can get request info. Paste it here.

Yoshiyuki Ieyama
@44uk
If someone who has trouble wit FAILURE_TIMESTAMP_TOO_FAR_IN_FUTURE, please try it and paste output here.
HaoCHEN3
@HaoCHEN3
yo man, I just reveiced the msg, I will try it later.
Yoshiyuki Ieyama
@44uk
v0.0.17 has been released. Add log output, add transaction/get endpoint, some cosmetic changes, remove cli support.
cli support move to nis-cli https://rubygems.org/gems/nis-cli.
Yoshiyuki Ieyama
@44uk
https://44uk.github.io/nis-ruby/ I'm writing more detail of nis-ruby.
Yoshiyuki Ieyama
@44uk
Version 0.0.18 is pushed into master branch. it supports create/audit public Apostille. see https://44uk.github.io/nis-ruby/examples/apostille/. I will release gem later.
Yoshiyuki Ieyama
@44uk
I have pushed version 0.0.18 to rubygems.
Yoshiyuki Ieyama
@44uk
I have released version 0.0.18.1. Resolved the security problem for https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8418
Kris
@ksteigerwald
Hello, thank you for this gem. Very helpful and easy to use.
I do have a bit of a hang up and was wondering if anyone could help shed some light.
When attempting to update a mosaic definition, i get the following error:
remote 172.27.0.2 attempted to call local /transaction/prepare-announce (Nis::Error)
Kris
@ksteigerwald
looks like an RPC issue, but i'm a bit at a lost where to make a correction.
here is gist of the test script I am working with:
Please help
Yoshiyuki Ieyama
@44uk
@ksteigerwald Hi, I'm sorry for the delay in replying you. Please use nis.transaction_announce(req). nis.transaction_prepare_announce method is for local node.
Line. 74
Kris
@ksteigerwald
Thanks!
After some trial/error i have a response
still fails with FAILURE_INSUFFICIENT_FEE
but i think i can just adjust that ;)
Yoshiyuki Ieyama
@44uk
Good. that error just a lack of balance. easy to resolve, just add xem to the address.
Kris
@ksteigerwald
cool, that was my next step ;)
Yoshiyuki Ieyama
@44uk
:+1:
Yoshiyuki Ieyama
@44uk
if someone met FAILURE_TIMESTAMP_TOO_FAR_IN_FUTURE, please try to request to other node.
Yoshiyuki Ieyama
@44uk
or check your computer clock. If still no good, minus some seconds timestamp
https://github.com/44uk/nis-ruby/blob/master/lib/nis/util.rb#L38
Yoshiyuki Ieyama
@44uk
Hi, I refactor this gem and create new wrapper nem-ruby https://github.com/44uk/nem-ruby
Yoshiyuki Ieyama
@44uk
Please use nem-ruby. Discontinue the development of this gem.
Yoshiyuki Ieyama
@44uk
If someone met the problem, please use development branch gem or simply require 'forwardable'.