Documentation ¶
Index ¶
- func Execute()
- func NewAction(contract string, name string, data string) *rpcpb.Action
- type SDK
- func (s *SDK) CreateNewAccount(newID string, ownerKey string, activeKey string, initialGasPledge int64, ...) (string, error)
- func (s *SDK) GetContractStorage(r *rpcpb.GetContractStorageRequest) (*rpcpb.GetContractStorageResponse, error)
- func (s *SDK) GetProducerVoteInfo(r *rpcpb.GetProducerVoteInfoRequest) (*rpcpb.GetProducerVoteInfoResponse, error)
- func (s *SDK) GetSignAlgo() crypto.Algorithm
- func (s *SDK) GetSignAlgoByEnum(enum rpcpb.Signature_Algorithm) crypto.Algorithm
- func (s *SDK) GetSignAlgoByName(name string) crypto.Algorithm
- func (s *SDK) GetTxReceiptByTxHash(txHashStr string) (*rpcpb.TxReceipt, error)
- func (s *SDK) LoadAccount() error
- func (s *SDK) PledgeForGasAndRAM(gasPledged int64, ram int64) error
- func (s *SDK) PublishContract(codePath string, abiPath string, conID string, update bool, updateID string) (*rpcpb.TransactionRequest, string, error)
- func (s *SDK) SaveAccount(name string, kp *account.KeyPair) error
- func (s *SDK) SendTx(tx *rpcpb.TransactionRequest) (string, error)
- func (s *SDK) SendTxFromActions(actions []*rpcpb.Action) (txHash string, err error)
- func (s *SDK) SetAccount(name string, kp *account.KeyPair)
- func (s *SDK) SetAmountLimit(amountLimit string)
- func (s *SDK) SetChainID(chainID uint32)
- func (s *SDK) SetCheckResult(checkResult bool, checkResultDelay float32, checkResultMaxRetry int32)
- func (s *SDK) SetServer(server string)
- func (s *SDK) SetSignAlgo(signAlgo string)
- func (s *SDK) SetTxInfo(gasLimit float64, gasRatio float64, expiration int64, delaySecond int64)
- func (s *SDK) SetVerbose(verbose bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SDK ¶ added in v1.1.0
type SDK struct {
// contains filtered or unexported fields
}
SDK ...
func (*SDK) CreateNewAccount ¶ added in v1.1.0
func (s *SDK) CreateNewAccount(newID string, ownerKey string, activeKey string, initialGasPledge int64, initialRAM int64, initialCoins int64) (string, error)
CreateNewAccount ... return txHash
func (*SDK) GetContractStorage ¶ added in v1.1.0
func (s *SDK) GetContractStorage(r *rpcpb.GetContractStorageRequest) (*rpcpb.GetContractStorageResponse, error)
GetContractStorage ...
func (*SDK) GetProducerVoteInfo ¶
func (s *SDK) GetProducerVoteInfo(r *rpcpb.GetProducerVoteInfoRequest) (*rpcpb.GetProducerVoteInfoResponse, error)
GetProducerVoteInfo ...
func (*SDK) GetSignAlgoByEnum ¶
GetSignAlgoByEnum ...
func (*SDK) GetSignAlgoByName ¶
GetSignAlgoByName ...
func (*SDK) GetTxReceiptByTxHash ¶ added in v1.1.0
GetTxReceiptByTxHash ...
func (*SDK) PledgeForGasAndRAM ¶ added in v1.1.0
PledgeForGasAndRAM ...
func (*SDK) PublishContract ¶ added in v1.1.0
func (s *SDK) PublishContract(codePath string, abiPath string, conID string, update bool, updateID string) (*rpcpb.TransactionRequest, string, error)
PublishContract converts contract js code to transaction. If 'send', also send it to chain.
func (*SDK) SaveAccount ¶
SaveAccount save account to file
func (*SDK) SendTxFromActions ¶
SendTxFromActions send transaction and check result if sdk.checkResult is set
func (*SDK) SetAccount ¶ added in v1.1.0
SetAccount ...
func (*SDK) SetCheckResult ¶ added in v1.1.0
SetCheckResult ...
Source Files ¶
Click to show internal directories.
Click to hide internal directories.