Categorygithub.com/FactomProject/factom
modulepackage
0.4.0
Repository: https://github.com/factomproject/factom.git
Documentation: pkg.go.dev

# README

factom api

CircleCI GoDoc

Golang client implementation of the factomd and factom-walletd APIs.

# Functions

AddressStringType determin the type of address from the given string.
AddTransactionECOutput adds an Entry Credit output to a temporary transaction in the wallet.
AddTransactionFee adds the appropriate factoid fee payment to a transaction input of a temporary transaction in the wallet.
AddTransactionInput adds a factoid input to a temporary transaction in the wallet.
AddTransactionOutput adds a factoid output to a temporary transaction in the wallet.
BackupWallet returns a formatted string with the wallet seed and the secret keys for all of the wallet addresses.
BuyEC creates and sends a transaction to the Factom Network that purchases Entry Credits.
BuyExactEC creates and sends a transaction to the Factom Network that purchases an exact number of Entry Credits.
ChainExists returns true if a Chain with the given chainid exists within the Factom Blockchain.
ChainIDFromFields computes a ChainID based on the binary External IDs of that Chain's First Entry.
ChainIDFromStrings computes the ChainID of a Chain Created with External IDs that would match the given string (in order).
CommitChain sends the signed ChainID, the Entry Hash, and the Entry Credit public key to the factom network.
CommitEntry sends the signed Entry Hash and the Entry Credit public key to the factom network.
ComposeChainCommit creates a JSON2Request to commit a new Chain via the factomd web api.
ComposeChainReveal creates a JSON2Request to reveal the Chain via the factomd web api.
ComposeEntryCommit creates a JSON2Request to commit a new Entry via the factomd web api.
ComposeEntryReveal creates a JSON2Request to reveal the Entry via the factomd web api.
ComposeTransaction creates a json object from a temporary transaction in the wallet that may be sent to the factomd API to submit the transaction to the network.
DeleteTransaction remove a temporary transacton from the wallet.
EnableCookies will accept and manage cookies from the API server.
No description provided by the author
No description provided by the author
EntryCommitACK searches for an entry/chain commit with a given transaction ID.
No description provided by the author
EntryCost calculates the cost in Entry Credits of adding an Entry to a Chain on the Factom protocol.
EntryRevealACK will take the entryhash and search for the entry and the commit.
FactoidACK gets the status of a given Factoid Transaction.
FactoidSubmit sends a raw transaction to factomd to be included in the network.
FactoidToFactoshi takes a Factoid amount as a string and returns the value in factoids.
FactomdServer returns where to find the factomd server, and tells the server its public ip.
FactoshiToFactoid converts a uint64 factoshi ammount into a fixed point number represented as a string.
FetchAddresses requests all of the addresses in the Factom Wallet database.
FetchECAddress requests an Entry Credit address from the Factom Wallet.
FetchFactoidAddress requests a Factom address from the Factom Wallet.
No description provided by the author
No description provided by the author
GenerateECAddress creates a new Entry Credit Address and stores it in the Factom Wallet.
GenerateFactoidAddress creates a new Factoid Address and stores it in the Factom Wallet.
No description provided by the author
GetABlock requests a specific ABlock from the factomd API.
GetABlockByHeight requests an ABlock of a specific height from the factomd.
GetActiveIdentityKeys returns the identity's public keys that were/are active at the highest saved block height, along with that blockheight.
GetActiveIdentityKeysAtHeight returns the identity's public keys that were active at the specified block height.
GetAllChainEntries returns a list of all Factom Entries for a given Chain.
GetAllChainEntriesAtHeight returns a list of all Factom Entries for a given Chain at a given point in the Chain's history.
GetAllEBlockEntries requests every Entry from a given Entry Block.
GetAnchors retrieves the bitcoin and ethereum anchors from factod.
GetAnchorsByHeight retrieves the bitcoin and ethereum anchors for a specific height.
GetAuthorities retrieves a list of the known athorities from factomd.
GetBalanceTotals return the total value of Factoids and Entry Credits in the wallet according to the the server acknowledgement and the value saved in the blockchain.
GetBlockByHeightRaw fetches the specified block type by height Deprecated: use ablock, dblock, eblock, ecblock and fblock instead.
GetChainHead returns the hash of the most recent Entry made into a given Factom Chain.
GetCurrentMinute gets the current network information from the factom daemon.
GetDBlock requests a Directory Block by its Key Merkle Root from the factomd.
GetDBlockByHeight requests a Directory Block by its block height from the factomd API.
GetDBlockHead requests the most recent Directory Block Key Merkel Root created by the Factom Network.
GetDiagnostics requests diagnostic information from factomd.
GetDnsBalance returns the balances of the Factoid and Entry Credit addresses associated with a netki DNS name.
GetEBlock requests an Entry Block from factomd by its Key Merkle Root.
GetECAddress creates an Entry Credit Address public/secret key pair from a secret Entry Credit Address string i.e.
GetECBalance returns the Entry Credit balance of a given Entry Credit Public Address.
GetECBlock requests a specified Entry Credit Block from the factomd API.
GetECBlockByHeight request an Entry Credit Block of a given height.
GetECRate returns the current conversion rate cost in factoshis (Factoid^(-1e8)) of purchasing Entry Credits.
GetEntry requests an Entry from the factomd API by its Entry Hash.
GetFactoidAddress creates a Factoid Address rcd/secret key pair from a secret Factoid Address string i.e.
GetFactoidBalance returns the balance in factoshi (factoid * 1e8) of a given Factoid Public Address.
No description provided by the author
No description provided by the author
No description provided by the author
GetFBlock requests a specified Factoid Block from factomd by its keymr.
GetFBlockByHeight requests a specified Factoid Block from factomd by its height.
GetFirstEntry returns the first Entry used to create the given Factom Chain.
GetHeights requests the list of heights from the factomd API.
GetIdentityChainID takes an identity name and returns its corresponding ChainID.
GetIdentityKey takes a private key string and returns an IdentityKey.
GetMultipleECBalances returns balances for multiple Entry Credit Addresses from the factomd API.
GetMultipleFCTBalances returns balances for multiple Factoid Addresses from the factomd API.
GetPendingEntries requests a list of all Entries that are waiting to be written into the next block on the Factom Blockchain.
GetPendingTransactions requests a list of transactions that have been submitted to the Factom Network, but have not yet been included in a Factoid Block.
GetProperties requests various properties of the factomd and factom wallet software and API versions.
GetRaw requests the raw data for any binary block kept in the factomd database.
GetReceipt requests a Receipt for a given Factom Entry.
GetTmpTransaction requests a temporary transaction from the wallet.
GetTPS returns the instant rate (over the previous 3 seconds) and total rate (over the lifetime of the node) of Transactions Per Second rate know to factomd.
GetTransaction requests a transaction from the factomd API.
No description provided by the author
GetWalletHeight requests the current block heights known to the Factom Wallet.
No description provided by the author
No description provided by the author
No description provided by the author
ImportAddresses takes a number of Factoid and Entry Creidit secure keys and stores the Facotid and Entry Credit addresses in the Factom Wallet.
No description provided by the author
ImportKoinify creates a Factoid Address from a secret 12 word koinify mnumonic.
IsValidAddress checks that a string is a valid address of one of the defined address types.
IsValidAttribute returns true if the entry is a properly formatted attribute with a verifiable signature.
IsValidEndorsement returns true if the Entry is a properly formatted attribute endorsement with a verifiable signature.
No description provided by the author
ListTransactionsAddress lists all transaction to and from a given address.
ListTransactionsAll lists all the transactions from the wallet database.
ListTransactionsID lists a transaction from the wallet database with a given Transaction ID.
ListTransactionsRange lists all transacions from the wallet database made within a given range of Directory Block heights.
ListTransactionsTmp lists all of the temporary transaction held in the wallet.
MakeBIP44ECAddress generates an Entry Credit Address from a 12 word mnemonic, an account index, a chain index, and an address index, according to the bip44 standard for multicoin wallets.
MakeBIP44FactoidAddress generates a Factoid Address from a 12 word mnemonic, an account index, a chain index, and an address index, according to the bip44 standard for multicoin wallets.
No description provided by the author
MakeECAddress creates an Entry Credit Address public/secret key pair from a secret key []byte.
MakeFactoidAddress creates a Factoid Address rcd/secret key pair from a secret key []byte.
MakeFactoidAddressFromKoinify takes the 12 word string used in the Koinify sale and returns a Factoid Address.
No description provided by the author
NewChain creates a new Factom Chain from an Entry.
NewChainFromBytes creates a new Factom Chain from byte data used to construct an Entry.
NewChainFromStrings creates a new Factom Chain from strings used to construct an Entry.
NewECAddress creates a blank public/secret key pair for an Entry Credit Address.
NewEntryFromBytes creates a new Factom Entry from byte data.
NewEntryFromStrings creates a new Factom Entry from strings.
NewFactoidAddress creates a blank rcd/secret key pair for a Factoid Address.
NewIdentityAttributeEndorsementEntry creates and returns an Entry struct that agrees with or recognizes a given attribute.
NewIdentityAttributeEntry creates and returns an Entry struct that assigns an attribute JSON object to a given identity.
NewIdentityChain creates an returns a Chain struct for a new identity.
No description provided by the author
NewIdentityKeyReplacementEntry creates and returns a new Entry struct for the key replacement.
No description provided by the author
No description provided by the author
No description provided by the author
NewRCD1 creates a new 0 value Type 1 Factoid RCD.
NewTransaction creates a new temporary Transaction in the wallet.
No description provided by the author
ParseMnemonic parse and validate a bip39 mnumonic string.
RemoveAddress removes an address from the Factom Wallet database.
No description provided by the author
ReplayDBlockFromHeight requests DBlock states to be emitted over the LiveFeed API.
ResolveDnsName resolve a netki wallet DNS name and returns the public address string for the Factoid address and the Entry Credit addresses associated with that name.
RevealChain sends the Chain data to the factom network to create a chain that has previously been commited.
RevealEntrysends the Entry data to the factom network to create an Entry that has previously been commited.
SendFactoid creates and sends a transaction to the Factom Network.
SendFactomdRequest sends a json object to factomd.
SendRawMsg sends a raw hex encoded byte string for factomd to send as a binary message on the Factom Netwrork.
SendTransaction composes a prepaired temoprary transaction from the wallet and sends it to the factomd API to be included on the factom network.
No description provided by the author
No description provided by the author
SetFactomdServer sets where to find the factomd server, and tells the server its public ip.
No description provided by the author
SetOpenNode points the Factomd server to the open node API and enables cookies.
No description provided by the author
No description provided by the author
SetWalletServer sets where to find the fctwallet server, and tells the server its public ip.
No description provided by the author
SignData lets you sign arbitrary data by the specified signer.
SignTransaction adds the reqired signatures from the appropriate factoid addresses to a temporary transaction in the wallet.
SubTransactionFee subtracts the appropriate factoid fee payment from a transaction output of a temporary transaction in the wallet.
No description provided by the author
WalletComposeChainCommitReveal composes commit and reveal json objects that may be used to make API calls to the factomd API to create a new Factom Chain.
WalletComposeEntryCommitReveal composes commit and reveal json objects that may be used to make API calls to the factomd API to create a new Factom Entry.
FactomdServer returns where to find the fctwallet server, and tells the server its public ip.

