skycoin 0.26.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +2 -0
- data/ext/extconf.rb +5 -0
- data/ext/libskycoin_ruby.i +18 -0
- data/ext/structs.i +32 -0
- data/ext/swig.h +56 -0
- data/lib/skycoin.rb +7 -0
- data/lib/skycoin/version.rb +3 -0
- data/skycoin.gemspec +28 -0
- metadata +84 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9bfe8859f80b9aeca2471489be7ba57ad46ea49a5a804806660850cf03db84a0
|
4
|
+
data.tar.gz: f0da9ccdf2e18fbcfaab957435b0795ee6920b544976f58ef72dcda9cec27a25
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6ef47b5ef45fc2160895aef4f975b79a2d79e6815928a98e5ede20af0622f51193b4ee4a04ce8109dbf1c7d0650a6a9631ad8517f6d9117128ea410d9d3341a3
|
7
|
+
data.tar.gz: 3e4837b498a2cc455c61a883a05cfe603b54b38d70de20a1b88d1ac026f75ad4f05d182e78854f0256e5ebd3fd4bf634ffce7195dc0b21ec5102cf0848fdf5d8
|
data/.gitignore
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at dev0006@simelo.tech. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 Maykel Arias Torres
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# Skycoin
|
2
|
+
|
3
|
+
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/skycoin`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'skycoin'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install skycoin
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/skycoin. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
40
|
+
|
41
|
+
## Code of Conduct
|
42
|
+
|
43
|
+
Everyone interacting in the Skycoin project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/skycoin/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/ext/extconf.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
%module skycoin
|
2
|
+
%include "typemaps.i"
|
3
|
+
%{
|
4
|
+
#define SWIG_FILE_WITH_INIT
|
5
|
+
#include "libskycoin.h"
|
6
|
+
#include "swig.h"
|
7
|
+
%}
|
8
|
+
|
9
|
+
//Apply strictly to python
|
10
|
+
//Not for other languages
|
11
|
+
%include "/gopath/src/github.com/skycoin/libskycoin/lib/swig/common/common.i"
|
12
|
+
%include "/gopath/src/github.com/skycoin/libskycoin/lib/swig/dynamic/dynamic.i"
|
13
|
+
|
14
|
+
%include "swig.h"
|
15
|
+
/* Find the modified copy of libskycoin */
|
16
|
+
%include "libskycoin.h"
|
17
|
+
%include "structs.i"
|
18
|
+
%include "skyerrors.h"
|
data/ext/structs.i
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
// clang-format off
|
2
|
+
%include "api.client.go.h"
|
3
|
+
|
4
|
+
%include "cipher.hash.go.h"
|
5
|
+
%include "cipher.address.go.h"
|
6
|
+
%include "cipher.bitcoin.go.h"
|
7
|
+
%include "cipher.crypto.go.h"
|
8
|
+
%include "cipher.encrypt.scrypt_chacha20poly1305.go.h"
|
9
|
+
|
10
|
+
%include "cipher.secp256k1-go.secp256k1-go2.field.go.h"
|
11
|
+
%include "cipher.secp256k1-go.secp256k1-go2.xy.go.h"
|
12
|
+
%include "cipher.secp256k1-go.secp256k1-go2.xyz.go.h"
|
13
|
+
|
14
|
+
%include "cli.cli.go.h"
|
15
|
+
%include "cli.create_rawtx.go.h"
|
16
|
+
|
17
|
+
%include "coin.transactions.go.h"
|
18
|
+
%include "coin.block.go.h"
|
19
|
+
%include "coin.outputs.go.h"
|
20
|
+
|
21
|
+
%include "util.http.json.go.h"
|
22
|
+
|
23
|
+
%include "visor.readable.go.h"
|
24
|
+
|
25
|
+
%include "wallet.balance.go.h"
|
26
|
+
%include "wallet.entry.go.h"
|
27
|
+
%include "wallet.notes.go.h"
|
28
|
+
%include "wallet.wallet.go.h"
|
29
|
+
|
30
|
+
%include "transaction.choose.go.h"
|
31
|
+
%include "api.send.go.h"
|
32
|
+
|
data/ext/swig.h
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
|
2
|
+
typedef struct {
|
3
|
+
GoUint8 data[33];
|
4
|
+
} cipher_PubKey;
|
5
|
+
|
6
|
+
typedef struct {
|
7
|
+
GoUint8 data[32];
|
8
|
+
} cipher_SecKey;
|
9
|
+
|
10
|
+
typedef struct {
|
11
|
+
GoUint8 data[20];
|
12
|
+
} cipher_Ripemd160;
|
13
|
+
|
14
|
+
typedef struct {
|
15
|
+
GoUint8 data[65];
|
16
|
+
} cipher_Sig;
|
17
|
+
|
18
|
+
typedef struct {
|
19
|
+
GoUint8 data[32];
|
20
|
+
} cipher_SHA256;
|
21
|
+
|
22
|
+
typedef struct {
|
23
|
+
GoUint8 data[4];
|
24
|
+
} cipher_Checksum;
|
25
|
+
|
26
|
+
typedef struct {
|
27
|
+
cipher_SecKey* data;
|
28
|
+
int count;
|
29
|
+
} cipher_SecKeys;
|
30
|
+
|
31
|
+
typedef struct {
|
32
|
+
cipher_PubKey* data;
|
33
|
+
int count;
|
34
|
+
} cipher_PubKeys;
|
35
|
+
|
36
|
+
typedef struct {
|
37
|
+
cipher_SHA256* data;
|
38
|
+
int count;
|
39
|
+
} cipher_SHA256s;
|
40
|
+
|
41
|
+
typedef struct {
|
42
|
+
coin__UxOut* data;
|
43
|
+
int count;
|
44
|
+
} coin_UxOutArray;
|
45
|
+
|
46
|
+
typedef struct {
|
47
|
+
cipher__Address* data;
|
48
|
+
int count;
|
49
|
+
} cipher_Addresses;
|
50
|
+
|
51
|
+
typedef GoUint32_ (*FeeCalcFunc)(Transaction__Handle handle, unsigned long long* pFee, void* context);
|
52
|
+
|
53
|
+
typedef struct {
|
54
|
+
FeeCalcFunc callback;
|
55
|
+
void* context;
|
56
|
+
} Fee_Calculator;
|
data/lib/skycoin.rb
ADDED
data/skycoin.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "skycoin/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "skycoin"
|
8
|
+
spec.version = Skycoin::VERSION
|
9
|
+
spec.authors = ["Skycoin"]
|
10
|
+
spec.email = ["dev0006@simelo.tech"]
|
11
|
+
|
12
|
+
spec.summary = %q{Libskycoin library for Ruby}
|
13
|
+
spec.description = %q{Libskycoin library for Ruby}
|
14
|
+
spec.homepage = "https://github.com/simelo/libskycoin-ruby"
|
15
|
+
spec.extensions = ['ext/extconf.rb']
|
16
|
+
|
17
|
+
# Specify which files should be added to the gem when it is released.
|
18
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
20
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
end
|
22
|
+
spec.bindir = "exe"
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ["lib"]
|
25
|
+
|
26
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: skycoin
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.26.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Skycoin
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-07-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
description: Libskycoin library for Ruby
|
42
|
+
email:
|
43
|
+
- dev0006@simelo.tech
|
44
|
+
executables: []
|
45
|
+
extensions:
|
46
|
+
- ext/extconf.rb
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- ".gitignore"
|
50
|
+
- CODE_OF_CONDUCT.md
|
51
|
+
- Gemfile
|
52
|
+
- LICENSE.txt
|
53
|
+
- README.md
|
54
|
+
- Rakefile
|
55
|
+
- ext/extconf.rb
|
56
|
+
- ext/libskycoin_ruby.i
|
57
|
+
- ext/structs.i
|
58
|
+
- ext/swig.h
|
59
|
+
- lib/skycoin.rb
|
60
|
+
- lib/skycoin/version.rb
|
61
|
+
- skycoin.gemspec
|
62
|
+
homepage: https://github.com/simelo/libskycoin-ruby
|
63
|
+
licenses: []
|
64
|
+
metadata: {}
|
65
|
+
post_install_message:
|
66
|
+
rdoc_options: []
|
67
|
+
require_paths:
|
68
|
+
- lib
|
69
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
74
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
requirements: []
|
80
|
+
rubygems_version: 3.0.4
|
81
|
+
signing_key:
|
82
|
+
specification_version: 4
|
83
|
+
summary: Libskycoin library for Ruby
|
84
|
+
test_files: []
|