Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Repository with widget used in Network Members functionality.

Notifications You must be signed in to change notification settings

coinfirm/NetworkMembersWidget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Network Members widget

Installation

Copy content of dist directory to your web application scripts and styles.

Implementation

Front-side

Add following code to <head> of your site:

<link rel="stylesheet" href="path/to/amlt-widget.css">
<script src="path/to/amlt-widget.js"></script>
<script>
    amltWidget();
</script>
<div id="amlt-widget" data-url="/example/server.php" data-user-input="true">
    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHQAAAAnCAYAAADegGx+AAABg2lDQ1BzUkdCIElFQzYxOTY2LTIuMQAAKM+VkblLQ0EQh79EJR7xAAUtLIJEQYgSIwRtLCIaBbVIIng1yTOHkOPxXoIEW8E2oCDaeBX6F2grWAuCoggi2Fkr2qg85xkhQUjhLjvz7W93hp1ZsIaSSkqvdkMqndUCfp9jbn7BYXuijnaa6KU/rOjqdHA8RMXxfovF9Nd9Zi7+NxqWo7oCllrhEUXVssITwlOrWdXkLeE2JRFeFj4RdmnyQOEbU48U+dnkeJE/TdZCgVGprUXYES/jSBkrCS0lLJXjTCVzyu97zErs0fRsUHyXrE50Avjx4WCSMUbxMsCwWC99eOiXHRXi3T/xM2QkVhGrkkdjhTgJsrhEzUn2qPiY6FGZSfJm///2VY8NeorZ7T6oeTSM126wbcJXwTA+Dgzj6xCqHuA8XYrP7MPQm+iFkubcg+Z1OL0oaZFtONuAjns1rIV/pCpZ1lgMXo6hcR5ar6B+sdiz33OO7iC0Jl91CTu70CP3m5e+Aa2FaAa80MNAAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjb8jGPfAAAHE0lEQVR4Xu2caagVZRjHr6mVllYUlZJlC7SYmYoU2SJlaFlJy5dCsMQoyg9li2TYooH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vZ0wi86vKc3TTQEw7lb1s6BH0bqyWoqKRmf32mhbx2Z8JGdkBPNqRu+pYUC/3bXkIFlcvfh/YR6OP2EypoQEm9C+WhG9/lL7h7Cfq6/YQKGtHOTN7/WEg94VfSeehzP2oTGlJSw39B0bOj5X9B2Sx0df0PhvpAjWeFBV8AAAAASUVORK5CYII=">
</div>

Params

Parameter Type Description
data-url String URL Address on your backend, used to send widget data trough API
data-logo* String URL Address of your logo
data-user-input* Boolean Allow user to identify himself (can be also made on server-side)

* - optional

Server-side

Reported addresses are stored under specific Network Member profile. This is why address reporting MUST BE done by API request.

Endpoint used to report addresses:

https://api.coinfirm.com/v3/panels/nm/reported_address

Method: POST

Payload:

Parameter Type Description Example value
address String Address to report
address_type String Address type ETH
rate Number Address rate 0 - negative, 1 - neutral, 2 - positive 0
owner (optional) String Address owner name Coinfirm
description (optional) String Some additional info about address
urls (optional) Object[] Array of links connected to address [ [ "url" => "https://coinfirm.com" ], ... ]
files Object[] Array of proof files connected to address [ [ "base64" => "...", "type" => "image/png" ], ... ]

Customization

To customize widget pass options object to widget initialization function. Currently supported customization options:

<script>
    amltWidget({
        font: {
            name: 'Roboto Mono' // Font name from google fonts
        },
        style: {
            fontColor: '#fff',
            bgColor: '#040a0f',
            footerBgColor: '#142a42',
            successColor: '#6edf2e',
            neutralColor: '#a0adbe',
            dangerColor: '#f24226',
            inputFontColor: '#fff',
            inputBgColor: '#040a0f',
            inputBorderStyle: 'bottom', // or full (default)
            inputBorderColor: '#37404a',
            buttonFontColor: '#404040'
        }
    });
</script>

Examples

Development

Install dependencies

npm i

Build and minimize assets before deployment

npm run build

About

Repository with widget used in Network Members functionality.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •