mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 04:04:21 +01:00
* tx history * fix * fix * pr review refactor * pr review refactor * fix * pr review refactor * exclude gosec G115 Integer Overflow Conversion * ignore some gosec errs * ignore some gosec errs * ignore createdat in test assertion * Fixes (#7) * Fixes * Fixes * Update golang (#8) * update gha golangci-lint version * update gha golangci-lint version * fix linting issues * fix linting issues * fix linting issues * add linter timeout --------- Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
39 lines
1.3 KiB
Go
39 lines
1.3 KiB
Go
package arksdk
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/ark-network/ark/pkg/client-sdk/client"
|
|
"github.com/ark-network/ark/pkg/client-sdk/store"
|
|
)
|
|
|
|
type ArkClient interface {
|
|
GetConfigData(ctx context.Context) (*store.StoreData, error)
|
|
Init(ctx context.Context, args InitArgs) error
|
|
InitWithWallet(ctx context.Context, args InitWithWalletArgs) error
|
|
IsLocked(ctx context.Context) bool
|
|
Unlock(ctx context.Context, password string) error
|
|
Lock(ctx context.Context, password string) error
|
|
Balance(ctx context.Context, computeExpiryDetails bool) (*Balance, error)
|
|
Receive(ctx context.Context) (string, string, error)
|
|
SendOnChain(ctx context.Context, receivers []Receiver) (string, error)
|
|
SendOffChain(
|
|
ctx context.Context, withExpiryCoinselect bool, receivers []Receiver,
|
|
) (string, error)
|
|
UnilateralRedeem(ctx context.Context) error
|
|
CollaborativeRedeem(
|
|
ctx context.Context, addr string, amount uint64, withExpiryCoinselect bool,
|
|
) (string, error)
|
|
SendAsync(ctx context.Context, withExpiryCoinselect bool, receivers []Receiver) (string, error)
|
|
Claim(ctx context.Context) (string, error)
|
|
ListVtxos(ctx context.Context) ([]client.Vtxo, []client.Vtxo, error)
|
|
GetTransactionHistory(ctx context.Context) ([]Transaction, error)
|
|
}
|
|
|
|
type Receiver interface {
|
|
To() string
|
|
Amount() uint64
|
|
|
|
isOnchain() bool
|
|
}
|