Members
# ERC20Events
Enum representing the events emitted by an ERC20 contract.
Enum representing the events emitted by an ERC20 contract.
Methods
# Owner() → {MethodDecorator}
Decorator for marking methods that require ownership authorization.
Decorator for marking methods that require ownership authorization. Checks the owner of the token before allowing the method to be executed.
A method decorator that checks ownership authorization.
MethodDecorator
Example
```typescript
class TokenContract extends Contract {
# decrypt(encryptedText, keyObject)
Util function to decrypt data
Parameters:
| Name | Type | Description |
|---|---|---|
encryptedText |
BufferSource
|
|
keyObject |
keyObject
|
# encrypt(text, keyObject)
Util function to decrypt data
Parameters:
| Name | Type | Description |
|---|---|---|
text |
string
|
|
keyObject |
keyObject
|
# getDerivationKey(salt, key)
Util function to derive a key from another key
Parameters:
| Name | Type | Description |
|---|---|---|
salt |
string
|
|
key |
CryptoKey
|
Original key |
# getKey(derivation)
Util function to get the key and IV from the CrytoKey array
Parameters:
| Name | Type | Description |
|---|---|---|
derivation |
ArrayBuffer
|
# getMaster(data)
Util function to get a random master key
If data is not passed, a random ArrayBuffer will be generated
Parameters:
| Name | Type | Description |
|---|---|---|
data |
ArrayBuffer
|
encrytion data |