nockchain-grpc/proto/types.proto
2025-11-04 10:38:31 +07:00

106 lines
1.8 KiB
Protocol Buffer

syntax = "proto3";
package nockchain.public.v2;
option go_package = "./;nockchain";
import "blockchain.proto";
message ScanData {
string pubkey = 1;
Balance data = 2;
}
enum ImportType {
UNDEFINED = 0;
EXTENDED_KEY = 1;
SEEDPHRASE = 2;
MASTER_PRIVKEY = 3;
WATCH_ONLY = 4;
}
message TimelockIntent {
optional TimelockRange absolute = 1;
optional TimelockRange relative = 2;
}
message TimelockRange {
optional Timelock min = 1;
optional Timelock max = 2;
}
message Timelock {
uint64 value = 1;
}
message RawTx {
string tx_id = 1;
Version version = 2;
repeated NockchainNamedSpend named_spends = 3;
}
message NockchainNamedSpend {
NockchainName name = 1;
oneof spend_kind {
NockchainSpendV0 legacy = 2;
NockchainSpendV1 witness = 3;
}
}
message NockchainSpendV0 {
repeated NockchainSignature signatures = 1;
repeated NockchainSeedV0 seeds = 2;
uint64 fee = 3;
}
message NockchainSpendV1 {
}
message NockchainNote {
oneof note {
NockchainNoteV0 v0 = 1;
NockchainNoteV1 v1 = 2;
}
}
message NockchainNoteV0 {
Version version = 1;
uint64 origin_page = 2;
NockchainName name = 3;
NockchainLock lock = 5;
NockchainSource source = 6;
uint64 asset =7;
}
message NockchainNoteV1 {
}
message NockchainName {
string first = 1;
string last = 2;
}
message NockchainSignature {
string pubkey = 1;
repeated uint64 chal = 2;
repeated uint64 sig = 3;
}
message NockchainSeedV0 {
optional NockchainSource output_source = 1;
string lock_root = 2;
NockchainLock note_data = 3;
uint64 gift = 4;
string parent_hash = 5;
}
message NockchainLock {
uint64 keys_required = 1;
repeated string pubkeys = 2;
}
message NockchainSource {
string source = 1;
bool is_coinbase = 2;
}
enum Version {
V0 = 0;
V1 = 1;
V2 = 2;
}