Documentation ¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type ABlockEntry
- type ABlockEntryData
- type ABlockEntryLink
- type ABlockEntryList
- type ABlockList
- type ABlockLong
- type ABlockLongDblock
- type ABlockLongNext
- type ABlockLongPrev
- type ABlockShort
- type ABlockShortDblock
- type APIClient
- type APIKey
- type APIResponse
- type Address
- type AddressLink
- type AddressList
- type AllInfo
- type AllInfoLinks
- type AnchorLong
- type AnchorLongData
- type BasicAuth
- type BitcoinAnchor
- type Chain
- type ChainCreate
- type ChainData
- type ChainDataDblock
- type ChainDataEblock
- type ChainDataEntries
- type ChainLink
- type ChainList
- type ChainListData
- type ChainShort
- type ChainsApiService
- func (a *ChainsApiService) GetChainByID(ctx context.Context, chainId string) (Chain, *http.Response, error)
- func (a *ChainsApiService) GetChains(ctx context.Context, localVarOptionals *GetChainsOpts) (ChainList, *http.Response, error)
- func (a *ChainsApiService) PostChain(ctx context.Context, chainCreate ChainCreate) (ChainShort, *http.Response, error)
- func (a *ChainsApiService) PostChainSearch(ctx context.Context, searchBody SearchBody, ...) (ChainList, *http.Response, error)
- type CommitLink
- type CommitLong
- type Configuration
- type DBlockLink
- type DBlockList
- type DBlockLong
- type DBlockLongAblock
- type DBlockLongBtcAnchorEntry
- type DBlockLongBtcAnchorEntryChain
- type DBlockLongEblocks
- type DBlockLongEcblock
- type DBlockLongFblock
- type DBlockLongNext
- type DBlockLongPrev
- type DBlockShort
- type EBlockLink
- type EBlockLinkChain
- type EBlockList
- type EBlockLong
- type EBlockLongNext
- type EBlockLongPrev
- type EBlockShort
- type EBlockShortChain
- type EBlockShortDblock
- type EcBlockEntryList
- type EcBlockList
- type EcBlockLong
- type EcBlockLongDblock
- type EcBlockShort
- type EntriesApiService
- func (a *EntriesApiService) GetEntriesByChainID(ctx context.Context, chainId string, ...) (EntryList, *http.Response, error)
- func (a *EntriesApiService) GetEntryByHash(ctx context.Context, chainId string, entryHash string) (Entry, *http.Response, error)
- func (a *EntriesApiService) GetFirstEntry(ctx context.Context, chainId string) (Entry, *http.Response, error)
- func (a *EntriesApiService) GetLastEntry(ctx context.Context, chainId string) (Entry, *http.Response, error)
- func (a *EntriesApiService) PostEntriesSearch(ctx context.Context, chainId string, searchBody SearchBody, ...) (EntrySearchResponse, *http.Response, error)
- func (a *EntriesApiService) PostEntryToChainID(ctx context.Context, chainId string, entryCreate EntryCreate) (EntryShort, *http.Response, error)
- type Entry
- type EntryCreate
- type EntryData
- type EntryDataDblock
- type EntryDataEblock
- type EntryList
- type EntryListChain
- type EntryListData
- type EntrySearchResponse
- type EntrySearchResponseData
- type EntryShort
- type ErrorMessage
- type ErrorMessageErrors
- type EthereumAnchor
- type FBlockList
- type FBlockLong
- type FBlockLongNext
- type FBlockLongPrev
- type FBlockShort
- type FactomAnchor
- type GenericOpenAPIError
- type GetChainsOpts
- type GetEntriesByChainIDOpts
- type GetKeysbyIdChainIdOpts
- type GetSearchOpts
- type IdentitiesApiService
- func (a *IdentitiesApiService) GetIdChainbyId(ctx context.Context, identityChainId string) (IdentityChain, *http.Response, error)
- func (a *IdentitiesApiService) GetKeybyEntryHash(ctx context.Context, identityChainId string, keyString string) (IdentityKey, *http.Response, error)
- func (a *IdentitiesApiService) GetKeysbyIdChainId(ctx context.Context, identityChainId string, ...) (KeyList, *http.Response, error)
- func (a *IdentitiesApiService) PostIdChain(ctx context.Context, identityCreate IdentityCreate) (ChainShort, *http.Response, error)
- func (a *IdentitiesApiService) PostKeytoIdChainId(ctx context.Context, identityChainId string, ...) (EntryShort, *http.Response, error)
- type IdentityChain
- type IdentityCreate
- type IdentityKey
- type IdentityKeyData
- type IdentityKeyReplace
- type IdentityKeyShort
- type IdentityKeyShortData
- type InfoApiService
- type InlineResponse200
- type InlineResponse200Data
- type KeyList
- type MerkleNode
- type PostChainSearchOpts
- type PostEntriesSearchOpts
- type ProofsApiService
- func (a *ProofsApiService) GetAnchorbySearch(ctx context.Context, objectId string) (AnchorLong, *http.Response, error)
- func (a *ProofsApiService) GetReceiptsbyEntry(ctx context.Context, entryHash string) (ReceiptLong, *http.Response, error)
- func (a *ProofsApiService) GetSearch(ctx context.Context, localVarOptionals *GetSearchOpts) (InlineResponse200, *http.Response, error)
- type ReceiptLong
- type ReceiptLongData
- type SearchBody
- type SingleAnchor
- type Transaction
- type TransactionLink
- type TransactionLinkShort
- type TransactionList
- type TransactionShort
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type ABlockEntry ¶
type ABlockEntry struct {
Data ABlockEntryData `json:"data"`
}
type ABlockEntryData ¶
type ABlockEntryData struct { // The content of the admin block entry. Content string `json:"content"` // The timestamp for when this entry was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` CreatedAt string `json:"created_at"` Ablock ABlockShort `json:"ablock"` }
type ABlockEntryLink ¶
type ABlockEntryLink struct { // The SHA256 Hash of this entry. Hash string `json:"hash"` // The content of the admin block entry. Content string `json:"content"` // The timestamp for when this entry was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` CreatedAt string `json:"created_at"` // An API link to retreive all of the information about the entry. Href string `json:"href"` }
An admin block entry.
type ABlockEntryList ¶
type ABlockEntryList struct { // The Admin block entries returned in this set. Data []ABlockEntryLink `json:"data"` // The index of the first block returned from the total set (Starting from 0). Offset int32 `json:"offset"` // The number of blocks returned per page. Limit int32 `json:"limit"` // The total number of entries seen. Count int32 `json:"count"` }
type ABlockList ¶
type ABlockList struct { // The admin blocks returned in this set. Data []ABlockShort `json:"data"` // The index of the first block returned from the total set (Starting from 0). Offset int32 `json:"offset"` // The number of blocks returned per page. Limit int32 `json:"limit"` // The total number of blocks seen. Count int32 `json:"count"` }
type ABlockLong ¶
type ABlockLong struct { // The SHA256 Hash of this block. Hash string `json:"hash,omitempty"` // The hash of the previous admin block. BackReferenceHash string `json:"back_reference_hash,omitempty"` Prev ABlockLongPrev `json:"prev,omitempty"` Next ABlockLongNext `json:"next,omitempty"` Dblock ABlockLongDblock `json:"dblock,omitempty"` // The entries contained in this admin block. Entries string `json:"entries,omitempty"` }
A single Admin block from the factom blockchain.
type ABlockLongDblock ¶
type ABlockLongDblock struct { // The Key Merkle root of the directory block. Keymr string `json:"keymr,omitempty"` // An API link to the directory block. Href string `json:"href,omitempty"` }
The directory block that contains this factoid block.
type ABlockLongNext ¶
type ABlockLongNext struct { // The SHA256 hash of this admin block. Hash string `json:"hash,omitempty"` // An API link to this Admin block. Href string `json:"href,omitempty"` }
The next admin block.
type ABlockLongPrev ¶
type ABlockLongPrev struct { // The SHA256 hash of this admin block. Hash string `json:"hash,omitempty"` // An API link to this Admin block. Href string `json:"href,omitempty"` }
The previous admin block.
type ABlockShort ¶
type ABlockShort struct { // The SHA256 Hash of this block. Hash string `json:"hash,omitempty"` // A link to retrieve all data for this admin block. Href string `json:"href,omitempty"` Dblock ABlockShortDblock `json:"dblock,omitempty"` }
A single Admin block from the factom blockchain.
type ABlockShortDblock ¶
type ABlockShortDblock struct { // The SHA256 hash of this directory block. Hash string `json:"hash,omitempty"` // An API link to this directory block. Href string `json:"href,omitempty"` }
The directory block that contains this admin block.
type APIClient ¶
type APIClient struct { ChainsApi *ChainsApiService EntriesApi *EntriesApiService IdentitiesApi *IdentitiesApiService InfoApi *InfoApiService ProofsApi *ProofsApiService // contains filtered or unexported fields }
APIClient manages communication with the Harmony Connect API v1.0.19 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type Address ¶
type Address struct { // The literal address. Address string `json:"address,omitempty"` // The user address. UserAddress string `json:"user_address,omitempty"` // Whether this is an entry credit or factoid address. Type string `json:"type,omitempty"` // The current entry credit or factoid balance of the address. Balance string `json:"balance,omitempty"` // A list of all transactions that this address has paricipated in. Transactions map[string]interface{} `json:"transactions,omitempty"` }
A factoid or entry credit address.
type AddressLink ¶
type AddressLink struct { // The literal address. Address string `json:"address,omitempty"` // The user address. UserAddress string `json:"user_address,omitempty"` // An API link to obtain all data about this address. Href string `json:"href,omitempty"` }
A link to a factoid or entry credit address.
type AddressList ¶
type AddressList struct { // The addresses returned in this set. Data []AddressLink `json:"data"` // The index of the first address returned from the total set (Starting from 0). Offset int32 `json:"offset"` // The number of addresses returned per page. Limit int32 `json:"limit"` // The total number of addresses seen. Count int32 `json:"count"` }
type AllInfo ¶
type AllInfo struct { // Current version of the Connect API Version string `json:"version"` Links AllInfoLinks `json:"links"` }
type AllInfoLinks ¶
type AllInfoLinks struct { // Link to chain api Chains string `json:"chains"` }
Links to internal paths of the application
type AnchorLong ¶
type AnchorLong struct {
Data AnchorLongData `json:"data"`
}
type AnchorLongData ¶
type AnchorLongData struct { Dblock DBlockLink `json:"dblock"` // A list of all the anchors of this Directory Block. Anchors []SingleAnchor `json:"anchors"` }
Contains information about the desired Directory Block Anchor.
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type BitcoinAnchor ¶
type BitcoinAnchor struct { // Indicates the blockchain network that contains this anchor. Network string `json:"network"` // The confirmation status of the anchor. Either pending or confirmed. Status string `json:"status"` // The bitcoin transaction ID for the transaction that includes the anchor message. TxId string `json:"tx_id,omitempty"` // The hash of the bitcoin block that contains the anchor message. BlockHash string `json:"block_hash,omitempty"` }
type Chain ¶
type Chain struct {
Data ChainData `json:"data"`
}
Represents a list of Factom entries that have been or will be saved to the blockchain.
type ChainCreate ¶
type ChainCreate struct { // Tags that can be used to identify your chain. You can search for records that contain a particular external_id using Connect. You must send External IDs in Base64 format. ExternalIds []string `json:"external_ids"` // This is the data that will make up the first entry in your new chain. It is customary to use this space to describe the entries that are to follow in the chain. You must send the content field in Base64 format. Content string `json:"content"` // The URL where you would like to receive the callback from Connect. If this is not specified, callbacks will not activate. CallbackUrl string `json:"callback_url,omitempty"` // The stages that you would like to trigger a callback from Connect. This list can include any or all of the three stages: `replicated`, `factom`, and `anchored`. If callbacks are activated and this field is not sent, it will default to `factom` and `anchored` CallbackStages []string `json:"callback_stages,omitempty"` }
Used to create a new chain on Connect.
type ChainData ¶
type ChainData struct { // This is the unique identifier created for each chain. ChainId string `json:"chain_id"` // This is the data that was stored in the first entry of this chain. Content string `json:"content"` // Tags that have been used to identify this entry. ExternalIds []string `json:"external_ids"` // The immutability stage that this chain has reached. Stage string `json:"stage"` Entries ChainDataEntries `json:"entries"` Eblock ChainDataEblock `json:"eblock,omitempty"` Dblock ChainDataDblock `json:"dblock,omitempty"` // The time at which this chain was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.ssssssZ` This will be null if the chain is not at least at the `factom` immutability stage. CreatedAt string `json:"created_at,omitempty"` }
type ChainDataDblock ¶
type ChainDataDblock struct { // The Key Merkle Root for this directory block. Keymr string `json:"keymr,omitempty"` // The Factom blockchain height of this directory block. Height int32 `json:"height,omitempty"` // An API link to retrieve all information about this directory block. Href string `json:"href,omitempty"` }
Represents the Directory Block that relates to this chain. This will be null if the chain is not at least at the `factom` immutability stage.
type ChainDataEblock ¶
type ChainDataEblock struct { // The Key Merkle Root for this entry block. Keymr string `json:"keymr,omitempty"` // An API link to retrieve all information about this entry block. Href string `json:"href,omitempty"` }
Represents the Entry Block that contains the first entry of this chain. This will be null if the chain is not at least at the `factom` immutability stage.
type ChainDataEntries ¶
type ChainDataEntries struct { // An API link to all of the entries in this chain. Href string `json:"href"` }
type ChainLink ¶
type ChainLink struct { // The ID for this chain on the Factom blockchain. ChainId string `json:"chain_id"` // An API link to retrieve all information about this chain. Href string `json:"href"` }
An object that contains the Chain Hash (ID) as well as a URL for the chain.
type ChainList ¶
type ChainList struct { // An array that contains the chains on this page. Data []ChainListData `json:"data"` // The index of the first chain returned from the total set (Starting from 0). Offset int32 `json:"offset"` // The number of chains returned. Limit int32 `json:"limit"` // The total number of chains seen. Count int32 `json:"count"` }
Represents a list of Factom entries that have been or will be saved to the blockchain.
type ChainListData ¶
type ChainListData struct { // The ID for this chain on the Factom blockchain. ChainId string `json:"chain_id"` // The external IDs attached to this chain on the Factom blockchain. ExternalIds []string `json:"external_ids"` // An API link to retrieve all information about this chain. Href string `json:"href"` // The level of immutability that this chain has reached. Stage string `json:"stage"` // The time at which this chain was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.ssssssZ` This will be null if the chain is not at least at the `factom` immutability stage. CreatedAt string `json:"created_at,omitempty"` }
type ChainShort ¶
type ChainShort struct { // This is the unique identifier created for each chain. ChainId string `json:"chain_id"` // The unique identifier of the chain's first entry. EntryHash string `json:"entry_hash"` // The immutability stage that this chain has reached. Stage string `json:"stage"` }
Represents a list of Factom chains that have been or will be saved to the blockchain.
type ChainsApiService ¶
type ChainsApiService service
func (*ChainsApiService) GetChainByID ¶
func (a *ChainsApiService) GetChainByID(ctx context.Context, chainId string) (Chain, *http.Response, error)
ChainsApiService Get Chain Info Get information about a specific chain on Connect * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param chainId Chain identifier @return Chain
func (*ChainsApiService) GetChains ¶
func (a *ChainsApiService) GetChains(ctx context.Context, localVarOptionals *GetChainsOpts) (ChainList, *http.Response, error)
func (*ChainsApiService) PostChain ¶
func (a *ChainsApiService) PostChain(ctx context.Context, chainCreate ChainCreate) (ChainShort, *http.Response, error)
ChainsApiService Create a Chain Create a new chain. Each chain functions as a mini-blockchain such that all of the entries are linked. Every entry relies on data from previous entries in the chain. Any unauthorized alterations to any of these entries can be detected. Be aware that data entered into the `content` and `external_ids` fields must be in Base64 format. Sending this request will cause Connect to create the first entry of the chain. The data entered into the `content` and `external_id` fields will be applied to this entry. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param chainCreate @return ChainShort
func (*ChainsApiService) PostChainSearch ¶
func (a *ChainsApiService) PostChainSearch(ctx context.Context, searchBody SearchBody, localVarOptionals *PostChainSearchOpts) (ChainList, *http.Response, error)
type CommitLink ¶
type CommitLink struct { // The SHA256 Hash of this commit. Hash string `json:"hash"` // The timestamp for when this commit was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` CreatedAt string `json:"created_at"` // An API link to retreive all of the information about this commit. Href string `json:"href"` }
type CommitLong ¶
type CommitLong struct { // The SHA256 Hash of this commit. Hash string `json:"hash"` // The entry credit transaction ID that resulted in this commit. TxId string `json:"tx_id"` // The type version of this transaction. Version int32 `json:"version"` // The timestamp for when this commit was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` CreatedAt string `json:"created_at"` // The ID of the chain that was altered by this commit. ChainId string `json:"chain_id"` // The commit weld for this commit. This is the double hash (SHA256d) of the Entry Hash concatenated with the ChainID. Weld string `json:"weld"` // The unique identifier of the entry that was created by this commit. EntryHash string `json:"entry_hash"` // The number of entry credits spent on this commit. EntryCredits int32 `json:"entry_credits"` // The entry credit address that initiated this transaction. Address string `json:"address"` // The signature that authorized this commit. Signature string `json:"signature"` EcBlock EcBlockShort `json:"ec_block,omitempty"` }
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` HTTPClient *http.Client }
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type DBlockLink ¶
type DBlockLink struct { // The Key Merkle Root for this directory block. Keymr string `json:"keymr"` // The Factom block height of this block. Height int32 `json:"height"` // An API link to retrieve all available information about this directory block. Href string `json:"href"` }
A link to the directory block.
type DBlockList ¶
type DBlockList struct { // The directory blocks returned in this set. Data []DBlockShort `json:"data"` // The index of the first block returned from the total set (Starting from 0). Offset int32 `json:"offset"` // The number of blocks returned per page. Limit int32 `json:"limit"` // The total number of blocks seen. Count int32 `json:"count"` }
type DBlockLong ¶
type DBlockLong struct { // The height of a directory block indicates how many blocks were created before this block. This is used to identify blocks in the blockchain. Height string `json:"height,omitempty"` // The timestamp for when this block was built. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` StartedAt string `json:"started_at,omitempty"` // The Key Merkle Root for this block. Keymr []string `json:"keymr,omitempty"` BtcAnchorEntry DBlockLongBtcAnchorEntry `json:"btc_anchor_entry,omitempty"` // The bitcoin block hash for the bitcoin anchor that matches this directory block. BtcBlockHash string `json:"btc_block_hash,omitempty"` // The bitcoin transaction ID for the transaction that includes the anchor message. BtcTransaction string `json:"btc_transaction,omitempty"` Prev DBlockLongPrev `json:"prev,omitempty"` Next DBlockLongNext `json:"next,omitempty"` Ablock DBlockLongAblock `json:"ablock,omitempty"` Ecblock DBlockLongEcblock `json:"ecblock,omitempty"` Fblock DBlockLongFblock `json:"fblock,omitempty"` // The entry blocks contained in this directory block. Eblocks []DBlockLongEblocks `json:"eblocks,omitempty"` }
A single Directory block from the factom blockchain.
type DBlockLongAblock ¶
type DBlockLongAblock struct { // The Key Merkle Root for this admin block. Keymr string `json:"keymr,omitempty"` // The Factom block height. Height string `json:"height,omitempty"` // An API link to retrieve all information about this admin block. Href string `json:"href,omitempty"` }
The admin block contained in this directory block.
type DBlockLongBtcAnchorEntry ¶
type DBlockLongBtcAnchorEntry struct { // The unique identitfier of the entry. EntryHash string `json:"entry_hash,omitempty"` Chain DBlockLongBtcAnchorEntryChain `json:"chain,omitempty"` // The time at which this entry was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` CreatedAt string `json:"created_at,omitempty"` // An API link to retrieve all information about this entry. Href string `json:"href,omitempty"` }
An object that contains the Entry Hash (ID) and a URL for the entry.
type DBlockLongBtcAnchorEntryChain ¶
type DBlockLongBtcAnchorEntryChain struct { // The ID for this chain on the Factom blockchain. ChainId string `json:"chain_id,omitempty"` // An API link to retrieve all information about this chain. Href string `json:"href,omitempty"` }
An object that contains the Chain Hash (ID) as well as a URL for the chain.
type DBlockLongEblocks ¶
type DBlockLongEblocks struct { // The Key Merkle Root for this entry block. Keymr string `json:"keymr,omitempty"` // An API link to retrieve all information about this entry block. Href string `json:"href,omitempty"` Chain DBlockLongBtcAnchorEntryChain `json:"chain,omitempty"` }
type DBlockLongEcblock ¶
type DBlockLongEcblock struct { // The Key Merkle Root for this entry credit block. Keymr string `json:"keymr,omitempty"` // The Factom block height. Height string `json:"height,omitempty"` // An API link to retrieve all information about this entry credit block. Href string `json:"href,omitempty"` }
The entry credit block contained in this directory block.
type DBlockLongFblock ¶
type DBlockLongFblock struct { // The Key Merkle Root for this factoid block. Keymr string `json:"keymr,omitempty"` // The Factom block height. Height string `json:"height,omitempty"` // An API link to retrieve all information about this factoid block. Href string `json:"href,omitempty"` }
The factoid block contained in this directory block.
type DBlockLongNext ¶
type DBlockLongNext struct { // The Key Merkle Root for this directory block. Keymr string `json:"keymr,omitempty"` // The Factom block height. Height string `json:"height,omitempty"` // An API link to retrieve all information about this directory block. Href string `json:"href,omitempty"` }
The next directory block in the Factom blockchain. If null, this is the most recent block.
type DBlockLongPrev ¶
type DBlockLongPrev struct { // The Key Merkle Root for this directory block. Keymr string `json:"keymr,omitempty"` // The Factom block height. Height string `json:"height,omitempty"` // An API link to retrieve all information about this directory block. Href string `json:"href,omitempty"` }
The previous directory block in the Factom blockchain.
type DBlockShort ¶
type DBlockShort struct { // The height of a directory block indicates how many blocks were created before this block. This is used to identify blocks in the blockchain. Height int32 `json:"height,omitempty"` // The timestamp for when this block was built. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` StartedAt string `json:"started_at,omitempty"` // The Key Merkle Root for this block. Keymr string `json:"keymr,omitempty"` // The link to retrieve all information for this directory block. Href string `json:"href,omitempty"` // The number of entries contained in the admin block. AdminEntries string `json:"admin_entries,omitempty"` // The number of entries contained in the entry credit block. EcEntries string `json:"ec_entries,omitempty"` // The number of entries contained in the factoid block. FactoidEntries string `json:"factoid_entries,omitempty"` // The number of entries contained in the entry blocks. Entries string `json:"entries,omitempty"` }
A single Directory block from the factom blockchain.
type EBlockLink ¶
type EBlockLink struct { // The Key Merkle Root for this entry block. Keymr string `json:"keymr,omitempty"` // An API link to retrieve all information about this entry block. Href string `json:"href,omitempty"` }
A link to the entry block.
type EBlockLinkChain ¶
type EBlockLinkChain struct { // The Key Merkle Root for this entry block. Keymr string `json:"keymr,omitempty"` // An API link to retrieve all information about this entry block. Href string `json:"href,omitempty"` Chain DBlockLongBtcAnchorEntryChain `json:"chain,omitempty"` }
type EBlockList ¶
type EBlockList struct { // The entry blocks returned in this set. Data []EBlockLink `json:"data"` // The index of the first block returned from the total set (Starting from 0). Offset int32 `json:"offset"` // The number of blocks returned per page. Limit int32 `json:"limit"` // The total number of blocks seen. Count int32 `json:"count"` }
type EBlockLong ¶
type EBlockLong struct { // The Key Merkle Root for this entry block. Keymr string `json:"keymr"` // Shows where this entry block falls within the list of entry blocks that are contained in the parent directory block. Sequence int32 `json:"sequence"` Prev EBlockLongPrev `json:"prev,omitempty"` Next EBlockLongNext `json:"next,omitempty"` Chain EBlockShortChain `json:"chain"` Dblock EBlockShortDblock `json:"dblock"` // The timestamp for when this block was built. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` StartedAt map[string]interface{} `json:"started_at"` // An API link to retrieve all information about this entry block. Href string `json:"href"` // An API link to all of the entries in this entry block. Entries string `json:"entries"` }
type EBlockLongNext ¶
type EBlockLongNext struct { // The Key Merkle Root for this entry block. Keymr string `json:"keymr,omitempty"` // An API link to retrieve all information about this entry block. Href string `json:"href,omitempty"` }
The next entry block within the parent directory block.
type EBlockLongPrev ¶
type EBlockLongPrev struct { // The Key Merkle Root for this entry block. Keymr string `json:"keymr,omitempty"` // An API link to retrieve all information about this entry block. Href string `json:"href,omitempty"` }
The previous entry block within the parent directory block.
type EBlockShort ¶
type EBlockShort struct { // The Key Merkle Root for this entry block. Keymr string `json:"keymr"` Chain EBlockShortChain `json:"chain"` Dblock EBlockShortDblock `json:"dblock"` // The timestamp for when this block was built. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` StartedAt map[string]interface{} `json:"started_at"` // An API link to retrieve all information about this entry block. Href string `json:"href"` // The number of entries contained within this entry block. Entries int32 `json:"entries"` }
type EBlockShortChain ¶
type EBlockShortChain struct { // The ID for this chain on the Factom blockchain. ChainId string `json:"chain_id"` // An API link to retrieve all information about this chain. Href string `json:"href"` }
The chain that has been created or altered by this entry block.
type EBlockShortDblock ¶
type EBlockShortDblock struct { // The Key Merkle Root for this directory block. Keymr string `json:"keymr"` // The Factom block height of this block. Height int32 `json:"height"` // An API link to retrieve all available information about this directory block. Href string `json:"href"` }
The directory block that contains this entry block.
type EcBlockEntryList ¶
type EcBlockEntryList struct { // The commits returned in this set. Data []CommitLink `json:"data"` // The index of the first block returned from the total set (Starting from 0). Offset int32 `json:"offset"` // The number of blocks returned per page. Limit int32 `json:"limit"` // The total number of commits seen. Count int32 `json:"count"` }
type EcBlockList ¶
type EcBlockList struct { // The entry credit blocks returned in this set. Data []EcBlockShort `json:"data"` // The index of the first block returned from the total set (Starting from 0). Offset int32 `json:"offset"` // The number of blocks returned per page. Limit int32 `json:"limit"` // The total number of blocks seen. Count int32 `json:"count"` }
type EcBlockLong ¶
type EcBlockLong struct { // The SHA256 Hash of this entry credit block. Hash string `json:"hash,omitempty"` Dblock EcBlockLongDblock `json:"dblock,omitempty"` // The entries contained in this admin block. Entries string `json:"entries,omitempty"` }
A single entry credit block from the factom blockchain.
type EcBlockLongDblock ¶
type EcBlockLongDblock struct { // The SHA256 hash of this directory block. Hash string `json:"hash,omitempty"` // An API link to this directory block. Href string `json:"href,omitempty"` }
The directory block that contains this entry credit block.
type EcBlockShort ¶
type EcBlockShort struct { // The SHA256 Hash of this entry credit block. Hash string `json:"hash,omitempty"` // An API link to obtain the full set of data for this entry credit block. Href string `json:"href,omitempty"` Dblock EcBlockLongDblock `json:"dblock,omitempty"` }
A single entry credit block from the factom blockchain.
type EntriesApiService ¶
type EntriesApiService service
func (*EntriesApiService) GetEntriesByChainID ¶
func (a *EntriesApiService) GetEntriesByChainID(ctx context.Context, chainId string, localVarOptionals *GetEntriesByChainIDOpts) (EntryList, *http.Response, error)
func (*EntriesApiService) GetEntryByHash ¶
func (a *EntriesApiService) GetEntryByHash(ctx context.Context, chainId string, entryHash string) (Entry, *http.Response, error)
EntriesApiService Get Entry Info Returns information about a specific entry on Connect. The requested entry must be specified using the Chain ID and Entry Hash. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param chainId Chain identifier * @param entryHash The unique identitfier of the entry. @return Entry
func (*EntriesApiService) GetFirstEntry ¶
func (a *EntriesApiService) GetFirstEntry(ctx context.Context, chainId string) (Entry, *http.Response, error)
EntriesApiService Get Chain's First Entry Retrieve the first entry that has been saved to this chain. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param chainId Chain identifier @return Entry
func (*EntriesApiService) GetLastEntry ¶
func (a *EntriesApiService) GetLastEntry(ctx context.Context, chainId string) (Entry, *http.Response, error)
EntriesApiService Get Chain's Last Entry Retrieve the last entry that has been saved to this chain. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param chainId Chain identifier @return Entry
func (*EntriesApiService) PostEntriesSearch ¶
func (a *EntriesApiService) PostEntriesSearch(ctx context.Context, chainId string, searchBody SearchBody, localVarOptionals *PostEntriesSearchOpts) (EntrySearchResponse, *http.Response, error)
func (*EntriesApiService) PostEntryToChainID ¶
func (a *EntriesApiService) PostEntryToChainID(ctx context.Context, chainId string, entryCreate EntryCreate) (EntryShort, *http.Response, error)
EntriesApiService Create an Entry Create a new entry for the selected chain. Content and external id must be uploaded in Base64 format. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param chainId Chain identifier * @param entryCreate @return EntryShort
type Entry ¶
type Entry struct {
Data EntryData `json:"data"`
}
A single record that has been or will be saved to the blockchain.
type EntryCreate ¶
type EntryCreate struct { // Tags that can be used to identify your entry. You can search for records that contain a particular `external_id` using Connect. External IDs should be sent in Base64. ExternalIds []string `json:"external_ids"` // This is the data that will be stored directly on the blockchain. Please be sure that no private information is entered here. Content should be sent in Base64 format. Content string `json:"content"` // The address you'd like the callback to be sent to. If this is not specified, callbacks will not activate. CallbackUrl string `json:"callback_url,omitempty"` // The immutability stages you'd like to be notified about. This list can include any or all of the three stages: `replicated`, `factom`, and `anchored`. If callbacks are activated and this field is not sent, it will default to `factom` and `anchored` CallbackStages []string `json:"callback_stages,omitempty"` }
This information will be used to create a new entry.
type EntryData ¶
type EntryData struct { // The unique identitfier of the entry. EntryHash string `json:"entry_hash"` Chain EntryListChain `json:"chain"` // The time when this entry was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.ssssssZ` CreatedAt string `json:"created_at,omitempty"` // Tags that can be used to identify your entry. You can search for records that contain a particular `external_id` using Connect. External IDs are returned in Base64. ExternalIds []string `json:"external_ids"` // This is the data that is stored by the entry. Content will be sent in Base64 format. Content string `json:"content"` // The level of immutability that this entry has reached. Stage string `json:"stage"` Dblock EntryDataDblock `json:"dblock,omitempty"` Eblock EntryDataEblock `json:"eblock,omitempty"` }
type EntryDataDblock ¶
type EntryDataDblock struct { // The Key Merkle Root for this directory block. Keymr string `json:"keymr,omitempty"` // The Factom blockchain height of this directory block. Height int32 `json:"height,omitempty"` // An API link to retrieve all information about this directory block. Href string `json:"href,omitempty"` }
Represents the Directory Block that relates to this entry. This will be null if the chain is not at least at the `factom` immutability stage.
type EntryDataEblock ¶
type EntryDataEblock struct { // The Key Merkle Root for this entry block. Keymr string `json:"keymr,omitempty"` // An API link to retrieve all information about this entry block. Href string `json:"href,omitempty"` }
Represents the Entry Block that contains the entry. This will be null if the entry is not at least at the `factom` immutability stage.
type EntryList ¶
type EntryList struct { // An array that contains the entries on this page. Data []EntryListData `json:"data"` // The index of the first entry returned from the total set (Starting from 0). Offset int32 `json:"offset"` // The number of entries returned. Limit int32 `json:"limit"` // The total number of entries seen. Count int32 `json:"count"` }
A paginated list of entries.
type EntryListChain ¶
type EntryListChain struct { // The ID for this chain on the Factom blockchain. ChainId string `json:"chain_id,omitempty"` // An API link to retrieve all information about this chain. Href string `json:"href,omitempty"` }
An object that contains the Chain Hash (ID) as well as a URL for the chain.
type EntryListData ¶
type EntryListData struct { // The unique identitfier of the entry. EntryHash string `json:"entry_hash"` Chain EntryListChain `json:"chain"` // The time at which this entry was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.ssssssZ` CreatedAt string `json:"created_at,omitempty"` // An API link to retrieve all information about this entry. Href string `json:"href"` }
type EntrySearchResponse ¶
type EntrySearchResponse struct { // An array of entries that match your search criterion. Data []EntrySearchResponseData `json:"data"` // The index of the first item returned from the total set (Starting from 0). Offset int32 `json:"offset"` // The maximum number of entries per page. Limit int32 `json:"limit"` // The total number of entries seen. Count int32 `json:"count"` }
type EntrySearchResponseData ¶
type EntrySearchResponseData struct { // The unique identitfier of the entry. EntryHash string `json:"entry_hash"` // Tags that can be used to identify this entry. ExternalIds []string `json:"external_ids"` // The level of immutability that this entry has reached. Stage string `json:"stage"` // An API link to retrieve all information about this entry. Href string `json:"href"` }
type EntryShort ¶
type ErrorMessage ¶
type ErrorMessage struct { // A list of errors caused by the previous request. Errors []ErrorMessageErrors `json:"errors"` }
type ErrorMessageErrors ¶
type ErrorMessageErrors struct { // A detailed description of the error. Details string `json:"details"` }
Contains information about a single error.
type EthereumAnchor ¶
type EthereumAnchor struct { // Indicates the blockchain network that contains this anchor. Network string `json:"network"` // The confirmation status of the anchor. Either pending or confirmed. Status string `json:"status"` // The height of the first ethereum block that contains an anchor for this directory block. Valid anchors for the Directory block in question may also be contained in subsequent ethereum blocks. WindowStartHeight int32 `json:"window_start_height,omitempty"` // Window Merkle Root. This is the Merkle root that was published in the ethereum transaction that anchors this directory block. The root represents every one of the 1000 Directory blocks that's included in this anchor. WindowMr string `json:"window_mr,omitempty"` // The merkle branch that leads to the Directory block in question. Relates to the Window Merkle root. Presented as an array of Merkle nodes. MerkleBranch []MerkleNode `json:"merkle_branch,omitempty"` // The address of the contract that initiated the anchor transaction. ContractAddress string `json:"contract_address,omitempty"` // The ethereum transaction ID for the transaction that includes the anchor message. TxId string `json:"tx_id,omitempty"` // The index of the transaction within the block. TxIndex int32 `json:"tx_index,omitempty"` // The hash of the ethereum block that contains the anchor transaction. BlockHash string `json:"block_hash,omitempty"` }
type FBlockList ¶
type FBlockList struct { // The factoid blocks returned in this set. Data []FBlockShort `json:"data"` // The index of the first block returned from the total set (Starting from 0). Offset int32 `json:"offset"` // The number of blocks returned per page. Limit int32 `json:"limit"` // The total number of blocks seen. Count int32 `json:"count"` }
type FBlockLong ¶
type FBlockLong struct { // The SHA256 Hash of this entry. Keymr string `json:"keymr,omitempty"` Prev FBlockLongPrev `json:"prev,omitempty"` Next FBlockLongNext `json:"next,omitempty"` Dblock ABlockLongDblock `json:"dblock,omitempty"` // The Entry credit rate at the time this block was created. EcRate string `json:"ec_rate,omitempty"` // The number of factoid inputs in this block. FctTotalInputs string `json:"fct_total_inputs,omitempty"` // The number of factoid outputs in this block. FctTotalOutputs string `json:"fct_total_outputs,omitempty"` // The total number of entry credits purchased in this block. EcTotalCreated string `json:"ec_total_created,omitempty"` // A list of all of the transactions that occur in this block. Transactions string `json:"transactions,omitempty"` }
A single factoid block from the factom blockchain.
type FBlockLongNext ¶
type FBlockLongNext struct { // The Key Merkle root of the factoid block. Keymr string `json:"keymr,omitempty"` // An API link to the factoid block. Href string `json:"href,omitempty"` }
A link to the next factoid block in the chain.
type FBlockLongPrev ¶
type FBlockLongPrev struct { // The Key Merkle root of the factoid block. Keymr string `json:"keymr,omitempty"` // An API link to the factoid block. Href string `json:"href,omitempty"` }
A link to the previous factoid block in the chain.
type FBlockShort ¶
type FBlockShort struct { // The SHA256 Hash of this entry. Keymr string `json:"keymr,omitempty"` // An API link to obtain the full set of data for this factoid block. Href string `json:"href,omitempty"` Dblock ABlockLongDblock `json:"dblock,omitempty"` // The Entry credit rate at the time this block was created. EcRate string `json:"ec_rate,omitempty"` // The number of factoid transactions that occur in this block. Transactions string `json:"transactions,omitempty"` }
A single factoid block from the factom blockchain.
type FactomAnchor ¶
type FactomAnchor struct { // Indicates the blockchain network that contains this anchor. Network string `json:"network"` // The confirmation status of the anchor. Either pending or confirmed. Status string `json:"status"` // The time at which this entry was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.ssssssZ` This will be null if the chain is not at least at the `factom` immutability stage. CreatedAt string `json:"created_at,omitempty"` // The raw data that makes up the entry. EntrySerialized string `json:"entry_serialized,omitempty"` // The unique identitfier of the entry. EntryHash string `json:"entry_hash,omitempty"` Dblock DBlockLink `json:"dblock,omitempty"` // The branch of the merkle tree that represents this anchor. Presented as an array of Merkle nodes. MerkleBranch []MerkleNode `json:"merkle_branch,omitempty"` }
type GenericOpenAPIError ¶
type GenericOpenAPIError struct {
// contains filtered or unexported fields
}
GenericOpenAPIError Provides access to the body, error and model on returned errors.
func (GenericOpenAPIError) Body ¶
func (e GenericOpenAPIError) Body() []byte
Body returns the raw bytes of the response
func (GenericOpenAPIError) Error ¶
func (e GenericOpenAPIError) Error() string
Error returns non-empty string if there was an error.
func (GenericOpenAPIError) Model ¶
func (e GenericOpenAPIError) Model() interface{}
Model returns the unpacked model of the error
type GetChainsOpts ¶
type GetEntriesByChainIDOpts ¶
type GetKeysbyIdChainIdOpts ¶
type GetSearchOpts ¶
type IdentitiesApiService ¶
type IdentitiesApiService service
func (*IdentitiesApiService) GetIdChainbyId ¶
func (a *IdentitiesApiService) GetIdChainbyId(ctx context.Context, identityChainId string) (IdentityChain, *http.Response, error)
IdentitiesApiService Get Identity Chain Info Retrieve the details about a particular Identity Chain. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param identityChainId The hex encoded string that points to the identity's chain @return IdentityChain
func (*IdentitiesApiService) GetKeybyEntryHash ¶
func (a *IdentitiesApiService) GetKeybyEntryHash(ctx context.Context, identityChainId string, keyString string) (IdentityKey, *http.Response, error)
IdentitiesApiService Get Key Info Retreive information about a specific public key for a given Identity, including the heights at which the key was activated and retired if applicable. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param identityChainId The hex encoded string that points to the identity's chain * @param keyString The public key string. Must be in base58 idpub format. @return IdentityKey
func (*IdentitiesApiService) GetKeysbyIdChainId ¶
func (a *IdentitiesApiService) GetKeysbyIdChainId(ctx context.Context, identityChainId string, localVarOptionals *GetKeysbyIdChainIdOpts) (KeyList, *http.Response, error)
func (*IdentitiesApiService) PostIdChain ¶
func (a *IdentitiesApiService) PostIdChain(ctx context.Context, identityCreate IdentityCreate) (ChainShort, *http.Response, error)
IdentitiesApiService Create Identity Chain Creates a new identity chain. To create the chain, you'll need to include a unique name array and an array of public keys. If successful, returns information about the chain that was created. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param identityCreate @return ChainShort
func (*IdentitiesApiService) PostKeytoIdChainId ¶
func (a *IdentitiesApiService) PostKeytoIdChainId(ctx context.Context, identityChainId string, identityKeyReplace IdentityKeyReplace) (EntryShort, *http.Response, error)
IdentitiesApiService Replace Identity Key Retires an existing key from an identity and replaces it with a new one. To do this, a user must send the key to be replaced (`old_key`), the `new_key`, the signing key that authorizes the replacement and a signed message from the signing key. The signing key must be either equal to or senior to the key that is being replaced. *Note: You may not reuse a key. If the `new_key` has been used by this Identity at any level, the replacement will fail.* * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param identityChainId The hex encoded string that points to the identity's chain * @param identityKeyReplace @return EntryShort
type IdentityChain ¶
type IdentityChain struct { // The Identity Chain’s schema version. This details the format of this digital identity. More information about Factom Identity Chain schemas can be seen [here](). Version string `json:"version"` // The immutability stage that this chain has reached. The identity can be considered in use once it reaches the `factom` stage. Stage string `json:"stage"` // The block height at which this chain was written into the Factom blockchain. This is `null` if the chain has not reached the `factom` stage. CreatedHeight int32 `json:"created_height,omitempty"` // The Chain ID for this identity chain. ChainId string `json:"chain_id"` // A unique array of strings that are associated with this identity. Name []string `json:"name"` // Contains the currently active public keys for this identity. ActiveKeys []IdentityKeyShort `json:"active_keys"` // An API link to retrieve the keys for this identity. AllKeysHref string `json:"all_keys_href"` }
type IdentityCreate ¶
type IdentityCreate struct { // A unique array of strings that together constitute the Identity's name. Each string should be in Base64 format. *Note: It is best to avoid adding personally identifiable information to the blockchain.* Names []string `json:"names"` // A list of public keys that will be used to verify this Indenty’s signatures. You may initiate an identity with as many keys as you like. The array of keys should be sent in order of priority with 0 being the master key. The keys should be sent as Base58 strings in IdPub format. Keys []string `json:"keys"` // The URL where you would like to receive the callback from Connect. If this is not specified, callbacks will not activate. CallbackUrl string `json:"callback_url,omitempty"` // The stages that you would like to trigger a callback from Connect. This list can include any or all of the three stages: `replicated`, `factom`, and `anchored`. If callbacks are activated and this field is not sent, it will default to `factom` and `anchored` CallbackStages []string `json:"callback_stages,omitempty"` }
type IdentityKey ¶
type IdentityKey struct {
Data IdentityKeyData `json:"data"`
}
type IdentityKeyData ¶
type IdentityKeyData struct { // The public key string in Base58 idpub format. Key string `json:"key"` // The height at which this key became valid. ActivatedHeight int32 `json:"activated_height,omitempty"` // The expiration height of this key. `null` if this key is currently active. RetiredHeight int32 `json:"retired_height,omitempty"` // The level of this key within the hierarchy. A lower number indicates a key that allows a holder to replace higher numbered keys. The master key is priority 0. Priority int32 `json:"priority,omitempty"` // The unique identifier of the entry on the Identity chain where this key was activated. EntryHash string `json:"entry_hash,omitempty"` }
type IdentityKeyReplace ¶
type IdentityKeyReplace struct { // The public key you would like to replace. This should be sent as a Base58 string in IdPub format. OldKey string `json:"old_key"` // The public key that you would like to activate. This should be sent as a Base58 string in IdPub format. NewKey string `json:"new_key"` // The key you are using to authorize the replacement. Must be equal to or higher level than the key you want to replace. This should be sent as a Base58 string in IdPub format. SignerKey string `json:"signer_key"` // A signature that proves ownership of the `signer_key`. This signature should use the [Ed25519](https://ed25519.cr.yp.to/) specification. The signed message should be the Identity Chain ID, the Old Key, and the New Key in that order. The message should be a single string with no whitespace or separators between the three parts. Signature string `json:"signature"` // The URL where you would like to receive the callback from Connect. If this is not specified, callbacks will not activate. CallbackUrl string `json:"callback_url,omitempty"` // The stages that you would like to trigger a callback from Connect. This list can include any or all of the three stages: `replicated`, `factom`, and `anchored`. If callbacks are activated and this field is not sent, it will default to `factom` and `anchored` CallbackStages []string `json:"callback_stages,omitempty"` }
type IdentityKeyShort ¶
type IdentityKeyShort struct {
Data IdentityKeyShortData `json:"data"`
}
type IdentityKeyShortData ¶
type IdentityKeyShortData struct { // The public key. Key string `json:"key"` // The height at which this key became valid. `null` if this is the first key. ActivatedHeight int32 `json:"activated_height,omitempty"` // The expiration height of this key. `null` if this is the current key. RetiredHeight int32 `json:"retired_height,omitempty"` }
type InfoApiService ¶
type InfoApiService service
func (*InfoApiService) GetApiInfo ¶
InfoApiService API Info Request general information about the Connect API such as the version and available endpoints. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return AllInfo
type InlineResponse200 ¶
type InlineResponse200 struct { Data InlineResponse200Data `json:"data,omitempty"` // Tells you what type of result was found. Possible types include `directory_block`, `entry_block`, `factoid_block`, `chain`, `entry`, `address`, and `transaction`. Type string `json:"type,omitempty"` }
type InlineResponse200Data ¶
type InlineResponse200Data struct { // An API link to retrieve all information about this search result. Href string `json:"href,omitempty"` }
The search result. Includes an API link that allows you to retreive more information about the result. Also includes additional information based on the type of result reterned.
type KeyList ¶
type KeyList struct { // The keys returned in this set. Data []IdentityKey `json:"data"` // The index of the first key returned from the total set (Starting from 0). Offset int32 `json:"offset"` // The number of keys returned per page. Limit int32 `json:"limit"` // The total number of keys seen. Count int32 `json:"count"` }
type MerkleNode ¶
type PostChainSearchOpts ¶
type PostEntriesSearchOpts ¶
type ProofsApiService ¶
type ProofsApiService service
func (*ProofsApiService) GetAnchorbySearch ¶
func (a *ProofsApiService) GetAnchorbySearch(ctx context.Context, objectId string) (AnchorLong, *http.Response, error)
ProofsApiService Get Object's Anchors Retreive the blockchain anchors of an entry, chain, or block. Returns an array of anchors that may be of type ethereum, bitcoin, or factom. The valid identifiers for the objects that can be anchored are as follows: * Entry - Entry Hash * Chain - Chain ID * Directory Block - Height or Key Merkle Root * Entry Block - Key Merkle Root * Factoid Block - Key Merkle Root * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param objectId Object identifier. Used to identify an entry, chain, or block that has been published on the Factom blockchain. These objects can be identified by their hash, ID, height, or key Merkle root. @return AnchorLong
func (*ProofsApiService) GetReceiptsbyEntry ¶
func (a *ProofsApiService) GetReceiptsbyEntry(ctx context.Context, entryHash string) (ReceiptLong, *http.Response, error)
ProofsApiService Get Entry's Receipts Retrieve a receipt providing cryptographically verifiable proof that information was recorded in the Factom blockchain. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param entryHash The unique identitfier of the entry. @return ReceiptLong
func (*ProofsApiService) GetSearch ¶
func (a *ProofsApiService) GetSearch(ctx context.Context, localVarOptionals *GetSearchOpts) (InlineResponse200, *http.Response, error)
type ReceiptLong ¶
type ReceiptLong struct {
Data ReceiptLongData `json:"data"`
}
type ReceiptLongData ¶
type ReceiptLongData struct { // The timestamp for this entry. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` CreatedAt string `json:"created_at"` // The raw data that makes up the entry. EntrySerialized string `json:"entry_serialized"` // The unique identitfier of the entry. EntryHash string `json:"entry_hash"` // The branch of the merkle tree that represents this entry. Presented as an array of Merkle nodes. MerkleBranch []MerkleNode `json:"merkle_branch"` Eblock EBlockLink `json:"eblock"` Dblock DBlockLink `json:"dblock"` }
Contains the receipt information for the desired entry.
type SearchBody ¶
type SearchBody struct { // A list of external IDs. ExternalIds []string `json:"external_ids"` }
The external IDs of the chains or entries you want to retrieve. You must enter these External IDs in Base64 format.
type SingleAnchor ¶
type SingleAnchor struct { // Indicates the blockchain network that contains this anchor. Network string `json:"network"` // The confirmation status of the anchor. Either pending or confirmed. Status string `json:"status"` // Only returned for confirmed bitcoin or ethereum anchors. The bitcoin or ethereum transaction ID for the transaction that includes the anchor message. TxId string `json:"tx_id,omitempty"` // Only returned for confirmed bitcoin or ethereum anchors. The hash of the bitcoin or ethereum block that contains the anchor message. BlockHash string `json:"block_hash,omitempty"` // Only returned for confirmed factom anchors. The time at which this entry was created. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.ssssssZ` This will be null if the chain is not at least at the `factom` immutability stage. CreatedAt string `json:"created_at,omitempty"` // Only returned for confirmed factom anchors. The raw data that makes up the entry. EntrySerialized string `json:"entry_serialized,omitempty"` // Only returned for confirmed factom anchors. The unique identitfier of the entry. EntryHash string `json:"entry_hash,omitempty"` Dblock DBlockLink `json:"dblock,omitempty"` // Only returned for confirmed factom or ethereum anchors. The branch of the merkle tree that represents this anchor. Presented as an array of Merkle nodes. MerkleBranch []MerkleNode `json:"merkle_branch,omitempty"` // Only returned for confirmed ethereum anchors. The height of the first ethereum block that contains an anchor for this directory block. Valid anchors for the Directory block in question may also be contained in subsequent ethereum blocks. WindowStartHeight int32 `json:"window_start_height,omitempty"` // Only returned for confirmed ethereum anchors. Window Merkle Root. This is the Merkle root that was published in the ethereum transaction that anchors this directory block. The root represents every one of the 1000 Directory blocks that's included in this anchor. WindowMr string `json:"window_mr,omitempty"` // Only returned for confirmed ethereum anchors. The address of the contract that initiated the anchor transaction. ContractAddress string `json:"contract_address,omitempty"` // Only returned for confirmed ethereum anchors. The index of the transaction within the block. TxIndex int32 `json:"tx_index,omitempty"` }
type Transaction ¶
type Transaction struct { // The transaction ID for this transaction. TxId string `json:"tx_id,omitempty"` // The timestamp for this transaction. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` CreatedAt string `json:"created_at,omitempty"` // The number of factoids coming in from the sender. FctTotalInputs string `json:"fct_total_inputs,omitempty"` // The number of factoids going out to the receiver. FctTotalOutputs string `json:"fct_total_outputs,omitempty"` // The number of entry credits that have been purchased in this transaction. EcCreated string `json:"ec_created,omitempty"` // The price of an entry credit at the time of this transaction. EcRate string `json:"ec_rate,omitempty"` // The fee paid to the processor of this transaction. FctFee string `json:"fct_fee,omitempty"` // A link to the directory block that contains this transaction. Dblock string `json:"dblock,omitempty"` // A link to the factoid block that contains this transaction. Fblock string `json:"fblock,omitempty"` // All of the input transactions for this transaction. Inputs string `json:"inputs,omitempty"` // All of the output transactions for this transaction. Outputs string `json:"outputs,omitempty"` }
A single factoid transaction.
type TransactionLink ¶
type TransactionLink struct { // The transaction ID for this transaction. TxId string `json:"tx_id,omitempty"` // The timestamp for this transaction. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` CreatedAt string `json:"created_at,omitempty"` // An API link to obtain all data for this transaction. Href string `json:"href,omitempty"` // The number of factoids coming in from the sender. FctTotalInputs string `json:"fct_total_inputs,omitempty"` // The number of factoids going out to the receiver. FctTotalOutputs string `json:"fct_total_outputs,omitempty"` // The number of entry credits that have been purchased in this transaction. EcCreated string `json:"ec_created,omitempty"` // The fee paid to the processor of this transaction. FctFee string `json:"fct_fee,omitempty"` }
A single factoid transaction.
type TransactionLinkShort ¶
type TransactionLinkShort struct { // The transaction ID for this transaction. TxId string `json:"tx_id,omitempty"` // The timestamp for this transaction. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` CreatedAt string `json:"created_at,omitempty"` // An API link to obtain all data for this transaction. Href string `json:"href,omitempty"` // The price of an entry credit at the time of this transaction. EcRate string `json:"ec_rate,omitempty"` }
A single factoid transaction.
type TransactionList ¶
type TransactionList struct { // The transactions returned in this set. Data []TransactionLink `json:"data"` // The index of the first transaction returned from the total set (Starting from 0). Offset int32 `json:"offset"` // The number of transactions returned per page. Limit int32 `json:"limit"` // The total number of transactions seen. Count int32 `json:"count"` }
type TransactionShort ¶
type TransactionShort struct { // The transaction ID for this transaction. TxId string `json:"tx_id,omitempty"` // The timestamp for this transaction. Sent in [ISO 8601 Format](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ssZ` CreatedAt string `json:"created_at,omitempty"` // A link to the directory block that contains this transaction. Dblock string `json:"dblock,omitempty"` // A link to the factoid block that contains this transaction. Fblock string `json:"fblock,omitempty"` // An API link to obtain all data for this transaction. Href string `json:"href,omitempty"` // All of the input transactions for this transaction. Inputs string `json:"inputs,omitempty"` // All of the output transactions for this transaction. Outputs string `json:"outputs,omitempty"` // The number of entry credits that have been purchased in this transaction. OutEcs string `json:"out_ecs,omitempty"` }
A single factoid transaction.
Source Files ¶
- api_chains.go
- api_entries.go
- api_identities.go
- api_info.go
- api_proofs.go
- client.go
- configuration.go
- model_a_block_entry.go
- model_a_block_entry_data.go
- model_a_block_entry_link.go
- model_a_block_entry_list.go
- model_a_block_list.go
- model_a_block_long.go
- model_a_block_long_dblock.go
- model_a_block_long_next.go
- model_a_block_long_prev.go
- model_a_block_short.go
- model_a_block_short_dblock.go
- model_address.go
- model_address_link.go
- model_address_list.go
- model_all_info.go
- model_all_info_links.go
- model_anchor_long.go
- model_anchor_long_data.go
- model_bitcoin_anchor.go
- model_chain.go
- model_chain_create.go
- model_chain_data.go
- model_chain_data_dblock.go
- model_chain_data_eblock.go
- model_chain_data_entries.go
- model_chain_link.go
- model_chain_list.go
- model_chain_list_data.go
- model_chain_short.go
- model_commit_link.go
- model_commit_long.go
- model_d_block_link.go
- model_d_block_list.go
- model_d_block_long.go
- model_d_block_long_ablock.go
- model_d_block_long_btc_anchor_entry.go
- model_d_block_long_btc_anchor_entry_chain.go
- model_d_block_long_eblocks.go
- model_d_block_long_ecblock.go
- model_d_block_long_fblock.go
- model_d_block_long_next.go
- model_d_block_long_prev.go
- model_d_block_short.go
- model_e_block_link.go
- model_e_block_link_chain.go
- model_e_block_list.go
- model_e_block_long.go
- model_e_block_long_next.go
- model_e_block_long_prev.go
- model_e_block_short.go
- model_e_block_short_chain.go
- model_e_block_short_dblock.go
- model_ec_block_entry_list.go
- model_ec_block_list.go
- model_ec_block_long.go
- model_ec_block_long_dblock.go
- model_ec_block_short.go
- model_entry.go
- model_entry_create.go
- model_entry_data.go
- model_entry_data_dblock.go
- model_entry_data_eblock.go
- model_entry_list.go
- model_entry_list_chain.go
- model_entry_list_data.go
- model_entry_search_response.go
- model_entry_search_response_data.go
- model_entry_short.go
- model_error_message.go
- model_error_message_errors.go
- model_ethereum_anchor.go
- model_f_block_list.go
- model_f_block_long.go
- model_f_block_long_next.go
- model_f_block_long_prev.go
- model_f_block_short.go
- model_factom_anchor.go
- model_identity_chain.go
- model_identity_create.go
- model_identity_key.go
- model_identity_key_data.go
- model_identity_key_replace.go
- model_identity_key_short.go
- model_identity_key_short_data.go
- model_inline_response_200.go
- model_inline_response_200_data.go
- model_key_list.go
- model_merkle_node.go
- model_receipt_long.go
- model_receipt_long_data.go
- model_search_body.go
- model_single_anchor.go
- model_transaction.go
- model_transaction_link.go
- model_transaction_link_short.go
- model_transaction_list.go
- model_transaction_short.go
- response.go