1.4.1 • Published 2 years ago

@cicleo/react-module v1.4.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Cicleo React Module

This module is to integrate Cicleo into your website This contain Payment Button and Manage Account Button

Installation

npm i @cicleo/react-module

Usage of the Payment Button

First import this on the top of your file who will use the Payment Button

import  "@cicleo/react-module/dist/index.css";
import { PaymentButton } from  "@cicleo/react-module";

Then integrate it as simply

<PaymentButton
	config={{56:  5}}
	subscriptionId={1} //Subscription id is the id of the subscription (see on dapp)
	signer={signer as ethers.providers.JsonRpcSigner}
/>

Per exemple this configuration will config the button to use the #5 Subscription Manager on the BSC network

To use multiples chains just put Network ID and the related Subscription Manager ID

 <PaymentButton
	config={{56:  5, 43114: 6}}//Will use subscription manager 5 on BSC and subscription manager 6 on Avalanche
	subscriptionId={1} //Subscription id is the id of the subscription (see on dapp)
	signer={signer as ethers.providers.JsonRpcSigner}
/>

If you use wagmi you can simply use that for signer object

import { useSigner, useNetwork } from  "wagmi";
let { data: signer } = useSigner();

And there you go !

Usage of the Dynamic Subscription Button

First import this on the top of your file who will use the Dynamic Payment Button

import  "@cicleo/react-module/dist/index.css";
import { DynamicPaymentButton } from  "@cicleo/react-module";

Then integrate it as simply

<DynamicPaymentButton
	config={{56:  5}}
	subscriptionName="Package name" //Name of the subscription
    subscriptionPrice="1000000000000000000" //Price in wei into the subscription manager token
	signer={signer as ethers.providers.JsonRpcSigner}
/>

Usage of the Manage your Account Button

First import this on the top of your file who will use the Payment Button

import  "@cicleo/react-module/dist/index.css";
import { AccountBlock } from  "@cicleo/react-module";

Then integrate it as simply

<AccountBlock
	config={{56:  5}}
	signer={signer as ethers.providers.JsonRpcSigner}
/>

Per exemple this configuration will config the button to use the #5 Subscription Manager on the BSC network

To use multiples chains just put Network ID and the related Subscription Manager ID

 <AccountBlock
	config={{56:  5, 43114: 6}}//Will use subscription manager 5 on BSC and subscription manager 6 on Avalanche
	signer={signer as ethers.providers.JsonRpcSigner}
/>

If you use wagmi you can simply use that for signer object

import { useSigner, useNetwork } from  "wagmi";
let { data: signer } = useSigner();

And there you go !

Find my Subscription Manager ID ?

First go on https://cicleo.io/subscription/manage and click on your Subscription Manager, then you'll find it on the URL of the page

enter image description here

1.4.1

2 years ago

1.4.0

2 years ago

1.3.8

2 years ago

1.3.7

2 years ago

1.2.13

2 years ago

1.2.14

2 years ago

1.2.15

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.12

2 years ago

1.2.11

2 years ago

1.2.9

2 years ago

1.2.0

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.0.37

3 years ago

1.0.36

3 years ago

1.0.35

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.39

3 years ago

1.0.38

3 years ago

1.0.40

3 years ago

1.0.44

3 years ago

1.0.42

3 years ago

1.0.41

3 years ago

1.0.47

3 years ago

1.0.46

3 years ago

1.0.45

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.26

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.29

3 years ago

1.0.28

3 years ago

1.0.27

3 years ago

1.0.33

3 years ago

1.0.11

3 years ago

1.0.32

3 years ago

1.0.10

3 years ago

1.0.31

3 years ago

1.0.30

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.34

3 years ago

1.0.12

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago