tapyrus-api-client 0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +68 -0
- data/README.md +183 -0
- data/Rakefile +10 -0
- data/docs/AddTimestampRequest.md +20 -0
- data/docs/AddressApi.md +142 -0
- data/docs/CreateUserRequest.md +24 -0
- data/docs/GetAddressesResponse.md +20 -0
- data/docs/GetTokensResponse.md +20 -0
- data/docs/IssueTokenRequest.md +20 -0
- data/docs/PaymentApi.md +76 -0
- data/docs/PaymentRequest.md +22 -0
- data/docs/PaymentResponse.md +18 -0
- data/docs/ReissueTokenRequest.md +18 -0
- data/docs/TimestampApi.md +139 -0
- data/docs/TokenApi.md +355 -0
- data/docs/TokenResponse.md +20 -0
- data/docs/TransferTokenRequest.md +20 -0
- data/docs/UserApi.md +140 -0
- data/docs/UserinfoResponse.md +22 -0
- data/docs/UserinfoResponseBalances.md +18 -0
- data/git_push.sh +58 -0
- data/lib/tapyrus-api-client.rb +56 -0
- data/lib/tapyrus-api-client/api/address_api.rb +142 -0
- data/lib/tapyrus-api-client/api/payment_api.rb +83 -0
- data/lib/tapyrus-api-client/api/timestamp_api.rb +138 -0
- data/lib/tapyrus-api-client/api/token_api.rb +345 -0
- data/lib/tapyrus-api-client/api/user_api.rb +145 -0
- data/lib/tapyrus-api-client/api_client.rb +389 -0
- data/lib/tapyrus-api-client/api_error.rb +57 -0
- data/lib/tapyrus-api-client/configuration.rb +270 -0
- data/lib/tapyrus-api-client/models/add_timestamp_request.rb +232 -0
- data/lib/tapyrus-api-client/models/create_user_request.rb +269 -0
- data/lib/tapyrus-api-client/models/get_addresses_response.rb +229 -0
- data/lib/tapyrus-api-client/models/get_tokens_response.rb +227 -0
- data/lib/tapyrus-api-client/models/issue_token_request.rb +232 -0
- data/lib/tapyrus-api-client/models/payment_request.rb +246 -0
- data/lib/tapyrus-api-client/models/payment_response.rb +218 -0
- data/lib/tapyrus-api-client/models/reissue_token_request.rb +223 -0
- data/lib/tapyrus-api-client/models/token_response.rb +227 -0
- data/lib/tapyrus-api-client/models/transfer_token_request.rb +232 -0
- data/lib/tapyrus-api-client/models/userinfo_response.rb +238 -0
- data/lib/tapyrus-api-client/models/userinfo_response_balances.rb +218 -0
- data/lib/tapyrus-api-client/version.rb +15 -0
- data/spec/api/address_api_spec.rb +59 -0
- data/spec/api/payment_api_spec.rb +47 -0
- data/spec/api/timestamp_api_spec.rb +58 -0
- data/spec/api/token_api_spec.rb +98 -0
- data/spec/api/user_api_spec.rb +59 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/add_timestamp_request_spec.rb +40 -0
- data/spec/models/create_user_request_spec.rb +52 -0
- data/spec/models/get_addresses_response_spec.rb +40 -0
- data/spec/models/get_tokens_response_spec.rb +40 -0
- data/spec/models/issue_token_request_spec.rb +40 -0
- data/spec/models/payment_request_spec.rb +46 -0
- data/spec/models/payment_response_spec.rb +34 -0
- data/spec/models/reissue_token_request_spec.rb +34 -0
- data/spec/models/token_response_spec.rb +40 -0
- data/spec/models/transfer_token_request_spec.rb +40 -0
- data/spec/models/userinfo_response_balances_spec.rb +34 -0
- data/spec/models/userinfo_response_spec.rb +46 -0
- data/spec/spec_helper.rb +111 -0
- data/tapyrus-api-client.gemspec +38 -0
- metadata +192 -0
@@ -0,0 +1,24 @@
|
|
1
|
+
# TapyrusApiClient::CreateUserRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id_token** | **String** | [Token Endpoint](http://openid-foundation-japan.github.io/openid-connect-core-1_0.ja.html#TokenEndpoint) の応答に含まれる id_token | |
|
8
|
+
| **issuer** | **String** | [OpenID Provider Metadata](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata) における issuer | |
|
9
|
+
| **client_id** | **String** | [OAuth 2.0 Client Credential](https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1) における client_id | |
|
10
|
+
| **access_token** | **String** | [Token Endpoint](http://openid-foundation-japan.github.io/openid-connect-core-1_0.ja.html#TokenEndpoint) の応答に含まれる access_token | |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'tapyrus-api-client'
|
16
|
+
|
17
|
+
instance = TapyrusApiClient::CreateUserRequest.new(
|
18
|
+
id_token: eyJhbGciOiJSUzI1NiIsImtpZCI6IjFlOWdkazcifQ.ewogImlzcyI6ICJodHRwOi8vc2VydmVyLmV4YW1wbGUuY29tIiwKICJzdWIiOiAiMjQ4Mjg5NzYxMDAxIiwKICJhdWQiOiAiczZCaGRSa3F0MyIsCiAibm9uY2UiOiAibi0wUzZfV3pBMk1qIiwKICJleHAiOiAxMzExMjgxOTcwLAogImlhdCI6IDEzMTEyODA5NzAKfQ.ggW8hZ1EuVLuxNuuIJKX_V8a_OMXzR0EHR9R6jgdqrOOF4daGU96Sr_P6qJp6IcmD3HP99Obi1PRs-cwh3LO-p146waJ8IhehcwL7F09JdijmBqkvPeB2T9CJNqeGpe-gccMg4vfKjkM8FcGvnzZUN4_KSP0aAp1tOJ1zZwgjxqGByKHiOtX7TpdQyHE5lcMiKPXfEIQILVq0pc_E2DzL7emopWoaoZTF_m0_N0YzFC6g6EJbOEoRoSK5hoDalrcvRYLSrQAZZKflyuVCyixEoV9GfNQC3_osjzw2PAithfubEEBLuVVk4XUVrWOLrLl0nx7RkKU8NXNHq-rvKMzqg,
|
19
|
+
issuer: https://server.example.com,
|
20
|
+
client_id: s6BhdRkqt3,
|
21
|
+
access_token: SlAV32hkKG
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TapyrusApiClient::GetAddressesResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **count** | **Integer** | | [optional] |
|
8
|
+
| **addresses** | **Array<String>** | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'tapyrus-api-client'
|
14
|
+
|
15
|
+
instance = TapyrusApiClient::GetAddressesResponse.new(
|
16
|
+
count: 1,
|
17
|
+
addresses: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TapyrusApiClient::GetTokensResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **token_id** | **String** | | [optional] |
|
8
|
+
| **amount** | **Integer** | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'tapyrus-api-client'
|
14
|
+
|
15
|
+
instance = TapyrusApiClient::GetTokensResponse.new(
|
16
|
+
token_id: c3ec2fd806701a3f55808cbec3922c38dafaa3070c48c803e9043ee3642c660b46,
|
17
|
+
amount: 100
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TapyrusApiClient::IssueTokenRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **amount** | **Integer** | | |
|
8
|
+
| **token_type** | **Integer** | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'tapyrus-api-client'
|
14
|
+
|
15
|
+
instance = TapyrusApiClient::IssueTokenRequest.new(
|
16
|
+
amount: 100,
|
17
|
+
token_type: 1
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
data/docs/PaymentApi.md
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# TapyrusApiClient::PaymentApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://ap-01.tapyrus.chaintope.com/api/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**transfer**](PaymentApi.md#transfer) | **POST** /payment | 資金の送金 |
|
8
|
+
|
9
|
+
|
10
|
+
## transfer
|
11
|
+
|
12
|
+
> <PaymentResponse> transfer(opts)
|
13
|
+
|
14
|
+
資金の送金
|
15
|
+
|
16
|
+
指定したアドレスに任意のtapyrusを送金します。
|
17
|
+
|
18
|
+
### Examples
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'time'
|
22
|
+
require 'tapyrus-api-client'
|
23
|
+
# setup authorization
|
24
|
+
TapyrusApiClient.configure do |config|end
|
25
|
+
|
26
|
+
api_instance = TapyrusApiClient::PaymentApi.new
|
27
|
+
opts = {
|
28
|
+
payment_request: TapyrusApiClient::PaymentRequest.new({address: '1CY6TSSARn8rAFD9chCghX5B7j4PKR8S1a', amount: 10000000}) # PaymentRequest | `address`, `amount`を受け取り、アドレスに対して指定した額の資金(tapyrus)を送金します。 任意で`fee`を設定し、送金手数料を指定できます。
|
29
|
+
}
|
30
|
+
|
31
|
+
begin
|
32
|
+
# 資金の送金
|
33
|
+
result = api_instance.transfer(opts)
|
34
|
+
p result
|
35
|
+
rescue TapyrusApiClient::ApiError => e
|
36
|
+
puts "Error when calling PaymentApi->transfer: #{e}"
|
37
|
+
end
|
38
|
+
```
|
39
|
+
|
40
|
+
#### Using the transfer_with_http_info variant
|
41
|
+
|
42
|
+
This returns an Array which contains the response data, status code and headers.
|
43
|
+
|
44
|
+
> <Array(<PaymentResponse>, Integer, Hash)> transfer_with_http_info(opts)
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
begin
|
48
|
+
# 資金の送金
|
49
|
+
data, status_code, headers = api_instance.transfer_with_http_info(opts)
|
50
|
+
p status_code # => 2xx
|
51
|
+
p headers # => { ... }
|
52
|
+
p data # => <PaymentResponse>
|
53
|
+
rescue TapyrusApiClient::ApiError => e
|
54
|
+
puts "Error when calling PaymentApi->transfer_with_http_info: #{e}"
|
55
|
+
end
|
56
|
+
```
|
57
|
+
|
58
|
+
### Parameters
|
59
|
+
|
60
|
+
| Name | Type | Description | Notes |
|
61
|
+
| ---- | ---- | ----------- | ----- |
|
62
|
+
| **payment_request** | [**PaymentRequest**](PaymentRequest.md) | `address`, `amount`を受け取り、アドレスに対して指定した額の資金(tapyrus)を送金します。 任意で`fee`を設定し、送金手数料を指定できます。 | [optional] |
|
63
|
+
|
64
|
+
### Return type
|
65
|
+
|
66
|
+
[**PaymentResponse**](PaymentResponse.md)
|
67
|
+
|
68
|
+
### Authorization
|
69
|
+
|
70
|
+
No authorization required
|
71
|
+
|
72
|
+
### HTTP request headers
|
73
|
+
|
74
|
+
- **Content-Type**: application/json
|
75
|
+
- **Accept**: application/json
|
76
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# TapyrusApiClient::PaymentRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **address** | **String** | | |
|
8
|
+
| **amount** | **Integer** | | |
|
9
|
+
| **fee** | **Integer** | | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'tapyrus-api-client'
|
15
|
+
|
16
|
+
instance = TapyrusApiClient::PaymentRequest.new(
|
17
|
+
address: 1CY6TSSARn8rAFD9chCghX5B7j4PKR8S1a,
|
18
|
+
amount: 10000000,
|
19
|
+
fee: 100000
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# TapyrusApiClient::PaymentResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **txid** | **String** | | [optional] |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'tapyrus-api-client'
|
13
|
+
|
14
|
+
instance = TapyrusApiClient::PaymentResponse.new(
|
15
|
+
txid: 76077052e323a8445c398b690ed8b4b49c9b6e4d1e8e19ea0e7de7cead6f5fc8
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# TapyrusApiClient::ReissueTokenRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **amount** | **Integer** | | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'tapyrus-api-client'
|
13
|
+
|
14
|
+
instance = TapyrusApiClient::ReissueTokenRequest.new(
|
15
|
+
amount: 100
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,139 @@
|
|
1
|
+
# TapyrusApiClient::TimestampApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://ap-01.tapyrus.chaintope.com/api/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**add_timestamp**](TimestampApi.md#add_timestamp) | **POST** /timestamp | Timestampを記録 |
|
8
|
+
| [**get_timestamps**](TimestampApi.md#get_timestamps) | **GET** /timestamps | Timestamp一覧表示 |
|
9
|
+
|
10
|
+
|
11
|
+
## add_timestamp
|
12
|
+
|
13
|
+
> add_timestamp(opts)
|
14
|
+
|
15
|
+
Timestampを記録
|
16
|
+
|
17
|
+
ブロックチェーンにハッシュ値をタイムスタンプとして記録します。
|
18
|
+
|
19
|
+
### Examples
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'time'
|
23
|
+
require 'tapyrus-api-client'
|
24
|
+
# setup authorization
|
25
|
+
TapyrusApiClient.configure do |config|end
|
26
|
+
|
27
|
+
api_instance = TapyrusApiClient::TimestampApi.new
|
28
|
+
opts = {
|
29
|
+
add_timestamp_request: TapyrusApiClient::AddTimestampRequest.new({content_hash: '9ccc644b03a88358a754962903a659a2d338767ee61674dde5434702a6256e6d'}) # AddTimestampRequest | `content_hash`, `prefix`を受け取り、ブロックチェーンにハッシュ値をタイムスタンプとして記録します。
|
30
|
+
}
|
31
|
+
|
32
|
+
begin
|
33
|
+
# Timestampを記録
|
34
|
+
api_instance.add_timestamp(opts)
|
35
|
+
rescue TapyrusApiClient::ApiError => e
|
36
|
+
puts "Error when calling TimestampApi->add_timestamp: #{e}"
|
37
|
+
end
|
38
|
+
```
|
39
|
+
|
40
|
+
#### Using the add_timestamp_with_http_info variant
|
41
|
+
|
42
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
43
|
+
|
44
|
+
> <Array(nil, Integer, Hash)> add_timestamp_with_http_info(opts)
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
begin
|
48
|
+
# Timestampを記録
|
49
|
+
data, status_code, headers = api_instance.add_timestamp_with_http_info(opts)
|
50
|
+
p status_code # => 2xx
|
51
|
+
p headers # => { ... }
|
52
|
+
p data # => nil
|
53
|
+
rescue TapyrusApiClient::ApiError => e
|
54
|
+
puts "Error when calling TimestampApi->add_timestamp_with_http_info: #{e}"
|
55
|
+
end
|
56
|
+
```
|
57
|
+
|
58
|
+
### Parameters
|
59
|
+
|
60
|
+
| Name | Type | Description | Notes |
|
61
|
+
| ---- | ---- | ----------- | ----- |
|
62
|
+
| **add_timestamp_request** | [**AddTimestampRequest**](AddTimestampRequest.md) | `content_hash`, `prefix`を受け取り、ブロックチェーンにハッシュ値をタイムスタンプとして記録します。 | [optional] |
|
63
|
+
|
64
|
+
### Return type
|
65
|
+
|
66
|
+
nil (empty response body)
|
67
|
+
|
68
|
+
### Authorization
|
69
|
+
|
70
|
+
No authorization required
|
71
|
+
|
72
|
+
### HTTP request headers
|
73
|
+
|
74
|
+
- **Content-Type**: application/json
|
75
|
+
- **Accept**: Not defined
|
76
|
+
|
77
|
+
|
78
|
+
## get_timestamps
|
79
|
+
|
80
|
+
> Array<Array> get_timestamps
|
81
|
+
|
82
|
+
Timestamp一覧表示
|
83
|
+
|
84
|
+
ブロックチェーンに記録したタイムスタンプを取得し、`content_hash`,`prefix`,`txid`を一覧で表示します。
|
85
|
+
|
86
|
+
### Examples
|
87
|
+
|
88
|
+
```ruby
|
89
|
+
require 'time'
|
90
|
+
require 'tapyrus-api-client'
|
91
|
+
# setup authorization
|
92
|
+
TapyrusApiClient.configure do |config|end
|
93
|
+
|
94
|
+
api_instance = TapyrusApiClient::TimestampApi.new
|
95
|
+
|
96
|
+
begin
|
97
|
+
# Timestamp一覧表示
|
98
|
+
result = api_instance.get_timestamps
|
99
|
+
p result
|
100
|
+
rescue TapyrusApiClient::ApiError => e
|
101
|
+
puts "Error when calling TimestampApi->get_timestamps: #{e}"
|
102
|
+
end
|
103
|
+
```
|
104
|
+
|
105
|
+
#### Using the get_timestamps_with_http_info variant
|
106
|
+
|
107
|
+
This returns an Array which contains the response data, status code and headers.
|
108
|
+
|
109
|
+
> <Array(Array<Array>, Integer, Hash)> get_timestamps_with_http_info
|
110
|
+
|
111
|
+
```ruby
|
112
|
+
begin
|
113
|
+
# Timestamp一覧表示
|
114
|
+
data, status_code, headers = api_instance.get_timestamps_with_http_info
|
115
|
+
p status_code # => 2xx
|
116
|
+
p headers # => { ... }
|
117
|
+
p data # => Array<Array>
|
118
|
+
rescue TapyrusApiClient::ApiError => e
|
119
|
+
puts "Error when calling TimestampApi->get_timestamps_with_http_info: #{e}"
|
120
|
+
end
|
121
|
+
```
|
122
|
+
|
123
|
+
### Parameters
|
124
|
+
|
125
|
+
This endpoint does not need any parameter.
|
126
|
+
|
127
|
+
### Return type
|
128
|
+
|
129
|
+
**Array<Array>**
|
130
|
+
|
131
|
+
### Authorization
|
132
|
+
|
133
|
+
No authorization required
|
134
|
+
|
135
|
+
### HTTP request headers
|
136
|
+
|
137
|
+
- **Content-Type**: Not defined
|
138
|
+
- **Accept**: application/json
|
139
|
+
|
data/docs/TokenApi.md
ADDED
@@ -0,0 +1,355 @@
|
|
1
|
+
# TapyrusApiClient::TokenApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://ap-01.tapyrus.chaintope.com/api/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**burn_token**](TokenApi.md#burn_token) | **DELETE** /tokens/{token_id}/burn | トークンの焼却 |
|
8
|
+
| [**get_tokens**](TokenApi.md#get_tokens) | **GET** /tokens | トークンの総量取得 |
|
9
|
+
| [**issue_token**](TokenApi.md#issue_token) | **POST** /tokens/issue | トークンの新規発行 |
|
10
|
+
| [**reissue_token**](TokenApi.md#reissue_token) | **POST** /tokens/{token_id}/reissue | トークンの再発行 |
|
11
|
+
| [**transfer_token**](TokenApi.md#transfer_token) | **PUT** /tokens/{token_id}/transfer | トークンの送付 |
|
12
|
+
|
13
|
+
|
14
|
+
## burn_token
|
15
|
+
|
16
|
+
> burn_token(token_id, opts)
|
17
|
+
|
18
|
+
トークンの焼却
|
19
|
+
|
20
|
+
任意の数のトークンを焼却します。
|
21
|
+
|
22
|
+
### Examples
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require 'time'
|
26
|
+
require 'tapyrus-api-client'
|
27
|
+
# setup authorization
|
28
|
+
TapyrusApiClient.configure do |config|end
|
29
|
+
|
30
|
+
api_instance = TapyrusApiClient::TokenApi.new
|
31
|
+
token_id = 'token_id_example' # String | トークンの識別子。
|
32
|
+
opts = {
|
33
|
+
amount: 56 # Integer | `amount`を受け取り、指定した量のトークンを焼却します。 `amount`が未入力の場合全てのトークンを焼却します。
|
34
|
+
}
|
35
|
+
|
36
|
+
begin
|
37
|
+
# トークンの焼却
|
38
|
+
api_instance.burn_token(token_id, opts)
|
39
|
+
rescue TapyrusApiClient::ApiError => e
|
40
|
+
puts "Error when calling TokenApi->burn_token: #{e}"
|
41
|
+
end
|
42
|
+
```
|
43
|
+
|
44
|
+
#### Using the burn_token_with_http_info variant
|
45
|
+
|
46
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
47
|
+
|
48
|
+
> <Array(nil, Integer, Hash)> burn_token_with_http_info(token_id, opts)
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
begin
|
52
|
+
# トークンの焼却
|
53
|
+
data, status_code, headers = api_instance.burn_token_with_http_info(token_id, opts)
|
54
|
+
p status_code # => 2xx
|
55
|
+
p headers # => { ... }
|
56
|
+
p data # => nil
|
57
|
+
rescue TapyrusApiClient::ApiError => e
|
58
|
+
puts "Error when calling TokenApi->burn_token_with_http_info: #{e}"
|
59
|
+
end
|
60
|
+
```
|
61
|
+
|
62
|
+
### Parameters
|
63
|
+
|
64
|
+
| Name | Type | Description | Notes |
|
65
|
+
| ---- | ---- | ----------- | ----- |
|
66
|
+
| **token_id** | **String** | トークンの識別子。 | |
|
67
|
+
| **amount** | **Integer** | `amount`を受け取り、指定した量のトークンを焼却します。 `amount`が未入力の場合全てのトークンを焼却します。 | [optional] |
|
68
|
+
|
69
|
+
### Return type
|
70
|
+
|
71
|
+
nil (empty response body)
|
72
|
+
|
73
|
+
### Authorization
|
74
|
+
|
75
|
+
No authorization required
|
76
|
+
|
77
|
+
### HTTP request headers
|
78
|
+
|
79
|
+
- **Content-Type**: Not defined
|
80
|
+
- **Accept**: Not defined
|
81
|
+
|
82
|
+
|
83
|
+
## get_tokens
|
84
|
+
|
85
|
+
> <Array<GetTokensResponse>> get_tokens(opts)
|
86
|
+
|
87
|
+
トークンの総量取得
|
88
|
+
|
89
|
+
所有するトークンの総量を取得し、トークン識別子(`token_id`)ごとに総量(`amount`)を一覧で表示します。
|
90
|
+
|
91
|
+
### Examples
|
92
|
+
|
93
|
+
```ruby
|
94
|
+
require 'time'
|
95
|
+
require 'tapyrus-api-client'
|
96
|
+
# setup authorization
|
97
|
+
TapyrusApiClient.configure do |config|end
|
98
|
+
|
99
|
+
api_instance = TapyrusApiClient::TokenApi.new
|
100
|
+
opts = {
|
101
|
+
confirmation_only: true # Boolean | オプションで`confirmation_only`を設定でき、`true`の場合ブロックチェーン上で承認済みのトークンのみを取得し、`false`の場合未承認のトークンも含めて取得します。デフォルトは`true`です。
|
102
|
+
}
|
103
|
+
|
104
|
+
begin
|
105
|
+
# トークンの総量取得
|
106
|
+
result = api_instance.get_tokens(opts)
|
107
|
+
p result
|
108
|
+
rescue TapyrusApiClient::ApiError => e
|
109
|
+
puts "Error when calling TokenApi->get_tokens: #{e}"
|
110
|
+
end
|
111
|
+
```
|
112
|
+
|
113
|
+
#### Using the get_tokens_with_http_info variant
|
114
|
+
|
115
|
+
This returns an Array which contains the response data, status code and headers.
|
116
|
+
|
117
|
+
> <Array(<Array<GetTokensResponse>>, Integer, Hash)> get_tokens_with_http_info(opts)
|
118
|
+
|
119
|
+
```ruby
|
120
|
+
begin
|
121
|
+
# トークンの総量取得
|
122
|
+
data, status_code, headers = api_instance.get_tokens_with_http_info(opts)
|
123
|
+
p status_code # => 2xx
|
124
|
+
p headers # => { ... }
|
125
|
+
p data # => <Array<GetTokensResponse>>
|
126
|
+
rescue TapyrusApiClient::ApiError => e
|
127
|
+
puts "Error when calling TokenApi->get_tokens_with_http_info: #{e}"
|
128
|
+
end
|
129
|
+
```
|
130
|
+
|
131
|
+
### Parameters
|
132
|
+
|
133
|
+
| Name | Type | Description | Notes |
|
134
|
+
| ---- | ---- | ----------- | ----- |
|
135
|
+
| **confirmation_only** | **Boolean** | オプションで`confirmation_only`を設定でき、`true`の場合ブロックチェーン上で承認済みのトークンのみを取得し、`false`の場合未承認のトークンも含めて取得します。デフォルトは`true`です。 | [optional] |
|
136
|
+
|
137
|
+
### Return type
|
138
|
+
|
139
|
+
[**Array<GetTokensResponse>**](GetTokensResponse.md)
|
140
|
+
|
141
|
+
### Authorization
|
142
|
+
|
143
|
+
No authorization required
|
144
|
+
|
145
|
+
### HTTP request headers
|
146
|
+
|
147
|
+
- **Content-Type**: Not defined
|
148
|
+
- **Accept**: application/json
|
149
|
+
|
150
|
+
|
151
|
+
## issue_token
|
152
|
+
|
153
|
+
> <TokenResponse> issue_token(opts)
|
154
|
+
|
155
|
+
トークンの新規発行
|
156
|
+
|
157
|
+
任意の数のトークンを新規発行します。
|
158
|
+
|
159
|
+
### Examples
|
160
|
+
|
161
|
+
```ruby
|
162
|
+
require 'time'
|
163
|
+
require 'tapyrus-api-client'
|
164
|
+
# setup authorization
|
165
|
+
TapyrusApiClient.configure do |config|end
|
166
|
+
|
167
|
+
api_instance = TapyrusApiClient::TokenApi.new
|
168
|
+
opts = {
|
169
|
+
issue_token_request: TapyrusApiClient::IssueTokenRequest.new({amount: 100}) # IssueTokenRequest | `amount`を受け取り指定した数のトークンを新規発行します。 任意で`token_type`を設定し、トークンの種類を指定できます。 `token_type`が未指定な場合、再発行可能なトークンが発行されます。 トークンの種類は以下の通りです。 - 1: 再発行可能なトークン - 2: 再発行不可能なトークン - 3: NFT また、`token_type`が未指定または`1`の場合、任意でトークン識別子`id`を指定することで、指定したトークン識別子のトークンを再発行します。
|
170
|
+
}
|
171
|
+
|
172
|
+
begin
|
173
|
+
# トークンの新規発行
|
174
|
+
result = api_instance.issue_token(opts)
|
175
|
+
p result
|
176
|
+
rescue TapyrusApiClient::ApiError => e
|
177
|
+
puts "Error when calling TokenApi->issue_token: #{e}"
|
178
|
+
end
|
179
|
+
```
|
180
|
+
|
181
|
+
#### Using the issue_token_with_http_info variant
|
182
|
+
|
183
|
+
This returns an Array which contains the response data, status code and headers.
|
184
|
+
|
185
|
+
> <Array(<TokenResponse>, Integer, Hash)> issue_token_with_http_info(opts)
|
186
|
+
|
187
|
+
```ruby
|
188
|
+
begin
|
189
|
+
# トークンの新規発行
|
190
|
+
data, status_code, headers = api_instance.issue_token_with_http_info(opts)
|
191
|
+
p status_code # => 2xx
|
192
|
+
p headers # => { ... }
|
193
|
+
p data # => <TokenResponse>
|
194
|
+
rescue TapyrusApiClient::ApiError => e
|
195
|
+
puts "Error when calling TokenApi->issue_token_with_http_info: #{e}"
|
196
|
+
end
|
197
|
+
```
|
198
|
+
|
199
|
+
### Parameters
|
200
|
+
|
201
|
+
| Name | Type | Description | Notes |
|
202
|
+
| ---- | ---- | ----------- | ----- |
|
203
|
+
| **issue_token_request** | [**IssueTokenRequest**](IssueTokenRequest.md) | `amount`を受け取り指定した数のトークンを新規発行します。 任意で`token_type`を設定し、トークンの種類を指定できます。 `token_type`が未指定な場合、再発行可能なトークンが発行されます。 トークンの種類は以下の通りです。 - 1: 再発行可能なトークン - 2: 再発行不可能なトークン - 3: NFT また、`token_type`が未指定または`1`の場合、任意でトークン識別子`id`を指定することで、指定したトークン識別子のトークンを再発行します。 | [optional] |
|
204
|
+
|
205
|
+
### Return type
|
206
|
+
|
207
|
+
[**TokenResponse**](TokenResponse.md)
|
208
|
+
|
209
|
+
### Authorization
|
210
|
+
|
211
|
+
No authorization required
|
212
|
+
|
213
|
+
### HTTP request headers
|
214
|
+
|
215
|
+
- **Content-Type**: application/json
|
216
|
+
- **Accept**: application/json
|
217
|
+
|
218
|
+
|
219
|
+
## reissue_token
|
220
|
+
|
221
|
+
> <TokenResponse> reissue_token(token_id, opts)
|
222
|
+
|
223
|
+
トークンの再発行
|
224
|
+
|
225
|
+
指定した識別子を持つ再発行可能なトークンを任意の量再発行します。
|
226
|
+
|
227
|
+
### Examples
|
228
|
+
|
229
|
+
```ruby
|
230
|
+
require 'time'
|
231
|
+
require 'tapyrus-api-client'
|
232
|
+
# setup authorization
|
233
|
+
TapyrusApiClient.configure do |config|end
|
234
|
+
|
235
|
+
api_instance = TapyrusApiClient::TokenApi.new
|
236
|
+
token_id = 'token_id_example' # String | トークンの識別子。
|
237
|
+
opts = {
|
238
|
+
reissue_token_request: TapyrusApiClient::ReissueTokenRequest.new({amount: 100}) # ReissueTokenRequest |
|
239
|
+
}
|
240
|
+
|
241
|
+
begin
|
242
|
+
# トークンの再発行
|
243
|
+
result = api_instance.reissue_token(token_id, opts)
|
244
|
+
p result
|
245
|
+
rescue TapyrusApiClient::ApiError => e
|
246
|
+
puts "Error when calling TokenApi->reissue_token: #{e}"
|
247
|
+
end
|
248
|
+
```
|
249
|
+
|
250
|
+
#### Using the reissue_token_with_http_info variant
|
251
|
+
|
252
|
+
This returns an Array which contains the response data, status code and headers.
|
253
|
+
|
254
|
+
> <Array(<TokenResponse>, Integer, Hash)> reissue_token_with_http_info(token_id, opts)
|
255
|
+
|
256
|
+
```ruby
|
257
|
+
begin
|
258
|
+
# トークンの再発行
|
259
|
+
data, status_code, headers = api_instance.reissue_token_with_http_info(token_id, opts)
|
260
|
+
p status_code # => 2xx
|
261
|
+
p headers # => { ... }
|
262
|
+
p data # => <TokenResponse>
|
263
|
+
rescue TapyrusApiClient::ApiError => e
|
264
|
+
puts "Error when calling TokenApi->reissue_token_with_http_info: #{e}"
|
265
|
+
end
|
266
|
+
```
|
267
|
+
|
268
|
+
### Parameters
|
269
|
+
|
270
|
+
| Name | Type | Description | Notes |
|
271
|
+
| ---- | ---- | ----------- | ----- |
|
272
|
+
| **token_id** | **String** | トークンの識別子。 | |
|
273
|
+
| **reissue_token_request** | [**ReissueTokenRequest**](ReissueTokenRequest.md) | | [optional] |
|
274
|
+
|
275
|
+
### Return type
|
276
|
+
|
277
|
+
[**TokenResponse**](TokenResponse.md)
|
278
|
+
|
279
|
+
### Authorization
|
280
|
+
|
281
|
+
No authorization required
|
282
|
+
|
283
|
+
### HTTP request headers
|
284
|
+
|
285
|
+
- **Content-Type**: application/json
|
286
|
+
- **Accept**: application/json
|
287
|
+
|
288
|
+
|
289
|
+
## transfer_token
|
290
|
+
|
291
|
+
> <TokenResponse> transfer_token(token_id, transfer_token_request)
|
292
|
+
|
293
|
+
トークンの送付
|
294
|
+
|
295
|
+
任意の数のトークンを指定したアドレスに対して送付します。
|
296
|
+
|
297
|
+
### Examples
|
298
|
+
|
299
|
+
```ruby
|
300
|
+
require 'time'
|
301
|
+
require 'tapyrus-api-client'
|
302
|
+
# setup authorization
|
303
|
+
TapyrusApiClient.configure do |config|end
|
304
|
+
|
305
|
+
api_instance = TapyrusApiClient::TokenApi.new
|
306
|
+
token_id = 'token_id_example' # String | トークンの識別子。
|
307
|
+
transfer_token_request = TapyrusApiClient::TransferTokenRequest.new({address: '1CY6TSSARn8rAFD9chCghX5B7j4PKR8S1a'}) # TransferTokenRequest | `address`でトークンを送付する相手のアドレスを指定し、`amount`で送付するトークンの量を指定します。
|
308
|
+
|
309
|
+
begin
|
310
|
+
# トークンの送付
|
311
|
+
result = api_instance.transfer_token(token_id, transfer_token_request)
|
312
|
+
p result
|
313
|
+
rescue TapyrusApiClient::ApiError => e
|
314
|
+
puts "Error when calling TokenApi->transfer_token: #{e}"
|
315
|
+
end
|
316
|
+
```
|
317
|
+
|
318
|
+
#### Using the transfer_token_with_http_info variant
|
319
|
+
|
320
|
+
This returns an Array which contains the response data, status code and headers.
|
321
|
+
|
322
|
+
> <Array(<TokenResponse>, Integer, Hash)> transfer_token_with_http_info(token_id, transfer_token_request)
|
323
|
+
|
324
|
+
```ruby
|
325
|
+
begin
|
326
|
+
# トークンの送付
|
327
|
+
data, status_code, headers = api_instance.transfer_token_with_http_info(token_id, transfer_token_request)
|
328
|
+
p status_code # => 2xx
|
329
|
+
p headers # => { ... }
|
330
|
+
p data # => <TokenResponse>
|
331
|
+
rescue TapyrusApiClient::ApiError => e
|
332
|
+
puts "Error when calling TokenApi->transfer_token_with_http_info: #{e}"
|
333
|
+
end
|
334
|
+
```
|
335
|
+
|
336
|
+
### Parameters
|
337
|
+
|
338
|
+
| Name | Type | Description | Notes |
|
339
|
+
| ---- | ---- | ----------- | ----- |
|
340
|
+
| **token_id** | **String** | トークンの識別子。 | |
|
341
|
+
| **transfer_token_request** | [**TransferTokenRequest**](TransferTokenRequest.md) | `address`でトークンを送付する相手のアドレスを指定し、`amount`で送付するトークンの量を指定します。 | |
|
342
|
+
|
343
|
+
### Return type
|
344
|
+
|
345
|
+
[**TokenResponse**](TokenResponse.md)
|
346
|
+
|
347
|
+
### Authorization
|
348
|
+
|
349
|
+
No authorization required
|
350
|
+
|
351
|
+
### HTTP request headers
|
352
|
+
|
353
|
+
- **Content-Type**: application/json
|
354
|
+
- **Accept**: application/json
|
355
|
+
|