In SPL Token there is a function called Approve which gives the delegate account the ability to transfer an amount of tokens. So far I can only see this working for a custom token.
Is it possible to give the delegate account the ability to transfer SOL?
The flow I am after is:
Resources:
Your best bet is to wrap your SOL into an SPL token account (mint So11111111111111111111111111111111111111112
) and use the SOL as an SPL token, e.g.:
$ spl-token wrap 1
Wrapping 1 SOL into GJTxcnA5Sydy8YRhqvHxbQ5QNsPyRKvzguodQEaShJje
Signature: 4f4s5QVMKisLS6ihZcXXPbiBAzjnvkBcp2A7KKER7k9DwJ4qjbVsQBKv2rAyBumXC1gLn8EJQhwWkybE4yJGnw2Y
$ spl-token approve So11111111111111111111111111111111111111112 1 pubkey_to_approve_to
More info about wrapping at https://spl.solana.com/token#wrapping-sol and https://spl.solana.com/token#example-wrapping-sol-in-a-token