Documentation ¶
Index ¶
- Constants
- Variables
- func CreateKeyPair() ed25519.PrivKey
- func CreateKeyPairFromSeed(seed ed25519.PrivKey) (ret ed25519.PrivKey)
- func GetAddressFromIdentity(name *string) uint64deprecated
- func GetAddressFromIdentityChain(identitychain []byte) uint64deprecated
- func MarshalBinaryLedgerAdiChainPath(adiChainPath string, payload []byte, timestamp int64) []byte
- func MarshalBinaryLedgerChainId(chainId []byte, payload []byte, timestamp int64) []byte
- func ParseIdentityChainPath(adiChainPath *string) (adi string, chainPath string, err error)deprecated
- type Amount
- func (a *Amount) AsBigInt() *big.Int
- func (a *Amount) Div(v int64)
- func (a *Amount) MarshalBinary() ([]byte, error)
- func (s *Amount) MarshalJSON() ([]byte, error)
- func (a *Amount) Mul(v int64)
- func (a *Amount) Size() int
- func (a *Amount) UnmarshalBinary(data []byte) error
- func (s *Amount) UnmarshalJSON(data []byte) error
- type AtomicBool
- type ByByteArray
- type Byte
- type Bytes
- func (s Bytes) AsBytes32() (ret Bytes32)
- func (s Bytes) AsBytes64() (ret Bytes64)
- func (s *Bytes) Bytes() []byte
- func (s *Bytes) MarshalBinary() ([]byte, error)
- func (s *Bytes) MarshalJSON() ([]byte, error)
- func (s *Bytes) Size(varintbuf *[8]byte) int
- func (s *Bytes) UnmarshalBinary(data []byte) (err error)
- func (s *Bytes) UnmarshalJSON(data []byte) error
- type Bytes32
- type Bytes64
- type QueryType
- type String
- func (s *String) AsString() *string
- func (s *String) Bytes() []byte
- func (s *String) MarshalBinary() ([]byte, error)
- func (s *String) MarshalJSON() ([]byte, error)
- func (s *String) Size(varintbuf *[8]byte) int
- func (s *String) UnmarshalBinary(data []byte) error
- func (s *String) UnmarshalJSON(data []byte) error
- type TransactionType
- type TxType
- type UrlAdi
- type UrlChain
Constants ¶
const ( QueryTypeUnknown = QueryType(iota) QueryTypeUrl // Query by Url QueryTypeChainId // Query by chain id QueryTypeTxId // Query tx and pending chains By TxId QueryTypeTxHistory // Query transaction history QueryTypeDirectoryUrl // Query directory by URL QueryTypeData // Query a specific data entry using the url and optional entry hash QueryTypeDataSet // Query a set of data given pagination parameters for a given URL QueryTypeKeyPageIndex // Query key page index )
QueryType enumeration order matters, do not change order when adding new enums.
const ( // TxTypeCreateIdentity creates an ADI, which produces a synthetic chain // create transaction. // Deprecated: use protocol.TransactionTypeCreateIdentity TxTypeCreateIdentity = protocol.TransactionTypeCreateIdentity // TxTypeCreateTokenAccount creates an ADI token account, which produces a // synthetic chain create transaction. // Deprecated: use protocol.TransactionTypeCreateTokenAccount TxTypeCreateTokenAccount = protocol.TransactionTypeCreateTokenAccount // TxTypeSendTokens transfers tokens between token accounts, which produces // a synthetic deposit tokens transaction. // Deprecated: use protocol.TransactionTypeSendTokens TxTypeSendTokens = protocol.TransactionTypeSendTokens // TxTypeCreateDataAccount creates an ADI Data Account, which produces a // synthetic chain create transaction. // Deprecated: use protocol.TransactionTypeCreateDataAccount TxTypeCreateDataAccount = protocol.TransactionTypeCreateDataAccount // TxTypeWriteData writes data to an ADI Data Account, which *does not* // produce a synthetic transaction. // Deprecated: use protocol.TransactionTypeWriteData TxTypeWriteData = protocol.TransactionTypeWriteData // TxTypeWriteDataTo writes data to a Lite Data Account, which produces a // synthetic write data transaction. // Deprecated: use protocol.TransactionTypeWriteDataTo TxTypeWriteDataTo = protocol.TransactionTypeWriteDataTo // TxTypeAcmeFaucet produces a synthetic deposit tokens transaction that // deposits ACME tokens into a lite token account. // Deprecated: use protocol.TransactionTypeAcmeFaucet TxTypeAcmeFaucet = protocol.TransactionTypeAcmeFaucet // TxTypeCreateToken creates a token issuer, which produces a synthetic // chain create transaction. // Deprecated: use protocol.TransactionTypeCreateToken TxTypeCreateToken = protocol.TransactionTypeCreateToken // TxTypeIssueTokens issues tokens to a token account, which produces a // synthetic token deposit transaction. // Deprecated: use protocol.TransactionTypeIssueTokens TxTypeIssueTokens = protocol.TransactionTypeIssueTokens // TxTypeBurnTokens burns tokens from a token account, which produces a // synthetic burn tokens transaction. // Deprecated: use protocol.TransactionTypeBurnTokens TxTypeBurnTokens = protocol.TransactionTypeBurnTokens // TxTypeCreateKeyPage creates a key page, which produces a synthetic chain // create transaction. // Deprecated: use protocol.TransactionTypeCreateKeyPage TxTypeCreateKeyPage = protocol.TransactionTypeCreateKeyPage // TxTypeCreateKeyBook creates a key book, which produces a synthetic chain // create transaction. // Deprecated: use protocol.TransactionTypeCreateKeyBook TxTypeCreateKeyBook = protocol.TransactionTypeCreateKeyBook // TxTypeAddCredits converts ACME tokens to credits, which produces a // synthetic deposit credits transaction. // Deprecated: use protocol.TransactionTypeAddCredits TxTypeAddCredits = protocol.TransactionTypeAddCredits // TxTypeUpdateKeyPage adds, removes, or updates keys in a key page, which // *does not* produce a synthetic transaction. // Deprecated: use protocol.TransactionTypeUpdateKeyPage TxTypeUpdateKeyPage = protocol.TransactionTypeUpdateKeyPage // TxTypeSignPending is used to sign a pending transaction. // Deprecated: use protocol.TransactionTypeSignPending TxTypeSignPending = protocol.TransactionTypeSignPending )
User transactions
const ( // TxTypeSyntheticCreateChain creates or updates chains. // Deprecated: use protocol.TransactionTypeSyntheticCreateChain TxTypeSyntheticCreateChain = protocol.TransactionTypeSyntheticCreateChain // TxTypeSyntheticWriteData writes data to a data account. // Deprecated: use protocol.TransactionTypeSyntheticWriteData TxTypeSyntheticWriteData = protocol.TransactionTypeSyntheticWriteData // TxTypeSyntheticDepositTokens deposits tokens into token accounts. // Deprecated: use protocol.TransactionTypeSyntheticDepositTokens TxTypeSyntheticDepositTokens = protocol.TransactionTypeSyntheticDepositTokens // TxTypeSyntheticAnchor anchors one network to another. // Deprecated: use protocol.TransactionTypeSyntheticAnchor TxTypeSyntheticAnchor = protocol.TransactionTypeSyntheticAnchor // TxTypeSyntheticDepositCredits deposits credits into a credit holder. // Deprecated: use protocol.TransactionTypeSyntheticDepositCredits TxTypeSyntheticDepositCredits = protocol.TransactionTypeSyntheticDepositCredits // TxTypeSyntheticBurnTokens returns tokens to a token issuer's pool of // issuable tokens. // Deprecated: use protocol.TransactionTypeSyntheticBurnTokens TxTypeSyntheticBurnTokens = protocol.TransactionTypeSyntheticBurnTokens // TxTypeSyntheticMirror mirrors records from one network to another. // Deprecated: use protocol.TransactionTypeSyntheticMirror TxTypeSyntheticMirror = protocol.TransactionTypeSyntheticMirror // TxTypeSegWitDataEntry is a surrogate transaction segregated witness for // a WriteData transaction // Deprecated: use protocol.TransactionTypeSegWitDataEntry TxTypeSegWitDataEntry = protocol.TransactionTypeSegWitDataEntry )
Synthetic transactions
const ( // TxTypeInternalGenesis initializes system chains. // Deprecated: use protocol.TransactionTypeInternalGenesis TxTypeInternalGenesis = protocol.TransactionTypeInternalGenesis // Deprecated: use protocol.TransactionTypeInternalSendTransactions TxTypeInternalSendTransactions = protocol.TransactionTypeInternalSendTransactions // TxTypeInternalTransactionsSigned notifies the executor of synthetic // transactions that have been signed. // Deprecated: use protocol.TransactionTypeInternalTransactionsSigned TxTypeInternalTransactionsSigned = protocol.TransactionTypeInternalTransactionsSigned // TxTypeInternalTransactionsSent notifies the executor of synthetic // transactions that have been sent. // Deprecated: use protocol.TransactionTypeInternalTransactionsSent TxTypeInternalTransactionsSent = protocol.TransactionTypeInternalTransactionsSent )
const ( // TxTypeUnknown represents an unknown transaction type. // Deprecated: use protocol.TransactionTypeUnknown TxTypeUnknown = protocol.TransactionTypeUnknown )
Variables ¶
var ( QueryTypeName = map[QueryType]string{ QueryTypeUnknown: "QueryTypeUnknown", QueryTypeUrl: "QueryTypeUrl", QueryTypeChainId: "QueryTypeChainId", QueryTypeTxId: "QueryTypeTxId", QueryTypeTxHistory: "QueryTypeTxHistory", QueryTypeDirectoryUrl: "QueryTypeDirectoryUrl", QueryTypeData: "QueryTypeData", QueryTypeDataSet: "QueryTypeDataSet", QueryTypeKeyPageIndex: "QueryTypeKeyPageIndex", } QueryTypeValue = map[string]QueryType{ "QueryTypeUnknown": QueryTypeUnknown, "QueryTypeUrl": QueryTypeUrl, "QueryTypeChainId": QueryTypeChainId, "QueryTypeTxId": QueryTypeTxId, "QueryTypeTxHistory": QueryTypeTxHistory, "QueryTypeDirectoryUrl": QueryTypeDirectoryUrl, "QueryTypeData": QueryTypeData, "QueryTypeDataSet": QueryTypeDataSet, "QueryTypeKeyPageIndex": QueryTypeKeyPageIndex, } )
Enum value maps for QueryType.
Functions ¶
func CreateKeyPair ¶
CreateKeyPair generic helper function to create an ed25519 key pair
func GetAddressFromIdentity
deprecated
func GetAddressFromIdentityChain
deprecated
func MarshalBinaryLedgerAdiChainPath ¶
MarshalBinaryLedgerAdiChainPath adiChainPath == adi/chain/path This function will generate a ledger needed for ed25519 signing or sha256 hashed to produce TXID
func MarshalBinaryLedgerChainId ¶
MarshalBinaryLedgerChainId create a ledger that can be used for signing or generating a txid
func ParseIdentityChainPath
deprecated
ParseIdentityChainPath helpful parser to extract the identity name and chainpath. For example RedWagon/MyAccAddress becomes identity=redwagon and chainpath=redwagon/MyAccAddress.
Deprecated: use ./internal/url.Parse
Types ¶
type Amount ¶
func (*Amount) MarshalBinary ¶
func (*Amount) MarshalJSON ¶
MarshalJSON serializes ByteArray to hex
func (*Amount) UnmarshalBinary ¶
func (*Amount) UnmarshalJSON ¶
UnmarshalJSON serializes ByteArray to hex
type AtomicBool ¶
type AtomicBool int32
func (*AtomicBool) Load ¶
func (a *AtomicBool) Load() (v bool)
func (*AtomicBool) Store ¶
func (a *AtomicBool) Store(x bool)
type ByByteArray ¶
type ByByteArray [][]byte
------------------------------------------------ Byte array sorting - ascending
func (ByByteArray) Len ¶
func (f ByByteArray) Len() int
func (ByByteArray) Less ¶
func (f ByByteArray) Less(i, j int) bool
func (ByByteArray) Swap ¶
func (f ByByteArray) Swap(i, j int)
type Bytes ¶
type Bytes []byte
func (*Bytes) MarshalBinary ¶
func (*Bytes) MarshalJSON ¶
MarshalJSON serializes ByteArray to hex
func (*Bytes) UnmarshalBinary ¶
func (*Bytes) UnmarshalJSON ¶
UnmarshalJSON serializes ByteArray to hex
type Bytes32 ¶
type Bytes32 [32]byte
Bytes32 is a fixed array of 32 bytes
func GetChainIdFromChainPath
deprecated
func GetIdentityChainFromIdentity
deprecated
func (*Bytes32) AsByteArray ¶
func (*Bytes32) FromString ¶
FromString takes a hex encoded string and sets the byte array. The input parameter, str, must be 64 hex characters in length
func (*Bytes32) MarshalJSON ¶
MarshalJSON serializes ByteArray to hex
func (*Bytes32) ToString ¶
ToString will convert the 32 byte array into a hex string that is 64 hex characters in length
func (*Bytes32) UnmarshalJSON ¶
UnmarshalJSON serializes ByteArray to hex
type Bytes64 ¶
type Bytes64 [64]byte
Bytes64 is a fixed array of 32 bytes
func (*Bytes64) FromString ¶
FromString takes a hex encoded string and sets the byte array. The input parameter, str, must be 64 hex characters in length
func (*Bytes64) MarshalJSON ¶
MarshalJSON serializes ByteArray to hex
func (*Bytes64) ToString ¶
ToString will convert the 32 byte array into a hex string that is 64 hex characters in length
func (*Bytes64) UnmarshalJSON ¶
UnmarshalJSON serializes ByteArray to hex
type QueryType ¶
type QueryType uint64
type String ¶
type String string
func (*String) MarshalBinary ¶
func (*String) MarshalJSON ¶
func (*String) UnmarshalBinary ¶
func (*String) UnmarshalJSON ¶
type TransactionType ¶
type TransactionType = protocol.TransactionType
TransactionType is the type of a transaction. Deprecated: use protocol.TransactionType
type TxType ¶
type TxType = TransactionType
TxType is an alias for TransactionType Deprecated: use protocol.TransactionType
type UrlChain ¶
type UrlChain struct {
String
}
func (*UrlChain) MarshalJSON ¶
func (*UrlChain) UnmarshalJSON ¶
UnmarshalJSON serializes ByteArray to hex