Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| Mint | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| fromBuffer | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Attestto\SolanaPhpSdk\State; |
| 4 | |
| 5 | use Attestto\SolanaPhpSdk\Borsh\Borsh; |
| 6 | use Attestto\SolanaPhpSdk\Borsh\BorshObject; |
| 7 | |
| 8 | /** |
| 9 | * Class Mint |
| 10 | * |
| 11 | * This class represents a Decentralized Identifier (DID) account. |
| 12 | * It provides methods for creating and managing DID accounts, signing and verifying messages, and other related operations. |
| 13 | * @version 1.0 |
| 14 | * @package Attestto\SolanaPhpSdk\Accounts |
| 15 | * @license MIT |
| 16 | * @author Eduardo Chongkan |
| 17 | * @link https://chongkan.com |
| 18 | * @see https://github.com/identity-com/sol-did/tree/develop/sol-did/client/packages/idl |
| 19 | * @see https://explorer.solana.com/address/didso1Dpqpm4CsiCjzP766BGY89CAdD6ZBL68cRhFPc/anchor-program?cluster=devnet |
| 20 | */ |
| 21 | |
| 22 | class Mint |
| 23 | { |
| 24 | |
| 25 | use BorshObject; |
| 26 | |
| 27 | public const SCHEMA = [ |
| 28 | self::class => [ |
| 29 | 'kind' => 'struct', |
| 30 | 'fields' => [ |
| 31 | ['mintAuthorityOption', 'u32'], |
| 32 | ['mintAuthority', 'pubKey'], |
| 33 | ['supply', 'u64'], |
| 34 | ['decimals', 'u8'], |
| 35 | ['isInitialized', 'u8'], |
| 36 | ['freezeAuthorityOption', 'u32'], |
| 37 | ['freezeAuthority', 'pubKey'] |
| 38 | ], |
| 39 | ], |
| 40 | ]; |
| 41 | |
| 42 | public static function fromBuffer(array $buffer): self |
| 43 | { |
| 44 | return Borsh::deserialize(self::SCHEMA, self::class, $buffer); |
| 45 | } |
| 46 | } |