Skip to content

Commit

Permalink
Preparation for crates.io publication (#201)
Browse files Browse the repository at this point in the history
* chore: extended README.md
* chore: updated Cargo.toml for release
* chore: added keywords to Cargo.toml
* chore: updated changelog
  • Loading branch information
rado0x54 authored Dec 8, 2022
1 parent 601808d commit 5134435
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Implemented `::try_from` on `DidAccount` to easily support generative and non-generative integrations
- Added generative method on `DidSolDataAccount` class for simple integration of `null` case.
- Added required `Cargo.toml` package data for `sol-did` publication on crates.io.

### Changed
- Removed `publicKey: string;` from `EthSigner` interface. This makes it compatible with
Expand Down
109 changes: 109 additions & 0 deletions sol-did/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,128 @@

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

## is_authority Integration
Other programs can check if a verification method (e.g. public key or address) by integrating `is_authority`:

```rust
use sol_did::integrations::is_authority;
```

```rust
// pub fn is_authority(did_account: &AccountInfo,
// did_account_seed_bump: Option<u8>,
// controlling_did_accounts: &[AccountInfo],
// key: &[u8],
// filter_types: Option<&[VerificationMethodType]>,
// filter_fragment: Option<&String>) -> Result<bool>
```

## Instructions

### `initialize`
Arguments:
- size: `u32`

Accounts:
- didData `isMut`
- authority `isSigner`, `isMut`
- payer `isSigner`, `isMut`
- systemProgram

### `resize`
Arguments:
- size:`u32`
- ethSignature:`Option<Secp256k1RawSignature>`

Accounts:
- didData `isMut`
- authority `isSigner`
- payer `isSigner`, `isMut`
- systemProgram

### `close`
Arguments:
- ethSignature:`Option<Secp256k1RawSignature>`

Accounts:
- didData `isMut`
- authority `isSigner`
- destination `isMut`
- systemProgram

### `add_verification_method`
Arguments:
- verificationMethod:`VerificationMethod`
- ethSignature:`Option<Secp256k1RawSignature>`

Accounts:
- didData `isMut`
- authority `isSigner`

### `remove_verification_method`
Arguments:
- fragment:`string`
- ethSignature:`Option<Secp256k1RawSignature>`

Accounts:
- didData `isMut`
- authority `isSigner`

### `add_service`
Arguments:
- service:`Service`
- allowOverwrite:`bool`
- ethSignature:`Option<Secp256k1RawSignature>`

Accounts:
- didData `isMut`
- authority `isSigner`

### `remove_service`
Arguments:
- fragment:`string`
- ethSignature:`Option<Secp256k1RawSignature>`

Accounts:
- didData `isMut`
- authority `isSigner`

### `set_vm_flags`
Arguments:
- flagsVm:`UpdateFlagsVerificationMethod`
- ethSignature:`Option<Secp256k1RawSignature>`

Accounts:
- didData `isMut`
- authority `isSigner`

### `set_controllers`
Arguments:
- setControllersArg:`SetControllersArg`
- ethSignature:`Option<Secp256k1RawSignature>`

Accounts:
- didData `isMut`
- authority `isSigner`

### `update`
Arguments:
- updateArg:`UpdateArg`
- ethSignature:`Option<Secp256k1RawSignature>`

Accounts:
- didData `isMut`
- authority `isSigner`

### `migrate`
Arguments:

Accounts:
- didData `isMut`
- authority
- payer `isSigner`, `isMut`
- legacyDidData
- systemProgram

### Deployments

Expand Down
5 changes: 5 additions & 0 deletions sol-did/programs/sol-did/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name = "sol-did"
version = "3.1.4"
description = "Martin Riedel"
edition = "2021"
readme = "../../README.md"
homepage = "https://www.identity.com/"
repository = "https://github.com/identity-com/sol-did"
license = "MIT"
keywords = ["did", "solana", "identity", "did-method"]

[lib]
crate-type = ["cdylib", "lib"]
Expand Down

0 comments on commit 5134435

Please sign in to comment.