Package org.nervos.muta.service.asset
Class AssetService
- java.lang.Object
-
- org.nervos.muta.service.asset.AssetService
-
public class AssetService extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EVENT_APPROVE_ASSET
static java.lang.String
EVENT_CREATE_ASSET
static java.lang.String
EVENT_TRANSFER_ASSET
static java.lang.String
EVENT_TRANSFER_FROM
static java.util.List<EventRegisterEntry<?>>
eventRegistry
static java.lang.String
METHOD_APPROVE
static java.lang.String
METHOD_CREATE_ASSET
static java.lang.String
METHOD_GET_ALLOWANCE
static java.lang.String
METHOD_GET_ASSET
static java.lang.String
METHOD_GET_BALANCE
static java.lang.String
METHOD_TRANSFER
static java.lang.String
METHOD_TRANSFER_FROM
static java.lang.String
SERVICE_NAME
-
Constructor Summary
Constructors Constructor Description AssetService(Muta muta)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
approve(TransferPayload transferPayload, java.util.List<ParsedEvent<?>> events)
Asset
createAsset(CreateAssetPayload createAssetPayload, java.util.List<ParsedEvent<?>> events)
GetAllowanceResponse
getAllowance(GetAllowancePayload getAllowancePayload)
Asset
getAsset(GetAssetPayload getAssetPayload)
GetBalanceResponse
getBalance(GetBalancePayload getBalancePayload)
void
transfer(TransferPayload transferPayload, java.util.List<ParsedEvent<?>> events)
void
transfer_from(TransferFromPayload transferFromPayload, java.util.List<ParsedEvent<?>> events)
-
-
-
Field Detail
-
SERVICE_NAME
public static final java.lang.String SERVICE_NAME
- See Also:
- Constant Field Values
-
METHOD_CREATE_ASSET
public static final java.lang.String METHOD_CREATE_ASSET
- See Also:
- Constant Field Values
-
METHOD_GET_ASSET
public static final java.lang.String METHOD_GET_ASSET
- See Also:
- Constant Field Values
-
METHOD_GET_BALANCE
public static final java.lang.String METHOD_GET_BALANCE
- See Also:
- Constant Field Values
-
METHOD_GET_ALLOWANCE
public static final java.lang.String METHOD_GET_ALLOWANCE
- See Also:
- Constant Field Values
-
METHOD_TRANSFER
public static final java.lang.String METHOD_TRANSFER
- See Also:
- Constant Field Values
-
METHOD_APPROVE
public static final java.lang.String METHOD_APPROVE
- See Also:
- Constant Field Values
-
METHOD_TRANSFER_FROM
public static final java.lang.String METHOD_TRANSFER_FROM
- See Also:
- Constant Field Values
-
EVENT_CREATE_ASSET
public static final java.lang.String EVENT_CREATE_ASSET
- See Also:
- Constant Field Values
-
EVENT_TRANSFER_ASSET
public static final java.lang.String EVENT_TRANSFER_ASSET
- See Also:
- Constant Field Values
-
EVENT_APPROVE_ASSET
public static final java.lang.String EVENT_APPROVE_ASSET
- See Also:
- Constant Field Values
-
EVENT_TRANSFER_FROM
public static final java.lang.String EVENT_TRANSFER_FROM
- See Also:
- Constant Field Values
-
eventRegistry
public static final java.util.List<EventRegisterEntry<?>> eventRegistry
-
-
Constructor Detail
-
AssetService
public AssetService(Muta muta)
-
-
Method Detail
-
createAsset
public Asset createAsset(CreateAssetPayload createAssetPayload, java.util.List<ParsedEvent<?>> events) throws java.io.IOException
- Throws:
java.io.IOException
-
getAsset
public Asset getAsset(GetAssetPayload getAssetPayload) throws java.io.IOException
- Throws:
java.io.IOException
-
getBalance
public GetBalanceResponse getBalance(GetBalancePayload getBalancePayload) throws java.io.IOException
- Throws:
java.io.IOException
-
getAllowance
public GetAllowanceResponse getAllowance(GetAllowancePayload getAllowancePayload) throws java.io.IOException
- Throws:
java.io.IOException
-
transfer
public void transfer(TransferPayload transferPayload, java.util.List<ParsedEvent<?>> events) throws java.io.IOException
- Throws:
java.io.IOException
-
approve
public void approve(TransferPayload transferPayload, java.util.List<ParsedEvent<?>> events) throws java.io.IOException
- Throws:
java.io.IOException
-
transfer_from
public void transfer_from(TransferFromPayload transferFromPayload, java.util.List<ParsedEvent<?>> events) throws java.io.IOException
- Throws:
java.io.IOException
-
-