Class DelegationServiceImpl
java.lang.Object
com.kryptokrauts.aeternity.sdk.service.delegation.impl.DelegationServiceImpl
- All Implemented Interfaces:
DelegationService
public class DelegationServiceImpl extends java.lang.Object implements DelegationService
-
Constructor Summary
Constructors Constructor Description DelegationServiceImpl()
-
Method Summary
Modifier and Type Method Description java.lang.String
createAensDelegationSignature(java.lang.String contractId)
creates a delegation signature over "network id + account address + contract address" (concatenated as byte arrays)java.lang.String
createAensDelegationSignature(java.lang.String contractId, java.lang.String name)
creates a delegation signature over "network id + account address + name hash + contract address" (concatenated as byte arrays)java.lang.String
createOracleDelegationSignature(java.lang.String contractId)
creates a delegation signature over "network id + account address + contract" (concatenated as byte arrays)java.lang.String
createOracleDelegationSignature(java.lang.String contractId, java.lang.String queryId)
creates a delegation signature over "network id + oracle query id + contract address" (concatenated as byte arrays)java.lang.String
getAensCommitmentHash(java.lang.String name, java.math.BigInteger salt)
for claiming names with contracts it is required to provide the commitmentHash for an aens nameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
DelegationServiceImpl
public DelegationServiceImpl()
-
-
Method Details
-
createAensDelegationSignature
public java.lang.String createAensDelegationSignature(java.lang.String contractId)Description copied from interface:DelegationService
creates a delegation signature over "network id + account address + contract address" (concatenated as byte arrays)- Specified by:
createAensDelegationSignature
in interfaceDelegationService
- Parameters:
contractId
- the address of the contract (ct_...)- Returns:
- the delegation signature that allows a contract to perform a preclaim for an AENS name on behalf of the configured keypair
-
createAensDelegationSignature
public java.lang.String createAensDelegationSignature(java.lang.String contractId, java.lang.String name)Description copied from interface:DelegationService
creates a delegation signature over "network id + account address + name hash + contract address" (concatenated as byte arrays)- Specified by:
createAensDelegationSignature
in interfaceDelegationService
- Parameters:
contractId
- the address of the contract (ct_...)name
- the AENS name (e.g. kryptokrauts.chain)- Returns:
- the delegation signature that allows a contract to perform AENS related actions for a specific name on behalf of the configured keypair
-
createOracleDelegationSignature
public java.lang.String createOracleDelegationSignature(java.lang.String contractId)Description copied from interface:DelegationService
creates a delegation signature over "network id + account address + contract" (concatenated as byte arrays)- Specified by:
createOracleDelegationSignature
in interfaceDelegationService
- Parameters:
contractId
- the address of the contract (ct_...)- Returns:
- the delegation signature that allows a contract to create and extend an oracle on behalf of the configured keypair
-
createOracleDelegationSignature
public java.lang.String createOracleDelegationSignature(java.lang.String contractId, java.lang.String queryId)Description copied from interface:DelegationService
creates a delegation signature over "network id + oracle query id + contract address" (concatenated as byte arrays)- Specified by:
createOracleDelegationSignature
in interfaceDelegationService
- Parameters:
contractId
- the address of the contract (ct_...)queryId
- the query id (oq_...)- Returns:
- the delegation signature that allows a contract to respond to a specific query on behalf of the configured (oracle) keypair
-
getAensCommitmentHash
public java.lang.String getAensCommitmentHash(java.lang.String name, java.math.BigInteger salt)Description copied from interface:DelegationService
for claiming names with contracts it is required to provide the commitmentHash for an aens name- Specified by:
getAensCommitmentHash
in interfaceDelegationService
- Parameters:
name
- the AENS name to claimsalt
- the salt used in the pre-claim transaction- Returns:
- the hash that needs to be wrapped in the `Hash` object (generated via contraect-maven-plugin)
-