|
2 | 2 |
|
3 | 3 | The [anchor-based](https://github.com/coral-xyz/anchor) program of `did:sol` on Solana. |
4 | 4 |
|
| 5 | +## is_authority Integration |
| 6 | +Other programs can check if a verification method (e.g. public key or address) by integrating `is_authority`: |
| 7 | + |
| 8 | +```rust |
| 9 | +use sol_did::integrations::is_authority; |
| 10 | +``` |
| 11 | + |
| 12 | +```rust |
| 13 | +// pub fn is_authority(did_account: &AccountInfo, |
| 14 | +// did_account_seed_bump: Option<u8>, |
| 15 | +// controlling_did_accounts: &[AccountInfo], |
| 16 | +// key: &[u8], |
| 17 | +// filter_types: Option<&[VerificationMethodType]>, |
| 18 | +// filter_fragment: Option<&String>) -> Result<bool> |
| 19 | +``` |
| 20 | + |
5 | 21 | ## Instructions |
6 | 22 |
|
7 | 23 | ### `initialize` |
| 24 | +Arguments: |
| 25 | +- size: `u32` |
| 26 | + |
| 27 | +Accounts: |
| 28 | +- didData `isMut` |
| 29 | +- authority `isSigner`, `isMut` |
| 30 | +- payer `isSigner`, `isMut` |
| 31 | +- systemProgram |
| 32 | + |
8 | 33 | ### `resize` |
| 34 | +Arguments: |
| 35 | +- size:`u32` |
| 36 | +- ethSignature:`Option<Secp256k1RawSignature>` |
| 37 | + |
| 38 | +Accounts: |
| 39 | +- didData `isMut` |
| 40 | +- authority `isSigner` |
| 41 | +- payer `isSigner`, `isMut` |
| 42 | +- systemProgram |
| 43 | + |
9 | 44 | ### `close` |
| 45 | +Arguments: |
| 46 | +- ethSignature:`Option<Secp256k1RawSignature>` |
| 47 | + |
| 48 | +Accounts: |
| 49 | +- didData `isMut` |
| 50 | +- authority `isSigner` |
| 51 | +- destination `isMut` |
| 52 | +- systemProgram |
| 53 | + |
10 | 54 | ### `add_verification_method` |
| 55 | +Arguments: |
| 56 | +- verificationMethod:`VerificationMethod` |
| 57 | +- ethSignature:`Option<Secp256k1RawSignature>` |
| 58 | + |
| 59 | +Accounts: |
| 60 | +- didData `isMut` |
| 61 | +- authority `isSigner` |
| 62 | + |
11 | 63 | ### `remove_verification_method` |
| 64 | +Arguments: |
| 65 | +- fragment:`string` |
| 66 | +- ethSignature:`Option<Secp256k1RawSignature>` |
| 67 | + |
| 68 | +Accounts: |
| 69 | +- didData `isMut` |
| 70 | +- authority `isSigner` |
| 71 | + |
12 | 72 | ### `add_service` |
| 73 | +Arguments: |
| 74 | +- service:`Service` |
| 75 | +- allowOverwrite:`bool` |
| 76 | +- ethSignature:`Option<Secp256k1RawSignature>` |
| 77 | + |
| 78 | +Accounts: |
| 79 | +- didData `isMut` |
| 80 | +- authority `isSigner` |
| 81 | + |
13 | 82 | ### `remove_service` |
| 83 | +Arguments: |
| 84 | +- fragment:`string` |
| 85 | +- ethSignature:`Option<Secp256k1RawSignature>` |
| 86 | + |
| 87 | +Accounts: |
| 88 | +- didData `isMut` |
| 89 | +- authority `isSigner` |
| 90 | + |
14 | 91 | ### `set_vm_flags` |
| 92 | +Arguments: |
| 93 | +- flagsVm:`UpdateFlagsVerificationMethod` |
| 94 | +- ethSignature:`Option<Secp256k1RawSignature>` |
| 95 | + |
| 96 | +Accounts: |
| 97 | +- didData `isMut` |
| 98 | +- authority `isSigner` |
| 99 | + |
15 | 100 | ### `set_controllers` |
| 101 | +Arguments: |
| 102 | +- setControllersArg:`SetControllersArg` |
| 103 | +- ethSignature:`Option<Secp256k1RawSignature>` |
| 104 | + |
| 105 | +Accounts: |
| 106 | +- didData `isMut` |
| 107 | +- authority `isSigner` |
| 108 | + |
16 | 109 | ### `update` |
| 110 | +Arguments: |
| 111 | +- updateArg:`UpdateArg` |
| 112 | +- ethSignature:`Option<Secp256k1RawSignature>` |
| 113 | + |
| 114 | +Accounts: |
| 115 | +- didData `isMut` |
| 116 | +- authority `isSigner` |
| 117 | + |
17 | 118 | ### `migrate` |
| 119 | +Arguments: |
| 120 | + |
| 121 | +Accounts: |
| 122 | +- didData `isMut` |
| 123 | +- authority |
| 124 | +- payer `isSigner`, `isMut` |
| 125 | +- legacyDidData |
| 126 | +- systemProgram |
18 | 127 |
|
19 | 128 | ### Deployments |
20 | 129 |
|
|
0 commit comments