Documentation ¶
Index ¶
- Variables
- func AddCredits(actor string, args []string) (string, error)
- func CreateAccount(url string, args []string) (string, error)
- func CreateDataAccount(actorUrl string, args []string) (string, error)
- func CreateKeyBook(book string, args []string) (string, error)
- func CreateKeyPage(page string, args []string) (string, error)
- func CreateTX(sender string, args []string) (string, error)
- func Execute()
- func ExportKey(label string) (string, error)
- func ExportKeys() (out string, err error)
- func ExportMnemonic() (string, error)
- func ExportSeed() (string, error)
- func Faucet(url string) (string, error)
- func FindLabelFromPubKey(pubKey []byte) (lab string, err error)
- func GenerateAccount() (string, error)
- func GenerateKey(label string) (string, error)
- func GeneratePrivateKey() (privKey []byte, err error)
- func Get(url string) (string, error)
- func GetADI(url string) (string, error)
- func GetAccount(url string) (string, error)
- func GetAdiDirectory(actor string) (string, error)
- func GetAndPrintKeyBook(url string) (string, error)
- func GetAndPrintKeyPage(url string) (string, error)
- func GetByChainId(chainId []byte) (*acmeapi.APIDataResponse, error)
- func GetDataEntry(accountUrl string, args []string) (string, error)
- func GetDataEntrySet(accountUrl string, args []string) (string, error)
- func GetKey(url, key string) (string, error)
- func GetKeyBook(url string) ([]byte, *protocol.KeyBook, error)
- func GetKeyPage(url string) ([]byte, *protocol.KeyPage, error)
- func GetKeyPageInBook(book string, keyLabel string) (*protocol.KeyPage, int, error)
- func GetTX(hash string) (string, error)
- func GetTXHistory(accountUrl string, s string, e string) (string, error)
- func GetUrl(url string, method string) ([]byte, error)
- func GetVersion() (string, error)
- func ImportKey(pkhex string, label string) (out string, err error)
- func ImportMnemonic(mnemonic []string) (string, error)
- func InitRootCmd(database db.DB) *cobra.Command
- func IsLiteAccount(url string) bool
- func KeyPageUpdate(actorUrl string, op protocol.KeyPageOperation, args []string) (string, error)
- func ListADIs() (string, error)
- func ListAccounts() (string, error)
- func ListKeyPublic() (out string, err error)
- func LookupByLabel(label string) ([]byte, error)
- func LookupByPubKey(pubKey []byte) ([]byte, error)
- func NewADI(actor string, params []string) (string, error)
- func NewADIFromADISigner(actor *url2.URL, args []string) (string, error)
- func PrintADI()
- func PrintADICreate()
- func PrintADIGet()
- func PrintADIImport()
- func PrintAccount()
- func PrintAccountCreate()
- func PrintAccountExport()
- func PrintAccountGenerate()
- func PrintAccountGet()
- func PrintAccountImport()
- func PrintAccountList()
- func PrintAccountQr()
- func PrintAccountRestore()
- func PrintAdiDirectory()
- func PrintCredits()
- func PrintData()
- func PrintDataAccountCreate()
- func PrintDataGet()
- func PrintDataWrite()
- func PrintFaucet()
- func PrintGet()
- func PrintJsonRpcError(err error) (string, error)
- func PrintKey()
- func PrintKeyBook()
- func PrintKeyBookCreate()
- func PrintKeyBookGet()
- func PrintKeyExport()
- func PrintKeyGenerate()
- func PrintKeyImport()
- func PrintKeyPageCreate()
- func PrintKeyPageGet()
- func PrintKeyPublic()
- func PrintKeyUpdate()
- func PrintPage()
- func PrintQueryResponse(res *acmeapi.APIDataResponse) (string, error)
- func PrintQueryResponseV2(v2 *api2.QueryResponse) (string, error)
- func PrintTX()
- func PrintTXCreate()
- func PrintTXGet()
- func PrintTXHistoryGet()
- func QrAccount(s string) (string, error)
- func RestoreAccounts() (out string, err error)
- func WriteData(accountUrl string, args []string) (string, error)
- type AccountKeyBookStore
- type ActionDataResponse
- type ActionResponse
- type KeyBookStore
- type KeyPageStore
- type KeyResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Client = client.NewAPIClient() Db db.DB WantJsonOutput = false TxPretend = false )
View Source
var ( BucketAnon = []byte("anon") BucketAdi = []byte("adi") BucketKeys = []byte("keys") BucketLabel = []byte("label") BucketMnemonic = []byte("mnemonic") )
View Source
var ( TxWait time.Duration TxWaitSynth time.Duration )
View Source
var (
ApiToString = map[string]string{
"liteTokenAccount": "lite account",
"tokenAccount": "ADI token account",
"adi": "ADI",
"keyBook": "Key Book",
"keyPage": "Key Page",
}
)
View Source
var DidError bool
Functions ¶
func CreateAccount ¶
account create adiActor labelOrPubKeyHex height index tokenUrl keyBookUrl
func CreateKeyBook ¶
CreateKeyBook create a new key page
func CreateKeyPage ¶
CreateKeyPage create a new key page
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func ExportKeys ¶
func ExportMnemonic ¶
func ExportSeed ¶
func FindLabelFromPubKey ¶
func GenerateAccount ¶
func GenerateKey ¶
func GeneratePrivateKey ¶
func GetAccount ¶
func GetAdiDirectory ¶
func GetAndPrintKeyBook ¶
func GetAndPrintKeyPage ¶
func GetByChainId ¶
func GetByChainId(chainId []byte) (*acmeapi.APIDataResponse, error)
func GetKeyPageInBook ¶
func GetVersion ¶
func ImportMnemonic ¶
func IsLiteAccount ¶
func KeyPageUpdate ¶
func ListAccounts ¶
func ListKeyPublic ¶
func LookupByLabel ¶
func LookupByPubKey ¶
func PrintADICreate ¶
func PrintADICreate()
func PrintADIGet ¶
func PrintADIGet()
func PrintADIImport ¶
func PrintADIImport()
func PrintAccount ¶
func PrintAccount()
func PrintAccountCreate ¶
func PrintAccountCreate()
func PrintAccountExport ¶
func PrintAccountExport()
func PrintAccountGenerate ¶
func PrintAccountGenerate()
func PrintAccountGet ¶
func PrintAccountGet()
func PrintAccountImport ¶
func PrintAccountImport()
func PrintAccountList ¶
func PrintAccountList()
func PrintAccountQr ¶
func PrintAccountQr()
func PrintAccountRestore ¶
func PrintAccountRestore()
func PrintAdiDirectory ¶
func PrintAdiDirectory()
func PrintCredits ¶
func PrintCredits()
func PrintDataAccountCreate ¶
func PrintDataAccountCreate()
func PrintDataGet ¶
func PrintDataGet()
func PrintDataWrite ¶
func PrintDataWrite()
func PrintFaucet ¶
func PrintFaucet()
func PrintJsonRpcError ¶
func PrintKeyBook ¶
func PrintKeyBook()
func PrintKeyBookCreate ¶
func PrintKeyBookCreate()
func PrintKeyBookGet ¶
func PrintKeyBookGet()
func PrintKeyExport ¶
func PrintKeyExport()
func PrintKeyGenerate ¶
func PrintKeyGenerate()
func PrintKeyImport ¶
func PrintKeyImport()
func PrintKeyPageCreate ¶
func PrintKeyPageCreate()
func PrintKeyPageGet ¶
func PrintKeyPageGet()
func PrintKeyPublic ¶
func PrintKeyPublic()
func PrintKeyUpdate ¶
func PrintKeyUpdate()
func PrintQueryResponse ¶
func PrintQueryResponse(res *acmeapi.APIDataResponse) (string, error)
func PrintQueryResponseV2 ¶
func PrintQueryResponseV2(v2 *api2.QueryResponse) (string, error)
func PrintTXCreate ¶
func PrintTXCreate()
func PrintTXGet ¶
func PrintTXGet()
func PrintTXHistoryGet ¶
func PrintTXHistoryGet()
func RestoreAccounts ¶
Types ¶
type AccountKeyBookStore ¶
type AccountKeyBookStore struct {
KeyBook KeyBookStore `json:"keyBook"`
}
type ActionDataResponse ¶
type ActionDataResponse struct { EntryHash types.Bytes32 `json:"entryHash"` ActionResponse }
func ActionResponseFromData ¶
func ActionResponseFromData(r *api2.TxResponse, entryHash []byte) *ActionDataResponse
func (*ActionDataResponse) Print ¶
func (a *ActionDataResponse) Print() (string, error)
type ActionResponse ¶
type ActionResponse struct { Txid types.Bytes32 `json:"txid"` Hash types.Bytes32 `json:"hash"` 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"` }
func ActionResponseFrom ¶
func ActionResponseFrom(r *api2.TxResponse) *ActionResponse
func (*ActionResponse) Print ¶
func (a *ActionResponse) Print() (string, error)
type KeyBookStore ¶
type KeyBookStore struct {
KeyPageList []string `json:"keyPages"`
}
type KeyPageStore ¶
Click to show internal directories.
Click to hide internal directories.