Versions in this module Expand all Collapse all v4 v4.0.1 Jul 6, 2019 Changes in this version + const Base58c + const Base64c + const ConfigFilename + const IDTagAccount + const IDTagChannel + const IDTagCommitment + const IDTagContract + const IDTagName + const IDTagOracle + const ObjectTagAccount + const ObjectTagChannel + const ObjectTagChannelCloseMutualTransaction + const ObjectTagChannelCloseSoloTransaction + const ObjectTagChannelCreateTransaction + const ObjectTagChannelDepositTransaction + const ObjectTagChannelForceProgressTransaction + const ObjectTagChannelOffChainTransaction + const ObjectTagChannelOffChainUpdateCallContract + const ObjectTagChannelOffChainUpdateCreateContract + const ObjectTagChannelOffChainUpdateDeposit + const ObjectTagChannelOffChainUpdateTransfer + const ObjectTagChannelOffChainUpdateWithdrawal + const ObjectTagChannelSettleTransaction + const ObjectTagChannelSlashTransaction + const ObjectTagChannelSnapshotTransaction + const ObjectTagChannelWithdrawTransaction + const ObjectTagContract + const ObjectTagContractCall + const ObjectTagContractCallTransaction + const ObjectTagContractCreateTransaction + const ObjectTagLightMicroBlock + const ObjectTagMicroBody + const ObjectTagNameServiceClaimTransaction + const ObjectTagNameServiceCommitment + const ObjectTagNameServiceName + const ObjectTagNameServicePreclaimTransaction + const ObjectTagNameServiceRevokeTransaction + const ObjectTagNameServiceTransferTransaction + const ObjectTagNameServiceUpdateTransaction + const ObjectTagOracle + const ObjectTagOracleExtendTransaction + const ObjectTagOracleQuery + const ObjectTagOracleQueryTransaction + const ObjectTagOracleRegisterTransaction + const ObjectTagOracleResponseTransaction + const ObjectTagPoi + const ObjectTagSignedTransaction + const ObjectTagSpendTransaction + const PrefixAccountPubkey + const PrefixBlockProofOfFraudHash + const PrefixBlockStateHash + const PrefixBlockTransactionHash + const PrefixChannel + const PrefixCommitment + const PrefixContractByteArray + const PrefixContractPubkey + const PrefixKeyBlockHash + const PrefixMicroBlockHash + const PrefixName + const PrefixOraclePubkey + const PrefixOracleQuery + const PrefixOracleQueryID + const PrefixOracleResponse + const PrefixPeerPubkey + const PrefixProofOfInclusion + const PrefixSeparator + const PrefixSignature + const PrefixState + const PrefixStateTrees + const PrefixTransaction + const PrefixTransactionHash + var Config = ProfileConfig + func BaseEncodeTx(tx Tx) (string, error) + func BroadcastTransaction(c transactionPoster, txSignedBase64 string) (err error) + func Decode(in string) (out []byte, err error) + func DecodeRLPMessage(rawBytes []byte) []interface + func Encode(prefix HashPrefix, data []byte) string + func GetNextNonce(c getAccounter, accountID string) (nextNonce uint64, err error) + func GetTTL(c getHeighter, offset uint64) (ttl uint64, err error) + func GetTTLNonce(c getHeightAccounter, accountID string, offset uint64) (height uint64, nonce uint64, err error) + func GetWalletPath(path string) (walletPath string, err error) + func KeystoreSeal(account *Account, password string) (j []byte, e error) + func Namehash(name string) []byte + func Pp(data ...interface{}) + func PpI(indentSize int, data ...interface{}) + func PpT(indentSize int, title string) + func PrintError(code string, e *models.Error) + func PrintObject(title string, i interface{}) + func SignEncodeTx(kp *Account, txRaw []byte, networkID string) (signedEncodedTx, signedEncodedTxHash, signature string, err error) + func SignEncodeTxStr(kp *Account, tx string, networkID string) (signedEncodedTx, signedEncodedTxHash, signature string, err error) + func StoreAccountToKeyStoreFile(account *Account, password, walletName string) (filePath string, err error) + func Verify(address string, message, signature []byte) (valid bool, err error) + func VerifySignedTx(accountID string, txSigned string, networkID string) (valid bool, err error) + func WaitForTransactionUntilHeight(c getTransactionByHashHeighter, txHash string, untilHeight uint64) (blockHeight uint64, blockHash string, err error) + type Account struct + Address string + SigningKey ed25519.PrivateKey + func AccountFromHexString(hexPrivateKey string) (account *Account, err error) + func KeystoreOpen(data []byte, password string) (account *Account, err error) + func LoadAccountFromKeyStoreFile(keyFile, password string) (account *Account, err error) + func NewAccount() (account *Account, err error) + func (account *Account) Sign(message []byte) (signature []byte) + func (account *Account) SigningKeyToHexString() (signingKeyHex string) + type AensConfig struct + ClaimFee big.Int + ClientTTL uint64 + NameTTL uint64 + PreClaimFee big.Int + UpdateFee big.Int + type ClientConfig struct + BaseGas big.Int + Contracts ContractConfig + DefaultKey string + Fee big.Int + GasPerByte big.Int + GasPrice big.Int + Names AensConfig + NativeTransactions bool + Offline bool + Oracles OracleConfig + StateChannels StateChannelConfig + TTL uint64 + type Compiler struct + func NewCompiler(compilerURL string, debug bool) *Compiler + func (c *Compiler) APIVersion() (version string, err error) + func (c *Compiler) CompileContract(source string) (bytecode string, err error) + func (c *Compiler) DecodeCallResult(callResult string, callValue string, function string, source string) (answer interface{}, err error) + func (c *Compiler) DecodeCalldataBytecode(bytecode string, calldata string) (decodedCallData *models.DecodedCalldata, err error) + func (c *Compiler) DecodeCalldataSource(source string, callData string) (decodedCallData *models.DecodedCalldata, err error) + func (c *Compiler) DecodeData(data string, sophiaType string) (decodedData *models.SophiaJSONData, err error) + func (c *Compiler) EncodeCalldata(source string, function string, args []string) (callData string, err error) + func (c *Compiler) GenerateACI(source string) (aci *models.ACI, err error) + func (c *Compiler) SophiaVersion() (version string, err error) + type Context struct + Address string + Client *Node + func (c *Context) ContractCallTx(ContractID, CallData string, AbiVersion uint16, ...) (tx ContractCallTx, err error) + func (c *Context) ContractCreateTx(Code string, CallData string, VMVersion, AbiVersion uint16, ...) (tx ContractCreateTx, err error) + func (c *Context) NameClaimTx(name string, nameSalt big.Int, fee big.Int) (tx NameClaimTx, err error) + func (c *Context) NamePreclaimTx(name string, fee big.Int) (tx NamePreclaimTx, nameSalt *big.Int, err error) + func (c *Context) NameRevokeTx(name string) (tx NameRevokeTx, err error) + func (c *Context) NameTransferTx(name string, recipientAddress string) (tx NameTransferTx, err error) + func (c *Context) NameUpdateTx(name string, targetAddress string) (tx NameUpdateTx, err error) + func (c *Context) OracleExtendTx(oracleID string, ttlType, ttlValue uint64) (tx OracleExtendTx, err error) + func (c *Context) OracleQueryTx(OracleID, Query string, QueryFee big.Int, ...) (tx OracleQueryTx, err error) + func (c *Context) OracleRegisterTx(querySpec, responseSpec string, queryFee big.Int, ...) (tx OracleRegisterTx, err error) + func (c *Context) OracleRespondTx(OracleID string, QueryID string, Response string, TTLType uint64, ...) (tx OracleRespondTx, err error) + type ContractCallTx struct + AbiVersion uint16 + AccountNonce uint64 + Amount big.Int + CallData string + CallerID string + ContractID string + Fee big.Int + Gas big.Int + GasPrice big.Int + TTL uint64 + func NewContractCallTx(CallerID string, AccountNonce uint64, ContractID string, ...) ContractCallTx + func (tx *ContractCallTx) FeeEstimate() (*big.Int, error) + func (tx *ContractCallTx) JSON() (string, error) + func (tx *ContractCallTx) RLP() (rlpRawMsg []byte, err error) + type ContractConfig struct + ABIVersion uint16 + Amount big.Int + Deposit big.Int + Gas big.Int + GasPrice big.Int + VMVersion uint16 + type ContractCreateTx struct + AbiVersion uint16 + AccountNonce uint64 + Amount big.Int + CallData string + Code string + Deposit big.Int + Fee big.Int + Gas big.Int + GasPrice big.Int + OwnerID string + TTL uint64 + VMVersion uint16 + func NewContractCreateTx(OwnerID string, AccountNonce uint64, Code string, VMVersion, AbiVersion uint16, ...) ContractCreateTx + func (tx *ContractCreateTx) ContractID() (string, error) + func (tx *ContractCreateTx) FeeEstimate() (*big.Int, error) + func (tx *ContractCreateTx) JSON() (string, error) + func (tx *ContractCreateTx) RLP() (rlpRawMsg []byte, err error) + type HashPrefix string + func GetHashPrefix(hash string) (p HashPrefix) + type NameClaimTx struct + AccountID string + AccountNonce uint64 + Fee big.Int + Name string + NameSalt big.Int + TTL uint64 + func NewNameClaimTx(accountID, name string, nameSalt big.Int, fee big.Int, ...) NameClaimTx + func (tx *NameClaimTx) FeeEstimate() (*big.Int, error) + func (tx *NameClaimTx) JSON() (string, error) + func (tx *NameClaimTx) RLP() (rlpRawMsg []byte, err error) + type NamePointer struct + func NewNamePointer(key string, id string) *NamePointer + func (np *NamePointer) EncodeRLP(w io.Writer) (err error) + type NamePreclaimTx struct + AccountID string + AccountNonce uint64 + CommitmentID string + Fee big.Int + TTL uint64 + func NewNamePreclaimTx(accountID, commitmentID string, fee big.Int, ttl, accountNonce uint64) NamePreclaimTx + func (tx *NamePreclaimTx) FeeEstimate() (*big.Int, error) + func (tx *NamePreclaimTx) JSON() (string, error) + func (tx *NamePreclaimTx) RLP() (rlpRawMsg []byte, err error) + type NameRevokeTx struct + AccountID string + AccountNonce uint64 + Fee big.Int + NameID string + TTL uint64 + func NewNameRevokeTx(accountID, name string, fee big.Int, ttl, accountNonce uint64) NameRevokeTx + func (tx *NameRevokeTx) FeeEstimate() (*big.Int, error) + func (tx *NameRevokeTx) JSON() (string, error) + func (tx *NameRevokeTx) RLP() (rlpRawMsg []byte, err error) + type NameTransferTx struct + AccountID string + AccountNonce uint64 + Fee big.Int + NameID string + RecipientID string + TTL uint64 + func NewNameTransferTx(AccountID, NameID, RecipientID string, Fee big.Int, TTL, AccountNonce uint64) NameTransferTx + func (tx *NameTransferTx) FeeEstimate() (*big.Int, error) + func (tx *NameTransferTx) JSON() (string, error) + func (tx *NameTransferTx) RLP() (rlpRawMsg []byte, err error) + type NameUpdateTx struct + AccountID string + AccountNonce uint64 + ClientTTL uint64 + Fee big.Int + NameID string + NameTTL uint64 + Pointers []*NamePointer + TTL uint64 + func NewNameUpdateTx(accountID, nameID string, pointers []string, nameTTL, clientTTL uint64, ...) NameUpdateTx + func (tx *NameUpdateTx) FeeEstimate() (*big.Int, error) + func (tx *NameUpdateTx) JSON() (string, error) + func (tx *NameUpdateTx) RLP() (rlpRawMsg []byte, err error) + type Node struct + func NewNode(nodeURL string, debug bool) *Node + func (c *Node) GetAccount(accountID string) (account *models.Account, err error) + func (c *Node) GetContractByID(ctID string) (contract *models.ContractObject, err error) + func (c *Node) GetCurrentKeyBlock() (kb *models.KeyBlock, err error) + func (c *Node) GetGenerationByHeight(height uint64) (g *models.Generation, err error) + func (c *Node) GetHeight() (height uint64, err error) + func (c *Node) GetKeyBlockByHash(keyBlockID string) (txs *models.KeyBlock, err error) + func (c *Node) GetMicroBlockHeaderByHash(microBlockID string) (txs *models.MicroBlockHeader, err error) + func (c *Node) GetMicroBlockTransactionsByHash(microBlockID string) (txs *models.GenericTxs, err error) + func (c *Node) GetNameEntryByName(name string) (nameEntry *models.NameEntry, err error) + func (c *Node) GetOracleByPubkey(pubkey string) (oracle *models.RegisteredOracle, err error) + func (c *Node) GetOracleQueriesByPubkey(pubkey string) (oracleQueries *models.OracleQueries, err error) + func (c *Node) GetStatus() (status *models.Status, err error) + func (c *Node) GetTopBlock() (kb *models.KeyBlockOrMicroBlockHeader, err error) + func (c *Node) GetTransactionByHash(txHash string) (tx *models.GenericSignedTx, err error) + func (c *Node) PostTransaction(signedEncodedTx, signedEncodedTxHash string) (err error) + func (c *Node) PrintGenerationByHeight(height uint64) + type NodeConfig struct + NetworkID string + URL string + URLChannels string + URLInternal string + type ObjectEncoding string + type OracleConfig struct + QueryFee big.Int + QueryTTLType uint64 + QueryTTLValue uint64 + ResponseTTLType uint64 + ResponseTTLValue uint64 + VMVersion uint64 + type OracleExtendTx struct + AccountNonce uint64 + Fee big.Int + OracleID string + OracleTTLType uint64 + OracleTTLValue uint64 + TTL uint64 + func NewOracleExtendTx(oracleID string, accountNonce, oracleTTLType, oracleTTLValue uint64, ...) OracleExtendTx + func (tx *OracleExtendTx) JSON() (string, error) + func (tx *OracleExtendTx) RLP() (rlpRawMsg []byte, err error) + type OracleQueryTx struct + AccountNonce uint64 + Fee big.Int + OracleID string + Query string + QueryFee big.Int + QueryTTLType uint64 + QueryTTLValue uint64 + ResponseTTLType uint64 + ResponseTTLValue uint64 + SenderID string + TTL uint64 + func NewOracleQueryTx(SenderID string, AccountNonce uint64, OracleID, Query string, QueryFee big.Int, ...) OracleQueryTx + func (tx *OracleQueryTx) JSON() (string, error) + func (tx *OracleQueryTx) RLP() (rlpRawMsg []byte, err error) + type OracleRegisterTx struct + AbiVersion uint16 + AccountID string + AccountNonce uint64 + Fee big.Int + OracleTTLType uint64 + OracleTTLValue uint64 + QueryFee big.Int + QuerySpec string + ResponseSpec string + TTL uint64 + func NewOracleRegisterTx(accountID string, accountNonce uint64, querySpec, responseSpec string, ...) OracleRegisterTx + func (tx *OracleRegisterTx) JSON() (string, error) + func (tx *OracleRegisterTx) RLP() (rlpRawMsg []byte, err error) + type OracleRespondTx struct + AccountNonce uint64 + Fee big.Int + OracleID string + QueryID string + Response string + ResponseTTLType uint64 + ResponseTTLValue uint64 + TTL uint64 + func NewOracleRespondTx(OracleID string, AccountNonce uint64, QueryID string, Response string, ...) OracleRespondTx + func (tx *OracleRespondTx) JSON() (string, error) + func (tx *OracleRespondTx) RLP() (rlpRawMsg []byte, err error) + type ProfileConfig struct + Client ClientConfig + Name string + Node NodeConfig + Tuning TuningConfig + type SpendTx struct + Amount big.Int + Fee big.Int + Nonce uint64 + Payload string + RecipientID string + SenderID string + TTL uint64 + func NewSpendTx(senderID, recipientID string, amount, fee big.Int, payload string, ...) SpendTx + func (tx *SpendTx) FeeEstimate() (*big.Int, error) + func (tx *SpendTx) JSON() (string, error) + func (tx *SpendTx) RLP() (rlpRawMsg []byte, err error) + type StateChannelConfig struct + ChannelReserve uint64 + LockPeriod uint64 + type TuningConfig struct + ChainPollInteval int64 + ChainTimeout int64 + CryptoKdfMemlimit uint32 + CryptoKdfOpslimit uint32 + CryptoKdfThreads uint8 + OutputFormatJSON bool + type Tx interface + RLP func() ([]byte, error) Other modules containing this package github.com/aeternity/aepp-sdk-go github.com/aeternity/aepp-sdk-go/v5 github.com/aeternity/aepp-sdk-go/v6 github.com/aeternity/aepp-sdk-go/v7 github.com/aeternity/aepp-sdk-go/v8 github.com/aeternity/aepp-sdk-go/v9