forked from ark-network/ark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ark_sdk.go
36 lines (31 loc) · 1.16 KB
/
ark_sdk.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package arksdk
import (
"context"
"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)
Onboard(ctx context.Context, amount uint64) (string, 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)
ClaimAsync(ctx context.Context) (string, error)
}
type Receiver interface {
To() string
Amount() uint64
isOnchain() bool
}