Versions in this module Expand all Collapse all v2 v2.0.6 Feb 29, 2024 v2.0.5 Jan 4, 2024 v2.0.4 Jan 3, 2024 Changes in this version type Key + func KeyFromBytes(bts []byte) Key + func ParseKeyWithPub(s, pub string) (Key, error) v2.0.3 Dec 27, 2023 v2.0.2 Dec 22, 2023 v2.0.1 Dec 16, 2023 v2.0.0 Dec 12, 2023 Changes in this version + const AggregatedSignatureOrdinayMask + const AggregatedSignaturePrefix + const AggregatedSignatureSparseMask + const ExtraSizeGeneralLimit + const ExtraSizeStorageCapacity + const ExtraSizeStorageStep + const ExtraStoragePriceStep + const InputLocked + const InvalidOutputKey + const InvalidSignature + const MainNetworkID + const MaximumEncodingInt + const MinimumEncodingVersion + const Operator0 + const Operator64 + const OperatorCmp + const OperatorSum + const OutputTypeCustodianDeposit + const OutputTypeCustodianEvolution + const OutputTypeCustodianMigration + const OutputTypeCustodianWithdrawal + const OutputTypeDomainAccept + const OutputTypeDomainRemove + const OutputTypeNodeAccept + const OutputTypeNodeCancel + const OutputTypeNodePledge + const OutputTypeNodeRemove + const OutputTypeScript + const OutputTypeWithdrawalClaim + const OutputTypeWithdrawalFuel + const OutputTypeWithdrawalSubmit + const Precision + const ReferencesCountLimit + const SliceCountLimit + const TransactionTypeCustodianSlashNodes + const TransactionTypeCustodianUpdateNodes + const TransactionTypeDeposit + const TransactionTypeDomainAccept + const TransactionTypeDomainRemove + const TransactionTypeMint + const TransactionTypeNodeAccept + const TransactionTypeNodeCancel + const TransactionTypeNodePledge + const TransactionTypeNodeRemove + const TransactionTypeScript + const TransactionTypeUnknown + const TransactionTypeWithdrawalClaim + const TransactionTypeWithdrawalFuel + const TransactionTypeWithdrawalSubmit + const TxMethodGet + const TxMethodGetUtxo + const TxMethodSend + const TxVersion + const TxVersionBlake3Hash + const TxVersionCommonEncoding + const TxVersionHashSignature + const TxVersionLegacy + const TxVersionReferences + var DefaultLegacyConfig = Config + var DefaultSafeConfig = Config + func DecodeResponse(resp *http.Response) ([]byte, error) + func GenerateEd25519Key() ed25519.PrivateKey + func HashMembers(ids []string) string + func HashScalar(txVer uint8, k *edwards25519.Point, outputIndex uint8) *edwards25519.Scalar + func IsErrorCodes(err error, codes ...int) bool + func KeyMultPubPriv(pub, priv *Key) *edwards25519.Point + func UnmarshalResponse(resp *http.Response, v interface{}) error + type Address struct + PrivateSpendKey Key + PrivateViewKey Key + PublicSpendKey Key + PublicViewKey Key + func AddressFromPublicSpend(publicSpend Key) *Address + func AddressFromString(s string) (Address, error) + func GenerateAddress(rand io.Reader, public ...bool) *Address + func (a *Address) UnmarshalJSON(b []byte) error + func (a Address) CreateUTXO(txVer uint8, outputIndex uint8, amount decimal.Decimal) *Output + func (a Address) Hash() Hash + func (a Address) MarshalJSON() ([]byte, error) + func (a Address) String() string + type AggregatedSignature struct + Signature *Signature + Signers []int + type Client struct + func NewClient(cfg Config) *Client + func (c *Client) CallMixinNetRPC(ctx context.Context, resp interface{}, method string, params ...interface{}) error + func (c *Client) GetTransaction(ctx context.Context, hash Hash) (*Transaction, error) + func (c *Client) GetUTXO(ctx context.Context, hash Hash, outputIndex uint8) (*UTXO, error) + func (c *Client) HostFromContext(ctx context.Context) string + func (c *Client) RandomHost() string + func (c *Client) ReadConsensusInfo(ctx context.Context) (*ConsensusInfo, error) + func (c *Client) SendRawTransaction(ctx context.Context, raw string) (*Transaction, error) + func (c *Client) VerifyTransaction(ctx context.Context, addr *Address, txHash Hash) (bool, error) + func (c *Client) WithHost(ctx context.Context, host string) context.Context + type Config struct + Hosts []string + Safe bool + type ConsensusInfo struct + Epoch time.Time + Graph Graph + Mint Mint + Network Hash + Node Hash + Queue Queue + Timestamp time.Time + Uptime string + Version string + type ConsensusNode struct + Aggregator uint64 + Node Hash + Payee Address + Signer Address + State string + Timestamp int64 + Transaction Hash + Works [2]uint64 + type Decoder struct + func NewDecoder(b []byte) *Decoder + func NewMinimumDecoder(b []byte) (*Decoder, error) + func (dec *Decoder) DecodeTransaction() (*Transaction, error) + func (dec *Decoder) Read(b []byte) error + func (dec *Decoder) ReadAggregatedSignature() (*AggregatedSignature, error) + func (dec *Decoder) ReadByte() (byte, error) + func (dec *Decoder) ReadBytes() ([]byte, error) + func (dec *Decoder) ReadInput() (*Input, error) + func (dec *Decoder) ReadInt() (int, error) + func (dec *Decoder) ReadInteger() (Integer, error) + func (dec *Decoder) ReadMagic() (bool, error) + func (dec *Decoder) ReadOutput(ver uint8) (*Output, error) + func (dec *Decoder) ReadSignatures() (map[uint16]*Signature, error) + func (dec *Decoder) ReadUint16() (uint16, error) + func (dec *Decoder) ReadUint32() (uint32, error) + func (dec *Decoder) ReadUint64() (uint64, error) + type DepositData struct + Amount Integer + AssetKey string + Chain Hash + Index uint64 + Transaction string + type Encoder struct + func NewEncoder() *Encoder + func NewMinimumEncoder() *Encoder + func (enc *Encoder) EncodeAggregatedSignature(js *AggregatedSignature) + func (enc *Encoder) EncodeInput(in *Input) + func (enc *Encoder) EncodeOutput(o *Output, ver uint8) + func (enc *Encoder) EncodeSignatures(sm map[uint16]*Signature) + func (enc *Encoder) EncodeTransaction(signed *Transaction) []byte + func (enc *Encoder) Write(b []byte) + func (enc *Encoder) WriteByte(b byte) error + func (enc *Encoder) WriteInt(d int) + func (enc *Encoder) WriteInteger(d Integer) + func (enc *Encoder) WriteUint16(d uint16) + func (enc *Encoder) WriteUint32(d uint32) + func (enc *Encoder) WriteUint64(d uint64) + type Error struct + Code int + Description string + Extra map[string]interface{} + RequestID string + Status int + func (e *Error) Error() string + type Graph struct + Cache map[string]*GraphCache + Consensus []*ConsensusNode + Final map[string]*GraphFinal + SPS float64 + Topology uint64 + type GraphCache struct + Node Hash + References GraphReferences + Round uint64 + Snapshots []*GraphSnapshot + Timestamp int64 + type GraphFinal struct + End int64 + Hash Hash + Node Hash + Round uint64 + Start int64 + type GraphReferences struct + External Hash + Self Hash + type GraphSnapshot struct + Hash Hash + Node Hash + References GraphReferences + Round uint64 + Signature string + Timestamp int64 + Transaction Hash + Version int + type Hash [32]byte + var XINAssetId Hash + func HashFromString(src string) (Hash, error) + func NewBlake3Hash(data []byte) Hash + func NewHash(data []byte) Hash + func (h *Hash) UnmarshalJSON(b []byte) error + func (h Hash) HasValue() bool + func (h Hash) MarshalJSON() ([]byte, error) + func (h Hash) String() string + type Input struct + Deposit *DepositData + Genesis []byte + Hash *Hash + Index uint8 + Mint *MintData + type InputUTXO struct + Amount decimal.Decimal + Asset Hash + type Integer struct + var Zero Integer + func IntegerFromDecimal(d decimal.Decimal) (v Integer) + func IntegerFromString(x string) (v Integer) + func NewInteger(x uint64) (v Integer) + func (x *Integer) UnmarshalJSON(b []byte) error + func (x *Integer) UnmarshalMsgpack(data []byte) error + func (x Integer) Add(y Integer) (v Integer) + func (x Integer) Cmp(y Integer) int + func (x Integer) Count(y Integer) uint64 + func (x Integer) Div(y int) (v Integer) + func (x Integer) MarshalJSON() ([]byte, error) + func (x Integer) MarshalMsgpack() ([]byte, error) + func (x Integer) Mul(y int) (v Integer) + func (x Integer) Sign() int + func (x Integer) String() string + func (x Integer) Sub(y Integer) (v Integer) + type Key [32]byte + func DeriveGhostPrivateKey(txVer uint8, R, a, b *Key, outputIndex uint8) *Key + func DeriveGhostPublicKey(txVer uint8, r, A, B *Key, outputIndex uint8) *Key + func GenerateKey(randReader io.Reader) Key + func KeyFromSeed(seed []byte) Key + func KeyFromString(s string) (Key, error) + func ViewGhostOutputKey(txVer uint8, P, a, R *Key, outputIndex uint8) *Key + func (k *Key) UnmarshalJSON(b []byte) error + func (k Key) CheckKey() bool + func (k Key) DeterministicHashDerive() Key + func (k Key) HasValue() bool + func (k Key) MarshalJSON() ([]byte, error) + func (k Key) Public() Key + func (k Key) String() string + func (k Key) ToPoint() (*edwards25519.Point, error) + func (k Key) ToScalar() (*edwards25519.Scalar, error) + func (privateKey *Key) Sign(message []byte) Signature + func (privateKey *Key) SignHash(h Hash) Signature + func (publicKey *Key) Verify(message []byte, sig Signature) bool + func (publicKey *Key) VerifyHash(message Hash, sig Signature) bool + func (publicKey *Key) VerifyWithChallenge(sig Signature, a *edwards25519.Scalar) bool + type Mint struct + Batch uint64 + Pledge decimal.Decimal + Pool decimal.Decimal + type MintData struct + Amount Integer + Batch uint64 + Group string + type Output struct + Amount Integer + Keys []Key + Mask Key + Script Script + Type uint8 + Withdrawal *WithdrawalData + type Queue struct + Caches uint64 + Finals uint64 + type Script []uint8 + func NewThresholdScript(threshold uint8) Script + func (s *Script) UnmarshalJSON(b []byte) error + func (s Script) MarshalJSON() ([]byte, error) + func (s Script) String() string + func (s Script) Validate(sum int) error + func (s Script) VerifyFormat() error + type Signature [64]byte + func (s *Signature) UnmarshalJSON(b []byte) error + func (s Signature) MarshalJSON() ([]byte, error) + func (s Signature) String() string + type Transaction struct + AggregatedSignature *AggregatedSignature + Asset Hash + Extra TransactionExtra + Hash *Hash + Inputs []*Input + Outputs []*Output + References []Hash + Signatures []map[uint16]*Signature + Snapshot *Hash + Version uint8 + func TransactionFromData(data []byte) (*Transaction, error) + func TransactionFromRaw(raw string) (*Transaction, error) + func (t *Transaction) Dump() (string, error) + func (t *Transaction) DumpData() ([]byte, error) + func (t *Transaction) TransactionHash() (Hash, error) + func (t Transaction) DumpPayload() ([]byte, error) + func (tx *Transaction) ExtraLimit() int + type TransactionExtra []byte + func (e *TransactionExtra) UnmarshalJSON(b []byte) error + func (e TransactionExtra) MarshalJSON() ([]byte, error) + func (e TransactionExtra) String() string + type TransactionInput struct + Hint string + Inputs []*InputUTXO + Memo string + Outputs []*Output + References []Hash + TxVersion uint8 + func (input *TransactionInput) Asset() Hash + func (input *TransactionInput) Build() (*Transaction, error) + func (input *TransactionInput) TotalInputAmount() decimal.Decimal + func (input *TransactionInput) Validate() error + type TransactionV1 struct + Signatures [][]*Signature + func (t *TransactionV1) Dump() (string, error) + type UTXO struct + Amount decimal.Decimal + Hash Hash + Index uint8 + Lock *Hash + Type uint8 + type WithdrawalData struct + Address string + AssetKey string + Chain Hash + Tag string