Module: MixinBot::API::Snapshot

Included in:
MixinBot::API
Defined in:
lib/mixin_bot/api/snapshot.rb

Instance Method Summary collapse

Instance Method Details

#create_safe_snapshot_notification(**kwargs) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/mixin_bot/api/snapshot.rb', line 20

def create_safe_snapshot_notification(**kwargs)
  path = '/safe/snapshots/notifications'

  payload = {
    transaction_hash: kwargs[:transaction_hash],
    output_index: kwargs[:output_index],
    receiver_id: kwargs[:receiver_id]
  }

  client.post path, **payload, access_token: kwargs[:access_token]
end

#safe_snapshots(**options) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/mixin_bot/api/snapshot.rb', line 6

def safe_snapshots(**options)
  path = '/safe/snapshots'
  params = {
    limit: options[:limit],
    offset: options[:offset],
    asset: options[:asset],
    opponent: options[:opponent],
    app: options[:app_id],
    order: options[:order]
  }

  client.get path, **params
end