# Constants

No description provided by the author
6.
13.
14.
5.
9.
8.
3.
11.
12.
1.
4.
0.
7.
2.
10.
No description provided by the author
No description provided by the author
4.
2.
3.
1.
0.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ZeroHash is the string of all 00s.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Common Address errors.
Common Address errors.
Common Address errors.
Common Address errors.
Common Address errors.
No description provided by the author
RpcConfig sets the default target for the factomd and walletd API servers.

# Structs

ABlock is an Administrative Block that records metadata about the Factom Network and the consensus process for writing blocks into the Factom Blockchain.
AdminAddAuditServer adds an Audit Server to the pool to participate in auditing the Federated Servers.
AdminAddAuthorityAddress adds or replaces a Factoid Address to be used in a Coinbase Descriptor.
AdminAddAuthorityEfficiency set the percentage of the Factoid reward that a server yeilds to the Grant Pool to be used by the Factom Governance to improve the network.
AdminAddFederatedServer adds a Federated Server to the pool to participate in building subsequent blocks.
AdminAddFederatedServerBTCKey adds a Bitcoin public key that the Federated server will use to create the Anchor transaction to record the Factom Directory Block Hash on the Bitcoin Blockchain.
AdminAddFederatedServerKey adds or replaces a signing key in the key hierarchy for a Federated Server Identity.
AdminAddHash adds or replaces a matryoshka hash whithin the ABlock.
AdminCoinbaseDescriptor specifies a genesis transaction that creates new Factoids.
AdminCoinbaseDescriptorCancel cancels a specific output in a Coinbase Descriptor.
AdminDBSignature is a signature of the previous DBlock Header.
AdminMinuteNumber is deprecated as of the Factom Milestone 2 release, but is kept here for backwards compatability.
AdminMinuteNumber is deprecated as of the Factom Milestone 2 release, but is kept here for backwards compatability.
AdminRemoveFederatedServer removes an Authority Server from the pool at the specified Directory Block Height.
AdminRevealHash is a reveal of the matryoshka hash used to determin the server priority in subsequent blocks.
AdminServerFault authorizes the removal of a Federated Server.
AnchorBitcoin is the bitcoin specific anchor.
AnchorEthereum is the ethereum specific anchor.
Anchors is an anchors response from factomd.
AnchorSigningKey is a key for an external blockchain (like Bitcoin or Etherium) used to create a Factom Anchor.
An Authority is an identity on the Factom Blockchain that is responsible for signing some part of the Factom Directory Block merkel tree to achieve consensus on the network to create a canonical Directory Block.
No description provided by the author
A Chain is a blockchain datastructure in Factom.
CurrentMinuteInfo represents the current state of the factom network from the factomd API.
DBlock is a Factom Network Directory Block containing the Merkel root of all of the Entries and blocks from a 10 minute period in the Factom Network.
Diagnostics represents a set of diagnostic/debugging information about factomd and the Factom Network.
EBEntry is a member of the Entry Block representing a Factom Entry.
EBlock is an Entry Block from the Factom Network.
ECAddress is an Entry Credit public/secret key pair.
ECBalanceIncrease pays for and reserves a new entry in Factom.
ECBlock (Entry Credit Block) holds transactions that create Chains and Entries, and fund Entry Credit Addresses.
ECChainCommit pays for and reserves a new chain in Factom.
ECEntryCommit pays for and reserves a new entry in Factom.
ECMinuteNumber represents the end of a minute minute [1-10] in the order of the ECBEntries.
ECServerIndexNumber shows the index of the server that acknowledged the following ECBEntries.
Entry
No description provided by the author
EntryStatus is the metadata about an Entry Commit Transaction.
FactoidAddress is a Factoid Redeem Condition Datastructure (a type 1 RCD is just the public key) and a corresponding secret key.
FactoidTxStatus is the metadata about a Factoid Transaction.
FBlock represents a Factoid Block returned from factomd.
FBTransactions represents a single and valid transaction contained inside of an FBlock.
HeightsResponse is a list of the various current heights of blocks from factomd.
An Identity is an array of names and a hierarchy of keys.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MerkleNode is part of the ethereum anchor.
No description provided by the author
No description provided by the author
PendingTransaction is a single transaction returned by the pending-transaction API call.
Properties represents properties of the running factomd and factom wallet.
RawData is a simple hex encoded byte string.
RCD1 is a Type 1 Redeem Condition Datastructure which contains a public key used to sign transactions made with a Factoid Address.
Receipt is the Merkel proof that a given Entry and its metadata (such as the Entry Block timestamp) have been written to the Factom Blockchain and possibly anchored into Bitcoin, Etherium, or other blockchains.
No description provided by the author
RPCConfig is the configuration for the API handler.
No description provided by the author
SignedTransactionAddress contains a TransactionAddress along with the RCD and cryptographic signatures specified by the RCD.
A Transaction from the Factom Network represents a transfer of value between Factoid addresses and/or the creation of new Entry Credits.
TransactionAddress holds the relevant data for either an input or an output.
TransactionData is metadata about a given Transaction, including data about the Transaction Status (i.e.
TransactionResponse is the factomd API responce to a request made for a transaction.
TransAddress represents the imputs and outputs in a Factom Transaction.

# Interfaces

ABEntry is any valid Admin Block Entry type.
an ECBEntry is an individual member of the Entry Credit Block.
RCD is a Redeem Condition Datastructure representing a Factoid account.

# Type aliases

AdminID defines the type of an Admin Block Entry.
ECID defines the type of an Entry Credit Block Entry.