Documentation ¶
Index ¶
- Constants
- func NewAccount(pubKey ic.PubKey, amount int64) (*ledgerpb.Account, error)
- func NewChannelCommit(fromKey ic.PubKey, toKey ic.PubKey, amount int64) (*ledgerpb.ChannelCommit, error)
- func NewChannelState(id *ledgerpb.ChannelID, sequence int64, fromAccount *ledgerpb.Account, ...) *ledgerpb.ChannelState
- func NewContractID(id string, key ic.PubKey) (*escrowpb.ContractID, error)
- func NewEscrowContract(id string, payerPubKey ic.PubKey, hostPubKey ic.PubKey, authPubKey ic.PubKey, ...) (*escrowpb.EscrowContract, error)
- func NewPayinRequest(payinId string, payerPubkey ic.PubKey, state *ledgerpb.SignedChannelState) (*escrowpb.PayinRequest, error)
- func NewSignedChannelCommit(commit *ledgerpb.ChannelCommit, sig []byte) *ledgerpb.SignedChannelCommit
- func NewSignedChannelState(channelState *ledgerpb.ChannelState, fromSig []byte, toSig []byte) *ledgerpb.SignedChannelState
- func NewSignedCreateAccountRequest(key *ledgerpb.PublicKey, sig []byte) *ledgerpb.SignedCreateAccountRequest
- func NewSignedPayinRequest(req *escrowpb.PayinRequest, sig []byte) *escrowpb.SignedPayinRequest
- func NewSignedPublicKey(privK ic.PrivKey, pubK ic.PubKey) (*ledgerpb.SignedPublicKey, error)
- func NewSingedContractID(id *escrowpb.ContractID, sig []byte) *escrowpb.SignedContractID
- type Client
- func (c *Client) CloseChannel(ctx context.Context, signedChannelState *ledgerpb.SignedChannelState) error
- func (c *Client) CreateChannel(ctx context.Context, channelCommit *ledgerpb.ChannelCommit, sig []byte) (*ledgerpb.ChannelID, error)
- func (c *Client) ImportAccount(ctx context.Context, pubKey ic.PubKey) (*ledgerpb.Account, error)
- func (c *Client) ImportSignedAccount(ctx context.Context, privKey ic.PrivKey, pubKey ic.PubKey) (*ledgerpb.SignedCreateAccountResult, error)
Constants ¶
View Source
const LedgerVersion = "BTFS_Escrow_1.0.0"
Variables ¶
This section is empty.
Functions ¶
func NewChannelCommit ¶
func NewChannelState ¶
func NewContractID ¶
func NewEscrowContract ¶
func NewPayinRequest ¶
func NewPayinRequest(payinId string, payerPubkey ic.PubKey, state *ledgerpb.SignedChannelState) ( *escrowpb.PayinRequest, error)
func NewSignedChannelCommit ¶
func NewSignedChannelCommit(commit *ledgerpb.ChannelCommit, sig []byte) *ledgerpb.SignedChannelCommit
func NewSignedChannelState ¶
func NewSignedChannelState(channelState *ledgerpb.ChannelState, fromSig []byte, toSig []byte) *ledgerpb.SignedChannelState
func NewSignedCreateAccountRequest ¶
func NewSignedCreateAccountRequest(key *ledgerpb.PublicKey, sig []byte) *ledgerpb.SignedCreateAccountRequest
func NewSignedPayinRequest ¶
func NewSignedPayinRequest(req *escrowpb.PayinRequest, sig []byte) *escrowpb.SignedPayinRequest
func NewSignedPublicKey ¶
func NewSingedContractID ¶
func NewSingedContractID(id *escrowpb.ContractID, sig []byte) *escrowpb.SignedContractID
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CloseChannel ¶
func (*Client) CreateChannel ¶
func (*Client) ImportAccount ¶
Click to show internal directories.
Click to hide internal directories.