#instructions #signer #attached

pinocchio-memo

Pinocchio helpers to invoke Memo program instructions

2 unstable releases

new 0.1.0 Mar 29, 2025
0.0.0 Mar 28, 2025

#4 in #signer

21 downloads per month

Apache-2.0

165KB
2K SLoC

pinocchio-memo

pinocchio-memo

Overview

This crate contains pinocchio helpers to perform cross-program invocations (CPIs) for SPL Memo program instructions.

Each instruction defines a struct with the accounts and parameters required. Once all values are set, you can call directly invoke or invoke_signed to perform the CPI.

This is a no_std crate.

Note: The API defined in this crate is subject to change.

Getting Started

From your project folder:

cargo add pinocchio-memo

This will add the pinocchio-memo dependency to your Cargo.toml file.

Examples

Creating a memo:

// Both accounts should be signers
Memo {
    signers: &[&account_infos[0], &account_infos[1]],
    memo: "hello",
}
.invoke()?;

License

The code is licensed under the Apache License Version 2.0

Dependencies