Documentation
¶
Index ¶
- type Client
- func (c *Client) Close()
- func (c *Client) ExecuteUserOperation(callData []byte) (result *zerodev.UserOperationResult, err 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) 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) GetMintVehicleWithDeviceDefinitionTypedData(manufacturerNode *big.Int, owner common.Address, deviceDefinitionId string, ...) *signer.TypedData
- func (c *Client) MintVehicleAndSdWithDdInput(data *registry.MintVehicleAndSdWithDdInput) (result *zerodev.UserOperationResult, err error)
- func (c *Client) MintVehicleAndSdWithDdInputAndSacd(data *registry.MintVehicleAndSdWithDdInput, sacdInput registry.SacdInput) (result *zerodev.UserOperationResult, err error)
- func (c *Client) MintVehicleAndSdWithDdInputBatch(data []registry.MintVehicleAndSdWithDdInputBatch) (result *zerodev.UserOperationResult, err error)
- func (c *Client) MintVehicleWithDdInput(data *registry.MintVehicleWithDeviceDefinition) (result *zerodev.UserOperationResult, err error)
- func (c *Client) SendSignedUserOperation(op *zerodev.UserOperation) (result *zerodev.UserOperationResult, err error)
- type ClientConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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
}
func NewClient ¶
func NewClient(config *ClientConfig) (*Client, error)
func (*Client) ExecuteUserOperation ¶
func (*Client) GetBurnSdByOwnerUserOperationAndHash ¶
func (*Client) GetBurnSdTypedData ¶
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) GetBurnVehicleByOwnerUserOperationAndHash ¶
func (*Client) GetMintVehicleAndSdTypedData ¶
GetMintVehicleAndSdTypedData generates TypedData for signing by Synthetic Device (SD) whenever Vehicle with SD is minted
func (*Client) GetMintVehicleWithDeviceDefinitionTypedData ¶
func (c *Client) GetMintVehicleWithDeviceDefinitionTypedData(manufacturerNode *big.Int, owner common.Address, deviceDefinitionId string, attributeInfoPairs []registry.AttributeInfoPair) *signer.TypedData
GetMintVehicleWithDeviceDefinitionTypedData generates TypedData for signing by Vehicle owner whenever Vehicle with Device Definition is minted
func (*Client) MintVehicleAndSdWithDdInput ¶
func (c *Client) MintVehicleAndSdWithDdInput(data *registry.MintVehicleAndSdWithDdInput) (result *zerodev.UserOperationResult, err error)
MintVehicleAndSdWithDdInput mints a vehicle and paired synthetic device using data with a device definition. Requires SD signature of typed data returned by GetMintVehicleAndSdTypedData Requires Vehicle Owner signature of typed data returned by GetMintVehicleWithDeviceDefinitionTypedData
func (*Client) MintVehicleAndSdWithDdInputAndSacd ¶
func (c *Client) MintVehicleAndSdWithDdInputAndSacd(data *registry.MintVehicleAndSdWithDdInput, sacdInput registry.SacdInput) (result *zerodev.UserOperationResult, err error)
MintVehicleAndSdWithDdInputAndSacd 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 GetMintVehicleWithDeviceDefinitionTypedData
func (*Client) MintVehicleAndSdWithDdInputBatch ¶
func (c *Client) MintVehicleAndSdWithDdInputBatch(data []registry.MintVehicleAndSdWithDdInputBatch) (result *zerodev.UserOperationResult, err error)
MintVehicleAndSdWithDdInputBatch mints a 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 GetMintVehicleWithDeviceDefinitionTypedData