1.4.1 • Published 12 months ago

@cicleo/react-module v1.4.1

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months 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

12 months ago

1.4.0

12 months ago

1.3.8

12 months ago

1.3.7

1 year ago

1.2.13

1 year ago

1.2.14

1 year ago

1.2.15

1 year ago

1.3.6

1 year ago

1.3.5

1 year ago

1.3.4

1 year ago

1.3.3

1 year ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.12

1 year ago

1.2.11

1 year ago

1.2.9

1 year ago

1.2.0

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.37

1 year ago

1.0.36

1 year ago

1.0.35

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.39

1 year ago

1.0.38

1 year ago

1.0.40

1 year ago

1.0.44

1 year ago

1.0.42

1 year ago

1.0.41

1 year ago

1.0.47

1 year ago

1.0.46

1 year ago

1.0.45

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.29

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.33

1 year ago

1.0.11

1 year ago

1.0.32

1 year ago

1.0.10

1 year ago

1.0.31

1 year ago

1.0.30

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.34

1 year ago

1.0.12

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago