Developing with CLI Wallet code

I’m looking to use the CLI wallet code to develop something along the lines of an app, or perhaps just some interesting ways to interface with the blockchain to read data. (Mostly for experience initially, but with business users as my focus.)

I’d like to know if others can share some simple ideas they think would be useful, and maybe things to know about developing using the CLI.

I have good enough javascript skills, plus some general other languages, but not an expert by any standard. Though I’ve developed commercial software using other languages so I understand the end to end life cycle and need for continuous improvement and development, security, privacy, maintenance and such.

That said, I would like to hear from the community about how to built something new with the CLI code that would not complete the TWM, but offer some niche use cases.

Some ideas I want to experiment with:
Make a simple basic personal store app that lets you favorite products, watch/alert an item price, quantity, etc.
And hopefully if it ends up being safe enough, others could clone the project. (Not trying for any payment activity yet, just an anonymous product viewer similar to safex.ninja but for a single seller, or maybe even a user can favorites several sellers along with products, etc…)(i guess that’s really more like saved search queries with ability to hide results you don’t want to see again.)

If anyone has any cool use cases they want to share, I’d like to try to make something and share it.

9 Likes

At first glance you can find some lower level access to information directly from a full node using these rpc calls:

Found at the recent documentation, soon will be published on the main repo

examples here:

For the wallet level functionality you can import safex-nodejs-libwallet

This will let you open a wallet keys file and do transactions with javascript, programmatically:

9 Likes

So, I finally got some time to sit and read through all of this and use the API and I was successful in pulling in some blockchain offers header information and locked in tokens. I’ve used Microsoft Access for this so far. (Some may cringe, but I have 20+ years developing in access and can bend it to my will, it’s very extensible)

I think that’s a good start but now I’m really looking forward to doing more and seeing if I can dabble into some of the more advanced features ( create accounts, offers, stake, unstake, send tokens).i hope that’s available to do now. If anyone knows otherwise, let me know.

I’m going to import the wallet library and see what i can do next.

Thank you @dandabek for all those links, they made it easy to get to this point and I hope to be a contributor in the near future.

After I get successful testing I hope to be able to share a template of what I’ve built, it will have some really interesting features.

10 Likes

Thanks @THINKER for sharing your experience up to now, maybe share with us a screenshot if you have of what can be seen from your side :nerd_face:

Probably among the best thread replies so far! :slight_smile:

9 Likes

Brilliant to see someone having a tinker with what is available. Wish I had to knowledge to help or do something productive.

6 Likes

When someone develops a phone app that works it will advance the marketplace 5 years instantly. Can’t wait to see it!

9 Likes

I agree with you 100%, I hope over the summer we result in a mobile wallet with marketplace access.

12 Likes

@dandabek here are some samples:
Pulling in price pegs and being able to ‘favorite’ your preferred peg

Filtering Price Pegs (for future use case)

Showing the Blockchain stats:

This auto refreshes based on your set timer: (every 2 minutes here):

So far this has been simple…about 8 hours invested
Now I can attack more adventurous things!!

11 Likes

I got offers imported…just a little more data transformation work needed to get it all converted correct…but this means next stop is wallet tools!

(got the offers! - now to learn how to go make them!! :wink: )

(the layout has not been edited et…lots of prettying up to do still)

Wallet library might be a steeper learning curve, so I’ll take my time learning that and share later

14 Likes

just an update, I’ve made it a lot further and have the RPC wallet functionality working very well.
I can open/close wallet, tag/untag, label account, plus the code is set up for the other general wallet functions.

I’ve turned my focus back to the safex account creating and offer generation, though I’m a bit stuck on this.

If anyone has any tips to share, please do.

When using the CLI Wallet command ‘safex_account
example:
safex_account new testusername1 sample account data

The new safex_account appear in my list of safex_accounts, but status says active: no.

The documentation for “Account Creation” (Advanced transactions · VanGrx/safexcore Wiki · GitHub) says to lock 1000 SFT, but the command does not have a parameter for it.

Is the locking of 1000 SFT a sperate step? or how do you lock the SFT to have an account created?

I have created a couple test accounts, and all say active: no

Can anyone point me to what I might be missing?
Thank you in advance!

8 Likes

You first do the new account like you did to create new account on the wallet, and then safex_account create (name) to create it on the blockchain, then when txn is send it will mature for 10 blocks and then the account is active

7 Likes

What @Lomax said :ok_hand::point_up_2:

6 Likes

@Lomax Well that was simple. Thank you…transaction sent. Now I try to bring this closer to the finish line.

7 Likes

So after a safex_account is created, attempting to “safex_offer new” or “safex_account edit” I get:
Error: internal error: the tx uses funds from multiple accounts
image

Not sure I understand how it’s selecting funds from multiple accounts. Wondering if it’s something different? I’m running the command on the selected account (index of 1 in this case) and it has funds.

Does anyone know how to force this to use just a single account for the funds?
Or do I need to do something like send myself a big block of SFX/SFT?

5 Likes

I’m honestly not sure you can use the advanced functions outside of the index 0 account. The testing was never focussed on using the subaccounts.

5 Likes

I’d recommend moving the coins back to the main account (index 0) and trying there.

4 Likes

Just a peek at some rough work.
Desktop browser with some different view options for product images. Plus working on these features:

  • ability to favorite/unfavorite an item.
  • ability to show/hide by product (always show, never show, hide until updated)
  • ability to show/hide by seller (always show, never show, hide until new products)
  • ability to search local (coming soon)
  • ability to create custom search query
  • ability to save a search query
  • ability to be alerted when something new matches your search query

8 Likes

well It seems I color outside the lines…I’ll move things to account 0 and try again.
Thanks

5 Likes

No worries. Which index # did you use to create the safex_account?

5 Likes

I used account index 1 to create the safex_account

5 Likes