neodix42 / MyLocalTon

Personal local TON blockchain
GNU General Public License v3.0
117 stars 20 forks source link

CLI \ API tool to create transaction #31

Closed dkatzan closed 3 months ago

dkatzan commented 3 months ago

Hi, thx for this tool I'm planning to use MyLocalTon in order to test some wallet app I'm building

trying to build a docker file to run everything I need, but in order to run my tests I will need some kind of faucet functionality When running MyLocalTon in the UI, going into accounts, I see u start off with multiple funded wallets, and can use those in order to send transactions to a destination of your choice

Is it possible to access and control those using CLI or some API?

neodix42 commented 3 months ago

Hi, there is no such option now. This is a valid point and it is my backlog, hopefully, within a month or two, I will add it. For now, you can take a look at the secret phrases and private keys in settings.json file.

dkatzan commented 3 months ago

Ah, got you thx

I see in settings.json the following:

  "mainWalletAddrBase64": "kf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIue",
  "mainWalletAddrFull": "-1:0000000000000000000000000000000000000000000000000000000000000000",
  "mainWalletPrvKey": "b737ef573c6d85367372777e14aee3e62e306fb16bef3dbe13fc8f3de946dcf9",

are u suggesting I can extract the private key from there, and use that to programmatically create a transaction

neodix42 commented 3 months ago

That's right. You can also take validator's wallet - see section genesisNode.walletAddress - this wallet has the mnemonic. For programmatically to work with wallets/smart contracts you can use one of the following libs:

goutils - go @.*** - javascript ton-kotlin pytoniq ton4j - java

On Mon, Aug 5, 2024 at 11:49 AM Daniel Katzan @.***> wrote:

Ah, got you thx

I see in settings.json the following:

"mainWalletAddrBase64": "kf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIue", "mainWalletAddrFull": "-1:0000000000000000000000000000000000000000000000000000000000000000", "mainWalletPrvKey": "b737ef573c6d85367372777e14aee3e62e306fb16bef3dbe13fc8f3de946dcf9",

are u suggesting I can extract the private key from there, and use that to programmatically create a transaction

— Reply to this email directly, view it on GitHub https://github.com/neodix42/MyLocalTon/issues/31#issuecomment-2268656601, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMOVWWOS7II2Q4YD64TEBTLZP5DDFAVCNFSM6AAAAABL7D5MDCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRYGY2TMNRQGE . You are receiving this because you commented.Message ID: @.***>