Documentation
¶
Index ¶
Constants ¶
View Source
const CurrentSlateVersion uint16 = 2
CurrentSlateVersion is The most recent version of the slate
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InputV2 ¶
type InputV2 struct {
// The features of the output being spent.
// We will check maturity for coinbase output.
Features core.OutputFeatures `json:"features"`
// The commit referencing the output being spent.
Commit string `json:"commit"`
}
InputV2 is a v2 input
type OutputV2 ¶
type OutputV2 struct {
// Options for an output's structure or use
Features core.OutputFeatures `json:"features"`
// The homomorphic commitment representing the output amount
Commit string `json:"commit"`
// A proof that the commitment is in the right range
Proof string `json:"proof"`
}
OutputV2 is a v2 output
type ParticipantDataV2 ¶
type ParticipantDataV2 struct {
// Id of participant in the transaction. (For now, 0=sender, 1=rec)
ID core.Uint64 `json:"id"`
// Public key corresponding to private blinding factor
PublicBlindExcess string `json:"public_blind_excess"`
// Public key corresponding to private nonce
PublicNonce string `json:"public_nonce"`
// Public partial signature
PartSig *string `json:"part_sig"`
// A message for other participants
Message *string `json:"message"`
// Signature, created with private key corresponding to 'public_blind_excess'
MessageSig *string `json:"message_sig"`
}
ParticipantDataV2 is the participant data slate version 0
type SlateV2 ¶
type SlateV2 struct {
// Versioning info
VersionInfo VersionCompatInfoV2 `json:"version_info"`
// The number of participants intended to take part in this transaction
NumParticipants uint `json:"num_participants"`
// Unique transaction ID, selected by sender
ID uuid.UUID `json:"id"`
// The core transaction data:
// inputs, outputs, kernels, kernel offset
Transaction TransactionV2 `json:"tx"`
// base amount (excluding fee)
Amount core.Uint64 `json:"amount"`
// fee amount
Fee core.Uint64 `json:"fee"`
// Block height for the transaction
Height core.Uint64 `json:"height"`
// Lock height
LockHeight core.Uint64 `json:"lock_height"`
// Participant data, each participant in the transaction will
// insert their public data here. For now, 0 is sender and 1
// is receiver, though this will change for multi-party
ParticipantData []ParticipantDataV2 `json:"participant_data"`
}
SlateV2 represents a slate version 2
type SlateVersion ¶
type SlateVersion int
SlateVersion represents the slate version
const ( // V2 (most current) V2 SlateVersion = iota )
type TransactionBodyV2 ¶
type TransactionBodyV2 struct {
// List of inputs spent by the transaction.
Inputs []InputV2 `json:"inputs"`
// List of outputs the transaction produces.
Outputs []OutputV2 `json:"outputs"`
// List of kernels that make up this transaction (usually a single kernel).
Kernels []TxKernelV2 `json:"kernels"`
}
TransactionBodyV2 represent a v2 transaction body
type TransactionV2 ¶
type TransactionV2 struct {
/// The kernel "offset" k2
/// excess is k1G after splitting the key k = k1 + k2
Offset string `json:"offset"`
/// The transaction body - inputs/outputs/kernels
Body TransactionBodyV2 `json:"body"`
}
TransactionV2 is a v2 transaction
type TxKernelV2 ¶
type TxKernelV2 struct {
// Options for a kernel's structure or use
Features core.KernelFeatures `json:"features"`
// Fee originally included in the transaction this proof is for.
Fee core.Uint64 `json:"fee"`
// This kernel is not valid earlier than lock_height blocks
// The max lock_height of all *inputs* to this transaction
LockHeight core.Uint64 `json:"lock_height"`
// Remainder of the sum of all transaction commitments. If the transaction
// is well formed, amounts components should sum to zero and the excess
// is hence a valid public key.
Excess string `json:"excess"`
// The signature proving the excess is a valid public key, which signs
// the transaction fee.
ExcessSig string `json:"excess_sig"`
}
TxKernelV2 is a v2 tx kernel
type VersionCompatInfoV2 ¶
type VersionCompatInfoV2 struct {
// The current version of the slate format
Version uint16 `json:"version"`
// Original version this slate was converted from
OrigVersion uint16 `json:"orig_version"`
// The grin block header version this slate is intended for
BlockHeaderVersion uint16 `json:"block_header_version"`
}
VersionCompatInfoV2 is a V2 version compat info
Click to show internal directories.
Click to hide internal directories.