Configuration Parameters
Gateway Provider
The configuration parameters of the Gateway Provider vary slightly depending on the blockchain. For a full integration guide on integrating the Gateway Provider, please see UI Modal.
Property | Description | Type |
wallet | An object representing the user's wallet. This may be |
|
wallet.publicKey | The user wallet's public key. |
|
wallet.signTransaction | A function that asks the user's wallet to sign a transaction. |
where |
gatekeeperNetwork | The address of the Gatekeeper Network for which your Civic Passes are issued.
To get started you can use the address of the CAPTCHA Verification: |
|
connection | A Solana connection to any Solana network. The recommended commitment level is |
|
cluster | The Solana network to use (i.e. |
|
Advanced Configuration
Client options
You can specify some options that affect the display behavior of the Civic modal that the user interacts with:
Property | Description | Type |
autoShowModal | Whether the Civic modal should appear automatically if the Civic Pass token state changes. | true | false |
logLevel | The log level. | debug | info | warn | error |
disableAutoRestartOnValidationFailure | [Optional] When set to true, prevents the flow to automatically restart on user validation failure (USER_INFORMATION_REJECTED). Defaults to false. | true | false |
Usage example:
Paying for your customers' transactions
If your users do not have crypto wallets, you can subsidize the cost of their passes, including the transaction cost, by signing and sending the transactions yourself.
To do this:
Set the
payer
field on the front-endCreate a back-end service to sign and send the transaction (warning: ensure you verify the source of the transaction before signing! Signing arbitrary transactions from an unsecured front-end can lead to loss of funds)
Call that back-end service from the front-end via the
handleTransaction
callback.
For more details, see here:
Broadcasting transactions via Civic
In the default mode of operation, the transaction required to issue or refresh the Civic Pass will be signed, but not broadcasted, by Civic. The user is responsible for broadcasting the transaction, including any fees. This flow is handled transparently by the Gateway Provider, which also communicates any fees to the user via the Civic Pass modal.
Some Gatekeeper Networks support an alternative mode such as having the Civic backend broadcast the transaction. If the Gatekeeper Network you are using supports this, you can set the gatekeeperSendsTransaction
property to true
to turn it on.
Property | Description | Type |
gatekeeperSendsTransaction | Civic will send the transaction to the blockchain on behalf of the user. Defaults to | true | false |
forceRequireRefresh | Setting this flag forces the user to refresh their active pass when set, even if the pass is not expired.
Defaults to | true | false |
Last updated