How to send cycles to a subaccount of a canister hzopp-yqaaa-aaaad-aamqa-cai
?
I created the address a24ab620518fb79668404793c73c7ec24ed1c6c93c404fa89a9c62536e7ed2ca
, but when I try send TCYCLES from NNS to it, NNS says that the address is invalid: “Please enter a valid address.”
I got this address from
public composite query({caller}) func userAccountBlob(): async Blob {
Principal.toLedgerAccount(Principal.fromActor(this), ?(Principal.toBlob(caller)));
};
and converted it to hex by TS:
const address = Buffer.from(props.cyclesPaymentAddress!).toString('hex');
I also may send to to my canister using DFX, but for --to-subaccount <TO_SUBACCOUNT>
I don’t know what is TO_SUBACCOUNT format.
Please teach me to send cycles to subaccount from both DFX and online wallets.