Documentation
ΒΆ
Index ΒΆ
Constants ΒΆ
This section is empty.
Variables ΒΆ
View Source
var ( // Configuration errors ErrInvalidClient = errors.New("invalid ethereum client") ErrInvalidFactoryAddress = errors.New("invalid factory contract address") ErrInvalidUSDCAddress = errors.New("invalid USDC token address") ErrMissingAuth = errors.New("missing authentication (private key or auth)") ErrInvalidPrivateKey = errors.New("invalid private key format") // Contract errors ErrContractNotFound = errors.New("contract not found") ErrInvalidContractCall = errors.New("invalid contract call") ErrTransactionFailed = errors.New("transaction failed") ErrInsufficientBalance = errors.New("insufficient balance") ErrInsufficientAllowance = errors.New("insufficient allowance") // Asset errors ErrAssetNotFound = errors.New("asset not found") ErrAssetNotVerified = errors.New("asset not verified") ErrAssetNotLicensable = errors.New("asset cannot be licensed") ErrAssetAlreadyExists = errors.New("asset already exists") ErrInvalidAssetHash = errors.New("invalid asset hash") // License errors ErrLicenseNotFound = errors.New("license not found") ErrLicenseExpired = errors.New("license expired") ErrLicenseNotActive = errors.New("license not active") ErrAlreadyLicensed = errors.New("already licensed") ErrInvalidLicenseType = errors.New("invalid license type") // Group errors ErrGroupNotFound = errors.New("group not found") ErrGroupEmpty = errors.New("group cannot be empty") ErrAssetNotInGroup = errors.New("asset not in group") ErrAssetAlreadyInGroup = errors.New("asset already in group") // Organization errors ErrOrgNotFound = errors.New("organization not found") ErrNotAuthorized = errors.New("not authorized") ErrInvalidRole = errors.New("invalid role") // General errors ErrInvalidAddress = errors.New("invalid address") ErrInvalidAmount = errors.New("invalid amount") ErrInvalidParameters = errors.New("invalid parameters") ErrTimeout = errors.New("operation timeout") ErrNotImplemented = errors.New("not implemented") )
SDK error definitions
Functions ΒΆ
This section is empty.
Types ΒΆ
type Config ΒΆ
type Config struct {
// Ethereum client connection
Client *ethclient.Client
// Contract addresses
FactoryAddress common.Address
USDCAddress common.Address
// Authentication
PrivateKey string
Auth *bind.TransactOpts
// Gas settings
GasLimit uint64
GasPrice *big.Int
MaxFeePerGas *big.Int
MaxPriorityFeePerGas *big.Int
// Network settings
ChainID *big.Int
// Optional: Custom module addresses (if using FactoryLite)
ModuleAddresses *ModuleAddresses
}
Config holds the configuration for the Hauska SDK
func DefaultConfig ΒΆ
func DefaultConfig() *Config
DefaultConfig returns a default configuration for local development
func (*Config) CallOptions ΒΆ
CallOptions returns call options for read operations
func (*Config) TransactionOptions ΒΆ
func (c *Config) TransactionOptions() *bind.TransactOpts
TransactionOptions returns transaction options based on config
func (*Config) WaitForTransaction ΒΆ
WaitForTransaction waits for a transaction to be mined
type ModuleAddresses ΒΆ
type ModuleAddresses struct {
LicenseManager common.Address
AssetRegistry common.Address
GroupManager common.Address
RevenueDistributor common.Address
AssetNFT common.Address
}
ModuleAddresses holds addresses for all Hauska modules
type SDK ΒΆ
type SDK struct {
// High-level clients
Factory client.FactoryClient
Organization client.OrganizationClient
License client.LicenseClient
Asset client.AssetClient
Group client.GroupClient
Revenue client.RevenueClient
USDC client.USDCClient
// Low-level services (for advanced usage)
Services *Services
// contains filtered or unexported fields
}
SDK is the main entry point for the Hauska Go SDK
func (*SDK) NewOrganizationClient ΒΆ
func (sdk *SDK) NewOrganizationClient(orgAddress string) (client.OrganizationClient, error)
NewOrganizationClient creates a new organization client for a specific organization
type Services ΒΆ
type Services struct {
Factory *services.FactoryService
Organization *services.OrganizationService
License *services.LicenseService
Asset *services.AssetService
Group *services.GroupService
Revenue *services.RevenueService
NFT *services.NFTService
USDC *services.USDCService
}
Services holds all low-level service implementations
Click to show internal directories.
Click to hide internal directories.