sdk

package
v1.0.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 20 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArSeedCli

type ArSeedCli struct {
	ACli *goar.Client
	SCli *gentleman.Client
}

func New

func New(arSeedUrl string) *ArSeedCli

func (*ArSeedCli) BroadcastTxData

func (a *ArSeedCli) BroadcastTxData(arId string) error

func (*ArSeedCli) BroadcastTxMeta added in v1.0.8

func (a *ArSeedCli) BroadcastTxMeta(arId string) error

func (*ArSeedCli) BundleFee added in v1.0.0

func (a *ArSeedCli) BundleFee(size int64, currency string) (schema.RespFee, error)

func (*ArSeedCli) GetBroadcastMetaTask added in v1.0.0

func (a *ArSeedCli) GetBroadcastMetaTask(arId string) (schema.Task, error)

func (*ArSeedCli) GetBroadcastTask added in v1.0.0

func (a *ArSeedCli) GetBroadcastTask(arId string) (schema.Task, error)

func (*ArSeedCli) GetBundler added in v1.0.0

func (a *ArSeedCli) GetBundler() (string, error)

func (*ArSeedCli) GetItemIds added in v1.0.0

func (a *ArSeedCli) GetItemIds(arId string) ([]string, error)

func (*ArSeedCli) GetItemMeta added in v1.0.0

func (a *ArSeedCli) GetItemMeta(itemId string) (types.BundleItem, error)

func (*ArSeedCli) GetOrders added in v1.0.0

func (a *ArSeedCli) GetOrders(addr string, startId int) ([]schema.Order, error)

func (*ArSeedCli) GetSyncTask added in v1.0.0

func (a *ArSeedCli) GetSyncTask(arId string) (schema.Task, error)

func (*ArSeedCli) KillBroadcastMetaTask added in v1.0.0

func (a *ArSeedCli) KillBroadcastMetaTask(arId string) error

func (*ArSeedCli) KillBroadcastTask added in v1.0.0

func (a *ArSeedCli) KillBroadcastTask(arId string) error

func (*ArSeedCli) KillSyncTask added in v1.0.0

func (a *ArSeedCli) KillSyncTask(arId string) error

func (*ArSeedCli) SubmitItem added in v1.0.0

func (a *ArSeedCli) SubmitItem(itemBinary []byte, currency string, apikey string, needSequence bool) (*schema.RespOrder, error)

func (*ArSeedCli) SubmitNativeData added in v1.0.7

func (a *ArSeedCli) SubmitNativeData(apiKey string, data []byte, contentType string, tags map[string]string) (*schema.RespItemId, error)

func (*ArSeedCli) SubmitTx

func (a *ArSeedCli) SubmitTx(arTx types.Transaction) error

func (*ArSeedCli) SyncTx added in v1.0.0

func (a *ArSeedCli) SyncTx(arId string) error

type SDK added in v1.0.1

type SDK struct {
	ItemSigner *goar.ItemSigner
	Cli        *ArSeedCli
	Pay        *paySdk.SDK
}

func NewSDK added in v1.0.1

func NewSDK(arseedUrl, payUrl string, signer interface{}) (*SDK, error)

func (*SDK) BatchPayOrders added in v1.0.13

func (s *SDK) BatchPayOrders(orders []*arseedSchema.RespOrder) (everTxs []*paySchema.Transaction, err error)

func (*SDK) PayOrders added in v1.0.13

func (s *SDK) PayOrders(orders []*arseedSchema.RespOrder) (everTx *paySchema.Transaction, err error)

func (*SDK) SendData added in v1.0.8

func (s *SDK) SendData(data []byte, currency string, apikey string, option *schema.OptionItem, needSequence bool) (order *arseedSchema.RespOrder, err error)

func (*SDK) SendDataAndPay added in v1.0.1

func (s *SDK) SendDataAndPay(data []byte, currency string, option *schema.OptionItem, needSequence bool) (everTx *paySchema.Transaction, itemId string, err error)

func (*SDK) UploadFolder added in v1.0.13

func (s *SDK) UploadFolder(rootPath string, batchSize int, indexFile string, currency string) (orders []*seedSchema.RespOrder, manifestId string, err error)

func (*SDK) UploadFolderAndPay added in v1.0.14

func (s *SDK) UploadFolderAndPay(rootPath string, batchSize int, indexFile string, currency string) (orders []*seedSchema.RespOrder, manifestId string, everTxs []*paySchema.Transaction, err error)

func (*SDK) UploadFolderWithNoFee added in v1.0.14

func (s *SDK) UploadFolderWithNoFee(rootPath string, batchSize int, indexFile string, noFeeApikey string) (orders []*seedSchema.RespOrder, manifestId string, err error)

func (*SDK) UploadFolderWithSequence added in v1.0.22

func (s *SDK) UploadFolderWithSequence(rootPath string, batchSize int, indexFile string, noFeeApikey string) (orders []*seedSchema.RespOrder, manifestId string, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL