I feel you would do what you’re asking with an explorer API and rawtransactions, nevertheless it is advisable to watch out when utilizing rawtransactions as you would lose lots of cash when you dont know what you’re doing (see my notice on the finish).
Transactions are product of inputs and outputs. Shall we say you might have 10 cash on deal with A, you would have two unspent transaction outputs (the two outputs from if you deposited the ten cash), perhaps one unspent output has 7 cash, and the opposite 3 cash (totaling 10).
If you wish to ship your good friend 1 coin, it’s possible you’ll take the out there unspent transaction of three cash, ship 1 coin to your good friend, and 1.9999 cash (after charges of 0.0001) shall be returned to you as “change”. Right here is an instance transaction https://chainz.cryptoid.data/btc/tx.dws?499936575.htm You possibly can see 1 earlier output, turning into the enter, and the 2 ensuing outputs.
Your bitcoin-cli pockets wants the total blockchain, as a result of the checklist of your unspent transactions is constructed from all of the inputs and outputs. Nevertheless discover that the explorer I linked to additionally has an API and (when you request and are granted an API key) the next question will lead to providing you with all of the inputs for that particular deal with;
You then would use the RPC console to:
1/ createrawtransaction
2/ signrawtransaction
3/ sendrawtransaction
Confer with the https://en.bitcoin.it/wiki/Raw_Transactions Wiki for utilization and different helpful CLI instructions round this subject.
WARNING: Be aware when utilizing createrawtransaction you MUST MANUALLY CALCULATE TRANSACTION FEES AND CHANGE, when you fail to do that accurately change shall be consumed as charges!!!
So now you’ll be able to see how its attainable (though extraordinarily awkward!) to make and ship transactions with out a native copy of the blockchain. When it comes to how a Ledger works, I think they do steps 1/ createrawtransaction and three/ sendrawtransaction in an un-secure surroundings, they only use the Ledger itself to do step 2/ signrawtransaction, as that is the one level at which non-public keys are wanted.