Logged Conversation (all times UTC)
[02:31] <stellar-slack> any links to cross border transactions?
[02:32] <stellar-slack> Like if I have to set up from the scratch, how the set up would look like?
[02:37] <sacarlson> like usd > eur ?
[07:28] <stellar-slack> sacarlson, yes
[07:36] <sacarlson> so you would have to have two accounts with the oposite currency ballances a has 10usd b has 10eur do have that?
[07:36] <sacarlson> on an issuer they both have as trusted
[07:37] <sacarlson> they would both setup orders to the oposite that would cross in price say even trade 10usd for 10eur to make it easy
[07:39] <sacarlson> that's about it then A would have his eur and B would have his USD
[07:40] <sacarlson> before you setup the orders they could have looked at the order book to see what bids are being asked to know what to set there order value to
[09:06] <stellar-slack> like USD to EUR
[09:07] <stellar-slack> So
[09:07] <stellar-slack> Let us say
[09:08] <stellar-slack> I have one account-A
[09:08] <stellar-slack> and that has 100 dollars
[09:08] <stellar-slack> and another account-B
[09:08] <stellar-slack> and that account has 100 EUR
[09:09] <stellar-slack> now all i want is transfer 10 dollars from A to B
[09:09] <stellar-slack> the result would leave A with 90 dollars
[09:10] <stellar-slack> the result with leave B with 109 EUR (aster conversion)
[09:10] <stellar-slack> question is
[09:10] <stellar-slack> how do I do this with a trusted entity such as an isuer
[09:11] <stellar-slack> Let us say I have an issuer-C who both A & B trust
[09:11] <stellar-slack> so A sends to Issuer who in turn sends this to B
[10:28] <stellar-slack> @sacarlson @ lukeburns you can read about multisig here: https://github.com/stellar/stellar-core/blob/master/src/transactions/readme.md and here are the JS examples: https://github.com/stellar/js-stellar-lib/tree/master/docs#creating-a-multi-signature-account
[10:54] <sacarlson> meetreks no you don't send the issuer anything. the issuer is the one that sent you the original credit
[10:55] <stellar-slack> The issuer - -is it with respect to the sender or the receiver
[10:55] <sacarlson> example I setup the other day from_pair is the issuer the to_pair is you https://github.com/sacarlson/pokerth_accounting/blob/master/send_currency.rb
[10:56] <stellar-slack> OK
[10:56] <stellar-slack> so you send the fund_pair to the issuer and I get the funds from the issuer
[10:57] <sacarlson> the to_pair when he has the credit from the issuer in this example from_pair he can now send or setup orders with that credit to your B
[10:57] <sacarlson> no
[10:57] <sacarlson> from_pair IS the issuer
[10:58] <stellar-slack> OK, got it
[10:58] <stellar-slack> just to reiterate
[10:58] <stellar-slack> I am am sending a payment from my account to someones account
[10:58] <stellar-slack> I first ask stellar the path
[10:58] <stellar-slack> stellar returns the bets path
[10:59] <stellar-slack> so I use the best path info
[10:59] <stellar-slack> and from there who ever is my trusted entity
[10:59] <stellar-slack> I initiate a payment from myself to the other party
[10:59] <sacarlson> here is an example of sending native STR https://github.com/sacarlson/pokerth_accounting/blob/master/send_stellar.rb
[11:00] <stellar-slack> can you validate the above sequence for me
[11:02] <sacarlson> the path is only going to calculate the present price from the issuer you have chosen
[11:02] <sacarlson> you can look at the books before you setup an order to decide what to ask or bid
[11:04] <sacarlson> you then setup the order with the chosen issuer, if price of your bid is crossed your order will exicute
[11:04] <stellar-slack> OK
[11:04] <stellar-slack> I prefer to get the path before I issue the order
[11:04] <sacarlson> path just provides you a look at the price
[11:05] <sacarlson> maybe the path your thinking of is chosing a differenc issurer
[11:05] <sacarlson> different
[11:06] <sacarlson> the value of an asset from one issuer may not be the same price of the same thing from another issuer
[11:09] <sacarlson> and thanks bartek I'll take a look at those links you sent us
[11:22] <stellar-slack> Yes I am aware
[11:22] <stellar-slack> but if the liquidity players are there in the market
[11:22] <stellar-slack> I must get a better rate by calling path
[11:26] <sacarlson> why don't you just setup two accounts with the script I sent you and setup trades between them to try it out
[11:28] <sacarlson> I think you will find that path provides you that same info that looking at the booked orders only in a single value depending on how many orders it has to buy to get the volume needed
[11:29] <sacarlson> when you look at the results I think you will get the idea
[11:30] <sacarlson> or you could prove me wrong
[11:30] <stellar-slack> Can you let me know how to execute your scripts
[11:30] <stellar-slack> I use Node JS for mine
[11:30] <sacarlson> it's ruby
[11:30] <stellar-slack> so I go to ruby and execute that code?
[11:30] <sacarlson> do you run on linux?
[11:31] <stellar-slack> NO
[11:31] <stellar-slack> Windows
[11:31] <sacarlson> then I'm not sure, my code was developed on linux. ruby is cross platform but I've never run my code on windows
[11:32] <stellar-slack> let me try ruby
[11:32] <stellar-slack> you might have to guide me
[11:33] <sacarlson> sure I would love to know if my code runs on windows since at some point I do plan to port it
[11:34] <stellar-slack> OK
[11:34] <stellar-slack> I am in ruby
[11:34] <stellar-slack> what next
[11:34] <sacarlson> then you will want to download my git
[11:35] <sacarlson> https://github.com/sacarlson/pokerth_accounting
[11:35] <stellar-slack> like npm install and the link?
[11:35] <sacarlson> there is a download botton https://github.com/sacarlson/pokerth_accounting/archive/master.zip
[11:36] <sacarlson> after you have the files uncompressed in a directory you will need to install some gem stuf
[11:36] <stellar-slack> I have gems already
[11:36] <sacarlson> that's the part I'm unsure of in windows
[11:36] <sacarlson> oh ok
[11:37] <stellar-slack> how do I run?
[11:37] <sacarlson> so how would you get sqlite3 ruby-sqlite3 support?
[11:38] <sacarlson> on linux we just sudo apt-get install ruby-full sqlite3 ruby-sqlite3
[11:39] <stellar-slack> I have everything sacarlson
[11:39] <stellar-slack> I now have your files uncompressed
[11:39] <sacarlson> oh then gem install rest-client
[11:39] <sacarlson> gem install json
[11:39] <stellar-slack> I have Json
[11:40] <stellar-slack> I have rest-client as well
[11:40] <sacarlson> ok
[11:40] <sacarlson> so we need to create some accounts
[11:40] <stellar-slack> right
[11:40] <stellar-slack> how do we do that?
[11:41] <stellar-slack> use Stellar BOT itself
[11:41] <sacarlson> well I guess if all the parts are installed you could just cd to the directory and run pokerth_accounting.rb
[11:41] <sacarlson> that would auto create an account
[11:42] <sacarlson> my software in theory would also fund the account for you
[11:42] <stellar-slack> ok
[11:42] <stellar-slack> let me try
[11:42] <stellar-slack> just for saftey i tried json
[11:42] <stellar-slack> it is taking a while
[11:43] <stellar-slack> ok done
[11:43] <sacarlson> you will also want a sqlite browser do they have one on windows?
[11:43] <stellar-slack> Yes :)
[11:44] <sacarlson> well I don't see account number sent to http://poker.surething.biz/ so something didn't work
[11:45] <stellar-slack> Well
[11:45] <stellar-slack> I ran it
[11:45] <stellar-slack> it asked me to open your rb fil
[11:45] <sacarlson> so any output on the console?
[11:45] <stellar-slack> i chose IE
[11:45] <stellar-slack> and i just gives me the full source code
[11:45] <stellar-slack> nope
[11:45] <stellar-slack> nothing on th console
[11:46] <sacarlson> I would assume in a console you would type ruby ./pokerth_accounting.rb to get the interpreter to run it
[11:47] <stellar-slack> in windows
[11:47] <stellar-slack> it is ruby pokerth_accounting.rb
[11:47] <sacarlson> in your command window
[11:48] <stellar-slack> yes
[11:48] <stellar-slack> now getting proper error
[11:48] <sacarlson> you should see errors output if you don't have the gems installed
[11:48] <stellar-slack> I have gems
[11:48] <sacarlson> errors being what?
[11:49] <stellar-slack> 'require' cannot load such file -- sys/proctable
[11:49] <sacarlson> gem install rest-client
[11:49] <stellar-slack> I did
[11:50] <stellar-slack> and it sucessfully installed
[11:50] <sacarlson> ok we can comment out the sys/proctable we won't need it for what you want
[11:50] <sacarlson> oh maybe we can install that too?
[11:51] <stellar-slack> how
[11:51] <stellar-slack> gem install ??
[11:51] <sacarlson> gem install sys-proctable
[11:52] <stellar-slack> ok got it
[11:52] <sacarlson> ok
[11:52] <stellar-slack> now
[11:53] <sacarlson> ruby ./pokerth_accounting.rb and see what other error we see
[11:53] <stellar-slack> modir: no such file or directory
[11:53] <stellar-slack> C:/userrs/user2/ ...
[11:53] <stellar-slack> ENOENT
[11:54] <sacarlson> oh these paths won't work in windows ~/.pokerth/log-files/
[11:55] <stellar-slack> so what whould I remove?
[11:55] <sacarlson> so I would have to change them to something windows would use
[11:55] <sacarlson> what was this C:/userrs/user2/ ?
[11:56] <sacarlson> was that in the error ?
[11:56] <stellar-slack> Yes
[11:56] <stellar-slack> Guess
[11:56] <stellar-slack> it is trying to log it in windows defautl
[11:56] <sacarlson> so do those dir exist?
[11:57] <sacarlson> I guess at this point you will have to pick a directory maybe a subdir of where you uncompressed it
[11:58] <sacarlson> that you would have to create then modify the lines 12 and 13 to point at them
[12:00] <sacarlson> another option is run everything on linux mint in a virtualbox running on your windows
[12:01] <stellar-slack> guess gem install sqllite3
[12:01] <stellar-slack> I changed the logs path
[12:01] <stellar-slack> now I get SQL exception :)
[12:01] <sacarlson> what line is that pointing at?
[12:02] <sacarlson> you did install sqlite3?
[12:02] <stellar-slack> just giving this now...to be usre
[12:03] <stellar-slack> gem install sqlite3
[12:03] <sacarlson> yes you will need that
[12:03] <stellar-slack> very quickly it has done that
[12:03] <stellar-slack> again
[12:03] <stellar-slack> OK
[12:03] <stellar-slack> I get these things
[12:04] <stellar-slack> last log filename = accountlog.pdb
[12:04] <stellar-slack> got here not exist
[12:04] <stellar-slack> Exception occured in configs
[12:04] <stellar-slack> no such table : Player
[12:05] <stellar-slack> Guess it is an SQL exception
[12:05] <stellar-slack> looking for table Player
[12:05] <stellar-slack> but cant find the schema
[12:06] <sacarlson> if it didn't exist it was supposed to create it
[12:07] <stellar-slack> Hmm
[12:07] <sacarlson> oh at this point it is looking for log files generated by pokerth
[12:08] <stellar-slack> Yes
[12:08] <stellar-slack> any suggestions
[12:08] <sacarlson> well for the full package you could install pokerth there is a windows version but..
[12:09] <sacarlson> you just want the tools so maybe they will already work
[12:09] <stellar-slack> OK
[12:10] <stellar-slack> send me that
[12:10] <sacarlson> try run ruby check_account.rb
[12:10] <stellar-slack> ok
[12:10] <sacarlson> I think we won't need it for what you want
[12:10] <sacarlson> we will just use the payment class at this point
[12:11] <stellar-slack> That is running fine
[12:11] <sacarlson> cool
[12:11] <stellar-slack> I use nodejs
[12:11] <sacarlson> so all we really need is an account number set then or 2
[12:11] <stellar-slack> this rubs is so diffent
[12:11] <stellar-slack> what is this ruby by the way?
[12:12] <sacarlson> ruby it's just an interpreted object oriented language
[12:12] <sacarlson> I prefer it's simplicity
[12:12] <stellar-slack> does the same as node JS
[12:12] <stellar-slack> node JS is also simple
[12:13] <stellar-slack> can you send me a link to learn ruby?
[12:13] <sacarlson> I guess they are all simple if you know them
[12:13] <stellar-slack> :)
[12:13] <stellar-slack> Yes
[12:13] <sacarlson> the example code is the best
[12:13] <stellar-slack> OK
[12:13] <stellar-slack> will try and follow it
[12:14] <stellar-slack> so now what is the step?
[12:14] <sacarlson> so all we would have to do to get send_currency.rb to create your accounts would be to add your accounts numbers in the code
[12:15] <stellar-slack> which code sacarlson
[12:15] <stellar-slack> send_currency.rb?
[12:15] <sacarlson> change the #from_pair = {"account"=>"gLan...","secret"=>"s3zD..."} and #to_pair = {"account"=>"gKzt...","secret"=>"sfyq..."}
[12:15] <sacarlson> to your accounts
[12:16] <sacarlson> yes that's what creates accounts with trust
[12:17] <sacarlson> run it two times with a different to_pair the secound time and you will have two accounts with all the currencys
[12:17] <sacarlson> you will also have to take out the # commented lines to enable them again
[12:18] <stellar-slack> OK
[12:18] <stellar-slack> for a start
[12:18] <sacarlson> with those account you can then setup orders between them with your JS or other
[12:19] <stellar-slack> can you share any accounts and keys
[12:19] <sacarlson> don't you have any?
[12:19] <sacarlson> you can get them from the faucet
[12:19] <stellar-slack> link?
[12:20] <sacarlson> https://www.stellar.org/ scroll down to start tutorial
[12:21] <sacarlson> it will generate account pairs and deposit 1000 STR in them for you
[12:22] <stellar-slack> I have
[12:22] <stellar-slack> gpHUkTY9c7qviqSbAkPMm5v9ZyTDho9GAE sf2GCNjmvf5Ng8Dak4bAmuYqYBk9hkZuFqMMQiLYdEf3BRMX1GW
[12:23] <stellar-slack> gBuYT5AQpjw1mEiDBJNJshtV3GyV5A2UKA s3wXzQDc638s3dYrrfJbF1nNQSsUW1JATBinLGb8VjQuaXiay3F
[12:23] <sacarlson> I have a function in my class_payment.rb that creates new accounts with funding but you need one account with funding to create more
[12:23] <sacarlson> ok
[12:23] <stellar-slack> and it has deposited money
[12:23] <sacarlson> yup
[12:24] <stellar-slack> not sure with the syntax
[12:24] <stellar-slack> so
[12:24] <stellar-slack> uncommented
[12:24] <stellar-slack> from_pair = {"account" : "gpHUkTY9c7qviqSbAkPMm5v9ZyTDho9GAE"
[12:24] <stellar-slack> like that
[12:24] <stellar-slack> or any other formats?
[12:25] <sacarlson> from_pair = {"account"=>"gpHUkTY9c7qviqSbAkPMm5v9ZyTDho9GAE", "secret"=>"sf2GCNjmvf5Ng8Dak4bAmuYqYBk9hkZuFqMMQiLYdEf3BRMX1GW"}
[12:26] <sacarlson> put it bellow he YAML
[12:26] <sacarlson> the yaml is used to import the secreet numbers from a sucured file
[12:29] <stellar-slack> guess it went to sleep mode
[12:29] <stellar-slack> guess the function itself worked
[12:29] <stellar-slack> but check balance failed
[12:30] <stellar-slack> shouldnt matter i guess
[12:30] <stellar-slack> let me try with another set of pair
[12:31] <sacarlson> I'm not sure you put the from_pair and to_pair in the correct location . I see that the names are used bellow the Yaml that could be replaced with yours
[12:31] <sacarlson> or I have the numbers what am I thinking I could run them
[12:31] <sacarlson> or = oh
[12:34] <stellar-slack> I did
[12:34] <stellar-slack> Ok
[12:35] <stellar-slack> ran it for 2 different pairs
[12:35] <stellar-slack> what is the next step?
[12:37] <sacarlson> next step check the ballance
[12:37] <sacarlson> I'm also running it on the first set that is sending 10,000 to each currency
[12:38] <stellar-slack> OK
[12:38] <sacarlson> just change the ammount and run it again to get more money
[12:39] <sacarlson> so for your orders and payment transaction you will us the from_pair account as the issure
[12:40] <sacarlson> opps you will need a 3rd set of account numbers
[12:41] <sacarlson> the to_pair will be changed but the from_pair will stay the same
[12:41] <sacarlson> your from_pair will be your primary issuer
[12:51] <sacarlson> I looked at the account ballance of "gBuYT5AQpjw1mEiDBJNJshtV3GyV5A2UKA" and I note that it only has trust set for CHP, seems I failed to put the delay in the first one that makes the others not work
[12:56] <sacarlson> even with the added delay and running it again I still only see AUS, USD, CHP with positive ballances, maybe I need to add delays between the add trust?
[13:09] <sacarlson> after adding a 12 second delay between each add trust it seems to have worked for the rest of the currenies
[13:11] <sacarlson> "gBuYT5AQpjw1mEiDBJNJshtV3GyV5A2UKA" now has all these USD EUR JPN AUS GBP CHP from the issuer "gpHUkTY9c7qviqSbAkPMm5v9ZyTDho9GAE" with minimum 10k each
About StellarVerse IRC Logger
StellarValue IRC Logger
is part of