diff --git a/0.4.1/CardanoWallet.html b/0.4.1/CardanoWallet.html new file mode 100644 index 0000000..58aed91 --- /dev/null +++ b/0.4.1/CardanoWallet.html @@ -0,0 +1,215 @@ + + + + + + + Module: CardanoWallet + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Module: CardanoWallet + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet.rb,
+ lib/cardano_wallet/base.rb,
lib/cardano_wallet/misc.rb,
lib/cardano_wallet/byron.rb,
lib/cardano_wallet/utils.rb,
lib/cardano_wallet/shared.rb,
lib/cardano_wallet/shelley.rb,
lib/cardano_wallet/version.rb
+
+
+ +
+ +

Overview

+
+ +

Main module. Go to Base#initialize for more details no how to start.

+ + +
+
+
+ + +

Defined Under Namespace

+

+ + + Modules: Byron, Misc, Shared, Shelley, Utils + + + + Classes: Base + + +

+ + +

+ Constant Summary + collapse +

+ +
+ +
VERSION = + +
+
'0.4.1'
+ +
+ + + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + +
+

Class Method Details

+ + +
+

+ + .new(options = {}) ⇒ Object + + + + + +

+ + + + +
+
+
+
+17
+18
+19
+
+
# File 'lib/cardano_wallet.rb', line 17
+
+def self.new(options = {})
+  CardanoWallet::Base.new(options)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Base.html b/0.4.1/CardanoWallet/Base.html new file mode 100644 index 0000000..a843443 --- /dev/null +++ b/0.4.1/CardanoWallet/Base.html @@ -0,0 +1,707 @@ + + + + + + + Class: CardanoWallet::Base + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Base + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + +
+
Includes:
+
HTTParty
+
+ + + + + + +
+
Defined in:
+
lib/cardano_wallet/base.rb
+
+ +
+ +

Overview

+
+ +

Base class for all APIs

+ + +
+
+
+ + +
+ + + + +

Instance Attribute Summary collapse

+ + + + + + +

+ Instance Method Summary + collapse +

+ + + + + +
+

Constructor Details

+ +
+

+ + #initialize(opt = {}) ⇒ Base + + + + + +

+
+ +

Initialize CardanoWallet.

+ + +
+
+
+ +
+

Examples:

+ + +

+

Initialize CardanoWallet with default settings

+

+ +
@cw = CardanoWallet.new
+ + +

+

Initialize CardanoWallet with custom settings

+

+ +
@cw = CardanoWallet.new({ port: 4445,
+                          protocol: 'https',
+                          cacert: '/path/to/cacert',
+                          pem: '/path/to/client.pem',
+                          timeout: 600 })
+ +
+ +

Raises:

+
    + +
  • + + + (ArgumentError) + + + +
  • + +
+ +
+ + + + +
+
+
+
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+
+
# File 'lib/cardano_wallet/base.rb', line 21
+
+def initialize(opt = {})
+  raise ArgumentError, 'argument should be Hash' unless opt.is_a?(Hash)
+
+  opt[:protocol] ||= 'http'
+  opt[:host] ||= 'localhost'
+  opt[:port] ||= 8090
+  opt[:url] ||= "#{opt[:protocol]}://#{opt[:host]}:#{opt[:port]}/v2"
+  opt[:cacert] ||= ''
+  opt[:pem] ||= ''
+  opt[:timeout] ||= -1
+  self.class.base_uri opt[:url]
+  self.class.default_timeout(opt[:timeout].to_i) unless opt[:timeout] == -1
+
+  unless opt[:cacert].empty?
+    ENV['SSL_CERT_FILE'] = opt[:cacert]
+    self.class.ssl_ca_file(File.read(ENV.fetch('SSL_CERT_FILE', nil)))
+  end
+  self.class.pem(File.read(opt[:pem])) unless opt[:pem].empty?
+
+  @opt = opt
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #optObject + + + + + +

+
+ +

Returns the value of attribute opt.

+ + +
+
+
+ + +
+ + + + +
+
+
+
+9
+10
+11
+
+
# File 'lib/cardano_wallet/base.rb', line 9
+
+def opt
+  @opt
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #byronObject + + + + + +

+
+ +

Init API for Byron

+ + +
+
+
+ + +
+ + + + +
+
+
+
+54
+55
+56
+
+
# File 'lib/cardano_wallet/base.rb', line 54
+
+def byron
+  Byron.new @opt
+end
+
+
+ +
+

+ + #miscObject + + + + + +

+
+ +

Init API for Misc

+ + +
+
+
+ + +
+ + + + +
+
+
+
+59
+60
+61
+
+
# File 'lib/cardano_wallet/base.rb', line 59
+
+def misc
+  Misc.new @opt
+end
+
+
+ +
+

+ + #sharedObject + + + + + +

+
+ +

Init API for Shared wallets

+ + +
+
+
+ + +
+ + + + +
+
+
+
+49
+50
+51
+
+
# File 'lib/cardano_wallet/base.rb', line 49
+
+def shared
+  Shared.new @opt
+end
+
+
+ +
+

+ + #shelleyObject + + + + + +

+
+ +

Init API for Shelley

+ + +
+
+
+ + +
+ + + + +
+
+
+
+44
+45
+46
+
+
# File 'lib/cardano_wallet/base.rb', line 44
+
+def shelley
+  Shelley.new @opt
+end
+
+
+ +
+

+ + #utilsObject + + + + + +

+
+ +

Init API for Utils

+ + +
+
+
+ + +
+ + + + +
+
+
+
+64
+65
+66
+
+
# File 'lib/cardano_wallet/base.rb', line 64
+
+def utils
+  Utils.new @opt
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Byron.html b/0.4.1/CardanoWallet/Byron.html new file mode 100644 index 0000000..637ac9e --- /dev/null +++ b/0.4.1/CardanoWallet/Byron.html @@ -0,0 +1,204 @@ + + + + + + + Module: CardanoWallet::Byron + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Module: CardanoWallet::Byron + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/byron.rb
+
+ +
+ +

Overview

+
+ +

Byron APIs

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.byron # API for Byron
+ +
+ + +

Defined Under Namespace

+

+ + + + + Classes: Addresses, Assets, CoinSelections, Init, Migrations, Transactions, Wallets + + +

+ + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + +
+

Class Method Details

+ + +
+

+ + .new(opt) ⇒ Object + + + + + +

+ + + + +
+
+
+
+10
+11
+12
+
+
# File 'lib/cardano_wallet/byron.rb', line 10
+
+def self.new(opt)
+  Init.new opt
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Byron/Addresses.html b/0.4.1/CardanoWallet/Byron/Addresses.html new file mode 100644 index 0000000..4afbdcf --- /dev/null +++ b/0.4.1/CardanoWallet/Byron/Addresses.html @@ -0,0 +1,625 @@ + + + + + + + Class: CardanoWallet::Byron::Addresses + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Byron::Addresses + + + +

+
+ +
+
Inherits:
+
+ CardanoWallet::Base + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/byron.rb
+
+ +
+ +

Overview

+
+ +

Byron addresses

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.byron.addresses # API for Byron addresses
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from CardanoWallet::Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from CardanoWallet::Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #bulk_import(wid, addresses) ⇒ Object + + + + + +

+
+ +

Import addresses to Byron wallet.

