bindings

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package bindings provides Go ABI bindings for smart account contracts.

Index

Constants

View Source
const EscrowExecutorABI = `` /* 981-byte string literal not displayed */

EscrowExecutorABI is the ABI for LangoEscrowExecutor.

View Source
const Safe7579ABI = `` /* 1358-byte string literal not displayed */

Safe7579ABI is the ABI for the Safe7579 adapter contract.

View Source
const SessionValidatorABI = `` /* 1671-byte string literal not displayed */

SessionValidatorABI is the ABI for LangoSessionValidator.

View Source
const SpendingHookABI = `` /* 924-byte string literal not displayed */

SpendingHookABI is the ABI for LangoSpendingHook.

Variables

This section is empty.

Functions

func ParseABI

func ParseABI(abiJSON string) (*ethabi.ABI, error)

ParseABI parses a JSON ABI string.

Types

type EscrowExecution

type EscrowExecution struct {
	Target   common.Address
	Value    *big.Int
	CallData []byte
}

EscrowExecution represents a single execution in a batch.

type EscrowExecutorClient

type EscrowExecutorClient struct {
	// contains filtered or unexported fields
}

EscrowExecutorClient provides typed access to the LangoEscrowExecutor contract.

func NewEscrowExecutorClient

func NewEscrowExecutorClient(
	caller contract.ContractCaller,
	address common.Address,
	chainID int64,
) *EscrowExecutorClient

NewEscrowExecutorClient creates a new escrow executor client.

func (*EscrowExecutorClient) ExecuteBatchedEscrow

func (c *EscrowExecutorClient) ExecuteBatchedEscrow(
	ctx context.Context,
	executions []EscrowExecution,
) (string, error)

ExecuteBatchedEscrow executes a batch of escrow operations.

func (*EscrowExecutorClient) GetEscrowStatus

func (c *EscrowExecutorClient) GetEscrowStatus(
	ctx context.Context,
	escrowID [32]byte,
) (uint8, *big.Int, error)

GetEscrowStatus returns the status and amount for an escrow.

func (*EscrowExecutorClient) RefundEscrow

func (c *EscrowExecutorClient) RefundEscrow(
	ctx context.Context,
	escrowID [32]byte,
) (string, error)

RefundEscrow refunds funds from an escrow to the depositor.

func (*EscrowExecutorClient) ReleaseEscrow

func (c *EscrowExecutorClient) ReleaseEscrow(
	ctx context.Context,
	escrowID [32]byte,
) (string, error)

ReleaseEscrow releases funds from an escrow to the recipient.

type Safe7579Client

type Safe7579Client struct {
	// contains filtered or unexported fields
}

Safe7579Client provides typed access to the Safe7579 adapter contract.

func NewSafe7579Client

func NewSafe7579Client(
	caller contract.ContractCaller,
	address common.Address,
	chainID int64,
) *Safe7579Client

NewSafe7579Client creates a new Safe7579 client.

func (*Safe7579Client) AccountID

func (c *Safe7579Client) AccountID(
	ctx context.Context,
) (string, error)

AccountID returns the account's identifier string.

func (*Safe7579Client) Execute

func (c *Safe7579Client) Execute(
	ctx context.Context,
	mode [32]byte,
	executionCalldata []byte,
) (string, error)

Execute executes calldata through the Safe7579 adapter.

func (*Safe7579Client) InstallModule

func (c *Safe7579Client) InstallModule(
	ctx context.Context,
	moduleTypeID *big.Int,
	module common.Address,
	initData []byte,
) (string, error)

InstallModule installs an ERC-7579 module on the account.

func (*Safe7579Client) IsModuleInstalled

func (c *Safe7579Client) IsModuleInstalled(
	ctx context.Context,
	moduleTypeID *big.Int,
	module common.Address,
	additionalContext []byte,
) (bool, error)

IsModuleInstalled checks if a module is installed on the account.

func (*Safe7579Client) SupportsModule

func (c *Safe7579Client) SupportsModule(
	ctx context.Context,
	moduleTypeID *big.Int,
) (bool, error)

SupportsModule checks if the account supports a module type.

func (*Safe7579Client) UninstallModule

func (c *Safe7579Client) UninstallModule(
	ctx context.Context,
	moduleTypeID *big.Int,
	module common.Address,
	deInitData []byte,
) (string, error)

UninstallModule removes an ERC-7579 module from the account.

type SessionValidatorClient

type SessionValidatorClient struct {
	// contains filtered or unexported fields
}

SessionValidatorClient provides typed access to the LangoSessionValidator contract.

func NewSessionValidatorClient

func NewSessionValidatorClient(
	caller contract.ContractCaller,
	address common.Address,
	chainID int64,
) *SessionValidatorClient

NewSessionValidatorClient creates a new session validator client.

func (*SessionValidatorClient) GetSessionKeyPolicy

func (c *SessionValidatorClient) GetSessionKeyPolicy(
	ctx context.Context,
	sessionKey common.Address,
) (interface{}, error)

GetSessionKeyPolicy retrieves the policy for a session key.

func (*SessionValidatorClient) IsSessionKeyActive

func (c *SessionValidatorClient) IsSessionKeyActive(
	ctx context.Context,
	sessionKey common.Address,
) (bool, error)

IsSessionKeyActive checks whether a session key is active.

func (*SessionValidatorClient) RegisterSessionKey

func (c *SessionValidatorClient) RegisterSessionKey(
	ctx context.Context,
	sessionKey common.Address,
	policy interface{},
) (string, error)

RegisterSessionKey registers a new session key with its policy.

func (*SessionValidatorClient) RevokeSessionKey

func (c *SessionValidatorClient) RevokeSessionKey(
	ctx context.Context,
	sessionKey common.Address,
) (string, error)

RevokeSessionKey revokes an existing session key.

type SpendState

type SpendState struct {
	DailySpent      *big.Int
	CumulativeSpent *big.Int
	LastResetDay    *big.Int
}

SpendState represents the current spending state for a session.

type SpendingConfig

type SpendingConfig struct {
	PerTxLimit      *big.Int
	DailyLimit      *big.Int
	CumulativeLimit *big.Int
}

SpendingConfig represents the spending limits for an account.

type SpendingHookClient

type SpendingHookClient struct {
	// contains filtered or unexported fields
}

SpendingHookClient provides typed access to the LangoSpendingHook contract.

func NewSpendingHookClient

func NewSpendingHookClient(
	caller contract.ContractCaller,
	address common.Address,
	chainID int64,
) *SpendingHookClient

NewSpendingHookClient creates a new spending hook client.

func (*SpendingHookClient) GetConfig

func (c *SpendingHookClient) GetConfig(
	ctx context.Context,
	account common.Address,
) (*SpendingConfig, error)

GetConfig retrieves the spending limits for an account.

func (*SpendingHookClient) GetSpendState

func (c *SpendingHookClient) GetSpendState(
	ctx context.Context,
	account, sessionKey common.Address,
) (*SpendState, error)

GetSpendState retrieves the spending state for an account's session key.

func (*SpendingHookClient) SetLimits

func (c *SpendingHookClient) SetLimits(
	ctx context.Context,
	perTxLimit, dailyLimit, cumulativeLimit *big.Int,
) (string, error)

SetLimits configures the spending limits for the caller's account.

Jump to

Keyboard shortcuts

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