Documentation
¶
Index ¶
- type BurnSDByOwnerResult
- type BurnVehicleByOwnerResult
- type Client
- func (c *Client) Close()
- func (c *Client) GetBurnSDByOwnerResult(result *zerodev.UserOperationResult) (*BurnSDByOwnerResult, error)
- func (c *Client) GetBurnSDByOwnerUserOperationAndHash(owner common.Address, syntheticDeviceTokenId *big.Int) (op *zerodev.UserOperation, hash *common.Hash, err error)
- func (c *Client) GetBurnSDTypedData(vehicleNode *big.Int, syntheticDeviceNode *big.Int) *signer.TypedData
- func (c *Client) GetBurnVehicleByOwnerResult(result *zerodev.UserOperationResult) (*BurnVehicleByOwnerResult, error)
- func (c *Client) GetBurnVehicleByOwnerUserOperationAndHash(owner common.Address, vehicleTokenId *big.Int) (op *zerodev.UserOperation, hash *common.Hash, err error)
- func (c *Client) GetMintVehicleAndSDTypedData(integrationNode *big.Int) *signer.TypedData
- func (c *Client) GetMintVehicleAndSDWithDDResult(result *zerodev.UserOperationResult) (*MintVehicleAndSDWithDDResult, error)
- func (c *Client) GetMintVehicleWithDDResult(result *zerodev.UserOperationResult) (*MintVehicleWithDDResult, error)
- func (c *Client) GetMintVehicleWithDDTypedData(manufacturerNode *big.Int, owner common.Address, deviceDefinitionId string, ...) *signer.TypedData
- func (c *Client) GetReceipt(result *zerodev.UserOperationResult) (receipt *zerodev.UserOperationReceipt, err error)
- func (c *Client) MintVehicleAndSDWithDD(data *registry.MintVehicleAndSdWithDdInput, waitForReceipt bool, ...) (*zerodev.UserOperationResult, *MintVehicleAndSDWithDDResult, error)
- func (c *Client) MintVehicleAndSDWithDDAndSACD(data *registry.MintVehicleAndSdWithDdInput, sacdInput registry.SacdInput, ...) (*zerodev.UserOperationResult, *MintVehicleAndSDWithDDResult, error)
- func (c *Client) MintVehicleAndSDWithDDBatch(data []registry.MintVehicleAndSdWithDdInputBatch, waitForReceipt bool) (result *zerodev.UserOperationResult, err error)
- func (c *Client) MintVehicleWithDD(data *registry.MintVehicleWithDeviceDefinition, waitForReceipt bool, ...) (*zerodev.UserOperationResult, *MintVehicleWithDDResult, error)
- func (c *Client) SendSignedUserOperation(op *zerodev.UserOperation, waitForReceipt bool) (result *zerodev.UserOperationResult, err error)
- type ClientConfig
- type MintVehicleAndSDWithDDResult
- type MintVehicleWithDDResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BurnSDByOwnerResult ¶ added in v0.3.0
type BurnSDByOwnerResult struct {
registry.RegistrySyntheticDeviceNodeBurned
}
type BurnVehicleByOwnerResult ¶ added in v0.3.0
type BurnVehicleByOwnerResult struct {
registry.RegistryVehicleNodeBurned
}
type Client ¶
type Client struct {
RegistryAddress common.Address
VehicleIdAddress common.Address
SyntheticDeviceIdAddress common.Address
Registry *registry.Registry
VehicleId *vehicleid.Vehicleid
SyntheticDeviceId *sdid.Sdid
ZerodevClient *zerodev.Client
Config ClientConfig
}
func NewClient ¶
func NewClient(config *ClientConfig) (*Client, error)
func (*Client) GetBurnSDByOwnerResult ¶ added in v0.3.0
func (c *Client) GetBurnSDByOwnerResult(result *zerodev.UserOperationResult) (*BurnSDByOwnerResult, error)
func (*Client) GetBurnSDByOwnerUserOperationAndHash ¶ added in v0.3.0
func (*Client) GetBurnSDTypedData ¶ added in v0.3.0
func (c *Client) GetBurnSDTypedData(vehicleNode *big.Int, syntheticDeviceNode *big.Int) *signer.TypedData
GetBurnSDTypedData generates TypedData for signing by Vehicle owner whenever SD is being burned
func (*Client) GetBurnVehicleByOwnerResult ¶ added in v0.3.0
func (c *Client) GetBurnVehicleByOwnerResult(result *zerodev.UserOperationResult) (*BurnVehicleByOwnerResult, error)
func (*Client) GetBurnVehicleByOwnerUserOperationAndHash ¶
func (*Client) GetMintVehicleAndSDTypedData ¶ added in v0.3.0
GetMintVehicleAndSDTypedData generates TypedData for signing by Synthetic Device (SD) whenever Vehicle with SD is minted
func (*Client) GetMintVehicleAndSDWithDDResult ¶ added in v0.3.0
func (c *Client) GetMintVehicleAndSDWithDDResult(result *zerodev.UserOperationResult) (*MintVehicleAndSDWithDDResult, error)
func (*Client) GetMintVehicleWithDDResult ¶ added in v0.3.0
func (c *Client) GetMintVehicleWithDDResult(result *zerodev.UserOperationResult) (*MintVehicleWithDDResult, error)
func (*Client) GetMintVehicleWithDDTypedData ¶ added in v0.3.0
func (c *Client) GetMintVehicleWithDDTypedData(manufacturerNode *big.Int, owner common.Address, deviceDefinitionId string, attributeInfoPairs []registry.AttributeInfoPair) *signer.TypedData
GetMintVehicleWithDDTypedData generates TypedData for signing by Vehicle owner whenever Vehicle with Device Definition is minted
func (*Client) GetReceipt ¶ added in v0.3.0
func (*Client) MintVehicleAndSDWithDD ¶ added in v0.3.0
func (c *Client) MintVehicleAndSDWithDD(data *registry.MintVehicleAndSdWithDdInput, waitForReceipt bool, getResult bool) (*zerodev.UserOperationResult, *MintVehicleAndSDWithDDResult, error)
MintVehicleAndSDWithDD mints a vehicle and paired synthetic device using data with a device definition. No SACD input is required. Requires SD signature of typed data returned by GetMintVehicleAndSDTypedData Requires Vehicle Owner signature of typed data returned by GetMintVehicleWithDDTypedData
func (*Client) MintVehicleAndSDWithDDAndSACD ¶ added in v0.3.0
func (c *Client) MintVehicleAndSDWithDDAndSACD(data *registry.MintVehicleAndSdWithDdInput, sacdInput registry.SacdInput, waitForReceipt bool, getResult bool) (*zerodev.UserOperationResult, *MintVehicleAndSDWithDDResult, error)
MintVehicleAndSDWithDDAndSACD mints a vehicle and paired synthetic device using data with a device definition and separate SACD. Requires SD signature of typed data returned by GetMintVehicleAndSDTypedData Requires Vehicle Owner signature of typed data returned by GetMintVehicleWithDDTypedData
func (*Client) MintVehicleAndSDWithDDBatch ¶ added in v0.3.0
func (c *Client) MintVehicleAndSDWithDDBatch(data []registry.MintVehicleAndSdWithDdInputBatch, waitForReceipt bool) (result *zerodev.UserOperationResult, err error)
MintVehicleAndSDWithDDBatch mints vehicles and paired synthetic devices in batches using data with a device definition and SACD input. Requires SD signature of typed data returned by GetMintVehicleAndSDTypedData Requires Vehicle Owner signature of typed data returned by GetMintVehicleWithDDTypedData
func (*Client) MintVehicleWithDD ¶ added in v0.3.0
func (c *Client) MintVehicleWithDD(data *registry.MintVehicleWithDeviceDefinition, waitForReceipt bool, getResult bool) (*zerodev.UserOperationResult, *MintVehicleWithDDResult, error)
func (*Client) SendSignedUserOperation ¶
type ClientConfig ¶
type ClientConfig struct {
AccountAddress common.Address
AccountPK *ecdsa.PrivateKey
RpcURL *url.URL
PaymasterURL *url.URL
BundlerURL *url.URL
ChainID *big.Int
RegistryAddress common.Address
VehicleIdAddress common.Address
SyntheticDeviceIdAddress common.Address
ReceiptPollingDelaySeconds int
ReceiptPollingRetries int
}
type MintVehicleAndSDWithDDResult ¶ added in v0.3.0
type MintVehicleAndSDWithDDResult struct {
registry.RegistryVehicleNodeMintedWithDeviceDefinition
registry.RegistrySyntheticDeviceNodeMinted
}
type MintVehicleWithDDResult ¶ added in v0.3.0
type MintVehicleWithDDResult struct {
registry.RegistryVehicleNodeMintedWithDeviceDefinition
}