java.lang.Object
java.lang.Record
tech.deplant.java4ever.framework.Credentials
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCredentials
(String publicKey, String secretKey) Creates an instance of aCredentials
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.tech.deplant.java4ever.binding.Crypto.KeyPair
keyPair()
Key pair crypto . key pair.static Credentials
Of file credentials.static Credentials
ofRandom
(int contextId) Generates new random KeyPair by using crypto.generate_random_sign_keys() method of SDK.static Credentials
ofResource
(String resourceName) Of resource credentials.static Credentials
Of seed credentials.static Credentials
ofSeed
(int contextId, String seedString, int seedWords, tech.deplant.java4ever.binding.Crypto.MnemonicDictionary dictionary) Of seed credentials.static Credentials
Of seed credentials.Returns the value of thepublicKey
record component.Public key big int big integer.publicKeyTonSafe
(int contextId) Public key ton safe string.Returns the value of thesecretKey
record component.Secret key big int big integer.tech.deplant.java4ever.binding.Abi.Signer
signer()
Signer abi . signer.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
NONE
The constant NONE.
-
-
Constructor Details
-
Credentials
-
-
Method Details
-
ofRandom
public static Credentials ofRandom(int contextId) throws tech.deplant.java4ever.binding.EverSdkException Generates new random KeyPair by using crypto.generate_random_sign_keys() method of SDK.- Parameters:
contextId
- the context id- Returns:
- the credentials
- Throws:
tech.deplant.java4ever.binding.EverSdkException
- the ever sdk exception
-
ofResource
Of resource credentials.- Parameters:
resourceName
- the resource name- Returns:
- the credentials
-
ofFile
Of file credentials.- Parameters:
filePath
- the file path- Returns:
- the credentials
-
ofSeed
public static Credentials ofSeed(int contextId, String seedString, int seedWords, tech.deplant.java4ever.binding.Crypto.MnemonicDictionary dictionary) throws tech.deplant.java4ever.binding.EverSdkException Of seed credentials.- Parameters:
contextId
- the context idseedString
- the seed stringseedWords
- the seed wordsdictionary
- the dictionary- Returns:
- the credentials
- Throws:
tech.deplant.java4ever.binding.EverSdkException
- the ever sdk exception
-
ofSeed
public static Credentials ofSeed(int contextId, String seedString, int seedWords) throws tech.deplant.java4ever.binding.EverSdkException Of seed credentials.- Parameters:
contextId
- the context idseedString
- the seed stringseedWords
- the seed words- Returns:
- the credentials
- Throws:
tech.deplant.java4ever.binding.EverSdkException
- the ever sdk exception
-
ofSeed
public static Credentials ofSeed(int contextId, Seed seed) throws tech.deplant.java4ever.binding.EverSdkException Of seed credentials.- Parameters:
contextId
- the context idseed
- the seed- Returns:
- the credentials
- Throws:
tech.deplant.java4ever.binding.EverSdkException
- the ever sdk exception
-
signer
public tech.deplant.java4ever.binding.Abi.Signer signer()Signer abi . signer.- Returns:
- the abi . signer
-
keyPair
public tech.deplant.java4ever.binding.Crypto.KeyPair keyPair()Key pair crypto . key pair.- Returns:
- the crypto . key pair
-
publicKeyTonSafe
public String publicKeyTonSafe(int contextId) throws tech.deplant.java4ever.binding.EverSdkException Public key ton safe string.- Parameters:
contextId
- the context id- Returns:
- the string
- Throws:
tech.deplant.java4ever.binding.EverSdkException
- the ever sdk exception
-
publicKeyBigInt
-
secretKeyBigInt
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
publicKey
-
secretKey
-