Versions in this module Expand all Collapse all v1 v1.6.0 Jan 24, 2024 Changes in this version + func ARToWinston(a *big.Float) *big.Int + func Base64Decode(data string) ([]byte, error) + func Base64Encode(data []byte) string + func BundleItemSignData(d types.BundleItem) ([]byte, error) + func ByteArrayToLong(b []byte) int + func ConcatBuffer(buffers ...[]byte) []byte + func ContainsInSlice(items []string, item string) bool + func DecodeBlock(body string) (*types.Block, error) + func DecodeBundle(bundleBinary []byte) (*types.Bundle, error) + func DecodeBundleItem(itemBinary []byte) (*types.BundleItem, error) + func DecodeBundleItemStream(itemBinary io.Reader) (*types.BundleItem, error) + func DecodeBundleStream(bundleData *os.File) (*types.Bundle, error) + func DeepHash(data []interface{}) [48]byte + func DeserializeTags(data []byte) ([]types.Tag, error) + func GenerateChunks(data interface{}) (types.Chunks, error) + func GenerateIndepHash(b types.Block) string + func GenerateItemBinary(d *types.BundleItem) (by []byte, err error) + func GenerateItemBinaryStream(d *types.BundleItem) (binaryReader io.Reader, err error) + func GenerateRsaKey(bits int) (*rsa.PrivateKey, error) + func GetBundleItemTagsBytes(itemBinary []byte) ([]byte, error) + func GetChunk(tx types.Transaction, idx int, data []byte) (*types.GetChunk, error) + func GetChunkStream(tx types.Transaction, idx int, data *os.File) (*types.GetChunk, error) + func GetSignatureData(tx *types.Transaction) ([]byte, error) + func Hash(data [][]byte) []byte + func ItemSignerAddr(b types.BundleItem) (string, error) + func LongTo32ByteArray(long int) []byte + func LongTo8ByteArray(long int) []byte + func NewBundle(items ...types.BundleItem) (*types.Bundle, error) + func NewBundleItem(owner string, signatureType int, target, anchor string, data []byte, ...) (*types.BundleItem, error) + func NewBundleItemStream(owner string, signatureType int, target, anchor string, data io.Reader, ...) (*types.BundleItem, error) + func NewBundleStream(items ...types.BundleItem) (*types.Bundle, error) + func OwnerToAddress(owner string) (string, error) + func OwnerToPubKey(owner string) (*rsa.PublicKey, error) + func PaddedBigBytes(bigint *big.Int, n int) []byte + func PrepareChunks(tx *types.Transaction, data interface{}, dataSize int) error + func PstTransferTags(contractId string, target string, qty int64, warp bool) ([]types.Tag, error) + func ReadBits(bigint *big.Int, buf []byte) + func SerializeTags(tags []types.Tag) ([]byte, error) + func ShortTo2ByteArray(long int) []byte + func Sign(msg []byte, prvKey *rsa.PrivateKey) ([]byte, error) + func SignTransaction(tx *types.Transaction, prvKey *rsa.PrivateKey) error + func SubmitItemToArSeed(item types.BundleItem, currency, arseedUrl string) (*schema.RespOrder, error) + func SubmitItemToBundlr(item types.BundleItem, bundlrUrl string) (*types.BundlrResp, error) + func TagsDecode(base64Tags []types.Tag) ([]types.Tag, error) + func TagsEncode(tags []types.Tag) []types.Tag + func Verify(msg []byte, pubKey *rsa.PublicKey, sign []byte) error + func VerifyBundleItem(d types.BundleItem) error + func VerifyTransaction(tx types.Transaction) (err error) + func WinstonToAR(w *big.Int) *big.Float + type ValidateResult struct + ChunkSize int + LeftBound int + Offset int + RightBound int + func ValidatePath(id []byte, dest, leftBound, rightBound int, path []byte) (*ValidateResult, bool)