Verify Via Button
- After ARGOS ID package is installed, you can create a button to call the modal window.
- To create ARGOS ID button, insert 1 CSS file, 1 JS file and <argos-id> tag to the Head Tag.
- You can write codes in Java, Python, JSP, PHP, Ruby, Asp, JavaScript.
- 1.To create an ARGOS ID button, <argos-id></argos-id> tag is needed.
- 2.To use the tag, 1 CSS file and 1 JS file should be added as shown below.
<head>
<script defer src="https://id.trustargos.com/bundle.argos-id.js"></script>
<link href="https://id.trustargos.com/static/css/argos-id.css" rel="stylesheet">
</head>
- 1.Should be writtne in <body></body> tag.
- 2.There are 4 attributes for <argos-id></argos-id> tag.
- 3.'id' and 'project' are required.
- 4.'chains' and 'button-style' are optional, default value will be set when they are empty.
- When 'chain' is not desgnated in the code, the options set from the dashboard will be applied.
- 'chain' stated in the code has higher priority than the one from the dashboard.
- For the 'chains' value, bsc/eth/klay/matic/sol are available. They all should be seperated with a comma(,) and all should be in lower characters.
- 'chains' can be text but when it needs to dynamic, use dynamic variables.
- For 'button-style', CSS won't be applied. Please designate it as a variable and apply CSS.
Attribute | Required | Description |
---|---|---|
id | required | Set ID of ARGOS ID button. |
project | required | The ID of project created from the dashboard. |
chains | optional | Chains to be verified. |
button-style | optional | Set the CSS of the button, it will be overlayed with existing style. |
- With only <argos-id></argos-id> tag, the button won't be created. Options must be set between <script></script>.
- <script></script> tag shold be written under the <argos-id></argos-id> tag.
1
<argos-id
2
id = "{id}"
3
project = "{projectId}"
4
>
5
</argos-id>
- To set the property dynamically, specify it as variable and apply the options.
- <script></script> parts are examples.
1
<argos-id
2
id= "{id}"
3
project ="{projectId}"
4
button-style = "{button-style}"
5
chains = "{chains}"
6
>
7
</argos-id>
8
<script>
9
const argosIdButton = document.getElementById('id');
10
const chains = "bsc,eth,klay"
11
argosIdButton.setAttribute('chains', chains)
12
argosIdButton.setAttribute('button-style', '{"backgroundColor":"blue", "color":"white"}')
13
</script>
EX)
1
<argos-id
2
id="argos-id-button"
3
project ="projectId"
4
button-style = "{button-style}"
5
chains = "{chains}"
6
>
7
</argos-id>
8
<script>
9
if (window.location.href.includes('eth') {
10
const argosIdButton = document.getElementById('argos-id-button');
11
argosIdButton.setAttribute('chains', 'eth')
12
}
13
</script>
Last modified 9mo ago