diff --git a/lazer/Cargo.lock b/lazer/Cargo.lock index 725f54488a..e7ab10911c 100644 --- a/lazer/Cargo.lock +++ b/lazer/Cargo.lock @@ -3882,7 +3882,7 @@ dependencies = [ [[package]] name = "pyth-lazer-publisher-sdk" -version = "0.1.2" +version = "0.1.3" dependencies = [ "anyhow", "fs-err", diff --git a/lazer/publisher_sdk/proto/pyth_lazer_transaction.proto b/lazer/publisher_sdk/proto/pyth_lazer_transaction.proto index f10a8e6c6e..39798dcd46 100644 --- a/lazer/publisher_sdk/proto/pyth_lazer_transaction.proto +++ b/lazer/publisher_sdk/proto/pyth_lazer_transaction.proto @@ -12,22 +12,32 @@ import "governance_instruction.proto"; // Resulting bytes should then be signed with the signature scheme specified. // The signed lazer transaction is encoded as bytes and sent to Pyth Lazer Relayer. message SignedLazerTransaction { - // [required] specifies the type of signature used to sign the payload - optional TransactionSignatureType signature_type = 1; - - // [required] signature derived from signing payload bytes - optional bytes signature = 2; + // [required] signature with public key + optional SignatureData signature_data = 1; // [required] lazer transaction encoded as bytes through protobuf - optional bytes payload = 3; + optional bytes payload = 2; +} - // TODO: Add public key +// Signature for encoded payload along with the relevant public keys to verify against it +// Public key should successfully verify payload +// Pyth Lazer will maintain a list of valid public keys +// Passed public key should be present in publisher's list of valid keys +message SignatureData { + // [required] type of signature, which determines included data needed for verifying + oneof data { + Ed25519SignatureData ed25519 = 1; + }; } -// Types of signatures supported by Pyth Lazer -enum TransactionSignatureType { - // signature is 64 bytes long - ed25519 = 0; +// ED25519 style signature. Should include a single signature and a single public key +// Signature will be verified using public key after determining public key is valid +message Ed25519SignatureData { + // [required] 64 byte signature + optional bytes signature = 1; + + // [required] 32 byte public key + optional bytes public_key = 2; } // Transaction contianing one of the valid Lazer Transactions diff --git a/lazer/publisher_sdk/rust/Cargo.toml b/lazer/publisher_sdk/rust/Cargo.toml index bc8cfbb578..665a3c22d0 100644 --- a/lazer/publisher_sdk/rust/Cargo.toml +++ b/lazer/publisher_sdk/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyth-lazer-publisher-sdk" -version = "0.1.2" +version = "0.1.3" edition = "2021" description = "Pyth Lazer Publisher SDK types." license = "Apache-2.0"