Documentation
¶
Overview ¶
Copyright 2019 icodezjb
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 icodezjb ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 icodezjb ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- func Must(err error)
- func VersionFunc() string
- type Config
- type ContractDetails
- type Handler
- func (h *Handler) AuditContract(ctx context.Context, result interface{}, contractId common.Hash) error
- func (h *Handler) DeployContract(ctx context.Context) error
- func (h *Handler) GetContractId(ctx context.Context, txID common.Hash) (*HtlcLogHTLCNew, error)
- func (h *Handler) NewContract(ctx context.Context, participant common.Address, amount int64, ...) (*types.Transaction, error)
- func (h *Handler) Redeem(ctx context.Context, contractId common.Hash, secret common.Hash) (*types.Transaction, error)
- func (h *Handler) Refund(ctx context.Context, contractId common.Hash) (*types.Transaction, error)
- func (h *Handler) StatContract(ctx context.Context) error
- type HtlcLogHTLCNew
- type SecretHashPair
Constants ¶
This section is empty.
Variables ¶
var ( Commit = "unknown-commit" BuildTime = "unknown-buildtime" Version = "0.2.0" )
Functions ¶
Types ¶
type Config ¶
type Config struct { ChainID *big.Int `json:"chainID"` ChainName string `json:"chainName"` URL string `json:"url"` OtherChainID *big.Int `json:"otherChainID"` OtherChainName string `json:"otherChainName"` OtherURL string `json:"otherURL"` Account string `json:"account"` Contract string `json:"contract"` KeyStore string `json:"keystoreDir"` Password string `json:"password"` Chain *chain `json:"-"` // contains filtered or unexported fields }
func (*Config) ParseConfig ¶
func (*Config) ValidateAddress ¶
type ContractDetails ¶
type Handler ¶
func (*Handler) AuditContract ¶
func (*Handler) GetContractId ¶
func (*Handler) NewContract ¶
type HtlcLogHTLCNew ¶
type SecretHashPair ¶
func NewSecretHashPair ¶
func NewSecretHashPair() *SecretHashPair