Documentation
¶
Index ¶
- func NewClient(ctx context.Context, log logrus.FieldLogger, monitor string, conf *Config) (*client, error)
- type AddressInfo
- type Client
- type Config
- type Confirmation
- type DataDecoded
- type DetailedExecutionInfo
- type ExecutionInfo
- type Metrics
- type Parameter
- type QueuedTransactionResult
- type QueuedTransactionsResponse
- type SafeAppInfo
- type SafeResponse
- type TokenInfo
- type Transaction
- type TransactionData
- type TransactionDetails
- type TransactionInfo
- type TransferInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddressInfo ¶
type Client ¶
type Client interface {
// GetQueuedTransactions returns queued transactions for a safe
GetQueuedTransactions(ctx context.Context, safeAddress string) (*QueuedTransactionsResponse, error)
// GetTransaction returns details for a specific transaction
GetTransaction(ctx context.Context, safeAddress, safeTxHash string) (*TransactionDetails, error)
// GetSafe returns details for a specific safe
GetSafe(ctx context.Context, safeAddress string) (*SafeResponse, error)
// SetChainID sets the chain ID for the client
SetChainID(chainID string)
}
Client exposes Safe API client
type Config ¶
type Confirmation ¶
type Confirmation struct {
Signer AddressInfo `json:"signer"`
Signature string `json:"signature"`
SubmittedAt int64 `json:"submittedAt"`
}
type DataDecoded ¶
type DetailedExecutionInfo ¶
type DetailedExecutionInfo struct {
Type string `json:"type"`
SubmittedAt int64 `json:"submittedAt"`
Nonce int `json:"nonce"`
SafeTxGas string `json:"safeTxGas"`
BaseGas string `json:"baseGas"`
GasPrice string `json:"gasPrice"`
GasToken string `json:"gasToken"`
RefundReceiver AddressInfo `json:"refundReceiver"`
SafeTxHash string `json:"safeTxHash"`
Executor *AddressInfo `json:"executor"`
Signers []AddressInfo `json:"signers"`
ConfirmationsRequired int `json:"confirmationsRequired"`
Confirmations []Confirmation `json:"confirmations"`
Rejectors []AddressInfo `json:"rejectors"`
GasTokenInfo *TokenInfo `json:"gasTokenInfo"`
Trusted bool `json:"trusted"`
Proposer AddressInfo `json:"proposer"`
ProposedByDelegate *string `json:"proposedByDelegate"`
}
type ExecutionInfo ¶
type ExecutionInfo struct {
Type string `json:"type"`
Nonce int `json:"nonce"`
ConfirmationsRequired int `json:"confirmationsRequired"`
ConfirmationsSubmitted int `json:"confirmationsSubmitted"`
MissingSigners []AddressInfo `json:"missingSigners,omitempty"`
}
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func GetMetricsInstance ¶
func (Metrics) ObserveRequest ¶
type QueuedTransactionResult ¶
type QueuedTransactionResult struct {
Type string `json:"type"`
Label *string `json:"label,omitempty"`
Transaction *Transaction `json:"transaction,omitempty"`
ConflictType *string `json:"conflictType,omitempty"`
}
type QueuedTransactionsResponse ¶
type QueuedTransactionsResponse struct {
Count int `json:"count"`
Next *string `json:"next"`
Previous *string `json:"previous"`
Results []QueuedTransactionResult `json:"results"`
}
type SafeAppInfo ¶
type SafeResponse ¶ added in v0.1.0
type SafeResponse struct {
Address AddressInfo `json:"address"`
ChainID string `json:"chainId"`
Nonce int `json:"nonce"`
Threshold int `json:"threshold"`
Owners []AddressInfo `json:"owners"`
Implementation AddressInfo `json:"implementation"`
ImplementationVersionState string `json:"implementationVersionState"`
CollectiblesTag *string `json:"collectiblesTag"`
TxQueuedTag string `json:"txQueuedTag"`
TxHistoryTag string `json:"txHistoryTag"`
MessagesTag *string `json:"messagesTag"`
Modules *string `json:"modules"`
FallbackHandler *AddressInfo `json:"fallbackHandler"`
Guard *AddressInfo `json:"guard"`
Version string `json:"version"`
}
func (*SafeResponse) CheckSigners ¶ added in v0.1.1
func (s *SafeResponse) CheckSigners(signers []string) bool
type Transaction ¶
type Transaction struct {
ID string `json:"id"`
Timestamp int64 `json:"timestamp"`
TxStatus string `json:"txStatus"`
TxInfo TransactionInfo `json:"txInfo"`
ExecutionInfo ExecutionInfo `json:"executionInfo"`
SafeAppInfo *SafeAppInfo `json:"safeAppInfo"`
TxHash *string `json:"txHash"`
}
type TransactionData ¶
type TransactionData struct {
HexData *string `json:"hexData"`
DataDecoded *DataDecoded `json:"dataDecoded"`
To AddressInfo `json:"to"`
Value string `json:"value"`
Operation int `json:"operation"`
TrustedDelegateCallTarget *string `json:"trustedDelegateCallTarget"`
AddressInfoIndex *map[string]AddressInfo `json:"addressInfoIndex"`
}
type TransactionDetails ¶
type TransactionDetails struct {
SafeAddress string `json:"safeAddress"`
TxID string `json:"txId"`
ExecutedAt *string `json:"executedAt"`
TxStatus string `json:"txStatus"`
TxInfo TransactionInfo `json:"txInfo"`
TxData TransactionData `json:"txData"`
TxHash *string `json:"txHash"`
DetailedExecutionInfo DetailedExecutionInfo `json:"detailedExecutionInfo"`
SafeAppInfo *SafeAppInfo `json:"safeAppInfo"`
Note *string `json:"note"`
}
type TransactionInfo ¶
type TransactionInfo struct {
Type string `json:"type"`
HumanDescription *string `json:"humanDescription"`
Sender AddressInfo `json:"sender"`
Recipient AddressInfo `json:"recipient"`
Direction string `json:"direction"`
TransferInfo *TransferInfo `json:"transferInfo,omitempty"`
}
type TransferInfo ¶
Click to show internal directories.
Click to hide internal directories.