Documentation ¶
Index ¶
- Constants
- func WriteManifest(name string, data []byte) error
- type ArweaveClient
- func (a *ArweaveClient) GetBalance() (arAmount *big.Float, err error)
- func (a *ArweaveClient) GetTransaction(data []byte, manifest bool) (*types.Transaction, error)
- func (a *ArweaveClient) GetTxPrice(data []byte) (int64, error)
- func (a *ArweaveClient) NewManifest(path string) (*ArweaveManifest, error)
- func (a *ArweaveClient) UploadTo(data []byte, manifest bool) (*types.Transaction, error)
- func (a *ArweaveClient) UploadToTxHash(data []byte, manifest bool) (string, error)
- func (a *ArweaveClient) UploadToUrl(data []byte, manifest bool) (string, error)
- type ArweaveManifest
- type ArweaveManifestIndex
- type ArweaveManifestPath
Constants ¶
View Source
const ( ManifestFile = "manifest.w3tools" ManifestContentType = "application/x.arweave-manifest+json" IndexFile = "index.html" )
Variables ¶
This section is empty.
Functions ¶
func WriteManifest ¶
Types ¶
type ArweaveClient ¶
func InitArweaveClient ¶
func InitArweaveClient(keyFile, node string) (*ArweaveClient, error)
func (*ArweaveClient) GetBalance ¶
func (a *ArweaveClient) GetBalance() (arAmount *big.Float, err error)
func (*ArweaveClient) GetTransaction ¶
func (a *ArweaveClient) GetTransaction(data []byte, manifest bool) (*types.Transaction, error)
func (*ArweaveClient) GetTxPrice ¶
func (a *ArweaveClient) GetTxPrice(data []byte) (int64, error)
func (*ArweaveClient) NewManifest ¶
func (a *ArweaveClient) NewManifest(path string) (*ArweaveManifest, error)
func (*ArweaveClient) UploadTo ¶
func (a *ArweaveClient) UploadTo(data []byte, manifest bool) (*types.Transaction, error)
func (*ArweaveClient) UploadToTxHash ¶
func (a *ArweaveClient) UploadToTxHash(data []byte, manifest bool) (string, error)
func (*ArweaveClient) UploadToUrl ¶
func (a *ArweaveClient) UploadToUrl(data []byte, manifest bool) (string, error)
type ArweaveManifest ¶
type ArweaveManifest struct { Manifest string `json:"manifest"` Version string `json:"version"` Index ArweaveManifestIndex `json:"index"` Paths map[string]ArweaveManifestPath `json:"paths"` }
func NewManifest ¶
func NewManifest() *ArweaveManifest
type ArweaveManifestIndex ¶
type ArweaveManifestIndex struct {
Path string `json:"path"`
}
type ArweaveManifestPath ¶
type ArweaveManifestPath struct {
ID string `json:"id"`
}
Click to show internal directories.
Click to hide internal directories.