didx-ruby
所属分类:WEB开发
开发工具:Ruby
文件大小:0KB
下载次数:0
上传日期:2023-04-08 18:16:47
上 传 者:
sh-1993
说明: 用于解析和解析W3C去中心化标识符(DID)的Ruby库
(Ruby library for parsing and resolving W3C decentralized identifiers (DIDs))
文件列表:
.idea/ (0, 2023-03-25)
.idea/did.iml (5761, 2023-03-25)
.idea/misc.xml (184, 2023-03-25)
.idea/modules.xml (258, 2023-03-25)
.idea/vcs.xml (167, 2023-03-25)
.rspec (53, 2023-03-25)
.rubocop.yml (220, 2023-03-25)
CHANGELOG.md (60, 2023-03-25)
CODE_OF_CONDUCT.md (5238, 2023-03-25)
Gemfile (192, 2023-03-25)
Gemfile.lock (1362, 2023-03-25)
LICENSE.txt (1078, 2023-03-25)
Rakefile (208, 2023-03-25)
bin/ (0, 2023-03-25)
bin/console (369, 2023-03-25)
bin/setup (131, 2023-03-25)
didx.gemspec (1585, 2023-03-25)
lib/ (0, 2023-03-25)
lib/didx.rb (834, 2023-03-25)
lib/didx/ (0, 2023-03-25)
lib/didx/document.rb (547, 2023-03-25)
lib/didx/generic.rb (568, 2023-03-25)
lib/didx/key.rb (191, 2023-03-25)
lib/didx/version.rb (67, 2023-03-25)
lib/didx/web.rb (634, 2023-03-25)
sig/ (0, 2023-03-25)
sig/didx.rbs (103, 2023-03-25)
spec/ (0, 2023-03-25)
spec/didx/ (0, 2023-03-25)
spec/didx/document_spec.rb (38, 2023-03-25)
spec/didx/generic_spec.rb (482, 2023-03-25)
spec/didx/key_spec.rb (513, 2023-03-25)
spec/didx/web_spec.rb (535, 2023-03-25)
spec/didx_spec.rb (136, 2023-03-25)
... ...
# DIDX
TODO: Delete this and the text below, and describe your gem
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/did`. To experiment with that code, run `bin/console` for an interactive prompt.
## Installation
Install the gem and add to the application's Gemfile by executing:
$ bundle add didx
If bundler is not being used to manage dependencies, install the gem by executing:
$ gem install didx
## Usage
### Create new DID
```ruby
# Parse a did:web DID
did_string = 'did:web:identity.foundation'
did = DIDX(did_string)
=> #
# Resolve to a did:web's DID Document
did.document
=> #["https://www.w3.org/ns/did/v1"], "id"=>"did:web:identity.foundation"}, @id="did:web:identity.foundation", @service=nil, @verification_method=nil>
```
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/did. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/did/blob/main/CODE_OF_CONDUCT.md).
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
## Code of Conduct
Everyone interacting in the DID project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/did/blob/main/CODE_OF_CONDUCT.md).
近期下载者:
相关文件:
收藏者: