create_p2id_note

Function create_p2id_note 

Source
pub fn create_p2id_note<R: FeltRng>(
    sender: AccountId,
    target: AccountId,
    assets: Vec<Asset>,
    note_type: NoteType,
    aux: Felt,
    rng: &mut R,
) -> Result<Note, NoteError>
Expand description

Generates a P2ID note - Pay-to-ID note.

This script enables the transfer of assets from the sender account to the target account by specifying the target’s account ID.

The passed-in rng is used to generate a serial number for the note. The returned note’s tag is set to the target’s account ID.

§Errors

Returns an error if deserialization or compilation of the P2ID script fails.