Documentation ¶
Index ¶
- Variables
- func CreateCustomMuiltAddress()
- func CreateCustomP2SHSpendTx()
- func CreateCustomP2SHTx()
- func CreateCustomSpendTx()
- func CreateCustomSpendTxForScriptHash()
- func CreateCustomTx()
- func CreateMuiltAddress()
- func CreateP2PKHSpendTx()
- func CreateP2PKHTx()
- func CreateP2SHSpendTx()
- func CreateP2SHTx()
- func DeriveRevocationPubkey(revokeBase, commitPoint *btcec.PublicKey) *btcec.PublicKey
- func FindUserIsOnline(peerId string) error
- func GenMultiSigScript(aPub, bPub []byte) ([]byte, error)
- func GenerateBTC() (string, string, error)
- func GenerateBTCTest() (string, string, error)
- func GetChannelInfoByTwoPeerID(peerIdA string, peerIdB string) (channelInfo *dao.ChannelInfo, err error)
- func GetHtlcFee() float64
- func Ripemd160H(d []byte) []byte
- func SenderHTLCScript(senderHtlcKey, receiverHtlcKey, revocationKey *btcec.PublicKey, ...) ([]byte, error)
- func SingleTweakBytes(commitPoint, basePoint *btcec.PublicKey) []byte
- func WitnessScriptHash(witnessScript []byte) ([]byte, error)
- type Message
- type Node
- type NodeService
- type PathBranchInfo
- type PathNode
- type RequestGetInfoByChannelId
- type Transaction
- type TreeNode
- type UserManager
- type Wallet
Constants ¶
This section is empty.
Variables ¶
View Source
var AtomicSwapService atomicSwapManager
View Source
var ChannelService = channelManager{}
View Source
var CommitmentTxService commitmentTxManager
View Source
var CommitmentTxSignedService commitmentTxSignedManager
View Source
var FundingTransactionService fundingTransactionManager
View Source
var HDWalletService hdWalletManager
View Source
var HtlcBackwardTxService htlcBackwardTxManager
HTLC Reverse pass the R (Preimage R)
View Source
var HtlcCloseTxService htlcCloseTxManager
htlc 关闭当前htlc交易
View Source
var HtlcForwardTxService htlcForwardTxManager
htlc pay money 付款
View Source
var HtlcHMessageService htlcHMessageManager
View Source
var HtlcQueryService = htlcQueryManager{}
View Source
var HttpService httpService
View Source
var MessageService messageManage
View Source
var OnlineUserMap = make(map[string]bool)
View Source
var P2PLocalPeerId string
View Source
var PathService = pathManager{}
View Source
var ScheduleService = scheduleManager{}
View Source
var UserService = UserManager{}
Functions ¶
func CreateCustomP2SHSpendTx ¶
func CreateCustomP2SHSpendTx()
func CreateCustomP2SHTx ¶
func CreateCustomP2SHTx()
func CreateCustomSpendTx ¶
func CreateCustomSpendTx()
func CreateCustomSpendTxForScriptHash ¶
func CreateCustomSpendTxForScriptHash()
func CreateCustomTx ¶
func CreateCustomTx()
解密 Transaction puzzle https://en.bitcoin.it/wiki/Script#Transaction_puzzle
func CreateMuiltAddress ¶
func CreateMuiltAddress()
func CreateP2PKHSpendTx ¶
func CreateP2PKHSpendTx()
func CreateP2PKHTx ¶
func CreateP2PKHTx()
新的地址 用addrtool_mnemonic_test.go的Test_Demo2生成,index = 1 {"index":1,"address":"n2Lo7zwvek2NHmvHSD85WARKSfYwJxofve","pub_key":"0288d87affee96b8fd0fc5eb6fa4f4dae0c2e69145deda8d0768a3c2aa3a77a0b5","wif":"cVEQD3Wm9pdpmAjHz3AuA5uGqZVgEt2kKbVrwUwRTsyLx9z12KvT"}
func CreateP2SHSpendTx ¶
func CreateP2SHSpendTx()
func CreateP2SHTx ¶
func CreateP2SHTx()
func DeriveRevocationPubkey ¶
func FindUserIsOnline ¶
func GenMultiSigScript ¶
func GenerateBTC ¶
func GenerateBTCTest ¶
func GetChannelInfoByTwoPeerID ¶
func GetChannelInfoByTwoPeerID(peerIdA string, peerIdB string) (channelInfo *dao.ChannelInfo, err error)
GetChannelInfoByTwoPeerID
Get a channel info by two peer ID.
func GetHtlcFee ¶
func GetHtlcFee() float64
func Ripemd160H ¶
func SenderHTLCScript ¶
func SingleTweakBytes ¶
func WitnessScriptHash ¶
Types ¶
type Message ¶
type Message struct { Id int `storm:"id,increment" json:"id" ` HashValue string `json:"hash_value"` Sender string `json:"sender"` Receiver string `json:"receiver"` Data string `json:"data"` CurrState dao.NormalState `json:"curr_state"` CreateAt time.Time `json:"create_at"` ReadAt time.Time `json:"read_at"` }
type NodeService ¶
type NodeService struct { }
func (*NodeService) Get ¶
func (service *NodeService) Get(id interface{}) (data Node, err error)
func (*NodeService) Save ¶
func (service *NodeService) Save(node *Node) error
type PathBranchInfo ¶
type PathBranchInfo struct { Peer2Peer string `json:"peer_2_peer"` Amount float64 `json:"amount"` Channel *dao.ChannelInfo `json:"channel"` }
type PathNode ¶
type PathNode struct { ParentNode int `json:"parent_node"` PathNames string `json:"path_names"` PathIdArr []int `json:"path_peers"` ChannelId int `json:"channel_id"` Level uint16 `json:"level"` CurrNodePeerId string `json:"curr_node_peer_id"` IsRoot bool `json:"is_root"` IsTarget bool `json:"is_target"` }
type RequestGetInfoByChannelId ¶
type RequestGetInfoByChannelId struct {
ChannelId string `json:"channel_id"`
}
type Transaction ¶
type Transaction struct { TxId string `json:"txid"` SourceAddress string `json:"source_address"` DestinationAddress string `json:"destination_address"` Amount int64 `json:"amount"` UnsignedTx string `json:"unsignedtx"` SignedTx string `json:"signedtx"` }
func CreateTransaction ¶
type UserManager ¶
type UserManager struct { }
func (*UserManager) UserInfo ¶
func (service *UserManager) UserInfo(email string) (user *dao.User, e error)
func (*UserManager) UserLogout ¶
func (service *UserManager) UserLogout(user *bean.User) error
func (*UserManager) UserSignUp ¶
func (service *UserManager) UserSignUp(user *bean.User) error
UserSignUp
Source Files ¶
- addrtool_hdwallet.go
- addrtool_mnemonic.go
- atomic_swap.go
- btc_tool.go
- btc_tx_custom_p2sh.go
- btc_tx_p2PKH.go
- btc_tx_p2sh.go
- btc_tx_puzzle.go
- channel.go
- funding.go
- globalservice.go
- htlc_h.go
- htlc_path.go
- htlc_query.go
- htlc_tx_backward.go
- htlc_tx_close.go
- htlc_tx_common.go
- htlc_tx_forward.go
- httpservice.go
- msg_service.go
- node.go
- rsmc_commitment.go
- rsmc_commitment_query.go
- schedule.go
- user.go
Click to show internal directories.
Click to hide internal directories.