Plug Wallet to Ledger Canister

Hello, I am trying to figure out how to transfer ICP from a plug wallet connection to the ledger canister signed with the principal ID that the user connects with.

For this I am using the Plug Connect from Connect apps to Plug - Documentation | Plug and followed the by me a coffee example.

But I am not sure how to send to the ledger canister specifically and sign the transaction so that another canister in my dapp that contains the smart contract logic for the transactions can call the ledger canister and retrieve this deposited ICP.

Does anyone know of some examples / docs I could look at to see how I could send from a plug wallet to the ledger canister? Or can anyone give me some pointers on how to approach this and what I need to do? ]

Many thanks

Hi, thank you for this. I am able to get a subAccount address and have set deposited some local ICP into a local account on my plug wallet, but when try send from this account to the ledger sub account like this


The ICP seems to leave my local account asmy balance goes down but when I query the account_balance of the sub account on the local ledger canister I am running I see 0 returned even after the transfer.
image

Do you have any thoughts why this may be? Thank you for the help

you probably look at the wrong account, how do you get from principal to account?