nockchain-grpc/proto/types.proto
2025-10-06 13:38:53 +07:00

92 lines
1.7 KiB
Protocol Buffer

syntax = "proto3";
package nockchain.public.v1;
option go_package = "./;nockchain";
import "blockchain.proto";
message ScanData {
string pubkey = 1;
WalletBalanceData 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;
repeated NockchainInput inputs = 2;
TimelockRange timelock_range = 3;
uint64 total_fees = 4;
}
message NockchainSpend {
repeated NockchainSignature signatures = 1;
repeated NockchainSeed seeds = 2;
uint64 fee = 3;
}
message NockchainNote {
Version version = 1;
uint64 block_height = 2;
optional TimelockIntent timelock = 3;
NockchainName name = 4;
NockchainLock lock = 5;
NockchainSource source = 6;
uint64 asset =7;
}
message NockchainName {
string first = 1;
string last = 2;
}
message NockchainInput {
NockchainName name = 1;
NockchainNote note = 2;
NockchainSpend spend = 3;
}
message NockchainSignature {
string pubkey = 1;
repeated uint64 chal = 2;
repeated uint64 sig = 3;
}
message NockchainSeed {
optional NockchainSource output_source = 1;
NockchainLock recipient = 2;
optional TimelockIntent timelock_intent = 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;
}