Documentation ¶
Index ¶
- Variables
- func Execute()
- func GetCreditValue() (string, error)
- func GetKey(url, key string) (string, error)
- func GetTokenUrlFromAccount(u *url.URL) (*url.URL, error)
- func GetVersion() (string, error)
- func IsLiteIdentity(urlstr string) (bool, error)
- func IsLiteTokenAccount(urlstr string) (bool, error)
- func PrintBlocks()
- func PrintEncrypt()
- func PrintGetMajorBlocks()
- func PrintGetMinorBlocks()
- func PrintJson(v interface{}) (string, error)
- func PrintJsonRpcError(err error) (string, error)
- func PrintKey()
- func PrintKeyExport()
- func PrintKeyGenerate()
- func PrintKeyImport()
- func PrintKeyPublic()
- func PrintMajorBlockQueryResponseV2(res *client.MajorQueryResponse) (string, error)
- func PrintTokenCreate()
- func PrintTokenGet()
- func QrAccount(s string) (string, error)
- func QueryAcmeOracle() (*protocol.AcmeOracle, error)
- func Remarshal(src interface{}, dst interface{}) error
- func RemarshalAs[T any](src any) (*T, error)
- func ValidateSigType(input string) (protocol.SignatureType, error)
- type ActionDataResponse
- type ActionLiteDataResponse
- type ActionResponse
- type ActionResponseError
- type Context
- func (x *Context) AddAuth(cmd *cobra.Command, account *url2.URL, signers []*api.SignRequest, ...) (string, error)
- func (x *Context) AddCredits(cmd *cobra.Command, origin string, args []string) (string, error)
- func (x *Context) BurnTokens(cmd *cobra.Command, origin string, args []string) (string, error)
- func (x *Context) CreateDataAccount(cmd *cobra.Command, origin string, args []string) (string, error)
- func (x *Context) CreateKeyBook(cmd *cobra.Command, args []string) (string, error)
- func (x *Context) CreateKeyPage(cmd *cobra.Command, args []string) (string, error)
- func (x *Context) CreateLiteDataAccount(cmd *cobra.Command, origin string, args []string) (string, error)
- func (x *Context) CreateLiteTokenAccount(cmd *cobra.Command, principal *url2.URL, signers []*api.SignRequest, ...) (string, error)
- func (x *Context) CreateTX(cmd *cobra.Command, sender string, args []string) (string, error)
- func (x *Context) CreateToken(cmd *cobra.Command, origin string, args []string) (string, error)
- func (x *Context) CreateTokenAccount(cmd *cobra.Command, principal *url2.URL, signers []*api.SignRequest, ...) (string, error)
- func (x *Context) DaemonSocket() string
- func (x *Context) DisableAuth(cmd *cobra.Command, account *url2.URL, signers []*api.SignRequest, ...) (string, error)
- func (x *Context) EnableAuth(cmd *cobra.Command, account *url2.URL, signers []*api.SignRequest, ...) (string, error)
- func (x *Context) ExecuteTX(cmd *cobra.Command, sender string, args []string) (string, error)
- func (x *Context) ExportAccounts(cmd *cobra.Command, filePath string) error
- func (x *Context) ExportKey(cmd *cobra.Command, label string) (string, error)
- func (x *Context) ExportKeys(cmd *cobra.Command) (out string, err error)
- func (x *Context) ExportMnemonic(cmd *cobra.Command) (string, error)
- func (x *Context) ExportSeed(cmd *cobra.Command) (string, error)
- func (x *Context) Faucet(cmd *cobra.Command, url string) (string, error)
- func (x *Context) GenerateKey(cmd *cobra.Command, labels ...string) (string, error)
- func (x *Context) Get(cmd *cobra.Command, urlStr string) (string, error)
- func (x *Context) GetADI(cmd *cobra.Command, url string) (string, error)
- func (x *Context) GetAdiDirectory(cmd *cobra.Command, origin string, start string, count string) (string, error)
- func (x *Context) GetAndPrintKeyBook(cmd *cobra.Command, args []string) (string, error)
- func (x *Context) GetAndPrintKeyPage(cmd *cobra.Command, url string) (string, error)
- func (x *Context) GetDataEntry(cmd *cobra.Command, accountUrl string, args []string) (string, error)
- func (x *Context) GetDataEntrySet(cmd *cobra.Command, accountUrl string, args []string) (string, error)
- func (x *Context) GetMajorBlocks(cmd *cobra.Command, args []string) (string, error)
- func (x *Context) GetMinorBlocks(cmd *cobra.Command, args []string) (string, error)
- func (x *Context) GetPendingTx(cmd *cobra.Command, origin string, args []string) (string, error)
- func (x *Context) GetTX(cmd *cobra.Command, hashOrUrl string) (string, error)
- func (x *Context) GetTXHistory(cmd *cobra.Command, accountUrl string, startArg string, endArg string) (string, error)
- func (x *Context) GetToken(cmd *cobra.Command, url string) (string, error)
- func (x *Context) GetTokenAccount(cmd *cobra.Command, url string) (string, error)
- func (x *Context) ImportAccounts(cmd *cobra.Command, filePath string) error
- func (x *Context) ImportFactoidKey(cmd *cobra.Command) (out string, err error)
- func (x *Context) ImportKey(cmd *cobra.Command, token []byte, label string, ...) (out string, err error)
- func (x *Context) ImportKeyPrompt(cmd *cobra.Command, label string, signatureType protocol.SignatureType) (out string, err error)
- func (x *Context) InitDBCreate(cmd *cobra.Command) error
- func (x *Context) InitDBImport(cmd *cobra.Command, memDb bool) error
- func (x *Context) IssueTokenToRecipient(cmd *cobra.Command, origin string, args []string) (string, error)
- func (x *Context) KeyPageUpdate(cmd *cobra.Command, origin string, op protocol.KeyPageOperationType, ...) (string, error)
- func (x *Context) ListAccounts(cmd *cobra.Command) (string, error)
- func (x *Context) PrintChainQueryResponseV2(cmd *cobra.Command, res *QueryResponse) (string, error)
- func (x *Context) PrintMinorBlockQueryResponseV2(cmd *cobra.Command, res *client.MinorQueryResponse) (string, error)
- func (x *Context) PrintMultiResponse(cmd *cobra.Command, res *client.MultiResponse) (string, error)
- func (x *Context) PrintTransactionQueryResponseV2(res *client.TransactionQueryResponse) (string, error)
- func (x *Context) RemoveAuth(cmd *cobra.Command, account *url2.URL, signers []*api.SignRequest, ...) (string, error)
- func (x *Context) ReplaceKey(cmd *cobra.Command, args []string) (string, error)
- func (x *Context) SignTX(cmd *cobra.Command, hashStr string, vote protocol.VoteType) (string, error)
- func (x *Context) SpawnDaemon() bool
- func (x *Context) WriteData(cmd *cobra.Command, accountUrl string, args []string) (string, error)
- func (x *Context) WriteDataTo(cmd *cobra.Command, accountUrl string, args []string) (string, error)
- type KeyResponse
- type QueryResponse
- type RpcError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Client *client.Client ClientV3 clientV3 Q v3.Querier2 ClientTimeout time.Duration ClientDebug bool WantJsonOutput = false TxPretend = false Prove = false Memo string Metadata flags.Bytes SigType string Authorities []string SignWith []*url.URL SignFor *url.URL SignerVersion uint DaemonConnStr string VaultName string Entropy uint WalletDir string NonInteractive bool Server string )
View Source
var ( TxWait time.Duration TxNoWait bool TxWaitSynth time.Duration TxIgnorePending bool TxLocal bool TxGetFor *url.URL )
View Source
var ( ApiToString = map[protocol.AccountType]string{ protocol.AccountTypeLiteTokenAccount: "Lite Account", protocol.AccountTypeTokenAccount: "ADI Token Account", protocol.AccountTypeIdentity: "ADI", protocol.AccountTypeKeyBook: "Key Book", protocol.AccountTypeKeyPage: "Key Page", protocol.AccountTypeDataAccount: "Data Chain", protocol.AccountTypeLiteDataAccount: "Lite Data Chain", } )
View Source
var DataSigningKeys []string
View Source
var ErrNonInteractive = fmt.Errorf("non-interactive")
View Source
var GetDirect bool
View Source
var Scratch bool
View Source
var WriteState bool
Functions ¶
func GetCreditValue ¶
func GetVersion ¶
func IsLiteIdentity ¶
func IsLiteTokenAccount ¶
func PrintBlocks ¶
func PrintBlocks()
func PrintEncrypt ¶
func PrintEncrypt()
func PrintGetMajorBlocks ¶
func PrintGetMajorBlocks()
func PrintGetMinorBlocks ¶
func PrintGetMinorBlocks()
func PrintJsonRpcError ¶
func PrintKeyExport ¶
func PrintKeyExport()
func PrintKeyGenerate ¶
func PrintKeyGenerate()
func PrintKeyImport ¶
func PrintKeyImport()
func PrintKeyPublic ¶
func PrintKeyPublic()
func PrintMajorBlockQueryResponseV2 ¶
func PrintMajorBlockQueryResponseV2(res *client.MajorQueryResponse) (string, error)
func PrintTokenCreate ¶
func PrintTokenCreate()
func PrintTokenGet ¶
func PrintTokenGet()
func QueryAcmeOracle ¶
func QueryAcmeOracle() (*protocol.AcmeOracle, error)
func Remarshal ¶
func Remarshal(src interface{}, dst interface{}) error
Remarshal uses mapstructure to convert a generic JSON-decoded map into a struct.
func RemarshalAs ¶ added in v0.4.0
func ValidateSigType ¶
func ValidateSigType(input string) (protocol.SignatureType, error)
Types ¶
type ActionDataResponse ¶
type ActionDataResponse struct { EntryHash types.Bytes32 `json:"entryHash"` ActionResponse }
func ActionResponseFromData ¶
func ActionResponseFromData(r *client.TxResponse, entryHash []byte) *ActionDataResponse
type ActionLiteDataResponse ¶
type ActionLiteDataResponse struct { AccountUrl types.String `json:"accountUrl"` AccountId types.Bytes32 `json:"accountId"` ActionDataResponse }
func ActionResponseFromLiteData ¶
func ActionResponseFromLiteData(r *client.TxResponse, accountUrl string, accountId []byte, entryHash []byte) *ActionLiteDataResponse
type ActionResponse ¶
type ActionResponse struct { TransactionHash types.Bytes `json:"transactionHash"` SignatureHashes []types.Bytes `json:"signatureHashes"` SimpleHash types.Bytes `json:"simpleHash"` Log types.String `json:"log"` Code types.String `json:"code"` Codespace types.String `json:"codespace"` Error types.String `json:"error"` Mempool types.String `json:"mempool"` Result *protocol.TransactionStatus `json:"result"` Flow []*client.TransactionQueryResponse `json:"flow"` }
func ActionResponseFrom ¶
func ActionResponseFrom(r *client.TxResponse) *ActionResponse
type ActionResponseError ¶
type ActionResponseError struct {
ActionResponse
}
func (*ActionResponseError) Error ¶
func (a *ActionResponseError) Error() string
type Context ¶ added in v0.6.0
type Context struct { viper.Viper // State DidError error // contains filtered or unexported fields }
func (*Context) AddCredits ¶ added in v0.6.0
func (*Context) BurnTokens ¶ added in v0.6.0
func (*Context) CreateDataAccount ¶ added in v0.6.0
func (*Context) CreateKeyBook ¶ added in v0.6.0
CreateKeyBook create a new key book
func (*Context) CreateKeyPage ¶ added in v0.6.0
CreateKeyPage create a new key page
func (*Context) CreateLiteDataAccount ¶ added in v0.6.0
func (*Context) CreateLiteTokenAccount ¶ added in v0.6.0
func (x *Context) CreateLiteTokenAccount(cmd *cobra.Command, principal *url2.URL, signers []*api.SignRequest, args []string) (string, error)
CreateLiteTokenAccount usage is: accumulate account create token --lite ${LTA} --sign-with ${KEY}@${SIGNER}
func (*Context) CreateToken ¶ added in v0.6.0
func (*Context) CreateTokenAccount ¶ added in v0.6.0
func (x *Context) CreateTokenAccount(cmd *cobra.Command, principal *url2.URL, signers []*api.SignRequest, args []string) (string, error)
CreateTokenAccount account create url labelOrPubKeyHex height index tokenUrl keyBookUrl
func (*Context) DaemonSocket ¶ added in v0.6.0
func (*Context) DisableAuth ¶ added in v0.6.0
func (*Context) EnableAuth ¶ added in v0.6.0
func (*Context) ExportAccounts ¶ added in v0.6.0
func (*Context) ExportKeys ¶ added in v0.6.0
func (*Context) ExportMnemonic ¶ added in v0.6.0
func (*Context) ExportSeed ¶ added in v0.6.0
func (*Context) GenerateKey ¶ added in v0.6.0
func (*Context) GetAdiDirectory ¶ added in v0.6.0
func (*Context) GetAndPrintKeyBook ¶ added in v0.6.0
func (*Context) GetAndPrintKeyPage ¶ added in v0.6.0
func (*Context) GetDataEntry ¶ added in v0.6.0
func (*Context) GetDataEntrySet ¶ added in v0.6.0
func (*Context) GetMajorBlocks ¶ added in v0.6.0
func (*Context) GetMinorBlocks ¶ added in v0.6.0
func (*Context) GetPendingTx ¶ added in v0.6.0
func (*Context) GetTXHistory ¶ added in v0.6.0
func (*Context) GetTokenAccount ¶ added in v0.6.0
func (*Context) ImportAccounts ¶ added in v0.6.0
func (*Context) ImportFactoidKey ¶ added in v0.6.0
func (*Context) ImportKey ¶ added in v0.6.0
func (x *Context) ImportKey(cmd *cobra.Command, token []byte, label string, signatureType protocol.SignatureType) (out string, err error)
ImportKey will import the private key and assign it to the label
func (*Context) ImportKeyPrompt ¶ added in v0.6.0
func (*Context) InitDBCreate ¶ added in v0.6.0
func (*Context) InitDBImport ¶ added in v0.6.0
func (*Context) IssueTokenToRecipient ¶ added in v0.6.0
func (*Context) KeyPageUpdate ¶ added in v0.6.0
func (*Context) ListAccounts ¶ added in v0.6.0
func (*Context) PrintChainQueryResponseV2 ¶ added in v0.6.0
func (*Context) PrintMinorBlockQueryResponseV2 ¶ added in v0.6.0
func (*Context) PrintMultiResponse ¶ added in v0.6.0
func (*Context) PrintTransactionQueryResponseV2 ¶ added in v0.6.0
func (x *Context) PrintTransactionQueryResponseV2(res *client.TransactionQueryResponse) (string, error)
func (*Context) RemoveAuth ¶ added in v0.6.0
func (*Context) ReplaceKey ¶ added in v0.6.0
func (*Context) SpawnDaemon ¶ added in v0.6.0
type KeyResponse ¶
type KeyResponse struct { Lite types.String `json:"name,omitempty"` Addresses []types.String `json:"addresses,omitempty"` Names []types.String `json:"names,omitempty"` PrivateKey types.Bytes `json:"privateKey,omitempty"` PublicKey types.Bytes `json:"publicKey,omitempty"` KeyInfo api.KeyInfo `json:"keyInfo,omitempty"` KeyHash types.Bytes `json:"keyHash,omitempty"` NativeAddress types.String `json:"nativeAddress,omitempty"` LastUsedOn uint64 `json:"lastUsedOn,omitempty"` LiteAccount *url.URL `json:"liteAccount,omitempty"` Seed types.Bytes `json:"seed,omitempty"` Mnemonic types.String `json:"mnemonic,omitempty"` }
func (*KeyResponse) Print ¶ added in v0.4.0
func (r *KeyResponse) Print() string
type QueryResponse ¶
type QueryResponse struct { Type string `json:"type,omitempty"` MainChain *client.MerkleState `json:"mainChain,omitempty"` Data interface{} `json:"data,omitempty"` ChainId []byte `json:"chainId,omitempty"` Origin string `json:"origin,omitempty"` KeyPage *client.KeyPage `json:"keyPage,omitempty"` Txid []byte `json:"txid,omitempty"` Signatures []protocol.Signature `json:"signatures,omitempty"` Status *protocol.TransactionStatus `json:"status,omitempty"` SyntheticTxids [][32]byte `json:"syntheticTxids,omitempty"` }
This is a hack to reduce how much we have to change
func GetKeyBook ¶
func GetKeyBook(url string) (*QueryResponse, *protocol.KeyBook, error)
func GetKeyPage ¶
func GetKeyPage(url string) (*QueryResponse, *protocol.KeyPage, error)
func GetUrl ¶
func GetUrl(urlstr string) (*QueryResponse, error)
Source Files ¶
- account.go
- adi.go
- auth.go
- blocks.go
- book.go
- cli_config.go
- config.go
- credits.go
- data.go
- encrypt.go
- faucet.go
- follower.go
- get.go
- history.go
- init.go
- key.go
- ledger.go
- operator.go
- oracle.go
- output.go
- page.go
- resubmit.go
- root.go
- staking.go
- token.go
- tx.go
- util.go
- util_nix.go
- util_signing.go
- validator.go
- version.go
- wallet.go
- wallet_unix.go
Click to show internal directories.
Click to hide internal directories.