klaytn 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -10
  3. data/lib/klaytn/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed4fcb0b9e08db6917b1894cb830e6e1defe8d60ee36abab18eba1b115867cbf
4
- data.tar.gz: 696c31b090e503f89fa591371aff141558ed1fab96455602602897a524a5d45d
3
+ metadata.gz: 840690260a6ceff31a91ffe9cacc0c409250ffad205f19fbbe1be530a10ebdf0
4
+ data.tar.gz: e4a52cab25d3fcd889bcc17ebd128a06d9abe4c3df3cccd19cfbd4084cad6a52
5
5
  SHA512:
6
- metadata.gz: d15ee526048fc2241de2137ff7cb615975f9f3766de53298a54259f63a5dac24d1c52d7f6f4dbdc500f150ed8144c84adc8d8168a6bcada89f19a21c41f259d4
7
- data.tar.gz: 51ea4334ed61229920b3881af2ed3ef3dffd024aaadddc51eb8f96bfed3f1cdece6df4bc9e50d5cac07891e953bb4dc049347009fc7e96934d46d8739708eccc
6
+ metadata.gz: e9ea5ea41989f1edeed62f3f19b6548d2ecbf2b3ba4a01ef417285705ba0961652f9310852c090402f36ca0512f99ac8079848e37f11f3d3f9af2218234b26ec
7
+ data.tar.gz: 2cf0539ca0bc93703130122d440daca05d46d13ab67843d3a494aa8f76b4343170f5a101dfc30cd0752b59195b08a402e197799f6579fcb356de247459437290
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Klaytn Ruby Library
2
- Execute transactions and interact with smart contracts, wallets, and NFT tokens on the Klaytn blockchain (https://www.klaytn.com/). Most functions require KAS Console credentials and KLAY tokens (inside a KAS Account Pool wallet) to pay transaction fees. Created by [ooju.xyz](https://ooju.xyz).
2
+ Execute transactions and interact with smart contracts, wallets, and NFT tokens on the [Klaytn blockchain](https://www.klaytn.com/). Most functions require KAS Console credentials and KLAY tokens (inside a KAS Account Pool wallet) to pay transaction fees. Created by [ooju.xyz](https://ooju.xyz).
3
3
 
4
4
  ## Installation
5
5
 
@@ -21,7 +21,7 @@ Or install it yourself as:
21
21
  This library is modeled off the [KAS Wallet API](https://refs.klaytnapi.com/en/wallet/latest), but is not an exhaustive implementation. Below are the core features.
22
22
 
23
23
  **Client authentication**
24
- ```
24
+ ```rb
25
25
  opts = {
26
26
  kas_access_key: 'KASxxx',
27
27
  kas_secret_access_key: 'yyy',
@@ -32,7 +32,7 @@ opts = {
32
32
  ```
33
33
 
34
34
  **Transactions**
35
- ```
35
+ ```rb
36
36
  client = Klaytn::Transaction.new(opts)
37
37
 
38
38
  # fetch a transaction
@@ -43,7 +43,7 @@ result = client.send('0x00E7b604e9493d53749e7b7b9e39F313d9F9890a', 1, { memo: 's
43
43
  ```
44
44
 
45
45
  **Wallets**
46
- ```
46
+ ```rb
47
47
  client = Klaytn::Wallet.new # no authentication required
48
48
 
49
49
  # get a wallet
@@ -54,7 +54,7 @@ result = client.get_balance('0x00e7b604e9493d53749e7b7b9e39f313d9f9890a') # => 3
54
54
  ```
55
55
 
56
56
  **Tokens**
57
- ```
57
+ ```rb
58
58
  # instantiation requires additional params
59
59
  opts = opts.merge(contract_address: '0xbceaa2fa50fef79bb5c4b2fc887dbdd3b96130b7')
60
60
  client = Klaytn::Token.new(opts)
@@ -64,15 +64,15 @@ result = client.get(1) # => {"tokenId"=>"0x1", "owner"=>"0x58e0cc86..."}
64
64
  ```
65
65
 
66
66
  **Contracts**
67
- ```
67
+ ```rb
68
68
  # deploy a contract
69
69
  client = Klaytn::Contract.new(opts)
70
- result = client.deploy(bytecode) # => {"from"=>"0x6e1f42c1e..."}
70
+ result = client.deploy('<bytecode>') # => {"from"=>"0x6e1f42c1e..."}
71
71
 
72
- # interact with a contract
72
+ # interact with a deployed contract
73
73
  opts = opts.merge(
74
- abi: [{...}], # deployed contract ABI
75
- contract_address: '0xbceaa2fa50fef79bb5c4b2fc887dbdd3b96130b7' # deployed contract address
74
+ abi: [{...}],
75
+ contract_address: '0xbceaa2fa50fef79bb5c4b2fc887dbdd3b96130b7'
76
76
  )
77
77
  client = Klaytn::Contract.new(opts)
78
78
  result = client.invoke_function('addAddressToWhitelist', ['0x00E7b604e9493d53749e7b7b9e39F313d9F9890a']) # => {"from"=>"0x3f71cde4246cb..."}
@@ -1,3 +1,3 @@
1
1
  module Klaytn
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: klaytn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Kulp