Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) GetCombinedName(subName, parentName string) string
- func (c *Client) ProcessPaymentTx(txHash string) error
- func (c *Client) RegisterName(name string) error
- func (c *Client) RegisterSubDomain(subName, parentName string) error
- func (c *Client) SetResolver(name string) error
- func (c *Client) UnlockAccount(keys ...string) error
- func (c *Client) UnlockAccountFromConfig(cfg *config.TemporalConfig) error
- func (c *Client) UpdateContentHash(subName, parentName, hash string) error
- func (c *Client) WaitForConfirmations(tx *types.Transaction) error
Constants ¶
const (
// TemporalENSName is our official ens name
TemporalENSName = "ipfstemporal.eth"
)
const (
// TxStatusSuccess is the status emitted on a successfuly transaction for onrik/ethrpc
TxStatusSuccess = "0x1"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { ETH *ethclient.Client RPC *ethrpc.EthRPC Auth *bind.TransactOpts RTCAddress string PaymentContractAddress string ConfirmationCount int // contains filtered or unexported fields }
Client is our connection to ethereum
func (*Client) GetCombinedName ¶
GetCombinedName is used to return a combined ens name
func (*Client) ProcessPaymentTx ¶
ProcessPaymentTx is used to process an ethereum/rtc based credit purchase
func (*Client) RegisterName ¶
RegisterName is used to register an ENS name
func (*Client) RegisterSubDomain ¶
RegisterSubDomain is used to register a subdomain under ipfstemporal.eth, allowing it to be updated with a content hash
func (*Client) SetResolver ¶
SetResolver is used to check if name doesnt have a public resolver, set it
func (*Client) UnlockAccount ¶
UnlockAccount is used to unlck our main account
func (*Client) UnlockAccountFromConfig ¶
UnlockAccountFromConfig generates a bind transactor opts from temporal config
func (*Client) UpdateContentHash ¶
UpdateContentHash is used to update the ipfs content hash of a particular *.ipfstemporal.eth subdomain
func (*Client) WaitForConfirmations ¶
func (c *Client) WaitForConfirmations(tx *types.Transaction) error
WaitForConfirmations is used to wait for enough block confirmations for a tx to be considered valid