cslrb 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93db38b6e547d150d766567c4397bff4f9755258934c063e79762c932ee5e261
4
- data.tar.gz: d39205e4a838e12054eccdd0806ff9207d0109517296881414a25de783faebf7
3
+ metadata.gz: efd03eda9b16602fefc3363fd98b7e3fa08e7f0b9d51a3dc891cd7f78cf326d0
4
+ data.tar.gz: ea8bb9a0c27969fc0b797cc741e98673e7957e1913aecca3fae8aca8c7e079eb
5
5
  SHA512:
6
- metadata.gz: b2a7330be72992b49f2fdbfd041d90a2804cfbf0b0650cb43cd612c2250e7b0555f54b16cd4999bf864119291d049fd3cac7a170836ddf1de4b9f8cddbb09e6e
7
- data.tar.gz: 13f1a4d74ad19f425d5625cbe9ce34b02b0495aa7432d9774fcedff1057c2b54f8834429577d5a15a8698263e3fd0d12ff81e6b953ed2da570ef6c51f5df458a
6
+ metadata.gz: 8ea1c4fe4ffc142f445f442cae956241c8a6cfc3ef9d41f6ec7440dd12e6f83884015222c3e795b16fbbbfa6a42aacddcabb10c1c5f063e395f64161497207ed
7
+ data.tar.gz: 28850a9021883f2b397f7431d372b8bbb690e8bb870c7135c424caad64e2bb1629e2580e4085c1764522e8b6c5bbfe1f10360f97be711eeb94f87033cdb25867
data/Cargo.toml CHANGED
@@ -8,8 +8,8 @@ edition = "2018"
8
8
 
9
9
  [dependencies]
10
10
  rutie = "0.8.2"
11
- cardano-serialization-lib = "11.4.0"
11
+ cardano-serialization-lib = "12.0.0"
12
12
 
13
13
  [lib]
14
14
  name = "cslrb"
15
- crate-type = ["dylib"]
15
+ crate-type = ["dylib"]
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cslrb (0.2.0)
4
+ cslrb (0.3.0)
5
5
  rutie (~> 0.0.4)
6
6
  thermite (~> 0.13)
7
7
 
@@ -69,4 +69,4 @@ DEPENDENCIES
69
69
  rubocop (~> 1.54)
70
70
 
71
71
  BUNDLED WITH
72
- 2.4.17
72
+ 2.2.22
data/README.md CHANGED
@@ -26,7 +26,7 @@ Or install it yourself as:
26
26
 
27
27
  ## Usage
28
28
 
29
- For example with the method `Cslrb.tx_body_from_hex` which accepts a string (TX CBOR as hex):
29
+ `cslrb` currently provides a single method, `Cslrb.tx_body_from_hex` which accepts a string (TX CBOR as hex).
30
30
 
31
31
  ```shell
32
32
  pry(main)> cbor_hex = "84a40081825820f97da637cc2e8b5b970b1952bcdc62422e82873bb0503a75ab70ed3c3476e9cc010182825839010a7bc8293ae50dd74ae399b261446abff238ea7c564ad52a52168e0b8c6663f1d8c19ba014cf7357207946d54731f2535ae8720c667cdbbc1a000f42408258390177992ea7e2b434bd4ba92e3b2c9592c0805a4552e1d2bb7a7e9c726b4b3ff6604e58320d841aa3af6d4aca9583bd3741ec93518d973a498e1a022468b3021a0002917d031a05d25734a10081825820e41c3c43e11599b056d0de12a55ef49346bb941fcafef7aad08a7b3361b4ccf55840b1fb566bacc3c5f97748dd281f65abec51c64814c289ddcd2792e094091750755542ef4cea7d423a09066486fb2ce185da6fef380dbf65fcadb9bda6c697d701f5f6"
@@ -40,7 +40,6 @@ Passing anything other than a `String` will result in an error.
40
40
 
41
41
  ```ruby
42
42
  Cslrb.tx_body_from_hex(cbor_hex)
43
- Cslrb.metadata_from_output_datum(cbor_hex)
44
43
  ```
45
44
 
46
45
  ## Development
data/lib/cslrb/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cslrb
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
5
5
  end
data/src/lib.rs CHANGED
@@ -2,7 +2,7 @@
2
2
  extern crate rutie;
3
3
 
4
4
  use cardano_serialization_lib::{Transaction};
5
- use cardano_serialization_lib::plutus::{PlutusData, PlutusDatumSchema};
5
+ use cardano_serialization_lib::{PlutusData, PlutusDatumSchema};
6
6
  use rutie::{Module, Object, RString, VM};
7
7
 
8
8
  module!(Cslrb);
@@ -19,16 +19,6 @@ methods!(
19
19
  Ok(json_string) => return RString::new_utf8(&json_string),
20
20
  Err(err) => return RString::new_utf8(&format!("Error: {}", err)),
21
21
  }
22
- },
23
- fn metadata_from_output_datum(cbor_hex: RString) -> RString {
24
- let ruby_string = cbor_hex.map_err(|e| VM::raise_ex(e) ).unwrap();
25
- let metadata = PlutusData::from_hex(&ruby_string.to_string()).unwrap();
26
- let schema = PlutusDatumSchema::BasicConversions;
27
-
28
- match metadata.to_json(schema) {
29
- Ok(json_string) => return RString::new_utf8(&json_string),
30
- Err(err) => return RString::new_utf8(&format!("Error: {}", err)),
31
- }
32
22
  }
33
23
  );
34
24
 
@@ -37,6 +27,5 @@ methods!(
37
27
  pub extern "C" fn Init_cslrb() {
38
28
  Module::from_existing("Cslrb").define(|itself| {
39
29
  itself.def_self("tx_body_from_hex", tx_body_from_hex);
40
- itself.def_self("metadata_from_output_datum", metadata_from_output_datum);
41
30
  });
42
31
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cslrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sascha Knobloch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-26 00:00:00.000000000 Z
11
+ date: 2025-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rutie