Skip to content

Commit 5134435

Browse files
authored
Preparation for crates.io publication (#201)
* chore: extended README.md * chore: updated Cargo.toml for release * chore: added keywords to Cargo.toml * chore: updated changelog
1 parent 601808d commit 5134435

3 files changed

Lines changed: 115 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
### Added
99
- Implemented `::try_from` on `DidAccount` to easily support generative and non-generative integrations
1010
- Added generative method on `DidSolDataAccount` class for simple integration of `null` case.
11+
- Added required `Cargo.toml` package data for `sol-did` publication on crates.io.
1112

1213
### Changed
1314
- Removed `publicKey: string;` from `EthSigner` interface. This makes it compatible with

sol-did/README.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,128 @@
22

33
The [anchor-based](https://github.com/coral-xyz/anchor) program of `did:sol` on Solana.
44

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+
521
## Instructions
622

723
### `initialize`
24+
Arguments:
25+
- size: `u32`
26+
27+
Accounts:
28+
- didData `isMut`
29+
- authority `isSigner`, `isMut`
30+
- payer `isSigner`, `isMut`
31+
- systemProgram
32+
833
### `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+
944
### `close`
45+
Arguments:
46+
- ethSignature:`Option<Secp256k1RawSignature>`
47+
48+
Accounts:
49+
- didData `isMut`
50+
- authority `isSigner`
51+
- destination `isMut`
52+
- systemProgram
53+
1054
### `add_verification_method`
55+
Arguments:
56+
- verificationMethod:`VerificationMethod`
57+
- ethSignature:`Option<Secp256k1RawSignature>`
58+
59+
Accounts:
60+
- didData `isMut`
61+
- authority `isSigner`
62+
1163
### `remove_verification_method`
64+
Arguments:
65+
- fragment:`string`
66+
- ethSignature:`Option<Secp256k1RawSignature>`
67+
68+
Accounts:
69+
- didData `isMut`
70+
- authority `isSigner`
71+
1272
### `add_service`
73+
Arguments:
74+
- service:`Service`
75+
- allowOverwrite:`bool`
76+
- ethSignature:`Option<Secp256k1RawSignature>`
77+
78+
Accounts:
79+
- didData `isMut`
80+
- authority `isSigner`
81+
1382
### `remove_service`
83+
Arguments:
84+
- fragment:`string`
85+
- ethSignature:`Option<Secp256k1RawSignature>`
86+
87+
Accounts:
88+
- didData `isMut`
89+
- authority `isSigner`
90+
1491
### `set_vm_flags`
92+
Arguments:
93+
- flagsVm:`UpdateFlagsVerificationMethod`
94+
- ethSignature:`Option<Secp256k1RawSignature>`
95+
96+
Accounts:
97+
- didData `isMut`
98+
- authority `isSigner`
99+
15100
### `set_controllers`
101+
Arguments:
102+
- setControllersArg:`SetControllersArg`
103+
- ethSignature:`Option<Secp256k1RawSignature>`
104+
105+
Accounts:
106+
- didData `isMut`
107+
- authority `isSigner`
108+
16109
### `update`
110+
Arguments:
111+
- updateArg:`UpdateArg`
112+
- ethSignature:`Option<Secp256k1RawSignature>`
113+
114+
Accounts:
115+
- didData `isMut`
116+
- authority `isSigner`
117+
17118
### `migrate`
119+
Arguments:
120+
121+
Accounts:
122+
- didData `isMut`
123+
- authority
124+
- payer `isSigner`, `isMut`
125+
- legacyDidData
126+
- systemProgram
18127

19128
### Deployments
20129

sol-did/programs/sol-did/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name = "sol-did"
33
version = "3.1.4"
44
description = "Martin Riedel"
55
edition = "2021"
6+
readme = "../../README.md"
7+
homepage = "https://www.identity.com/"
8+
repository = "https://github.com/identity-com/sol-did"
9+
license = "MIT"
10+
keywords = ["did", "solana", "identity", "did-method"]
611

712
[lib]
813
crate-type = ["cdylib", "lib"]

0 commit comments

Comments
 (0)