Skip to content

Commit

Permalink
Merge pull request #139 from xmtp/nm/frames-support
Browse files Browse the repository at this point in the history
Initial support for Frames
  • Loading branch information
neekolas authored Jan 30, 2024
2 parents cafa73e + 8214551 commit ac096da
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev/ts/generate
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ docker run --rm -i -v${PWD}:/code xmtp/protoc \
message_contents/ciphertext.proto \
message_contents/public_key.proto \
message_contents/contact.proto \
message_contents/frames.proto \
message_contents/invitation.proto \
message_contents/private_key.proto \
message_contents/content.proto \
Expand Down
31 changes: 31 additions & 0 deletions proto/message_contents/frames.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Signature is a generic structure for public key signatures.
syntax = "proto3";

package xmtp.message_contents;

import "message_contents/public_key.proto";
import "message_contents/signature.proto";

option go_package = "github.com/xmtp/proto/v3/go/message_contents";
option java_package = "org.xmtp.proto.message.contents";

// The message that will be signed by the Client and returned inside the
// `action_body` field of the FrameAction message
message FrameActionBody {
bytes frame_url = 1;
bytes button_index = 2;
string conversation_identifier = 3;
string message_id = 4; // Also include a reference to the specific message
}

// The outer payload that will be sent as the `messageBytes` in the
// `trusted_data` part of the Frames message
message FrameAction {
Signature signature = 1;
// The SignedPublicKeyBundle of the signer, used to link the XMTP signature
// with a blockchain account through a chain of signatures.
SignedPublicKeyBundle signed_public_key_bundle = 2;
// Serialized FrameActionBody message, so that the signature verification can
// happen on a byte-perfect representation of the message
bytes action_body = 3;
}
1 change: 1 addition & 0 deletions ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export * as fetcher from "./fetch.pb";
export * as authn from "./message_api/v1/authn.pb";
export * as message from "./message_contents/message.pb";
export * as content from "./message_contents/content.pb";
export * as frames from "./message_contents/frames.pb";
export * as conversationReference from "./message_contents/conversation_reference.pb";
export * as composite from "./message_contents/composite.pb";
export * as privateKey from "./message_contents/private_key.pb";
Expand Down

0 comments on commit ac096da

Please sign in to comment.