redgold-schema 0.1.48

Decentralized Portfolio Contracts & Data Lake
Documentation
syntax = "proto3";
package airgap;

import "structs.proto";

// Root message that represents all possible message types
message AirgapMessage {
  SignInternal sign_internal = 1;
  GetAccountLike get_xpub_like = 2;
  SignExternal sign_external = 3;
}

// Request to get an xpub or similar extended public key
message GetAccountLike {
  string path = 1;
  optional structs.SupportedCurrency currency = 2;
}

// Request to sign an external transaction
message SignExternal {
  string serialized_tx = 1;
  structs.SupportedCurrency currency = 2;
}

// Request to sign an internal transaction
message SignInternal {
  string path = 1;
  optional string key_name = 2;
  repeated structs.Transaction txs = 3;
}

message AirgapResponse {
  SignInternalResponse sign_internal = 1;
  GetAccountLikeResponse get_xpub_like = 2;
  SignExternalResponse sign_external = 3;
}

message GetAccountLikeResponse {
  optional string xpub = 1;
  optional structs.PublicKey publicKey = 2;
}

message SignExternalResponse {
  optional string ser_tx = 1;
}

message IndexedInputProof {
  int64 index = 1;
  repeated structs.Proof proof = 2;
}

message TransactionSignDetails {
  structs.Hash hash = 1;
  repeated IndexedInputProof signatures = 2;
}

message SignInternalResponse {
  repeated TransactionSignDetails signed_txs = 1;
}