+ + +
+
+
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    wallet id

    +
    + +
  • + +
  • + + addresses + + + (Array) + + + + — +
    +

    array of addresses

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+212
+213
+214
+215
+216
+
+
# File 'lib/cardano_wallet/byron.rb', line 212
+
+def bulk_import(wid, addresses)
+  self.class.put("/byron-wallets/#{wid}/addresses",
+                 body: { addresses: addresses }.to_json,
+                 headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #create(wid, params) ⇒ Object + + + + + +

+
+ +

Create address for Byron random wallet.

+ + +
+
+
+ +
+

Examples:

+ + +

+

Create address with index.

+

+ +
@cw.byron.addresses.create(wid, {passphrase: "Secure Passphrase", address_index: 2147483648})
+ + +

+

Create address with random index.

+

+ +
@cw.byron.addresses.create(wid, {passphrase: "Secure Passphrase"})
+ +
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    wallet id

    +
    + +
  • + +
  • + + params + + + (Hash) + + + + — +
    +

    passphrase and (optional) address_index

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+193
+194
+195
+196
+197
+198
+
+
# File 'lib/cardano_wallet/byron.rb', line 193
+
+def create(wid, params)
+  Utils.verify_param_is_hash!(params)
+  self.class.post("/byron-wallets/#{wid}/addresses",
+                  body: params.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #import(wid, addr_id) ⇒ Object + + + + + +

+
+ +

Import address to Byron wallet.

+ + +
+
+
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    wallet id

    +
    + +
  • + +
  • + + addr_id + + + (String) + + + + — +
    +

    address id

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+204
+205
+206
+
+
# File 'lib/cardano_wallet/byron.rb', line 204
+
+def import(wid, addr_id)
+  self.class.put("/byron-wallets/#{wid}/addresses/#{addr_id}")
+end
+
+
+ +
+

+ + #list(wid, query = {}) ⇒ Object + + + + + +

+
+ +

List Byron addresses.

+ + +
+
+
+ +
+

Examples:

+ + +
@cw.byron.addresses.list(wid, {state: "used"})
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+179
+180
+181
+182
+
+
# File 'lib/cardano_wallet/byron.rb', line 179
+
+def list(wid, query = {})
+  query_formatted = query.empty? ? '' : Utils.to_query(query)
+  self.class.get("/byron-wallets/#{wid}/addresses#{query_formatted}")
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Byron/Assets.html b/0.4.1/CardanoWallet/Byron/Assets.html new file mode 100644 index 0000000..1c9af16 --- /dev/null +++ b/0.4.1/CardanoWallet/Byron/Assets.html @@ -0,0 +1,273 @@ + + + + + + + Class: CardanoWallet::Byron::Assets + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Byron::Assets + + + +

+
+ +
+
Inherits:
+
+ CardanoWallet::Base + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/byron.rb
+
+ +
+ +

Overview

+
+ +

Init for Byron assets APIs

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.byron.assets # API for Byron assets
+ +
+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from CardanoWallet::Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from CardanoWallet::Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #get(wid, policy_id = nil, asset_name = nil) ⇒ Object + + + + + +

+
+ + +
+
+
+ +
+

Examples:

+ + +

+

Get all assets that were ever involved in wallet transaction and been on balance

+

+ +
@cw.byron.assets.get(wallet_id)
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+73
+74
+75
+76
+77
+78
+
+
# File 'lib/cardano_wallet/byron.rb', line 73
+
+def get(wid, policy_id = nil, asset_name = nil)
+  ep = "/byron-wallets/#{wid}/assets"
+  ep += "/#{policy_id}" if policy_id
+  ep += "/#{asset_name}" if asset_name
+  self.class.get(ep)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Byron/CoinSelections.html b/0.4.1/CardanoWallet/Byron/CoinSelections.html new file mode 100644 index 0000000..6735833 --- /dev/null +++ b/0.4.1/CardanoWallet/Byron/CoinSelections.html @@ -0,0 +1,289 @@ + + + + + + + Class: CardanoWallet::Byron::CoinSelections + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Byron::CoinSelections + + + +

+
+ +
+
Inherits:
+
+ CardanoWallet::Base + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/byron.rb
+
+ +
+ +

Overview

+
+ +

API for CoinSelections

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.byron.coin_selections # API for Byron coin_selections
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from CardanoWallet::Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from CardanoWallet::Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #random(wid, payments) ⇒ Object + + + + + +

+
+ +

Show random coin selection for particular payment

+ + +
+
+
+ +
+

Examples:

+ + +
@cw.byron.coin_selections.random(wid, [{addr1: 1000000}, {addr2: 1000000}])
+@cw.byron.coin_selections.random(wid, [{ "address": "addr1..",
+               "amount": { "quantity": 42000000, "unit": "lovelace" },
+               "assets": [{"policy_id": "pid", "asset_name": "name", "quantity": 0 } ] } ])
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+
+
# File 'lib/cardano_wallet/byron.rb', line 233
+
+def random(wid, payments)
+  Utils.verify_param_is_array!(payments)
+  payments_formatted = if payments.any? { |p| p.key?(:address) || p.key?('address') }
+                         payments
+                       else
+                         Utils.format_payments(payments)
+                       end
+  self.class.post("/byron-wallets/#{wid}/coin-selections/random",
+                  body: { payments: payments_formatted }.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Byron/Init.html b/0.4.1/CardanoWallet/Byron/Init.html new file mode 100644 index 0000000..9d1668b --- /dev/null +++ b/0.4.1/CardanoWallet/Byron/Init.html @@ -0,0 +1,620 @@ + + + + + + + Class: CardanoWallet::Byron::Init + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Byron::Init + + + +

+
+ +
+
Inherits:
+
+ CardanoWallet::Base + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/byron.rb
+
+ +
+ +

Overview

+
+ +

Init class for Byron APIs.

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.byron.wallets # API for Byron wallets
+@cw.byron.assets # API for Byron assets
+@cw.byron.coin_selections # API for Byron coin_selections
+@cw.byron.addresses # API for Byron addresses
+@cw.byron.transactions # API for Byron transactions
+@cw.byron.migrations # API for Byron migrations
+ +
+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from CardanoWallet::Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from CardanoWallet::Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #addressesObject + + + + + +

+
+ +

Get API for Byron addresses

+ + +
+
+ + + + + +
+
+
+
+33
+34
+35
+
+
# File 'lib/cardano_wallet/byron.rb', line 33
+
+def addresses
+  Addresses.new @opt
+end
+
+
+ +
+

+ + #assetsObject + + + + + +

+
+ +

API for Assets

+ + +
+
+ + + + + +
+
+
+
+57
+58
+59
+
+
# File 'lib/cardano_wallet/byron.rb', line 57
+
+def assets
+  Assets.new @opt
+end
+
+
+ +
+

+ + #coin_selectionsObject + + + + + +

+
+ +

API for CoinSelections

+ + +
+
+ + + + + +
+
+
+
+39
+40
+41
+
+
# File 'lib/cardano_wallet/byron.rb', line 39
+
+def coin_selections
+  CoinSelections.new @opt
+end
+
+
+ +
+

+ + #migrationsObject + + + + + +

+
+ +

Get API for Byron migrations

+ + +
+
+ + + + + +
+
+
+
+51
+52
+53
+
+
# File 'lib/cardano_wallet/byron.rb', line 51
+
+def migrations
+  Migrations.new @opt
+end
+
+
+ +
+

+ + #transactionsObject + + + + + +

+
+ +

Get API for Byron transactions

+ + +
+
+ + + + + +
+
+
+
+45
+46
+47
+
+
# File 'lib/cardano_wallet/byron.rb', line 45
+
+def transactions
+  Transactions.new @opt
+end
+
+
+ +
+

+ + #walletsObject + + + + + +

+
+ +

Get API for Byron wallets

+ + +
+
+ + + + + +
+
+
+
+27
+28
+29
+
+
# File 'lib/cardano_wallet/byron.rb', line 27
+
+def wallets
+  Wallets.new @opt
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Byron/Migrations.html b/0.4.1/CardanoWallet/Byron/Migrations.html new file mode 100644 index 0000000..0ec59de --- /dev/null +++ b/0.4.1/CardanoWallet/Byron/Migrations.html @@ -0,0 +1,396 @@ + + + + + + + Class: CardanoWallet::Byron::Migrations + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Byron::Migrations + + + +

+
+ +
+
Inherits:
+
+ CardanoWallet::Base + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/byron.rb
+
+ +
+ +

Overview

+
+ +

Byron migrations

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.byron.migrations # API for Byron Migrations
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from CardanoWallet::Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from CardanoWallet::Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #migrate(wid, passphrase, addresses) ⇒ Object + + + + + +

+
+ +

Migrate all funds from Byron wallet.

+ + +
+
+
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    wallet id

    +
    + +
  • + +
  • + + passphrase + + + (String) + + + + — +
    +

    wallet’s passphrase

    +
    + +
  • + +
  • + + array + + + (Array) + + + + — +
    +

    of addresses

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+385
+386
+387
+388
+389
+390
+
+
# File 'lib/cardano_wallet/byron.rb', line 385
+
+def migrate(wid, passphrase, addresses)
+  self.class.post("/byron-wallets/#{wid}/migrations",
+                  body: { addresses: addresses,
+                          passphrase: passphrase }.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #plan(wid, addresses) ⇒ Object + + + + + +

+
+ +

Get migration plan

+ + +
+
+ + + + + +
+
+
+
+374
+375
+376
+377
+378
+
+
# File 'lib/cardano_wallet/byron.rb', line 374
+
+def plan(wid, addresses)
+  self.class.post("/byron-wallets/#{wid}/migrations/plan",
+                  body: { addresses: addresses }.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Byron/Transactions.html b/0.4.1/CardanoWallet/Byron/Transactions.html new file mode 100644 index 0000000..a8707a2 --- /dev/null +++ b/0.4.1/CardanoWallet/Byron/Transactions.html @@ -0,0 +1,1100 @@ + + + + + + + Class: CardanoWallet::Byron::Transactions + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Byron::Transactions + + + +

+
+ +
+
Inherits:
+
+ CardanoWallet::Base + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/byron.rb
+
+ +
+ +

Overview

+
+ +

Byron transactions

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.byron.transactions # API for Byron Transactions
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from CardanoWallet::Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from CardanoWallet::Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #construct(wid, payments = nil, metadata = nil, mint = nil, validity_interval = nil) ⇒ Object + + + + + +

+
+ +

Construct transaction

+ + +
+
+
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    source wallet id

    +
    + +
  • + +
  • + + payments + + + (Array of Hashes) + + + (defaults to: nil) + + + — +
    +

    full payments payload with assets

    +
    + +
  • + +
  • + + metadata + + + (Hash) + + + (defaults to: nil) + + + — + + +
  • + +
  • + + mint + + + (Array of Hashes) + + + (defaults to: nil) + + + — +
    +

    mint object

    +
    + +
  • + +
  • + + validity_interval + + + (Hash) + + + (defaults to: nil) + + + — +
    +

    validity_interval object

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+
+
# File 'lib/cardano_wallet/byron.rb', line 259
+
+def construct(wid, payments = nil,  = nil, mint = nil, validity_interval = nil)
+  payload = {}
+  payload[:payments] = payments if payments
+  payload[:metadata] =  if 
+  payload[:mint] = mint if mint
+  payload[:validity_interval] = validity_interval if validity_interval
+
+  self.class.post("/byron-wallets/#{wid}/transactions-construct",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #create(wid, passphrase, payments) ⇒ Object + + + + + +

+
+ +

Create a transaction from the Byron wallet.

+ + +
+
+
+ +
+

Examples:

+ + +
@cw.byron.transactions.create(wid, passphrase, [{addr1: 1000000}, {addr2: 1000000}])
+@cw.byron.transactions.create(wid, passphrase, [{ "address": "addr1..",
+                           "amount": { "quantity": 42000000, "unit": "lovelace" },
+                           "assets": [{"policy_id": "pid", "asset_name": "name", "quantity": 0 } ] } ])
+ +
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    source wallet id

    +
    + +
  • + +
  • + + passphrase + + + (String) + + + + — +
    +

    source wallet’s passphrase

    +
    + +
  • + +
  • + + payments + + + (Array of Hashes) + + + + — +
    +

    addres, amount pair

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+
+
# File 'lib/cardano_wallet/byron.rb', line 326
+
+def create(wid, passphrase, payments)
+  Utils.verify_param_is_array!(payments)
+  payments_formatted = if payments.any? { |p| p.key?(:address) || p.key?('address') }
+                         payments
+                       else
+                         Utils.format_payments(payments)
+                       end
+  self.class.post("/byron-wallets/#{wid}/transactions",
+                  body: { payments: payments_formatted,
+                          passphrase: passphrase }.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #forget(wid, txid) ⇒ Object + + + + + +

+
+ +

Forget a transaction.

+ + +
+
+ + + + + +
+
+
+
+361
+362
+363
+
+
# File 'lib/cardano_wallet/byron.rb', line 361
+
+def forget(wid, txid)
+  self.class.delete("/byron-wallets/#{wid}/transactions/#{txid}")
+end
+
+
+ +
+

+ + #get(wid, tx_id) ⇒ Object + + + + + +

+
+ +

Get tx by id

+ + +
+
+ + + + + +
+
+
+
+300
+301
+302
+
+
# File 'lib/cardano_wallet/byron.rb', line 300
+
+def get(wid, tx_id)
+  self.class.get("/byron-wallets/#{wid}/transactions/#{tx_id}")
+end
+
+
+ +
+

+ + #list(wid, query = {}) ⇒ Object + + + + + +

+
+ +

List all Byron wallet’s transactions.

+ + +
+
+
+ +
+

Examples:

+ + +
@cw.byron.transactions.list(wid, {start: "2012-09-25T10:15:00Z", order: "descending"})
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+309
+310
+311
+312
+
+
# File 'lib/cardano_wallet/byron.rb', line 309
+
+def list(wid, query = {})
+  query_formatted = query.empty? ? '' : Utils.to_query(query)
+  self.class.get("/byron-wallets/#{wid}/transactions#{query_formatted}")
+end
+
+
+ +
+

+ + #payment_fees(wid, payments) ⇒ Object + + + + + +

+
+ +

Estimate fees for transaction

+ + +
+
+
+ +
+

Examples:

+ + +
@cw.byron.transactions.payment_fees(wid, [{addr1: 1000000}, {addr2: 1000000}])
+@cw.byron.transactions.payment_fees(wid, [{ "address": "addr1..",
+                     "amount": { "quantity": 42000000, "unit": "lovelace" },
+                     "assets": [{"policy_id": "pid", "asset_name": "name", "quantity": 0 } ] } ])
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+
+
# File 'lib/cardano_wallet/byron.rb', line 347
+
+def payment_fees(wid, payments)
+  Utils.verify_param_is_array!(payments)
+  payments_formatted = if payments.any? { |p| p.key?(:address) || p.key?('address') }
+                         payments
+                       else
+                         Utils.format_payments(payments)
+                       end
+  self.class.post("/byron-wallets/#{wid}/payment-fees",
+                  body: { payments: payments_formatted }.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #sign(wid, passphrase, transaction) ⇒ Object + + + + + +

+
+ +

Sign transaction

+ + +
+
+
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    source wallet id

    +
    + +
  • + +
  • + + passphrase + + + (String) + + + + — +
    +

    wallet’s passphrase

    +
    + +
  • + +
  • + + transaction + + + (String) + + + + — +
    +

    CBOR transaction data

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+
+
# File 'lib/cardano_wallet/byron.rb', line 276
+
+def sign(wid, passphrase, transaction)
+  payload = {
+    'passphrase' => passphrase,
+    'transaction' => transaction
+  }
+
+  self.class.post("/byron-wallets/#{wid}/transactions-sign",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #submit(wid, transaction) ⇒ Object + + + + + +

+
+ +

Submit transaction

+ + +
+
+
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    source wallet id

    +
    + +
  • + +
  • + + transaction + + + (String) + + + + — +
    +

    CBOR transaction data

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+291
+292
+293
+294
+295
+296
+
+
# File 'lib/cardano_wallet/byron.rb', line 291
+
+def submit(wid, transaction)
+  payload = { 'transaction' => transaction }
+  self.class.post("/byron-wallets/#{wid}/transactions-submit",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Byron/Wallets.html b/0.4.1/CardanoWallet/Byron/Wallets.html new file mode 100644 index 0000000..696e83c --- /dev/null +++ b/0.4.1/CardanoWallet/Byron/Wallets.html @@ -0,0 +1,861 @@ + + + + + + + Class: CardanoWallet::Byron::Wallets + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Byron::Wallets + + + +

+
+ +
+
Inherits:
+
+ CardanoWallet::Base + + + show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/byron.rb
+
+ +
+ +

Overview

+
+ +

Byron wallets

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.byron.wallets # API for Byron wallets
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from CardanoWallet::Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from CardanoWallet::Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #create(params) ⇒ Object + + + + + +

+
+ +

Create a Byron wallet based on the params.

+ + +
+
+
+ +
+

Examples:

+ + +
create({style: "random",
+        name: "Random Wallet from mnemonic_sentence",
+        passphrase: "Secure Passphrase",
+        mnemonic_sentence: %w[arctic decade pizza ...],
+       })
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+112
+113
+114
+115
+116
+117
+
+
# File 'lib/cardano_wallet/byron.rb', line 112
+
+def create(params)
+  Utils.verify_param_is_hash!(params)
+  self.class.post('/byron-wallets',
+                  body: params.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #delete(wid) ⇒ Object + + + + + +

+
+ +

Delete Byron wallet

+ + +
+
+
+ +
+

Examples:

+ + +

+

Delete Byron wallet

+

+ +
@cw.byron.wallets.delete(wallet_id)
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+123
+124
+125
+
+
# File 'lib/cardano_wallet/byron.rb', line 123
+
+def delete(wid)
+  self.class.delete("/byron-wallets/#{wid}")
+end
+
+
+ +
+

+ + #get(wid) ⇒ Object + + + + + +

+
+ +

Get Byron wallet details

+ + +
+
+
+ +
+

Examples:

+ + +

+

Get Byron wallet details

+

+ +
@cw.byron.wallets.get(wallet_id)
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+99
+100
+101
+
+
# File 'lib/cardano_wallet/byron.rb', line 99
+
+def get(wid)
+  self.class.get("/byron-wallets/#{wid}")
+end
+
+
+ +
+

+ + #listObject + + + + + +

+
+ +

List Byron wallets

+ + +
+
+
+ +
+

Examples:

+ + +

+

Get all Byron wallets

+

+ +
@cw.byron.wallets.get
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+91
+92
+93
+
+
# File 'lib/cardano_wallet/byron.rb', line 91
+
+def list
+  self.class.get('/byron-wallets')
+end
+
+
+ +
+

+ + #update_metadata(wid, params) ⇒ Object + + + + + +

+
+ +

Update Byron wallet’s metadata

+ + +
+
+
+ +
+

Examples:

+ + +
@cw.byron.wallets.(wid, {name: "New wallet name"})
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+132
+133
+134
+135
+136
+137
+
+
# File 'lib/cardano_wallet/byron.rb', line 132
+
+def (wid, params)
+  Utils.verify_param_is_hash!(params)
+  self.class.put("/byron-wallets/#{wid}",
+                 body: params.to_json,
+                 headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #update_passphrase(wid, params) ⇒ Object + + + + + +

+
+ +

Update Byron wallet’s passphrase.

+ + +
+
+
+ +
+

Examples:

+ + +
@cw.byron.wallets.update_passphrase(wid, {old_passphrase: "Secure Passphrase",
+                                          new_passphrase: "Securer Passphrase"})
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+160
+161
+162
+163
+164
+165
+
+
# File 'lib/cardano_wallet/byron.rb', line 160
+
+def update_passphrase(wid, params)
+  Utils.verify_param_is_hash!(params)
+  self.class.put("/byron-wallets/#{wid}/passphrase",
+                 body: params.to_json,
+                 headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #utxo(wid) ⇒ Object + + + + + +

+
+ +

See Byron wallet’s utxo distribution

+ + +
+
+
+ +
+

Examples:

+ + +
@cw.byron.wallets.utxo(wallet_id)
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+143
+144
+145
+
+
# File 'lib/cardano_wallet/byron.rb', line 143
+
+def utxo(wid)
+  self.class.get("/byron-wallets/#{wid}/statistics/utxos")
+end
+
+
+ +
+

+ + #utxo_snapshot(wid) ⇒ Object + + + + + +

+
+ + +
+
+
+ +
+

Examples:

+ + +
@cw.byron.wallets.utxo_snapshot(wallet_id)
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+150
+151
+152
+
+
# File 'lib/cardano_wallet/byron.rb', line 150
+
+def utxo_snapshot(wid)
+  self.class.get("/byron-wallets/#{wid}/utxo")
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Misc.html b/0.4.1/CardanoWallet/Misc.html new file mode 100644 index 0000000..fd4596f --- /dev/null +++ b/0.4.1/CardanoWallet/Misc.html @@ -0,0 +1,204 @@ + + + + + + + Module: CardanoWallet::Misc + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Module: CardanoWallet::Misc + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/misc.rb
+
+ +
+ +

Overview

+
+ +

Misc

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.misc
+ +
+ + +

Defined Under Namespace

+

+ + + + + Classes: Init, Network, Node, Proxy, Settings, Utils + + +

+ + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + +
+

Class Method Details

+ + +
+

+ + .new(opt) ⇒ Object + + + + + +

+ + + + +
+
+
+
+10
+11
+12
+
+
# File 'lib/cardano_wallet/misc.rb', line 10
+
+def self.new(opt)
+  Init.new opt
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Misc/Init.html b/0.4.1/CardanoWallet/Misc/Init.html new file mode 100644 index 0000000..b926f67 --- /dev/null +++ b/0.4.1/CardanoWallet/Misc/Init.html @@ -0,0 +1,518 @@ + + + + + + + Class: CardanoWallet::Misc::Init + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Misc::Init + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/misc.rb
+
+ +
+ +

Overview

+
+ +

Base Class for Misc API

+ + +
+
+
+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #networkObject + + + + + +

+
+ +

Call API for Network

+ + +
+
+ + + + + +
+
+
+
+19
+20
+21
+
+
# File 'lib/cardano_wallet/misc.rb', line 19
+
+def network
+  Network.new @opt
+end
+
+
+ +
+

+ + #nodeObject + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+39
+40
+41
+
+
# File 'lib/cardano_wallet/misc.rb', line 39
+
+def node
+  Node.new @opt
+end
+
+
+ +
+

+ + #proxyObject + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+29
+30
+31
+
+
# File 'lib/cardano_wallet/misc.rb', line 29
+
+def proxy
+  Proxy.new @opt
+end
+
+
+ +
+

+ + #settingsObject + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+34
+35
+36
+
+
# File 'lib/cardano_wallet/misc.rb', line 34
+
+def settings
+  Settings.new @opt
+end
+
+
+ +
+

+ + #utilsObject + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+24
+25
+26
+
+
# File 'lib/cardano_wallet/misc.rb', line 24
+
+def utils
+  Utils.new @opt
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Misc/Network.html b/0.4.1/CardanoWallet/Misc/Network.html new file mode 100644 index 0000000..7f73002 --- /dev/null +++ b/0.4.1/CardanoWallet/Misc/Network.html @@ -0,0 +1,406 @@ + + + + + + + Class: CardanoWallet::Misc::Network + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Misc::Network + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/misc.rb
+
+ +
+ +

Overview

+
+ +

API for Network

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.misc.network
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #clockObject + + + + + +

+
+ +

Check network clock

+ + +
+
+ + + + + +
+
+
+
+89
+90
+91
+
+
# File 'lib/cardano_wallet/misc.rb', line 89
+
+def clock
+  self.class.get('/network/clock')
+end
+
+
+ +
+

+ + #informationObject + + + + + +

+
+ +

Get network information

+ + +
+
+ + + + + +
+
+
+
+83
+84
+85
+
+
# File 'lib/cardano_wallet/misc.rb', line 83
+
+def information
+  self.class.get('/network/information')
+end
+
+
+ +
+

+ + #parametersObject + + + + + +

+
+ +

Check network parameters

+ + +
+
+ + + + + +
+
+
+
+95
+96
+97
+
+
# File 'lib/cardano_wallet/misc.rb', line 95
+
+def parameters
+  self.class.get('/network/parameters')
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Misc/Node.html b/0.4.1/CardanoWallet/Misc/Node.html new file mode 100644 index 0000000..60bf16f --- /dev/null +++ b/0.4.1/CardanoWallet/Misc/Node.html @@ -0,0 +1,256 @@ + + + + + + + Class: CardanoWallet::Misc::Node + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Misc::Node + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/misc.rb
+
+ +
+ +

Overview

+
+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.misc.node
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #block_headerObject + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+50
+51
+52
+
+
# File 'lib/cardano_wallet/misc.rb', line 50
+
+def block_header
+  self.class.get('/blocks/latest/header')
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Misc/Proxy.html b/0.4.1/CardanoWallet/Misc/Proxy.html new file mode 100644 index 0000000..50aa133 --- /dev/null +++ b/0.4.1/CardanoWallet/Misc/Proxy.html @@ -0,0 +1,284 @@ + + + + + + + Class: CardanoWallet::Misc::Proxy + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Misc::Proxy + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/misc.rb
+
+ +
+ +

Overview

+
+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.misc.proxy
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #submit_external_transaction(binary_blob) ⇒ Object + + + + + +

+
+ +

Submit a transaction that was created and signed outside of cardano-wallet.

+ + +
+
+
+

Parameters:

+
    + +
  • + + binary_blob + + + (String) + + + + — +
    +

    Signed transaction message binary blob.

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+153
+154
+155
+156
+157
+
+
# File 'lib/cardano_wallet/misc.rb', line 153
+
+def submit_external_transaction(binary_blob)
+  self.class.post('/proxy/transactions',
+                  body: binary_blob,
+                  headers: { 'Content-Type' => 'application/octet-stream' })
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Misc/Settings.html b/0.4.1/CardanoWallet/Misc/Settings.html new file mode 100644 index 0000000..6b16fd0 --- /dev/null +++ b/0.4.1/CardanoWallet/Misc/Settings.html @@ -0,0 +1,332 @@ + + + + + + + Class: CardanoWallet::Misc::Settings + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Misc::Settings + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/misc.rb
+
+ +
+ +

Overview

+
+ +

API for Network

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.misc.settings
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #getObject + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+62
+63
+64
+
+
# File 'lib/cardano_wallet/misc.rb', line 62
+
+def get
+  self.class.get('/settings')
+end
+
+
+ +
+

+ + #update(params) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+67
+68
+69
+70
+71
+72
+
+
# File 'lib/cardano_wallet/misc.rb', line 67
+
+def update(params)
+  CardanoWallet::Utils.verify_param_is_hash!(params)
+  self.class.put('/settings',
+                 body: { 'settings' => params }.to_json,
+                 headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Misc/Utils.html b/0.4.1/CardanoWallet/Misc/Utils.html new file mode 100644 index 0000000..87b6c01 --- /dev/null +++ b/0.4.1/CardanoWallet/Misc/Utils.html @@ -0,0 +1,560 @@ + + + + + + + Class: CardanoWallet::Misc::Utils + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Misc::Utils + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/misc.rb
+
+ +
+ +

Overview

+
+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.misc.utils
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #addresses(address_id) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+121
+122
+123
+
+
# File 'lib/cardano_wallet/misc.rb', line 121
+
+def addresses(address_id)
+  self.class.get("/addresses/#{address_id}")
+end
+
+
+ +
+

+ + #get_public_key(wid, role, index) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+116
+117
+118
+
+
# File 'lib/cardano_wallet/misc.rb', line 116
+
+def get_public_key(wid, role, index)
+  self.class.get("/wallets/#{wid}/keys/#{role}/#{index}")
+end
+
+
+ +
+

+ + #post_address(payload) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+126
+127
+128
+129
+130
+131
+132
+
+
# File 'lib/cardano_wallet/misc.rb', line 126
+
+def post_address(payload)
+  CardanoWallet::Utils.verify_param_is_hash!(payload)
+  self.class.post('/addresses',
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json',
+                             'Accept' => 'application/json' })
+end
+
+
+ +
+

+ + #sign_metadata(wid, role, index, pass, metadata) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+106
+107
+108
+109
+110
+111
+112
+113
+
+
# File 'lib/cardano_wallet/misc.rb', line 106
+
+def (wid, role, index, pass, )
+  payload = { passphrase: pass }
+  payload[:metadata] =  if 
+
+  self.class.post("/wallets/#{wid}/signatures/#{role}/#{index}",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #smash_health(query = {}) ⇒ Object + + + + + +

+
+ +

Current SMASH health

+ + +
+
+
+ +
+

Examples:

+ + +
smash_health({url: "https://smash.cardano-mainnet.iohk.io/"})
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+139
+140
+141
+142
+
+
# File 'lib/cardano_wallet/misc.rb', line 139
+
+def smash_health(query = {})
+  query_formatted = query.empty? ? '' : CardanoWallet::Utils.to_query(query)
+  self.class.get("/smash/health#{query_formatted}")
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Shared.html b/0.4.1/CardanoWallet/Shared.html new file mode 100644 index 0000000..c41a218 --- /dev/null +++ b/0.4.1/CardanoWallet/Shared.html @@ -0,0 +1,204 @@ + + + + + + + Module: CardanoWallet::Shared + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Module: CardanoWallet::Shared + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/shared.rb
+
+ +
+ +

Overview

+
+ +

Init API for Shelley Shared wallets

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.shared # API for Shared
+ +
+ + +

Defined Under Namespace

+

+ + + + + Classes: Addresses, Init, Keys, Transactions, Wallets + + +

+ + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + +
+

Class Method Details

+ + +
+

+ + .new(opt) ⇒ Object + + + + + +

+ + + + +
+
+
+
+9
+10
+11
+
+
# File 'lib/cardano_wallet/shared.rb', line 9
+
+def self.new(opt)
+  Init.new opt
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Shared/Addresses.html b/0.4.1/CardanoWallet/Shared/Addresses.html new file mode 100644 index 0000000..3c2f62d --- /dev/null +++ b/0.4.1/CardanoWallet/Shared/Addresses.html @@ -0,0 +1,260 @@ + + + + + + + Class: CardanoWallet::Shared::Addresses + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Shared::Addresses + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/shared.rb
+
+ +
+ +

Overview

+
+ +

API for Addresses

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.shared.addresses # API for Shared addresses
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #list(wid, query = {}) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+142
+143
+144
+145
+
+
# File 'lib/cardano_wallet/shared.rb', line 142
+
+def list(wid, query = {})
+  query_formatted = query.empty? ? '' : Utils.to_query(query)
+  self.class.get("/shared-wallets/#{wid}/addresses#{query_formatted}")
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Shared/Init.html b/0.4.1/CardanoWallet/Shared/Init.html new file mode 100644 index 0000000..ca34058 --- /dev/null +++ b/0.4.1/CardanoWallet/Shared/Init.html @@ -0,0 +1,454 @@ + + + + + + + Class: CardanoWallet::Shared::Init + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Shared::Init + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/shared.rb
+
+ +
+ +

Overview

+
+ +

Base class for Shelley Shared Wallets API

+ + +
+
+
+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #addressesObject + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+29
+30
+31
+
+
# File 'lib/cardano_wallet/shared.rb', line 29
+
+def addresses
+  Addresses.new @opt
+end
+
+
+ +
+

+ + #keysObject + + + + + +

+
+ +

Call API for Shared Keys

+ + +
+
+ + + + + +
+
+
+
+24
+25
+26
+
+
# File 'lib/cardano_wallet/shared.rb', line 24
+
+def keys
+  Keys.new @opt
+end
+
+
+ +
+

+ + #transactionsObject + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+34
+35
+36
+
+
# File 'lib/cardano_wallet/shared.rb', line 34
+
+def transactions
+  Transactions.new @opt
+end
+
+
+ +
+

+ + #walletsObject + + + + + +

+
+ +

Call API for Wallets

+ + +
+
+ + + + + +
+
+
+
+18
+19
+20
+
+
# File 'lib/cardano_wallet/shared.rb', line 18
+
+def wallets
+  Wallets.new @opt
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Shared/Keys.html b/0.4.1/CardanoWallet/Shared/Keys.html new file mode 100644 index 0000000..f7f9b9a --- /dev/null +++ b/0.4.1/CardanoWallet/Shared/Keys.html @@ -0,0 +1,406 @@ + + + + + + + Class: CardanoWallet::Shared::Keys + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Shared::Keys + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/shared.rb
+
+ +
+ +

Overview

+
+ +

API for Keys

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.shared.keys # API for Shared Keys
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #create_acc_public_key(wid, index, payload) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+161
+162
+163
+164
+165
+166
+167
+
+
# File 'lib/cardano_wallet/shared.rb', line 161
+
+def create_acc_public_key(wid, index, payload)
+  # payload = { passphrase: pass, format: format }
+  Utils.verify_param_is_hash!(payload)
+  self.class.post("/shared-wallets/#{wid}/keys/#{index}",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #get_acc_public_key(wid, query = {}) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+170
+171
+172
+173
+
+
# File 'lib/cardano_wallet/shared.rb', line 170
+
+def get_acc_public_key(wid, query = {})
+  query_formatted = query.empty? ? '' : Utils.to_query(query)
+  self.class.get("/shared-wallets/#{wid}/keys#{query_formatted}")
+end
+
+
+ +
+

+ + #get_public_key(wid, role, index, hash = {}) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+155
+156
+157
+158
+
+
# File 'lib/cardano_wallet/shared.rb', line 155
+
+def get_public_key(wid, role, index, hash = {})
+  hash_query = hash.empty? ? '' : Utils.to_query(hash)
+  self.class.get("/shared-wallets/#{wid}/keys/#{role}/#{index}#{hash_query}")
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Shared/Transactions.html b/0.4.1/CardanoWallet/Shared/Transactions.html new file mode 100644 index 0000000..23521c9 --- /dev/null +++ b/0.4.1/CardanoWallet/Shared/Transactions.html @@ -0,0 +1,986 @@ + + + + + + + Class: CardanoWallet::Shared::Transactions + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Shared::Transactions + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/shared.rb
+
+ +
+ +

Overview

+
+ +

API for Transactions

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.shared.transactions # API for Shared transactions
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #construct(wid, payments = nil, withdrawal = nil, metadata = nil, delegations = nil, mint = nil, validity_interval = nil, encoding = nil) ⇒ Object + + + + + +

+
+ +

Construct transaction

+ + +
+
+
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    source wallet id

    +
    + +
  • + +
  • + + payments + + + (Array of Hashes) + + + (defaults to: nil) + + + — +
    +

    full payments payload with assets

    +
    + +
  • + +
  • + + withdrawal + + + (String or Array) + + + (defaults to: nil) + + + — +
    +

    ‘self’ or mnemonic sentence

    +
    + +
  • + +
  • + + metadata + + + (Hash) + + + (defaults to: nil) + + + — + + +
  • + +
  • + + mint + + + (Array of Hashes) + + + (defaults to: nil) + + + — +
    +

    mint object

    +
    + +
  • + +
  • + + delegations + + + (Array of Hashes) + + + (defaults to: nil) + + + — +
    +

    delegations object

    +
    + +
  • + +
  • + + validity_interval + + + (Hash) + + + (defaults to: nil) + + + — +
    +

    validity_interval object

    +
    + +
  • + +
  • + + encoding + + + (String) + + + (defaults to: nil) + + + — +
    +

    output encoding (“base16” or “base64”)

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+
+
# File 'lib/cardano_wallet/shared.rb', line 55
+
+def construct(wid,
+              payments = nil,
+              withdrawal = nil,
+               = nil,
+              delegations = nil,
+              mint = nil,
+              validity_interval = nil,
+              encoding = nil)
+  payload = {}
+  payload[:payments] = payments if payments
+  payload[:withdrawal] = withdrawal if withdrawal
+  payload[:metadata] =  if 
+  payload[:mint_burn] = mint if mint
+  payload[:delegations] = delegations if delegations
+  payload[:validity_interval] = validity_interval if validity_interval
+  payload[:encoding] = encoding if encoding
+
+  self.class.post("/shared-wallets/#{wid}/transactions-construct",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #decode(wid, transaction) ⇒ Object + + + + + +

+
+ +

Decode transaction

+ + +
+
+
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    source wallet id

    +
    + +
  • + +
  • + + transaction + + + (String) + + + + — +
    +

    CBOR base64|base16 encoded transaction

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+81
+82
+83
+84
+85
+86
+87
+
+
# File 'lib/cardano_wallet/shared.rb', line 81
+
+def decode(wid, transaction)
+  payload = {}
+  payload[:transaction] = transaction
+  self.class.post("/shared-wallets/#{wid}/transactions-decode",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #get(wid, tx_id, query = {}) ⇒ Object + + + + + +

+
+ +

Get tx by id

+ + +
+
+ + + + + +
+
+
+
+119
+120
+121
+122
+
+
# File 'lib/cardano_wallet/shared.rb', line 119
+
+def get(wid, tx_id, query = {})
+  query_formatted = query.empty? ? '' : Utils.to_query(query)
+  self.class.get("/shared-wallets/#{wid}/transactions/#{tx_id}#{query_formatted}")
+end
+
+
+ +
+

+ + #list(wid, query = {}) ⇒ Object + + + + + +

+
+ +

List all wallet’s transactions

+ + +
+
+
+ +
+

Examples:

+ + +
list(wid, {start: "2012-09-25T10:15:00Z", order: "descending"})
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+129
+130
+131
+132
+
+
# File 'lib/cardano_wallet/shared.rb', line 129
+
+def list(wid, query = {})
+  query_formatted = query.empty? ? '' : Utils.to_query(query)
+  self.class.get("/shared-wallets/#{wid}/transactions#{query_formatted}")
+end
+
+
+ +
+

+ + #sign(wid, passphrase, transaction, encoding = nil) ⇒ Object + + + + + +

+
+ +

Sign transaction

+ + +
+
+
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    source wallet id

    +
    + +
  • + +
  • + + passphrase + + + (String) + + + + — +
    +

    wallet’s passphrase

    +
    + +
  • + +
  • + + transaction + + + (String) + + + + — +
    +

    CBOR transaction data

    +
    + +
  • + +
  • + + encoding + + + (String) + + + (defaults to: nil) + + + — +
    +

    output encoding (“base16” or “base64”)

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+
+
# File 'lib/cardano_wallet/shared.rb', line 95
+
+def sign(wid, passphrase, transaction, encoding = nil)
+  payload = {
+    'passphrase' => passphrase,
+    'transaction' => transaction
+  }
+  payload[:encoding] = encoding if encoding
+  self.class.post("/shared-wallets/#{wid}/transactions-sign",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #submit(wid, transaction) ⇒ Object + + + + + +

+
+ +

Submit transaction

+ + +
+
+
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    source wallet id

    +
    + +
  • + +
  • + + transaction + + + (String) + + + + — +
    +

    CBOR transaction data

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+110
+111
+112
+113
+114
+115
+
+
# File 'lib/cardano_wallet/shared.rb', line 110
+
+def submit(wid, transaction)
+  payload = { 'transaction' => transaction }
+  self.class.post("/shared-wallets/#{wid}/transactions-submit",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Shared/Wallets.html b/0.4.1/CardanoWallet/Shared/Wallets.html new file mode 100644 index 0000000..d274a97 --- /dev/null +++ b/0.4.1/CardanoWallet/Shared/Wallets.html @@ -0,0 +1,790 @@ + + + + + + + Class: CardanoWallet::Shared::Wallets + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Shared::Wallets + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/shared.rb
+
+ +
+ +

Overview

+
+ +

API for Wallets

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.shared.wallets # API for Shared Wallets
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #create(params) ⇒ Object + + + + + +

+
+ +

Create a wallet based on the params.

+ + +
+
+
+ +
+

Examples:

+ + +

+

Create wallet from mnemonic sentence

+

+ +
create({name: "Wallet from mnemonic_sentence",
+        passphrase: "Secure Passphrase",
+        mnemonic_sentence: %w[story egg fun ... ],
+        account_index: "1852H",
+        payment_script_template: {...},
+        ...
+       })
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+205
+206
+207
+208
+209
+210
+
+
# File 'lib/cardano_wallet/shared.rb', line 205
+
+def create(params)
+  Utils.verify_param_is_hash!(params)
+  self.class.post('/shared-wallets',
+                  body: params.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #delete(wid) ⇒ Object + + + + + +

+
+ +

Delete wallet

+ + +
+
+ + + + + +
+
+
+
+214
+215
+216
+
+
# File 'lib/cardano_wallet/shared.rb', line 214
+
+def delete(wid)
+  self.class.delete("/shared-wallets/#{wid}")
+end
+
+
+ +
+

+ + #get(wid) ⇒ Object + + + + + +

+
+ +

Get wallet details

+ + +
+
+ + + + + +
+
+
+
+190
+191
+192
+
+
# File 'lib/cardano_wallet/shared.rb', line 190
+
+def get(wid)
+  self.class.get("/shared-wallets/#{wid}")
+end
+
+
+ +
+

+ + #listObject + + + + + +

+
+ +

List all wallets

+ + +
+
+ + + + + +
+
+
+
+184
+185
+186
+
+
# File 'lib/cardano_wallet/shared.rb', line 184
+
+def list
+  self.class.get('/shared-wallets')
+end
+
+
+ +
+

+ + #update_delegation_script(wid, cosigner, acc_pub_key) ⇒ Object + + + + + +

+
+ +

Update delegation script

+ + +
+
+ + + + + +
+
+
+
+228
+229
+230
+231
+232
+
+
# File 'lib/cardano_wallet/shared.rb', line 228
+
+def update_delegation_script(wid, cosigner, acc_pub_key)
+  self.class.patch("/shared-wallets/#{wid}/delegation-script-template",
+                   body: { cosigner => acc_pub_key }.to_json,
+                   headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #update_payment_script(wid, cosigner, acc_pub_key) ⇒ Object + + + + + +

+
+ +

Update payment script

+ + +
+
+ + + + + +
+
+
+
+220
+221
+222
+223
+224
+
+
# File 'lib/cardano_wallet/shared.rb', line 220
+
+def update_payment_script(wid, cosigner, acc_pub_key)
+  self.class.patch("/shared-wallets/#{wid}/payment-script-template",
+                   body: { cosigner => acc_pub_key }.to_json,
+                   headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #utxo(wid) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+235
+236
+237
+
+
# File 'lib/cardano_wallet/shared.rb', line 235
+
+def utxo(wid)
+  self.class.get("/shared-wallets/#{wid}/statistics/utxos")
+end
+
+
+ +
+

+ + #utxo_snapshot(wid) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+240
+241
+242
+
+
# File 'lib/cardano_wallet/shared.rb', line 240
+
+def utxo_snapshot(wid)
+  self.class.get("/shared-wallets/#{wid}/utxo")
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Shelley.html b/0.4.1/CardanoWallet/Shelley.html new file mode 100644 index 0000000..db9d6bc --- /dev/null +++ b/0.4.1/CardanoWallet/Shelley.html @@ -0,0 +1,204 @@ + + + + + + + Module: CardanoWallet::Shelley + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Module: CardanoWallet::Shelley + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/shelley.rb
+
+ +
+ +

Overview

+
+ +

Init API for Shelley

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.shelley # API for Shelley
+ +
+ + +

Defined Under Namespace

+

+ + + + + Classes: Addresses, Assets, CoinSelections, Init, Keys, Migrations, StakePools, Transactions, Wallets + + +

+ + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + +
+

Class Method Details

+ + +
+

+ + .new(opt) ⇒ Object + + + + + +

+ + + + +
+
+
+
+9
+10
+11
+
+
# File 'lib/cardano_wallet/shelley.rb', line 9
+
+def self.new(opt)
+  Init.new opt
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Shelley/Addresses.html b/0.4.1/CardanoWallet/Shelley/Addresses.html new file mode 100644 index 0000000..77d7187 --- /dev/null +++ b/0.4.1/CardanoWallet/Shelley/Addresses.html @@ -0,0 +1,272 @@ + + + + + + + Class: CardanoWallet::Shelley::Addresses + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Shelley::Addresses + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/shelley.rb
+
+ +
+ +

Overview

+
+ +

API for Addresses

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.shelley.addresses # API for Shelley addresses
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #list(wid, query = {}) ⇒ Object + + + + + +

+
+ +

List addresses

+ + +
+
+
+ +
+

Examples:

+ + +
list(wid, {state: "used"})
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+246
+247
+248
+249
+
+
# File 'lib/cardano_wallet/shelley.rb', line 246
+
+def list(wid, query = {})
+  query_formatted = query.empty? ? '' : Utils.to_query(query)
+  self.class.get("/wallets/#{wid}/addresses#{query_formatted}")
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Shelley/Assets.html b/0.4.1/CardanoWallet/Shelley/Assets.html new file mode 100644 index 0000000..3351465 --- /dev/null +++ b/0.4.1/CardanoWallet/Shelley/Assets.html @@ -0,0 +1,261 @@ + + + + + + + Class: CardanoWallet::Shelley::Assets + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Shelley::Assets + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/shelley.rb
+
+ +
+ +

Overview

+
+ +

Base class for Shelley Assets API

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.shelley.assets # API for Shelley assets
+ +
+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #get(wid, policy_id = nil, asset_name = nil) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+84
+85
+86
+87
+88
+89
+
+
# File 'lib/cardano_wallet/shelley.rb', line 84
+
+def get(wid, policy_id = nil, asset_name = nil)
+  ep = "/wallets/#{wid}/assets"
+  ep += "/#{policy_id}" if policy_id
+  ep += "/#{asset_name}" if asset_name
+  self.class.get(ep)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Shelley/CoinSelections.html b/0.4.1/CardanoWallet/Shelley/CoinSelections.html new file mode 100644 index 0000000..38c8e2e --- /dev/null +++ b/0.4.1/CardanoWallet/Shelley/CoinSelections.html @@ -0,0 +1,384 @@ + + + + + + + Class: CardanoWallet::Shelley::CoinSelections + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Shelley::CoinSelections + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/shelley.rb
+
+ +
+ +

Overview

+
+ +

API for CoinSelections

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.shelley.coin_selections # API for Shelley coin_selections
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #random(wid, payments, withdrawal = nil, metadata = nil) ⇒ Object + + + + + +

+
+ +

Show random coin selection for particular payment

+ + +
+
+
+ +
+

Examples:

+ + +
random(wid, [{addr1: 1000000}, {addr2: 1000000}])
+random(wid, [{ "address": "addr1..",
+               "amount": { "quantity": 42000000, "unit": "lovelace" },
+               "assets": [{"policy_id": "pid", "asset_name": "name", "quantity": 0 } ] } ])
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+
+
# File 'lib/cardano_wallet/shelley.rb', line 266
+
+def random(wid, payments, withdrawal = nil,  = nil)
+  Utils.verify_param_is_array!(payments)
+  payments_formatted = if payments.any? { |p| p.key?(:address) || p.key?('address') }
+                         payments
+                       else
+                         Utils.format_payments(payments)
+                       end
+  payload = { payments: payments_formatted }
+  payload[:withdrawal] = withdrawal if withdrawal
+  payload[:metadata] =  if 
+
+  self.class.post("/wallets/#{wid}/coin-selections/random",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #random_deleg(wid, deleg_action) ⇒ Object + + + + + +

+
+ +

Coin selection -> Delegation action

+ + +
+
+
+ +
+

Examples:

+ + +
random(wid, {action: "join", pool: "poolid"})
+random(wid, {action: "quit"})
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+288
+289
+290
+291
+292
+293
+
+
# File 'lib/cardano_wallet/shelley.rb', line 288
+
+def random_deleg(wid, deleg_action)
+  Utils.verify_param_is_hash!(deleg_action)
+  self.class.post("/wallets/#{wid}/coin-selections/random",
+                  body: { delegation_action: deleg_action }.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Shelley/Init.html b/0.4.1/CardanoWallet/Shelley/Init.html new file mode 100644 index 0000000..42c637b --- /dev/null +++ b/0.4.1/CardanoWallet/Shelley/Init.html @@ -0,0 +1,766 @@ + + + + + + + Class: CardanoWallet::Shelley::Init + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Shelley::Init + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/shelley.rb
+
+ +
+ +

Overview

+
+ +

Init class for Shelley API

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.shelley.wallets # API for Shelley wallets
+@cw.shelley.assets # API for Shelley assets
+@cw.shelley.coin_selections # API for Shelley coin_selections
+@cw.shelley.addresses # API for Shelley addresses
+@cw.shelley.transactions # API for Shelley transactions
+@cw.shelley.migrations # API for Shelley migrations
+@cw.shelley.stake_pools # API for Shelley stake_pools
+@cw.shelley.keys # API for Shelley keys
+ +
+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #addressesObject + + + + + +

+
+ +

API for Addresses

+ + +
+
+ + + + + +
+
+
+
+34
+35
+36
+
+
# File 'lib/cardano_wallet/shelley.rb', line 34
+
+def addresses
+  Addresses.new @opt
+end
+
+
+ +
+

+ + #assetsObject + + + + + +

+
+ +

API for Assets

+ + +
+
+ + + + + +
+
+
+
+70
+71
+72
+
+
# File 'lib/cardano_wallet/shelley.rb', line 70
+
+def assets
+  Assets.new @opt
+end
+
+
+ +
+

+ + #coin_selectionsObject + + + + + +

+
+ +

API for CoinSelections

+ + +
+
+ + + + + +
+
+
+
+40
+41
+42
+
+
# File 'lib/cardano_wallet/shelley.rb', line 40
+
+def coin_selections
+  CoinSelections.new @opt
+end
+
+
+ +
+

+ + #keysObject + + + + + +

+
+ +

API for Keys

+ + +
+
+ + + + + +
+
+
+
+64
+65
+66
+
+
# File 'lib/cardano_wallet/shelley.rb', line 64
+
+def keys
+  Keys.new @opt
+end
+
+
+ +
+

+ + #migrationsObject + + + + + +

+
+ +

API for Migrations

+ + +
+
+ + + + + +
+
+
+
+58
+59
+60
+
+
# File 'lib/cardano_wallet/shelley.rb', line 58
+
+def migrations
+  Migrations.new @opt
+end
+
+
+ +
+

+ + #stake_poolsObject + + + + + +

+
+ +

API for StakePools

+ + +
+
+ + + + + +
+
+
+
+52
+53
+54
+
+
# File 'lib/cardano_wallet/shelley.rb', line 52
+
+def stake_pools
+  StakePools.new @opt
+end
+
+
+ +
+

+ + #transactionsObject + + + + + +

+
+ +

API for Transactions

+ + +
+
+ + + + + +
+
+
+
+46
+47
+48
+
+
# File 'lib/cardano_wallet/shelley.rb', line 46
+
+def transactions
+  Transactions.new @opt
+end
+
+
+ +
+

+ + #walletsObject + + + + + +

+
+ +

Call API for Wallets

+ + +
+
+ + + + + +
+
+
+
+28
+29
+30
+
+
# File 'lib/cardano_wallet/shelley.rb', line 28
+
+def wallets
+  Wallets.new @opt
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Shelley/Keys.html b/0.4.1/CardanoWallet/Shelley/Keys.html new file mode 100644 index 0000000..32367b6 --- /dev/null +++ b/0.4.1/CardanoWallet/Shelley/Keys.html @@ -0,0 +1,699 @@ + + + + + + + Class: CardanoWallet::Shelley::Keys + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Shelley::Keys + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/shelley.rb
+
+ +
+ +

Overview

+
+ +

Base class for Shelley Keys API

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.shelley.keys # API for Shelley Keys
+ +
+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #create_acc_public_key(wid, index, payload) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+116
+117
+118
+119
+120
+121
+122
+
+
# File 'lib/cardano_wallet/shelley.rb', line 116
+
+def create_acc_public_key(wid, index, payload)
+  # payload = { passphrase: pass, format: format, purpose: purpose }
+  Utils.verify_param_is_hash!(payload)
+  self.class.post("/wallets/#{wid}/keys/#{index}",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #create_policy_id(wid, policy_script_template) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+146
+147
+148
+149
+150
+151
+
+
# File 'lib/cardano_wallet/shelley.rb', line 146
+
+def create_policy_id(wid, policy_script_template)
+  payload = { policy_script_template: policy_script_template }
+  self.class.post("/wallets/#{wid}/policy-id",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #create_policy_key(wid, passphrase, query = {}) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+137
+138
+139
+140
+141
+142
+143
+
+
# File 'lib/cardano_wallet/shelley.rb', line 137
+
+def create_policy_key(wid, passphrase, query = {})
+  query_formatted = query.empty? ? '' : Utils.to_query(query)
+  payload = { passphrase: passphrase }
+  self.class.post("/wallets/#{wid}/policy-key#{query_formatted}",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #get_acc_public_key(wid, query = {}) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+125
+126
+127
+128
+
+
# File 'lib/cardano_wallet/shelley.rb', line 125
+
+def get_acc_public_key(wid, query = {})
+  query_formatted = query.empty? ? '' : Utils.to_query(query)
+  self.class.get("/wallets/#{wid}/keys#{query_formatted}")
+end
+
+
+ +
+

+ + #get_policy_key(wid, query = {}) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+131
+132
+133
+134
+
+
# File 'lib/cardano_wallet/shelley.rb', line 131
+
+def get_policy_key(wid, query = {})
+  query_formatted = query.empty? ? '' : Utils.to_query(query)
+  self.class.get("/wallets/#{wid}/policy-key#{query_formatted}")
+end
+
+
+ +
+

+ + #get_public_key(wid, role, index, query = {}) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+110
+111
+112
+113
+
+
# File 'lib/cardano_wallet/shelley.rb', line 110
+
+def get_public_key(wid, role, index, query = {})
+  query_formatted = query.empty? ? '' : Utils.to_query(query)
+  self.class.get("/wallets/#{wid}/keys/#{role}/#{index}#{query_formatted}")
+end
+
+
+ +
+

+ + #sign_metadata(wid, role, index, pass, metadata) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+99
+100
+101
+102
+103
+104
+105
+106
+107
+
+
# File 'lib/cardano_wallet/shelley.rb', line 99
+
+def (wid, role, index, pass, )
+  payload = { passphrase: pass }
+  payload[:metadata] =  if 
+
+  self.class.post("/wallets/#{wid}/signatures/#{role}/#{index}",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json',
+                             'Accept' => 'application/octet-stream' })
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Shelley/Migrations.html b/0.4.1/CardanoWallet/Shelley/Migrations.html new file mode 100644 index 0000000..e4b5ee7 --- /dev/null +++ b/0.4.1/CardanoWallet/Shelley/Migrations.html @@ -0,0 +1,396 @@ + + + + + + + Class: CardanoWallet::Shelley::Migrations + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Shelley::Migrations + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/shelley.rb
+
+ +
+ +

Overview

+
+ +

Shelley migrations

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.shelley.migrations # API for Shelley migrations
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #migrate(wid, passphrase, addresses) ⇒ Object + + + + + +

+
+ +

Migrate all funds from Shelley wallet.

+ + +
+
+
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    wallet id

    +
    + +
  • + +
  • + + passphrase + + + (String) + + + + — +
    +

    wallet’s passphrase

    +
    + +
  • + +
  • + + array + + + (Array) + + + + — +
    +

    of addresses

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+548
+549
+550
+551
+552
+553
+
+
# File 'lib/cardano_wallet/shelley.rb', line 548
+
+def migrate(wid, passphrase, addresses)
+  self.class.post("/wallets/#{wid}/migrations",
+                  body: { addresses: addresses,
+                          passphrase: passphrase }.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #plan(wid, addresses) ⇒ Object + + + + + +

+
+ +

Get migration plan

+ + +
+
+ + + + + +
+
+
+
+537
+538
+539
+540
+541
+
+
# File 'lib/cardano_wallet/shelley.rb', line 537
+
+def plan(wid, addresses)
+  self.class.post("/wallets/#{wid}/migrations/plan",
+                  body: { addresses: addresses }.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Shelley/StakePools.html b/0.4.1/CardanoWallet/Shelley/StakePools.html new file mode 100644 index 0000000..d8d4004 --- /dev/null +++ b/0.4.1/CardanoWallet/Shelley/StakePools.html @@ -0,0 +1,718 @@ + + + + + + + Class: CardanoWallet::Shelley::StakePools + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Shelley::StakePools + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/shelley.rb
+
+ +
+ +

Overview

+
+ +

API for StakePools

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.shelley.stake_pools # API for Shelley StakePools
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #delegation_fees(wid) ⇒ Object + + + + + +

+
+ +

Estimate delegation fees

+ + +
+
+ + + + + +
+
+
+
+524
+525
+526
+
+
# File 'lib/cardano_wallet/shelley.rb', line 524
+
+def delegation_fees(wid)
+  self.class.get("/wallets/#{wid}/delegation-fees")
+end
+
+
+ +
+

+ + #join(sp_id, wid, passphrase) ⇒ Object + + + + + +

+
+ +

Join stake pool

+ + +
+
+ + + + + +
+
+
+
+508
+509
+510
+511
+512
+
+
# File 'lib/cardano_wallet/shelley.rb', line 508
+
+def join(sp_id, wid, passphrase)
+  self.class.put("/stake-pools/#{sp_id}/wallets/#{wid}",
+                 body: { passphrase: passphrase }.to_json,
+                 headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #list(stake = {}) ⇒ Object + + + + + +

+
+ +

List all stake pools

+ + +
+
+ + + + + +
+
+
+
+495
+496
+497
+498
+
+
# File 'lib/cardano_wallet/shelley.rb', line 495
+
+def list(stake = {})
+  query = stake.empty? ? '' : Utils.to_query(stake)
+  self.class.get("/stake-pools#{query}")
+end
+
+
+ +
+

+ + #list_stake_keys(wid) ⇒ Object + + + + + +

+
+ +

List all stake keys

+ + +
+
+ + + + + +
+
+
+
+502
+503
+504
+
+
# File 'lib/cardano_wallet/shelley.rb', line 502
+
+def list_stake_keys(wid)
+  self.class.get("/wallets/#{wid}/stake-keys")
+end
+
+
+ +
+

+ + #quit(wid, passphrase) ⇒ Object + + + + + +

+
+ +

Quit stape pool

+ + +
+
+ + + + + +
+
+
+
+516
+517
+518
+519
+520
+
+
# File 'lib/cardano_wallet/shelley.rb', line 516
+
+def quit(wid, passphrase)
+  self.class.delete("#{@api}/stake-pools/*/wallets/#{wid}",
+                    body: { passphrase: passphrase }.to_json,
+                    headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #trigger_maintenance_actions(action = {}) ⇒ Object + + + + + +

+
+ +

Stake pools maintenance actions

+ + +
+
+
+ +
+

Examples:

+ + +
maintenance_action({ "maintenance_action": "gc_stake_pools" })
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+480
+481
+482
+483
+484
+485
+
+
# File 'lib/cardano_wallet/shelley.rb', line 480
+
+def trigger_maintenance_actions(action = {})
+  Utils.verify_param_is_hash!(action)
+  self.class.post('/stake-pools/maintenance-actions',
+                  body: action.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #view_maintenance_actionsObject + + + + + +

+
+ +

Metdata GC Status

+ + +
+
+ + + + + +
+
+
+
+489
+490
+491
+
+
# File 'lib/cardano_wallet/shelley.rb', line 489
+
+def view_maintenance_actions
+  self.class.get('/stake-pools/maintenance-actions')
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Shelley/Transactions.html b/0.4.1/CardanoWallet/Shelley/Transactions.html new file mode 100644 index 0000000..1b66a50 --- /dev/null +++ b/0.4.1/CardanoWallet/Shelley/Transactions.html @@ -0,0 +1,1502 @@ + + + + + + + Class: CardanoWallet::Shelley::Transactions + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Shelley::Transactions + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/shelley.rb
+
+ +
+ +

Overview

+
+ +

API for Transactions

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.shelley.transactions # API for Shelley Transactions
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #balance(wid, payload) ⇒ Object + + + + + +

+
+ +

Balance transaction

+ + +
+
+
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    source wallet id

    +
    + +
  • + +
  • + + payload + + + (Hash) + + + + — +
    +

    payload object

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+306
+307
+308
+309
+310
+
+
# File 'lib/cardano_wallet/shelley.rb', line 306
+
+def balance(wid, payload)
+  self.class.post("/wallets/#{wid}/transactions-balance",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #construct(wid, payments = nil, withdrawal = nil, metadata = nil, delegations = nil, mint = nil, validity_interval = nil, encoding = nil) ⇒ Object + + + + + +

+
+ +

Construct transaction

+ + +
+
+
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    source wallet id

    +
    + +
  • + +
  • + + payments + + + (Array of Hashes) + + + (defaults to: nil) + + + — +
    +

    full payments payload with assets

    +
    + +
  • + +
  • + + withdrawal + + + (String or Array) + + + (defaults to: nil) + + + — +
    +

    ‘self’ or mnemonic sentence

    +
    + +
  • + +
  • + + metadata + + + (Hash) + + + (defaults to: nil) + + + — + + +
  • + +
  • + + mint + + + (Array of Hashes) + + + (defaults to: nil) + + + — +
    +

    mint object

    +
    + +
  • + +
  • + + delegations + + + (Array of Hashes) + + + (defaults to: nil) + + + — +
    +

    delegations object

    +
    + +
  • + +
  • + + validity_interval + + + (Hash) + + + (defaults to: nil) + + + — +
    +

    validity_interval object

    +
    + +
  • + +
  • + + encoding + + + (String) + + + (defaults to: nil) + + + — +
    +

    output encoding (“base16” or “base64”)

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+
+
# File 'lib/cardano_wallet/shelley.rb', line 334
+
+def construct(wid,
+              payments = nil,
+              withdrawal = nil,
+               = nil,
+              delegations = nil,
+              mint = nil,
+              validity_interval = nil,
+              encoding = nil)
+  payload = {}
+  payload[:payments] = payments if payments
+  payload[:withdrawal] = withdrawal if withdrawal
+  payload[:metadata] =  if 
+  payload[:mint_burn] = mint if mint
+  payload[:delegations] = delegations if delegations
+  payload[:validity_interval] = validity_interval if validity_interval
+  payload[:encoding] = encoding if encoding
+
+  self.class.post("/wallets/#{wid}/transactions-construct",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #create(wid, passphrase, payments, withdrawal = nil, metadata = nil, ttl = nil) ⇒ Object + + + + + +

+
+ +

Create a transaction from the wallet

+ + +
+
+
+ +
+

Examples:

+ + +
create(wid, passphrase, [{addr1: 1000000}, {addr2: 1000000}], 'self', {"1": "abc"}, ttl = 10)
+create(wid, passphrase, [{ "address": "addr1..",
+                           "amount": { "quantity": 42000000, "unit": "lovelace" },
+                           "assets": [{"policy_id": "pid", "asset_name": "name", "quantity": 0 } ] } ],
+                           'self', {"1": "abc"}, ttl = 10)
+ +
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    source wallet id

    +
    + +
  • + +
  • + + passphrase + + + (String) + + + + — +
    +

    source wallet’s passphrase

    +
    + +
  • + +
  • + + payments + + + (Array of Hashes) + + + + — +
    +

    address / amount list or full payments payload with assets

    +
    + +
  • + +
  • + + withdrawal + + + (String or Array) + + + (defaults to: nil) + + + — +
    +

    ‘self’ or mnemonic sentence

    +
    + +
  • + +
  • + + metadata + + + (Hash) + + + (defaults to: nil) + + + — + + +
  • + +
  • + + ttl + + + (Int) + + + (defaults to: nil) + + + — +
    +

    transaction’s time-to-live in seconds

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+
+
# File 'lib/cardano_wallet/shelley.rb', line 416
+
+def create(wid, passphrase, payments, withdrawal = nil,  = nil, ttl = nil)
+  Utils.verify_param_is_array!(payments)
+  payments_formatted = if payments.any? { |p| p.key?(:address) || p.key?('address') }
+                         payments
+                       else
+                         Utils.format_payments(payments)
+                       end
+  payload = { payments: payments_formatted,
+              passphrase: passphrase }
+  payload[:withdrawal] = withdrawal if withdrawal
+  payload[:metadata] =  if 
+  payload[:time_to_live] = { quantity: ttl, unit: 'second' } if ttl
+
+  self.class.post("/wallets/#{wid}/transactions",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #decode(wid, transaction) ⇒ Object + + + + + +

+
+ +

Decode transaction

+ + +
+
+
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    source wallet id

    +
    + +
  • + +
  • + + transaction + + + (String) + + + + — +
    +

    CBOR base64|base16 encoded transaction

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+316
+317
+318
+319
+320
+321
+322
+
+
# File 'lib/cardano_wallet/shelley.rb', line 316
+
+def decode(wid, transaction)
+  payload = {}
+  payload[:transaction] = transaction
+  self.class.post("/wallets/#{wid}/transactions-decode",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #forget(wid, txid) ⇒ Object + + + + + +

+
+ +

Forget a transaction

+ + +
+
+ + + + + +
+
+
+
+464
+465
+466
+
+
# File 'lib/cardano_wallet/shelley.rb', line 464
+
+def forget(wid, txid)
+  self.class.delete("/wallets/#{wid}/transactions/#{txid}")
+end
+
+
+ +
+

+ + #get(wid, tx_id, query = {}) ⇒ Object + + + + + +

+
+ +

Get tx by id

+ + +
+
+ + + + + +
+
+
+
+386
+387
+388
+389
+
+
# File 'lib/cardano_wallet/shelley.rb', line 386
+
+def get(wid, tx_id, query = {})
+  query_formatted = query.empty? ? '' : Utils.to_query(query)
+  self.class.get("/wallets/#{wid}/transactions/#{tx_id}#{query_formatted}")
+end
+
+
+ +
+

+ + #list(wid, query = {}) ⇒ Object + + + + + +

+
+ +

List all wallet’s transactions

+ + +
+
+
+ +
+

Examples:

+ + +
list(wid, {start: "2012-09-25T10:15:00Z", order: "descending"})
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+396
+397
+398
+399
+
+
# File 'lib/cardano_wallet/shelley.rb', line 396
+
+def list(wid, query = {})
+  query_formatted = query.empty? ? '' : Utils.to_query(query)
+  self.class.get("/wallets/#{wid}/transactions#{query_formatted}")
+end
+
+
+ +
+

+ + #payment_fees(wid, payments, withdrawal = nil, metadata = nil, ttl = nil) ⇒ Object + + + + + +

+
+ +

Estimate fees for transaction

+ + +
+
+
+ +
+

Examples:

+ + +
payment_fees(wid, [{addr1: 1000000}, {addr2: 1000000}], {"1": "abc"}, ttl = 10)
+payment_fees(wid, [{ "address": "addr1..",
+                     "amount": { "quantity": 42000000, "unit": "lovelace" },
+                     "assets": [{"policy_id": "pid", "asset_name": "name", "quantity": 0 } ] } ],
+                     {"1": "abc"}, ttl = 10)
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+
+
# File 'lib/cardano_wallet/shelley.rb', line 443
+
+def payment_fees(wid, payments, withdrawal = nil,  = nil, ttl = nil)
+  Utils.verify_param_is_array!(payments)
+  payments_formatted = if payments.any? { |p| p.key?(:address) || p.key?('address') }
+                         payments
+                       else
+                         Utils.format_payments(payments)
+                       end
+
+  payload = { payments: payments_formatted }
+
+  payload[:withdrawal] = withdrawal if withdrawal
+  payload[:metadata] =  if 
+  payload[:time_to_live] = { quantity: ttl, unit: 'second' } if ttl
+
+  self.class.post("/wallets/#{wid}/payment-fees",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #sign(wid, passphrase, transaction, encoding = nil) ⇒ Object + + + + + +

+
+ +

Sign transaction

+ + +
+
+
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    source wallet id

    +
    + +
  • + +
  • + + passphrase + + + (String) + + + + — +
    +

    wallet’s passphrase

    +
    + +
  • + +
  • + + transaction + + + (String) + + + + — +
    +

    CBOR transaction data

    +
    + +
  • + +
  • + + encoding + + + (String) + + + (defaults to: nil) + + + — +
    +

    output encoding (“base16” or “base64”)

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+
+
# File 'lib/cardano_wallet/shelley.rb', line 362
+
+def sign(wid, passphrase, transaction, encoding = nil)
+  payload = {
+    'passphrase' => passphrase,
+    'transaction' => transaction
+  }
+  payload[:encoding] = encoding if encoding
+  self.class.post("/wallets/#{wid}/transactions-sign",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #submit(wid, transaction) ⇒ Object + + + + + +

+
+ +

Submit transaction

+ + +
+
+
+

Parameters:

+
    + +
  • + + wid + + + (String) + + + + — +
    +

    source wallet id

    +
    + +
  • + +
  • + + transaction + + + (String) + + + + — +
    +

    CBOR transaction data

    +
    + +
  • + +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+377
+378
+379
+380
+381
+382
+
+
# File 'lib/cardano_wallet/shelley.rb', line 377
+
+def submit(wid, transaction)
+  payload = { 'transaction' => transaction }
+  self.class.post("/wallets/#{wid}/transactions-submit",
+                  body: payload.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Shelley/Wallets.html b/0.4.1/CardanoWallet/Shelley/Wallets.html new file mode 100644 index 0000000..fc10a7f --- /dev/null +++ b/0.4.1/CardanoWallet/Shelley/Wallets.html @@ -0,0 +1,822 @@ + + + + + + + Class: CardanoWallet::Shelley::Wallets + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Shelley::Wallets + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/shelley.rb
+
+ +
+ +

Overview

+
+ +

API for Wallets

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.shelley.wallets # API for Shelley wallets
+ +
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #create(params) ⇒ Object + + + + + +

+
+ +

Create a wallet based on the params.

+ + +
+
+
+ +
+

Examples:

+ + +

+

Create wallet from mnemonic sentence

+

+ +
@cw.shelley.wallets.create({name: "Wallet from mnemonic_sentence",
+        passphrase: "Secure Passphrase",
+        mnemonic_sentence: %w[story egg fun ... ],
+       })
+ + +

+

Create wallet from pub key

+

+ +
@cw.shelley.wallets.create({name: "Wallet from pub key",
+        account_public_key: "b47546e...",
+        address_pool_gap: 20,
+       })
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+185
+186
+187
+188
+189
+190
+
+
# File 'lib/cardano_wallet/shelley.rb', line 185
+
+def create(params)
+  Utils.verify_param_is_hash!(params)
+  self.class.post('/wallets',
+                  body: params.to_json,
+                  headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #delete(wid) ⇒ Object + + + + + +

+
+ +

Delete wallet

+ + +
+
+ + + + + +
+
+
+
+194
+195
+196
+
+
# File 'lib/cardano_wallet/shelley.rb', line 194
+
+def delete(wid)
+  self.class.delete("/wallets/#{wid}")
+end
+
+
+ +
+

+ + #get(wid) ⇒ Object + + + + + +

+
+ +

Get wallet details

+ + +
+
+ + + + + +
+
+
+
+168
+169
+170
+
+
# File 'lib/cardano_wallet/shelley.rb', line 168
+
+def get(wid)
+  self.class.get("/wallets/#{wid}")
+end
+
+
+ +
+

+ + #listObject + + + + + +

+
+ +

List all wallets

+ + +
+
+ + + + + +
+
+
+
+162
+163
+164
+
+
# File 'lib/cardano_wallet/shelley.rb', line 162
+
+def list
+  self.class.get('/wallets')
+end
+
+
+ +
+

+ + #update_metadata(wid, params) ⇒ Object + + + + + +

+
+ +

Update wallet’s metadata

+ + +
+
+
+ +
+

Examples:

+ + +
@cw.shelley.wallets.(wid, {name: "New wallet name"})
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+203
+204
+205
+206
+207
+208
+
+
# File 'lib/cardano_wallet/shelley.rb', line 203
+
+def (wid, params)
+  Utils.verify_param_is_hash!(params)
+  self.class.put("/wallets/#{wid}",
+                 body: params.to_json,
+                 headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #update_passphrase(wid, params) ⇒ Object + + + + + +

+
+ +

Update wallet’s passphrase

+ + +
+
+
+ +
+

Examples:

+ + +
@cw.shelley.wallets.update_passphrase(wid, {old_passphrase: "Secure Passphrase",
+                                            new_passphrase: "Securer Passphrase"})
+ +
+ + +

See Also:

+ + +
+ + + + +
+
+
+
+227
+228
+229
+230
+231
+232
+
+
# File 'lib/cardano_wallet/shelley.rb', line 227
+
+def update_passphrase(wid, params)
+  Utils.verify_param_is_hash!(params)
+  self.class.put("/wallets/#{wid}/passphrase",
+                 body: params.to_json,
+                 headers: { 'Content-Type' => 'application/json' })
+end
+
+
+ +
+

+ + #utxo(wid) ⇒ Object + + + + + +

+
+ +

See wallet’s utxo distribution

+ + +
+
+ + + + + +
+
+
+
+212
+213
+214
+
+
# File 'lib/cardano_wallet/shelley.rb', line 212
+
+def utxo(wid)
+  self.class.get("/wallets/#{wid}/statistics/utxos")
+end
+
+
+ +
+

+ + #utxo_snapshot(wid) ⇒ Object + + + + + +

+
+ + +
+
+ + + + + +
+
+
+
+217
+218
+219
+
+
# File 'lib/cardano_wallet/shelley.rb', line 217
+
+def utxo_snapshot(wid)
+  self.class.get("/wallets/#{wid}/utxo")
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Utils.html b/0.4.1/CardanoWallet/Utils.html new file mode 100644 index 0000000..f199b3e --- /dev/null +++ b/0.4.1/CardanoWallet/Utils.html @@ -0,0 +1,542 @@ + + + + + + + Module: CardanoWallet::Utils + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Module: CardanoWallet::Utils + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/utils.rb
+
+ +
+ +

Overview

+
+ +

General Utils not connected to API

+ + +
+
+
+ +
+

Examples:

+ + +
@cw = CardanoWallet.new
+@cw.utils
+ +
+ + +

Defined Under Namespace

+

+ + + + + Classes: Mnemonic + + +

+ + + + + + + + +

+ Class Method Summary + collapse +

+ + + + + + +
+

Class Method Details

+ + +
+

+ + .format_payments(payments) ⇒ Array of Hashes + + + + + +

+
+ +

Returns - [:amount=>{:quantity=>1, :unit=>“lovelace”}, …}].

+ + +
+
+
+

Parameters:

+
    + +
  • + + payments + + + (Array of Hashes) + + + + — +
    • 1, 2 +
      +
    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (Array of Hashes) + + + + — +
    • :amount=>{:quantity=>1, :unit=>“lovelace”}, …} +
      +
    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+
+
# File 'lib/cardano_wallet/utils.rb', line 64
+
+def self.format_payments(payments)
+  verify_param_is_array!(payments)
+  unless payments.all? { |p| p.size == 1 && p.is_a?(Hash) }
+    raise ArgumentError, 'argument should be Array of single Hashes'
+  end
+
+  payments.map do |p|
+    a = p.collect do |addr, amt|
+      { address: addr.to_s,
+        amount: { quantity: amt.to_i,
+                  unit: 'lovelace' } }
+    end.flatten
+    Hash[*a]
+  end
+end
+
+
+ +
+

+ + .new(opt) ⇒ Object + + + + + +

+ + + + +
+
+
+
+10
+11
+12
+
+
# File 'lib/cardano_wallet/utils.rb', line 10
+
+def self.new(opt)
+  Mnemonic.new opt
+end
+
+
+ +
+

+ + .to_query(query) ⇒ Object + + + + + +

+ + + + +
+
+
+
+80
+81
+82
+83
+84
+85
+86
+
+
# File 'lib/cardano_wallet/utils.rb', line 80
+
+def self.to_query(query)
+  verify_param_is_hash!(query)
+  q = query.collect do |k, v|
+    "#{k}=#{v}"
+  end.join '&'
+  "?#{q}"
+end
+
+
+ +
+

+ + .verify_param_is_array!(param) ⇒ Object + + + + + +

+
+ + +
+
+
+ +

Raises:

+
    + +
  • + + + (ArgumentError) + + + +
  • + +
+ +
+ + + + +
+
+
+
+57
+58
+59
+
+
# File 'lib/cardano_wallet/utils.rb', line 57
+
+def self.verify_param_is_array!(param)
+  raise ArgumentError, 'argument should be Array' unless param.is_a?(Array)
+end
+
+
+ +
+

+ + .verify_param_is_hash!(param) ⇒ Object + + + + + +

+
+ + +
+
+
+ +

Raises:

+
    + +
  • + + + (ArgumentError) + + + +
  • + +
+ +
+ + + + +
+
+
+
+53
+54
+55
+
+
# File 'lib/cardano_wallet/utils.rb', line 53
+
+def self.verify_param_is_hash!(param)
+  raise ArgumentError, 'argument should be Hash' unless param.is_a?(Hash)
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/CardanoWallet/Utils/Mnemonic.html b/0.4.1/CardanoWallet/Utils/Mnemonic.html new file mode 100644 index 0000000..82b5581 --- /dev/null +++ b/0.4.1/CardanoWallet/Utils/Mnemonic.html @@ -0,0 +1,308 @@ + + + + + + + Class: CardanoWallet::Utils::Mnemonic + + — Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Class: CardanoWallet::Utils::Mnemonic + + + +

+
+ +
+
Inherits:
+
+ Base + +
    +
  • Object
  • + + + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
lib/cardano_wallet/utils.rb
+
+ +
+ +

Overview

+
+ +

Utils for mnemonics

+ + +
+
+
+ + +
+ + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Base

+

#opt

+ + + +

+ Instance Method Summary + collapse +

+ + + + + + + + + + + + + +

Methods inherited from Base

+

#byron, #initialize, #misc, #shared, #shelley, #utils

+ +
+

Constructor Details

+ +

This class inherits a constructor from CardanoWallet::Base

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #mnemonic_sentence(word_count = 24, language = 'english') ⇒ Object + + + + + +

+
+ +

Generate mnemonic sentence

+ + +
+
+
+ +
+

Examples:

+ + +

+

Default 24-word English mnemonic sentence

+

+ +
@cw.utils.mnemonic_sentence
+ + +

+

15-word French mnemonic sentence

+

+ +
@cw.utils.mnemonic_sentence(15, 'french')
+ +
+ + +
+ + + + +
+
+
+
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+
+
# File 'lib/cardano_wallet/utils.rb', line 23
+
+def mnemonic_sentence(word_count = 24, language = 'english')
+  languages = %w[english french spanish korean japanese
+                 italian chinese_traditional chinese_simplified]
+  unless languages.include?(language)
+    raise ArgumentError,
+          %(Not supported language: '#{language}'. Supported languages are: #{languages}.)
+  end
+
+  words = [9, 12, 15, 18, 21, 24]
+  case word_count
+  when 9
+    bits = 96
+  when 12
+    bits = 128
+  when 15
+    bits = 164
+  when 18
+    bits = 196
+  when 21
+    bits = 224
+  when 24
+    bits = 256
+  else
+    raise ArgumentError,
+          %(Not supported count of words #{word_count}. Supported counts are: #{words}.)
+  end
+  BipMnemonic.to_mnemonic(bits: bits, language: language).split
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/_index.html b/0.4.1/_index.html new file mode 100644 index 0000000..d2ec770 --- /dev/null +++ b/0.4.1/_index.html @@ -0,0 +1,436 @@ + + + + + + + Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Documentation for cardano_wallet (0.4.1)

+
+

Alphabetic Index

+ +

File Listing

+ + +
+

Namespace Listing A-Z

+ + + + + + + + +
+ + +
    +
  • A
  • +
      + +
    • + Addresses + + (CardanoWallet::Byron) + +
    • + +
    • + Addresses + + (CardanoWallet::Shared) + +
    • + +
    • + Addresses + + (CardanoWallet::Shelley) + +
    • + +
    • + Assets + + (CardanoWallet::Byron) + +
    • + +
    • + Assets + + (CardanoWallet::Shelley) + +
    • + +
    +
+ + +
    +
  • B
  • +
      + +
    • + Base + + (CardanoWallet) + +
    • + +
    • + Byron + + (CardanoWallet) + +
    • + +
    +
+ + + + + +
    +
  • I
  • +
      + +
    • + Init + + (CardanoWallet::Misc) + +
    • + +
    • + Init + + (CardanoWallet::Byron) + +
    • + +
    • + Init + + (CardanoWallet::Shared) + +
    • + +
    • + Init + + (CardanoWallet::Shelley) + +
    • + +
    +
+ + +
    +
  • K
  • +
      + +
    • + Keys + + (CardanoWallet::Shared) + +
    • + +
    • + Keys + + (CardanoWallet::Shelley) + +
    • + +
    +
+ + +
    +
  • M
  • +
      + +
    • + Migrations + + (CardanoWallet::Byron) + +
    • + +
    • + Migrations + + (CardanoWallet::Shelley) + +
    • + +
    • + Misc + + (CardanoWallet) + +
    • + +
    • + Mnemonic + + (CardanoWallet::Utils) + +
    • + +
    +
+ + +
    +
  • N
  • +
      + +
    • + Network + + (CardanoWallet::Misc) + +
    • + +
    • + Node + + (CardanoWallet::Misc) + +
    • + +
    +
+ + +
+ + +
    +
  • P
  • +
      + +
    • + Proxy + + (CardanoWallet::Misc) + +
    • + +
    +
+ + +
    +
  • S
  • +
      + +
    • + Settings + + (CardanoWallet::Misc) + +
    • + +
    • + Shared + + (CardanoWallet) + +
    • + +
    • + Shelley + + (CardanoWallet) + +
    • + +
    • + StakePools + + (CardanoWallet::Shelley) + +
    • + +
    +
+ + + + + +
    +
  • U
  • +
      + +
    • + Utils + + (CardanoWallet::Misc) + +
    • + +
    • + Utils + + (CardanoWallet) + +
    • + +
    +
+ + +
    +
  • W
  • +
      + +
    • + Wallets + + (CardanoWallet::Byron) + +
    • + +
    • + Wallets + + (CardanoWallet::Shared) + +
    • + +
    • + Wallets + + (CardanoWallet::Shelley) + +
    • + +
    +
+ +
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/class_list.html b/0.4.1/class_list.html new file mode 100644 index 0000000..0513e3d --- /dev/null +++ b/0.4.1/class_list.html @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + Class List + + + +
+
+

Class List

+ + + +
+ + +
+ + diff --git a/0.4.1/css/common.css b/0.4.1/css/common.css new file mode 100644 index 0000000..cf25c45 --- /dev/null +++ b/0.4.1/css/common.css @@ -0,0 +1 @@ +/* Override this file with custom rules */ \ No newline at end of file diff --git a/0.4.1/css/full_list.css b/0.4.1/css/full_list.css new file mode 100644 index 0000000..fa35982 --- /dev/null +++ b/0.4.1/css/full_list.css @@ -0,0 +1,58 @@ +body { + margin: 0; + font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; + font-size: 13px; + height: 101%; + overflow-x: hidden; + background: #fafafa; +} + +h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; } +.clear { clear: both; } +.fixed_header { position: fixed; background: #fff; width: 100%; padding-bottom: 10px; margin-top: 0; top: 0; z-index: 9999; height: 70px; } +#search { position: absolute; right: 5px; top: 9px; padding-left: 24px; } +#content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; } +#full_list { padding: 0; list-style: none; margin-left: 0; margin-top: 80px; font-size: 1.1em; } +#full_list ul { padding: 0; } +#full_list li { padding: 0; margin: 0; list-style: none; } +#full_list li .item { padding: 5px 5px 5px 12px; } +#noresults { padding: 7px 12px; background: #fff; } +#content.insearch #noresults { margin-left: 7px; } +li.collapsed ul { display: none; } +li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; } +li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; } +li { color: #888; cursor: pointer; } +li.deprecated { text-decoration: line-through; font-style: italic; } +li.odd { background: #f0f0f0; } +li.even { background: #fafafa; } +.item:hover { background: #ddd; } +li small:before { content: "("; } +li small:after { content: ")"; } +li small.search_info { display: none; } +a, a:visited { text-decoration: none; color: #05a; } +li.clicked > .item { background: #05a; color: #ccc; } +li.clicked > .item a, li.clicked > .item a:visited { color: #eee; } +li.clicked > .item a.toggle { opacity: 0.5; background-position: bottom right; } +li.collapsed.clicked a.toggle { background-position: top right; } +#search input { border: 1px solid #bbb; border-radius: 3px; } +#full_list_nav { margin-left: 10px; font-size: 0.9em; display: block; color: #aaa; } +#full_list_nav a, #nav a:visited { color: #358; } +#full_list_nav a:hover { background: transparent; color: #5af; } +#full_list_nav span:after { content: ' | '; } +#full_list_nav span:last-child:after { content: ''; } + +#content h1 { margin-top: 0; } +li { white-space: nowrap; cursor: normal; } +li small { display: block; font-size: 0.8em; } +li small:before { content: ""; } +li small:after { content: ""; } +li small.search_info { display: none; } +#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; } +#content.insearch #search { background-position: center right; } +#search input { width: 110px; } + +#full_list.insearch ul { display: block; } +#full_list.insearch .item { display: none; } +#full_list.insearch .found { display: block; padding-left: 11px !important; } +#full_list.insearch li a.toggle { display: none; } +#full_list.insearch li small.search_info { display: block; } diff --git a/0.4.1/css/style.css b/0.4.1/css/style.css new file mode 100644 index 0000000..eb0dbc8 --- /dev/null +++ b/0.4.1/css/style.css @@ -0,0 +1,497 @@ +html { + width: 100%; + height: 100%; +} +body { + font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; + font-size: 13px; + width: 100%; + margin: 0; + padding: 0; + display: flex; + display: -webkit-flex; + display: -ms-flexbox; +} + +#nav { + position: relative; + width: 100%; + height: 100%; + border: 0; + border-right: 1px dotted #eee; + overflow: auto; +} +.nav_wrap { + margin: 0; + padding: 0; + width: 20%; + height: 100%; + position: relative; + display: flex; + display: -webkit-flex; + display: -ms-flexbox; + flex-shrink: 0; + -webkit-flex-shrink: 0; + -ms-flex: 1 0; +} +#resizer { + position: absolute; + right: -5px; + top: 0; + width: 10px; + height: 100%; + cursor: col-resize; + z-index: 9999; +} +#main { + flex: 5 1; + -webkit-flex: 5 1; + -ms-flex: 5 1; + outline: none; + position: relative; + background: #fff; + padding: 1.2em; + padding-top: 0.2em; + box-sizing: border-box; +} + +@media (max-width: 920px) { + .nav_wrap { width: 100%; top: 0; right: 0; overflow: visible; position: absolute; } + #resizer { display: none; } + #nav { + z-index: 9999; + background: #fff; + display: none; + position: absolute; + top: 40px; + right: 12px; + width: 500px; + max-width: 80%; + height: 80%; + overflow-y: scroll; + border: 1px solid #999; + border-collapse: collapse; + box-shadow: -7px 5px 25px #aaa; + border-radius: 2px; + } +} + +@media (min-width: 920px) { + body { height: 100%; overflow: hidden; } + #main { height: 100%; overflow: auto; } + #search { display: none; } +} + +#main img { max-width: 100%; } +h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; } +h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; } +h1.title { margin-bottom: 10px; } +h1.alphaindex { margin-top: 0; font-size: 22px; } +h2 { + padding: 0; + padding-bottom: 3px; + border-bottom: 1px #aaa solid; + font-size: 1.4em; + margin: 1.8em 0 0.5em; + position: relative; +} +h2 small { font-weight: normal; font-size: 0.7em; display: inline; position: absolute; right: 0; } +h2 small a { + display: block; + height: 20px; + border: 1px solid #aaa; + border-bottom: 0; + border-top-left-radius: 5px; + background: #f8f8f8; + position: relative; + padding: 2px 7px; +} +.clear { clear: both; } +.inline { display: inline; } +.inline p:first-child { display: inline; } +.docstring, .tags, #filecontents { font-size: 15px; line-height: 1.5145em; } +.docstring p > code, .docstring p > tt, .tags p > code, .tags p > tt { + color: #c7254e; background: #f9f2f4; padding: 2px 4px; font-size: 1em; + border-radius: 4px; +} +.docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; } +.docstring h1 { font-size: 1.2em; } +.docstring h2 { font-size: 1.1em; } +.docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; } +.summary_desc .object_link a, .docstring .object_link a { + font-family: monospace; font-size: 1.05em; + color: #05a; background: #EDF4FA; padding: 2px 4px; font-size: 1em; + border-radius: 4px; +} +.rdoc-term { padding-right: 25px; font-weight: bold; } +.rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; } +.summary_desc pre.code .object_link a, .docstring pre.code .object_link a { + padding: 0px; background: inherit; color: inherit; border-radius: inherit; +} + +/* style for */ +#filecontents table, .docstring table { border-collapse: collapse; } +#filecontents table th, #filecontents table td, +.docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; } +#filecontents table tr:nth-child(odd), +.docstring table tr:nth-child(odd) { background: #eee; } +#filecontents table tr:nth-child(even), +.docstring table tr:nth-child(even) { background: #fff; } +#filecontents table th, .docstring table th { background: #fff; } + +/* style for
+ + + + + + + + + + + + + + + + +
LinkDescription
[Ruby API (edge)](https://piotr-iohk.github.io/cardano-wallet-rb/master/)cardano-wallet-rb API
[REST API (edge)](https://input-output-hk.github.io/cardano-wallet/api/edge/)[cardano-wallet's](https://github.com/input-output-hk/cardano-wallet) REST API
+ +
+

:warning: Links point to edge APIs corresponding to master branches for both cardano-wallet and cardano-wallet-rb. Refer to release page for API doc suitable for the latest release.

+
+ +

Examples

+ +
CW = CardanoWallet.new
+
+BYRON = CW.byron
+SHELLEY = CW.shelley
+MISC = CW.misc
+
+#Byron
+BYRON.wallets.create({name: "Byron",
+                       style: "random",
+                       mnemonic_sentence: CW.utils.mnemonic_sentence,
+                       passphrase: "Secure Passphrase"})
+
+BYRON.wallets.list.each_with_index do |wal, i|
+  BYRON.wallets.(wal['id'], {name: "Wallet number #{i}"})
+end
+
+BYRON.wallets.list.each do |wal|
+  puts wal['name']
+end
+
+#Shelley
+w = SHELLEY.wallets.create({name: "Shelley",
+                       mnemonic_sentence: CW.utils.mnemonic_sentence,
+                       passphrase: "Secure Passphrase"})
+
+SHELLEY.wallets.get(w['id'])
+SHELLEY.wallets.delete(w['id'])
+
+# Transaction
+wid = '1f82e...ccd95'
+ = { "1" => "test"}
+tx_c = SHELLEY.transactions.construct(wid, payments = nil, withdrawal = nil, )
+tx_s = SHELLEY.transactions.sign(wid, 'Secure Passphrase', tx_c['transaction'])
+tx_sub = SHELLEY.transactions.submit(wid, tx_s['transaction'])
+puts SHELLEY.transactions.get(wid, tx_sub['id'])
+
+# Delegation
+wid = '1f82e...ccd95'
+random_stake_pool_id = SHELLEY.stake_pools.list({stake: 10000}).sample['id']
+delegation = [{
+                "join" => {
+                            "pool" => random_stake_pool_id,
+                            "stake_key_index" => "0H"
+                          }
+              }]
+tx_c = SHELLEY.transactions.construct(wid, payments = nil, withdrawal = nil,  = nil, delegation)
+tx_s = SHELLEY.transactions.sign(wid, 'Secure Passphrase', tx_c['transaction'])
+tx_sub = SHELLEY.transactions.submit(wid, tx_s['transaction'])
+puts SHELLEY.transactions.get(wid, tx_sub['id'])
+
+#Misc
+MISC.network.information
+MISC.network.clock
+MISC.proxy.submit_external_transaction(File.new("/tmp/blob.bin").read)
+MISC.utils.addresses("addr_test1vqrlltfahghjxl5sy5h5mvfrrlt6me5fqphhwjqvj5jd88cccqcek")
+
+ +

Contributing

+ +

Bug reports and pull requests are welcome on GitHub at github.com/piotr-iohk/cardano-wallet-rb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

+ +

License

+ +

The gem is available as open source under the terms of the MIT License.

+ +

Code of Conduct

+ +

Everyone interacting in the cardano-wallet-rb project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

+ + + + + + + \ No newline at end of file diff --git a/0.4.1/file_list.html b/0.4.1/file_list.html new file mode 100644 index 0000000..2b6df40 --- /dev/null +++ b/0.4.1/file_list.html @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + File List + + + +
+
+

File List

+ + + +
+ + +
+ + diff --git a/0.4.1/frames.html b/0.4.1/frames.html new file mode 100644 index 0000000..9596248 --- /dev/null +++ b/0.4.1/frames.html @@ -0,0 +1,17 @@ + + + + + Documentation for cardano_wallet (0.4.1) + + + + diff --git a/0.4.1/index.html b/0.4.1/index.html new file mode 100644 index 0000000..d2ec770 --- /dev/null +++ b/0.4.1/index.html @@ -0,0 +1,436 @@ + + + + + + + Documentation for cardano_wallet (0.4.1) + + + + + + + + + + + + + + + + + + + +
+ + +

Documentation for cardano_wallet (0.4.1)

+
+

Alphabetic Index

+ +

File Listing

+ + +
+

Namespace Listing A-Z

+ + + + + + + + +
+ + +
    +
  • A
  • +
      + +
    • + Addresses + + (CardanoWallet::Byron) + +
    • + +
    • + Addresses + + (CardanoWallet::Shared) + +
    • + +
    • + Addresses + + (CardanoWallet::Shelley) + +
    • + +
    • + Assets + + (CardanoWallet::Byron) + +
    • + +
    • + Assets + + (CardanoWallet::Shelley) + +
    • + +
    +
+ + +
    +
  • B
  • +
      + +
    • + Base + + (CardanoWallet) + +
    • + +
    • + Byron + + (CardanoWallet) + +
    • + +
    +
+ + + + + +
    +
  • I
  • +
      + +
    • + Init + + (CardanoWallet::Misc) + +
    • + +
    • + Init + + (CardanoWallet::Byron) + +
    • + +
    • + Init + + (CardanoWallet::Shared) + +
    • + +
    • + Init + + (CardanoWallet::Shelley) + +
    • + +
    +
+ + +
    +
  • K
  • +
      + +
    • + Keys + + (CardanoWallet::Shared) + +
    • + +
    • + Keys + + (CardanoWallet::Shelley) + +
    • + +
    +
+ + +
    +
  • M
  • +
      + +
    • + Migrations + + (CardanoWallet::Byron) + +
    • + +
    • + Migrations + + (CardanoWallet::Shelley) + +
    • + +
    • + Misc + + (CardanoWallet) + +
    • + +
    • + Mnemonic + + (CardanoWallet::Utils) + +
    • + +
    +
+ + +
    +
  • N
  • +
      + +
    • + Network + + (CardanoWallet::Misc) + +
    • + +
    • + Node + + (CardanoWallet::Misc) + +
    • + +
    +
+ + +
+ + +
    +
  • P
  • +
      + +
    • + Proxy + + (CardanoWallet::Misc) + +
    • + +
    +
+ + +
    +
  • S
  • +
      + +
    • + Settings + + (CardanoWallet::Misc) + +
    • + +
    • + Shared + + (CardanoWallet) + +
    • + +
    • + Shelley + + (CardanoWallet) + +
    • + +
    • + StakePools + + (CardanoWallet::Shelley) + +
    • + +
    +
+ + + + + +
    +
  • U
  • +
      + +
    • + Utils + + (CardanoWallet::Misc) + +
    • + +
    • + Utils + + (CardanoWallet) + +
    • + +
    +
+ + +
    +
  • W
  • +
      + +
    • + Wallets + + (CardanoWallet::Byron) + +
    • + +
    • + Wallets + + (CardanoWallet::Shared) + +
    • + +
    • + Wallets + + (CardanoWallet::Shelley) + +
    • + +
    +
+ +
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/0.4.1/js/app.js b/0.4.1/js/app.js new file mode 100644 index 0000000..8d067fe --- /dev/null +++ b/0.4.1/js/app.js @@ -0,0 +1,314 @@ +(function() { + +var localStorage = {}, sessionStorage = {}; +try { localStorage = window.localStorage; } catch (e) { } +try { sessionStorage = window.sessionStorage; } catch (e) { } + +function createSourceLinks() { + $('.method_details_list .source_code'). + before("[View source]"); + $('.toggleSource').toggle(function() { + $(this).parent().nextAll('.source_code').slideDown(100); + $(this).text("Hide source"); + }, + function() { + $(this).parent().nextAll('.source_code').slideUp(100); + $(this).text("View source"); + }); +} + +function createDefineLinks() { + var tHeight = 0; + $('.defines').after(" more..."); + $('.toggleDefines').toggle(function() { + tHeight = $(this).parent().prev().height(); + $(this).prev().css('display', 'inline'); + $(this).parent().prev().height($(this).parent().height()); + $(this).text("(less)"); + }, + function() { + $(this).prev().hide(); + $(this).parent().prev().height(tHeight); + $(this).text("more..."); + }); +} + +function createFullTreeLinks() { + var tHeight = 0; + $('.inheritanceTree').toggle(function() { + tHeight = $(this).parent().prev().height(); + $(this).parent().toggleClass('showAll'); + $(this).text("(hide)"); + $(this).parent().prev().height($(this).parent().height()); + }, + function() { + $(this).parent().toggleClass('showAll'); + $(this).parent().prev().height(tHeight); + $(this).text("show all"); + }); +} + +function searchFrameButtons() { + $('.full_list_link').click(function() { + toggleSearchFrame(this, $(this).attr('href')); + return false; + }); + window.addEventListener('message', function(e) { + if (e.data === 'navEscape') { + $('#nav').slideUp(100); + $('#search a').removeClass('active inactive'); + $(window).focus(); + } + }); + + $(window).resize(function() { + if ($('#search:visible').length === 0) { + $('#nav').removeAttr('style'); + $('#search a').removeClass('active inactive'); + $(window).focus(); + } + }); +} + +function toggleSearchFrame(id, link) { + var frame = $('#nav'); + $('#search a').removeClass('active').addClass('inactive'); + if (frame.attr('src') === link && frame.css('display') !== "none") { + frame.slideUp(100); + $('#search a').removeClass('active inactive'); + } + else { + $(id).addClass('active').removeClass('inactive'); + if (frame.attr('src') !== link) frame.attr('src', link); + frame.slideDown(100); + } +} + +function linkSummaries() { + $('.summary_signature').click(function() { + document.location = $(this).find('a').attr('href'); + }); +} + +function summaryToggle() { + $('.summary_toggle').click(function(e) { + e.preventDefault(); + localStorage.summaryCollapsed = $(this).text(); + $('.summary_toggle').each(function() { + $(this).text($(this).text() == "collapse" ? "expand" : "collapse"); + var next = $(this).parent().parent().nextAll('ul.summary').first(); + if (next.hasClass('compact')) { + next.toggle(); + next.nextAll('ul.summary').first().toggle(); + } + else if (next.hasClass('summary')) { + var list = $('