rialo_s_spl_memo/lib.rs
1// Copyright (c) Subzero Labs, Inc.
2// SPDX-License-Identifier: Apache-2.0
3// This file is either (a) original to Subzero Labs, Inc. or (b) derived from the Anza codebase and modified by Subzero Labs, Inc.
4
5#![deny(missing_docs)]
6
7//! A program that accepts a string of encoded characters and verifies that it
8//! parses, while verifying and logging signers. Currently handles UTF-8
9//! characters.
10
11mod entrypoint;
12pub mod processor;
13
14// Export current sdk types for downstream users building with a different sdk
15// version
16pub use rialo_s_account_info;
17pub use rialo_s_instruction;
18use rialo_s_instruction::Instruction;
19pub use rialo_s_msg;
20pub use rialo_s_program_entrypoint;
21pub use rialo_s_program_error;
22pub use rialo_s_pubkey;
23use rialo_s_pubkey::Pubkey;
24pub use rialo_s_spl_memo_interface::{
25 v1,
26 v3::{check_id, id, ID},
27};
28
29/// Build a memo instruction, possibly signed
30///
31/// Accounts expected by this instruction:
32///
33/// 0. `..0+N` `[signer]` Expected signers; if zero provided, instruction will
34/// be processed as a normal, unsigned spl-memo
35pub fn build_memo(memo: &[u8], signer_pubkeys: &[&Pubkey]) -> Instruction {
36 rialo_s_spl_memo_interface::instruction::build_memo(&id(), memo, signer_pubkeys)
37}