Versions in this module Expand all Collapse all v1 v1.6.0 Jan 24, 2024 Changes in this version + var ErrBadGateway = errors.New("Bad Gateway") + var ErrInvalidId = errors.New("Invalid ArId") + var ErrNotFound = errors.New("Not Found") + var ErrPendingTx = errors.New("Pending") + var ErrRequestLimit = errors.New("Arweave gateway request limit") + func CreateTcKeyPair(bitSize, k, l int) (shares tcrsa.KeyShareList, meta *tcrsa.KeyMeta, err error) + func SignBundleItem(signatureType int, signer interface{}, item *types.BundleItem) error + type Client struct + func NewClient(nodeUrl string, proxyUrl ...string) *Client + func NewTempConn() *Client + func (c *Client) Arql(arql string) (ids []string, err error) + func (c *Client) BroadcastData(txId string, data []byte, numOfNodes int64, peers ...string) error + func (c *Client) ConcurrentDownloadChunkData(id string, concurrentNum int) ([]byte, error) + func (c *Client) ConcurrentDownloadChunkDataStream(id string, concurrentNum int) (dataFile *os.File, err error) + func (c *Client) DataSyncRecord(endOffset string, intervalsNum int) ([]string, error) + func (c *Client) DownloadChunkData(id string) ([]byte, error) + func (c *Client) DownloadChunkDataStream(id string) (*os.File, error) + func (c *Client) ExistTxData(arId string) (bool, error) + func (c *Client) GetBlockByHeight(height int64) (block *types.Block, err error) + func (c *Client) GetBlockByID(id string) (block *types.Block, err error) + func (c *Client) GetBlockFromPeers(height int64, peers ...string) (*types.Block, error) + func (c *Client) GetBlockHashList(from, to int) ([]string, error) + func (c *Client) GetBundleItems(bundleInId string, itemsIds []string) (items []*types.BundleItem, err error) + func (c *Client) GetInfo() (info *types.NetworkInfo, err error) + func (c *Client) GetLastTransactionID(address string) (id string, err error) + func (c *Client) GetPeers() ([]string, error) + func (c *Client) GetPendingTxIds() ([]string, error) + func (c *Client) GetTransactionAnchor() (anchor string, err error) + func (c *Client) GetTransactionByID(id string) (tx *types.Transaction, err error) + func (c *Client) GetTransactionData(id string, extension ...string) ([]byte, error) + func (c *Client) GetTransactionDataByGateway(id string) (body []byte, err error) + func (c *Client) GetTransactionDataStream(id string, extension ...string) (*os.File, error) + func (c *Client) GetTransactionDataStreamByGateway(id string) (*os.File, error) + func (c *Client) GetTransactionField(id string, field string) (string, error) + func (c *Client) GetTransactionPrice(dataSize int, target *string) (reward int64, err error) + func (c *Client) GetTransactionStatus(id string) (*types.TxStatus, error) + func (c *Client) GetTransactionTags(id string) ([]types.Tag, error) + func (c *Client) GetTxDataFromPeers(txId string, peers ...string) ([]byte, error) + func (c *Client) GetTxFromPeers(arId string, peers ...string) (*types.Transaction, error) + func (c *Client) GetUnconfirmedTx(arId string) (*types.Transaction, error) + func (c *Client) GetUnconfirmedTxFromPeers(arId string, peers ...string) (*types.Transaction, error) + func (c *Client) GetWalletBalance(address string) (arAmount *big.Float, err error) + func (c *Client) GraphQL(query string) ([]byte, error) + func (c *Client) SetTempConnUrl(url string) + func (c *Client) SetTimeout(timeout time.Duration) + func (c *Client) SubmitChunks(gc *types.GetChunk) (status string, code int, err error) + func (c *Client) SubmitToWarp(tx *types.Transaction) ([]byte, error) + func (c *Client) SubmitTransaction(tx *types.Transaction) (status string, code int, err error) + type ItemSigner struct + func NewItemSigner(signer interface{}) (*ItemSigner, error) + func (i *ItemSigner) CreateAndSignItem(data []byte, target string, anchor string, tags []types.Tag) (types.BundleItem, error) + func (i *ItemSigner) CreateAndSignItemStream(data io.Reader, target string, anchor string, tags []types.Tag) (types.BundleItem, error) + func (i *ItemSigner) CreateAndSignNestedItem(target string, anchor string, tags []types.Tag, items ...types.BundleItem) (types.BundleItem, error) + type SerializedUploader struct + type Signer struct + Address string + PrvKey *rsa.PrivateKey + PubKey *rsa.PublicKey + func NewSigner(b []byte) (*Signer, error) + func NewSignerByPrivateKey(privateKey *rsa.PrivateKey) *Signer + func NewSignerFromPath(path string) (*Signer, error) + func (s *Signer) Owner() string + func (s *Signer) SignMsg(msg []byte) ([]byte, error) + func (s *Signer) SignTx(tx *types.Transaction) error + type TcSign struct + func NewTcSign(meta *tcrsa.KeyMeta, signData []byte, salt []byte) (*TcSign, error) + func (ts *TcSign) AssembleSigShares(signedShares tcrsa.SigShareList) ([]byte, error) + func (ts *TcSign) ThresholdSign(signShare *tcrsa.KeyShare) (*tcrsa.SigShare, error) + func (ts *TcSign) VerifySigShare(sigShareData []byte) error + type TransactionUploader struct + ChunkIndex int + Client *Client + Data []byte + DataReader *os.File + LastRequestTimeEnd int64 + LastResponseError string + LastResponseStatus int + TotalErrors int + Transaction *types.Transaction + TxPosted bool + func CreateUploader(api *Client, upload interface{}, data []byte) (*TransactionUploader, error) + func (tt *TransactionUploader) ConcurrentOnce(ctx context.Context, concurrentNum int) error + func (tt *TransactionUploader) FormatSerializedUploader() *SerializedUploader + func (tt *TransactionUploader) FromSerialized(serialized *SerializedUploader, data []byte) (*TransactionUploader, error) + func (tt *TransactionUploader) FromTransactionId(id string) (*SerializedUploader, error) + func (tt *TransactionUploader) IsComplete() bool + func (tt *TransactionUploader) Once() (err error) + func (tt *TransactionUploader) PctComplete() float64 + func (tt *TransactionUploader) TotalChunks() int + func (tt *TransactionUploader) UploadChunk() error + func (tt *TransactionUploader) UploadedChunks() int + type Wallet struct + Client *Client + Signer *Signer + func NewWallet(b []byte, clientUrl string, proxyUrl ...string) (w *Wallet, err error) + func NewWalletFromPath(path string, clientUrl string, proxyUrl ...string) (*Wallet, error) + func (w *Wallet) Owner() string + func (w *Wallet) SendAR(amount *big.Float, target string, tags []types.Tag) (types.Transaction, error) + func (w *Wallet) SendARSpeedUp(amount *big.Float, target string, tags []types.Tag, speedFactor int64) (types.Transaction, error) + func (w *Wallet) SendBundleTx(ctx context.Context, concurrentNum int, bundleBinary []byte, tags []types.Tag) (types.Transaction, error) + func (w *Wallet) SendBundleTxSpeedUp(ctx context.Context, concurrentNum int, bundleBinary interface{}, ...) (types.Transaction, error) + func (w *Wallet) SendBundleTxStream(ctx context.Context, concurrentNum int, bundleReader *os.File, ...) (types.Transaction, error) + func (w *Wallet) SendData(data []byte, tags []types.Tag) (types.Transaction, error) + func (w *Wallet) SendDataConcurrentSpeedUp(ctx context.Context, concurrentNum int, data interface{}, tags []types.Tag, ...) (types.Transaction, error) + func (w *Wallet) SendDataSpeedUp(data []byte, tags []types.Tag, speedFactor int64) (types.Transaction, error) + func (w *Wallet) SendDataStream(data *os.File, tags []types.Tag) (types.Transaction, error) + func (w *Wallet) SendDataStreamSpeedUp(data *os.File, tags []types.Tag, speedFactor int64) (types.Transaction, error) + func (w *Wallet) SendPst(contractId string, target string, qty *big.Int, customTags []types.Tag, ...) (types.Transaction, error) + func (w *Wallet) SendTransaction(tx *types.Transaction) (types.Transaction, error) + func (w *Wallet) SendTransactionConcurrent(ctx context.Context, concurrentNum int, tx *types.Transaction) (types.Transaction, error) + func (w *Wallet) SendWinston(amount *big.Int, target string, tags []types.Tag) (types.Transaction, error) + func (w *Wallet) SendWinstonSpeedUp(amount *big.Int, target string, tags []types.Tag, speedFactor int64) (types.Transaction, error) + func (w *Wallet) WarpTransfer(contractId, target string, qty int64) (id string, err error)