126 lines
2.3 KiB
Protocol Buffer
126 lines
2.3 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 NockchainSeed seeds = 2;
|
|
uint64 fee = 3;
|
|
}
|
|
|
|
message NockchainSpendV1 {
|
|
repeated NockchainWitness witness = 1;
|
|
repeated NockchainSeed seeds = 2;
|
|
uint64 fee = 3;
|
|
}
|
|
|
|
message NockchainNote {
|
|
oneof note {
|
|
NockchainNoteV0 v0 = 1;
|
|
NockchainNoteV1 v1 = 2;
|
|
}
|
|
}
|
|
message NockchainNoteV0 {
|
|
Version version = 1;
|
|
uint64 origin_page = 2;
|
|
NockchainName name = 3;
|
|
NockchainLock lock = 4;
|
|
NockchainSource source = 5;
|
|
uint64 asset =6;
|
|
}
|
|
|
|
message NockchainNoteV1 {
|
|
Version version = 1;
|
|
uint64 origin_page = 2;
|
|
NockchainName name = 3;
|
|
NockchainLock note_data = 4;
|
|
uint64 assets = 5;
|
|
}
|
|
|
|
message NockchainName {
|
|
string first = 1;
|
|
string last = 2;
|
|
}
|
|
|
|
message NockchainSignature {
|
|
string pubkey = 1;
|
|
repeated uint64 chal = 2;
|
|
repeated uint64 sig = 3;
|
|
}
|
|
|
|
message NockchainWitness {
|
|
NockchainLockMerkleProof lmp = 1;
|
|
repeated NockchainSignature pkh = 2;
|
|
}
|
|
|
|
message NockchainLockMerkleProof {
|
|
NockchainLock spend_condition = 1;
|
|
uint64 axis = 2;
|
|
string merkle_root = 3;
|
|
}
|
|
|
|
message NockchainSeed {
|
|
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;
|
|
}
|