Sol and SPL-Token Transfer #10
Labels
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
Depends on
#53 Define derivation paths for ETH, SOL, etc.
public/keyfork
#1 Define transport envelope standard
public/icepick
#7 Support SD card import/export
public/icepick
Reference: public/icepick#10
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stages:
Progress update:
icepick-solana
can now generate SystemProgram transfer transactions. The blob returned contains a JSON serialized blob that should be parseable by the next program. This also means I need to add blob parsing systems into Icepick operation blobs.Blob parsing has been added. CLI will block if input is not a TTY to read a JSON value containing the output of the previous command. This also means we now have a system to get derived keys that we can pass to modules, since we can parse the non-
blob
content of the module i.e.{"blob": <whatever>, "derivation_paths": ["m/44'/501'/0'/0'"]}
gets sent to application like{"blob": <whatever>, "derived_keys": [[<key as u8 array>]]}
Keys could also be base64 and take up a lot less space, but would require to/from de/serialization.
https://docs.rs/serde_with/latest/serde_with/base64/struct.Base64.html solution found
A Keyfork-generated key, built using #17, sending SOL to another Keyfork-generated key. The transaction itself can be parsed by blockchain explorer but I can't verify the signatures using the explorer. Transaction broadcast is up next, and likely also a command to get a recent blockhash.
https://explorer.solana.com/tx/5jA97YEGipBggDyc43U72wsMcsmeVKDac6eokcXbuGTiketKLUqwgC32yM9gg5FNH9iCYvSYtrg7J1NsaH9Z4V5u?cluster=devnet
Minor update: I was working on seeing if I could reproduce an Icepick key using the Solana CLI and vice versa, and I encountered a strange hiccup. The Solana key management utilities use BIP-0039 mnemonics but don't use hierarchical derivation. This means that while Solana looks like it can accept mnemonics, it doesn't conform to the pattern of "use bip39 to get bip32 seed, use bip32/slip10".
In actuality, what happens when running
solana-keygen recover
is:This means most keys generated by the Solana CLI can't be used by Icepick. That doesn't necessarily mean Icepick can't generate keys consumable by the Solana CLI - that functionality will likely have to exist anyways at some point for conformance testing.
SPL-Token checkpoint: I had some issues with the Instruction compiler not marking the "from" pubkey as writable, to pay fees, in the event a payer is not provided. This has been resolved.
This is likely resolved in the CLI by using the Set Computation Budget thing I noticed earlier, but was not listed as required.
Base of
icepick sol transfer-token
has been committed. Devnet testing: https://explorer.solana.com/tx/64Qu7qSBXTtpouNVjDw2h2EwGuimn4CuhpLjUYFvVYReBakQdhAwsFpRfSTeK6vJ8rfZ1nZ5g4orLop589dw8quG?cluster=devnetblockhash
has been removed from all commands that generate transaction. The blockhash is instead provided to thesign
subcommand, which is the step between "generating (possibly online) and validating the transaction", which means the only time sensitive portion is: get blockhash (online) --> sign (offline) --> broadcast (online).End to end tests have been added as of
44aef0ca99
.