Companion Pubkey helpers for pinocchio.
This crate provides two convenience macros to resolve Pubkeys at compile time:
pubkey!: takes a pubkey value as a base58&strand generates its correpondentPubkey(byte array)declare_id!: takes a pubkey value as a base58&str(usually representing a program address) and generates anIDconstant,check_id()andid()helpers
It also defines a decode helper that takes a &str and returns the correspondent Pubkey value.
Examples
Creating a Pubkey constant value from a static &str:
use Pubkey;
pub const AUTHORITY: Pubkey = pubkey!;
Declaring the program address of a program (usually on your lib.rs):
declare_id!;
Creating a Pubkey from a &str:
let address = Stringfrom;
let owner = from_str;
License
The code is licensed under the Apache License Version 2.0