mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 20:24:21 +01:00
[SDK] Add Transaction History (#288)
* 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>
This commit is contained in:
@@ -2,6 +2,7 @@ package arksdk
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/ark-network/ark/common"
|
||||
grpcclient "github.com/ark-network/ark/pkg/client-sdk/client/grpc"
|
||||
@@ -129,3 +130,20 @@ type balanceRes struct {
|
||||
offchainBalanceByExpiration map[int64]uint64
|
||||
err error
|
||||
}
|
||||
|
||||
const (
|
||||
TxSent TxType = "sent"
|
||||
TxReceived TxType = "received"
|
||||
)
|
||||
|
||||
type TxType string
|
||||
|
||||
type Transaction struct {
|
||||
RoundTxid string
|
||||
RedeemTxid string
|
||||
Amount uint64
|
||||
Type TxType
|
||||
Pending bool
|
||||
Claimed bool
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user