Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Setting this flag disables retrying request with peers ContextDisablePeers = value("disablePeers") // Forces the URL of the peer, otherwise the default one is picked ContextForcePeer = value("forcePeer") )
View Source
const ARWEAVE_OWNER_LENGTH = 512
View Source
const ARWEAVE_SIGNATURE_LENGHT = 512
Arweave signature
Variables ¶
View Source
var ( ErrFailedToParse = errors.New("failed to parse response") ErrIdEmpty = errors.New("bundle id is empty") )
View Source
var LENGTHS = map[int]struct { Signature int Owner int }{ 1: { Signature: 512, Owner: 512, }, 3: { Signature: 65, Owner: 65, }, }
Functions ¶
func LongTo8ByteArray ¶
func ShortTo2ByteArray ¶
Types ¶
type BaseClient ¶
type BaseClient struct {
// contains filtered or unexported fields
}
func (*BaseClient) Request ¶
func (self *BaseClient) Request(ctx context.Context) (*resty.Request, context.CancelFunc)
func (*BaseClient) Reset ¶
func (self *BaseClient) Reset()
func (*BaseClient) SetPeers ¶
func (self *BaseClient) SetPeers(peers []string)
Set the list of potential peers in order they should be used Uses only peers that are proper urls
type BundleItem ¶
type BundleItem struct { SignatureType int `json:"signature_type"` Signature arweave.Base64String `json:"signature"` Owner arweave.Base64String `json:"owner"` // utils.Base64Encode(pubkey) Target arweave.Base64String `json:"target"` // optional, if exist must length 32, and is base64 str Anchor arweave.Base64String `json:"anchor"` // optional, if exist must length 32, and is base64 str Tags Tags `json:"tags"` Data arweave.Base64String `json:"data"` Id arweave.Base64String `json:"id"` }
type Signer ¶
type Signer struct { PrivateKey *rsa.PrivateKey Owner []byte }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.