Documentation ¶
Index ¶
- type Pegout
- type PegoutService
- func (p *PegoutService) CreateOnlinePrivateKey() (privkey *types.Privkey, err error)
- func (p *PegoutService) CreatePakEntry(accountExtPubkey *types.ExtPubkey, onlinePrivkey *types.Privkey) (pakEntry *types.ByteData, err error)
- func (p *PegoutService) CreatePegoutAddress(addressType types.AddressType, accountExtPubkey *types.ExtPubkey, ...) (pegoutAddress *types.Address, baseDescriptor *types.Descriptor, err error)
- func (p *PegoutService) CreatePegoutTransaction(utxoList []types.ElementsUtxoData, pegoutData types.InputConfidentialTxOut, ...) (tx *types.ConfidentialTx, pegoutAddress *types.Address, ...)
- func (p *PegoutService) VerifyPubkeySignature(proposalTx *types.ConfidentialTx, utxoData *types.ElementsUtxoData, ...) (isVerify bool, err error)
- func (p *PegoutService) WithConfig(conf config.CfdConfig) (obj *PegoutService, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pegout ¶
type Pegout interface { // CreateOnlinePrivateKey This function generate random private key for online key. CreateOnlinePrivateKey() (privkey *types.Privkey, err error) // CreatePakEntry This function create the PAK-Entry. CreatePakEntry( accountExtPubkey *types.ExtPubkey, onlinePrivkey *types.Privkey, ) (pakEntry *types.ByteData, err error) // CreatePegoutAddress This function create the pegout address for bitcoin network. CreatePegoutAddress( addressType types.AddressType, accountExtPubkey *types.ExtPubkey, addressIndex uint32, ) (pegoutAddress *types.Address, baseDescriptor *types.Descriptor, err error) // CreatePegoutTransaction This function create the pegout transaction. CreatePegoutTransaction( utxoList []types.ElementsUtxoData, pegoutData types.InputConfidentialTxOut, sendList *[]types.InputConfidentialTxOut, changeAddress *string, option *types.PegoutTxOption, ) ( tx *types.ConfidentialTx, pegoutAddress *types.Address, unblindTx *types.ConfidentialTx, err error, ) // VerifyPubkeySignature This function validate the signature by pubkey. VerifyPubkeySignature( proposalTx *types.ConfidentialTx, utxoData *types.ElementsUtxoData, signature *types.ByteData, ) (isVerify bool, err error) }
Pegout This interface defines the API used by the pegout function.
type PegoutService ¶
type PegoutService struct {
// contains filtered or unexported fields
}
PegoutService This struct is implements pegout api.
func NewPegoutService ¶
func NewPegoutService() *PegoutService
NewPegoutService This function returns an object that defines the API for Pegout.
func (*PegoutService) CreateOnlinePrivateKey ¶
func (p *PegoutService) CreateOnlinePrivateKey() (privkey *types.Privkey, err error)
CreateOnlinePrivateKey This function generate random private key for online key.
func (*PegoutService) CreatePakEntry ¶
func (p *PegoutService) CreatePakEntry( accountExtPubkey *types.ExtPubkey, onlinePrivkey *types.Privkey, ) (pakEntry *types.ByteData, err error)
CreatePakEntry This function create the PAK-Entry.
func (*PegoutService) CreatePegoutAddress ¶
func (p *PegoutService) CreatePegoutAddress( addressType types.AddressType, accountExtPubkey *types.ExtPubkey, addressIndex uint32, ) (pegoutAddress *types.Address, baseDescriptor *types.Descriptor, err error)
CreatePegoutAddress This function create the pegout address for bitcoin network.
func (*PegoutService) CreatePegoutTransaction ¶
func (p *PegoutService) CreatePegoutTransaction( utxoList []types.ElementsUtxoData, pegoutData types.InputConfidentialTxOut, sendList *[]types.InputConfidentialTxOut, changeAddress *string, option *types.PegoutTxOption, ) (tx *types.ConfidentialTx, pegoutAddress *types.Address, unblindTx *types.ConfidentialTx, err error)
CreatePegoutTransaction This function create the pegout transaction.
func (*PegoutService) VerifyPubkeySignature ¶
func (p *PegoutService) VerifyPubkeySignature( proposalTx *types.ConfidentialTx, utxoData *types.ElementsUtxoData, signature *types.ByteData, ) (isVerify bool, err error)
VerifyPubkeySignature This function validate the signature by pubkey.
func (*PegoutService) WithConfig ¶
func (p *PegoutService) WithConfig(conf config.CfdConfig) (obj *PegoutService, err error)
WithConfig This function set a configuration.
Click to show internal directories.
Click to hide internal directories.