nockchain-grpc/proto/types.proto

106 lines
1.8 KiB
Protocol Buffer
Raw Normal View History

2025-10-06 13:38:53 +07:00
syntax = "proto3";
2025-11-04 10:38:31 +07:00
package nockchain.public.v2;
2025-10-06 13:38:53 +07:00
option go_package = "./;nockchain";
import "blockchain.proto";
message ScanData {
string pubkey = 1;
2025-11-04 10:38:31 +07:00
Balance data = 2;
2025-10-06 13:38:53 +07:00
}
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 {
2025-11-04 10:38:31 +07:00
string tx_id = 1;
Version version = 2;
repeated NockchainNamedSpend named_spends = 3;
2025-10-06 13:38:53 +07:00
}
2025-11-04 10:38:31 +07:00
message NockchainNamedSpend {
NockchainName name = 1;
oneof spend_kind {
NockchainSpendV0 legacy = 2;
NockchainSpendV1 witness = 3;
}
}
message NockchainSpendV0 {
2025-10-06 13:38:53 +07:00
repeated NockchainSignature signatures = 1;
2025-11-04 10:38:31 +07:00
repeated NockchainSeedV0 seeds = 2;
2025-10-06 13:38:53 +07:00
uint64 fee = 3;
}
2025-11-04 10:38:31 +07:00
message NockchainSpendV1 {
}
2025-10-06 13:38:53 +07:00
message NockchainNote {
2025-11-04 10:38:31 +07:00
oneof note {
NockchainNoteV0 v0 = 1;
NockchainNoteV1 v1 = 2;
}
}
message NockchainNoteV0 {
2025-10-06 13:38:53 +07:00
Version version = 1;
2025-11-04 10:38:31 +07:00
uint64 origin_page = 2;
NockchainName name = 3;
2025-10-06 13:38:53 +07:00
NockchainLock lock = 5;
NockchainSource source = 6;
uint64 asset =7;
}
2025-11-04 10:38:31 +07:00
message NockchainNoteV1 {
}
2025-10-06 13:38:53 +07:00
message NockchainName {
string first = 1;
string last = 2;
}
message NockchainSignature {
string pubkey = 1;
repeated uint64 chal = 2;
repeated uint64 sig = 3;
}
2025-11-04 10:38:31 +07:00
message NockchainSeedV0 {
2025-10-06 13:38:53 +07:00
optional NockchainSource output_source = 1;
2025-11-04 10:38:31 +07:00
string lock_root = 2;
NockchainLock note_data = 3;
2025-10-06 13:38:53 +07:00
uint64 gift = 4;
string parent_hash = 5;
}
2025-11-04 10:38:31 +07:00
2025-10-06 13:38:53 +07:00
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;
}