Documentation
¶
Index ¶
- Constants
- func AssetCommitment(asset []byte, factor []byte) (result [33]byte, err error)
- func CommitmentFromBytes(commit []byte) (*secp256k1.Commitment, error)
- func ElementsToSatoshiValue(val [ElementsUnconfidentialValueLength]byte) (result uint64, err error)
- func FinalValueBlindingFactor(input FinalValueBlindingFactorArg) ([32]byte, error)
- func NonceHash(pubKey, privKey []byte) (result [32]byte, err error)
- func RangeProof(input RangeProofArg) ([]byte, error)
- func SatoshiToElementsValue(val uint64) (result [ElementsUnconfidentialValueLength]byte, err error)
- func SurjectionProof(input SurjectionProofArg) ([]byte, error)
- func ValueCommitment(value uint64, generator []byte, factor []byte) (result [33]byte, err error)
- type FinalValueBlindingFactorArg
- type RangeProofArg
- type SurjectionProofArg
- type UnblindOutputArg
- type UnblindOutputResult
Constants ¶
View Source
const (
ElementsUnconfidentialValueLength = 9
)
Variables ¶
This section is empty.
Functions ¶
func AssetCommitment ¶
AssetCommitment method generates asset commitment
func CommitmentFromBytes ¶ added in v0.0.3
func CommitmentFromBytes(commit []byte) (*secp256k1.Commitment, error)
CommitmentFromBytes parses a raw commitment. This should be moved into go-secp256k1-zkp library, check out https://github.com/vulpemventures/go-elements/pull/79#discussion_r435315406
func ElementsToSatoshiValue ¶
func ElementsToSatoshiValue(val [ElementsUnconfidentialValueLength]byte) ( result uint64, err error, )
ElementsToSatoshiValue method converts Elements value to Satoshi value
func FinalValueBlindingFactor ¶
func FinalValueBlindingFactor(input FinalValueBlindingFactorArg) ( [32]byte, error, )
FinalValueBlindingFactor method generates blind sum
func RangeProof ¶
func RangeProof(input RangeProofArg) ([]byte, error)
RangeProof method calculates range proof
func SatoshiToElementsValue ¶
func SatoshiToElementsValue(val uint64) ( result [ElementsUnconfidentialValueLength]byte, err error, )
SatoshiToElementsValue method converts Satoshi value to Elements value
func SurjectionProof ¶
func SurjectionProof(input SurjectionProofArg) ([]byte, error)
SurjectionProof method generates surjection proof
Types ¶
type FinalValueBlindingFactorArg ¶ added in v0.0.3
type RangeProofArg ¶ added in v0.0.3
type SurjectionProofArg ¶ added in v0.0.3
type UnblindOutputArg ¶ added in v0.0.3
type UnblindOutputResult ¶
type UnblindOutputResult struct {
Value uint64
Asset []byte
ValueBlindingFactor []byte
AssetBlindingFactor []byte
}
func UnblindOutput ¶
func UnblindOutput(input UnblindOutputArg) (*UnblindOutputResult, error)
UnblindOutput method unblinds confidential transaction output
Click to show internal directories.
Click to hide internal directories.