117 lines
2.4 KiB
Protocol Buffer
117 lines
2.4 KiB
Protocol Buffer
syntax = "proto3";
|
|
package nockchain.public.v1;
|
|
|
|
option go_package = "./;nockchain";
|
|
|
|
import "types.proto";
|
|
import "blockchain.proto";
|
|
import "nockchain.proto";
|
|
service WalletService {
|
|
rpc Keygen(KeygenRequest) returns (KeygenResponse);
|
|
rpc ImportKeys(ImportKeysRequest) returns (ImportKeysResponse);
|
|
rpc DeriveChild(DeriveChildRequest) returns (DeriveChildResponse);
|
|
rpc CreateTx(CreateTxRequest) returns (CreateTxResponse);
|
|
rpc SignTx(SignTxRequest) returns (SignTxResponse);
|
|
rpc Scan(ScanRequest) returns (ScanResponse);
|
|
rpc WalletGetBalance(GetBalanceRequest)
|
|
returns (GetBalanceResponse);
|
|
rpc WalletSendTransaction(SendTransactionRequest)
|
|
returns (SendTransactionResponse);
|
|
rpc TransactionAccepted(TransactionAcceptedRequest)
|
|
returns (TransactionAcceptedResponse);
|
|
}
|
|
|
|
message KeygenRequest {}
|
|
|
|
message KeygenResponse {
|
|
string public_key = 1;
|
|
string private_key = 2;
|
|
string seed = 3;
|
|
string chain_code = 4;
|
|
string import_private_key = 5;
|
|
string import_public_key = 6;
|
|
}
|
|
|
|
message ImportKeysRequest {
|
|
string key = 1;
|
|
ImportType import_type = 2;
|
|
}
|
|
|
|
message ImportKeysResponse {
|
|
string public_key = 1;
|
|
string private_key = 2;
|
|
string seed = 3;
|
|
string chain_code = 4;
|
|
string import_private_key = 5;
|
|
string import_public_key = 6;
|
|
}
|
|
|
|
message DeriveChildRequest {
|
|
string imported_key = 1;
|
|
uint64 index = 2;
|
|
bool hardened = 3;
|
|
}
|
|
|
|
message DeriveChildResponse {
|
|
string public_key = 1;
|
|
string private_key = 2;
|
|
string chain_code = 3;
|
|
}
|
|
|
|
message CreateTxRequest {
|
|
string names = 1;
|
|
string recipients = 2;
|
|
string gifts = 3;
|
|
uint64 fee = 4;
|
|
bool is_master_key = 5;
|
|
string key = 6;
|
|
string chain_code = 7;
|
|
uint64 index = 8;
|
|
bool hardened = 9;
|
|
TimelockIntent timelock_intent = 10;
|
|
}
|
|
|
|
message CreateTxResponse {
|
|
RawTx rawTx = 1;
|
|
}
|
|
|
|
message SignTxRequest {
|
|
string unsigned_tx = 1;
|
|
uint64 index = 2;
|
|
bool hardened = 3;
|
|
}
|
|
|
|
message SignTxResponse {
|
|
string signed_tx = 1;
|
|
string error = 2;
|
|
}
|
|
|
|
message ScanRequest {
|
|
string master_pubkey = 1;
|
|
string chain_code = 2;
|
|
uint64 search_depth = 3;
|
|
bool include_timelocks = 4;
|
|
bool include_multisig = 5;
|
|
}
|
|
|
|
message ScanResponse {
|
|
repeated ScanData scan_data = 1;
|
|
}
|
|
|
|
message GetBalanceRequest {
|
|
string address = 1;
|
|
}
|
|
|
|
message GetBalanceResponse {
|
|
WalletBalanceData data = 1;
|
|
}
|
|
|
|
message SendTransactionRequest {
|
|
RawTx raw_tx = 1;
|
|
}
|
|
|
|
message SendTransactionResponse {
|
|
WalletSendTransactionResponse response = 1;
|
|
}
|
|
|