mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-09-16 06:20:11 +00:00

* Naive bip39 with address reuse * Avoid address reuse in libkaspawallet * Add wallet daemon * Use daemon everywhere * Add forceOverride * Make CreateUnsignedTransaction endpoint receive amount in sompis * Collect close UTXOs * Filter out non-spendable UTXOs from selectUTXOs * Use different paths for multisig and non multisig * Fix tests to use non zero path * Fix multisig cosigner index detection * Add comments * Fix dump_unencrypted_data.go according to bip39 and bip32 * Fix wrong derivation path for multisig on wallet creation * Remove IsSynced endpoint and add validation if wallet is synced for the relevant endpoints * Rename server address to daemon address * Fix capacity for extendedPublicKeys * Use ReadBytes instead of ReadLine * Add validation when importing * Increment before using index value, and use it as is * Save keys file exactly where needed * Use %+v printErrorAndExit * Remove redundant consts * Rnemae collectCloseUTXOs and collectFarUTXOs * Move typedefs around * Add comment to addressesToQuery * Update collectUTXOsFromRecentAddresses comment about locks * Split collectUTXOs to small functions * Add sanity check * Add addEntryToUTXOSet function * Change validateIsSynced to isSynced * Simplify createKeyPairsFromFunction logic * Rename .Sync() to .Save() * Fix typo * Create bip39BitSize const * Add consts to purposes * Add multisig check for 'send' * Rename updatedPSTxBytes to partiallySignedTransaction * Change collectUTXOsFromFarAddresses's comment * Use setters for last used indexes * Don't use the pstx acronym * Fix SetPath * Remove spaces when reading lines * Fix walletserver to daemonaddress * Fix isUTXOSpendable to use DAA score Co-authored-by: Svarog <feanorr@gmail.com>
60 lines
1.2 KiB
Protocol Buffer
60 lines
1.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
package protoserialization;
|
|
|
|
option go_package = "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/serialization/protoserialization";
|
|
|
|
message PartiallySignedTransaction{
|
|
TransactionMessage tx = 1;
|
|
repeated PartiallySignedInput partiallySignedInputs = 2;
|
|
}
|
|
|
|
message PartiallySignedInput{
|
|
bytes redeemScript = 1;
|
|
TransactionOutput prevOutput = 2;
|
|
uint32 minimumSignatures = 3;
|
|
repeated PubKeySignaturePair pubKeySignaturePairs = 4;
|
|
string DerivationPath = 5;
|
|
}
|
|
|
|
message PubKeySignaturePair{
|
|
string extendedPubKey = 1;
|
|
bytes signature = 2;
|
|
}
|
|
|
|
message SubnetworkId{
|
|
bytes bytes = 1;
|
|
}
|
|
|
|
message TransactionMessage{
|
|
uint32 version = 1;
|
|
repeated TransactionInput inputs = 2;
|
|
repeated TransactionOutput outputs = 3;
|
|
uint64 lockTime = 4;
|
|
SubnetworkId subnetworkId = 5;
|
|
uint64 gas = 6;
|
|
bytes payload = 8;
|
|
}
|
|
|
|
message TransactionInput{
|
|
Outpoint previousOutpoint = 1;
|
|
bytes signatureScript = 2;
|
|
uint64 sequence = 3;
|
|
}
|
|
|
|
message Outpoint{
|
|
TransactionId transactionId = 1;
|
|
uint32 index = 2;
|
|
}
|
|
|
|
message TransactionId{
|
|
bytes bytes = 1;
|
|
}
|
|
message ScriptPublicKey {
|
|
bytes script = 1;
|
|
uint32 version = 2;
|
|
}
|
|
|
|
message TransactionOutput{
|
|
uint64 value = 1;
|
|
ScriptPublicKey scriptPublicKey = 2;
|
|
} |