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

2 years ago

1.0.36

2 years ago

1.0.35

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.39

2 years ago

1.0.38

2 years ago

1.0.40

2 years ago

1.0.44

2 years ago

1.0.42

2 years ago

1.0.41

2 years ago

1.0.47

2 years ago

1.0.46

2 years ago

1.0.45

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.33

2 years ago

1.0.11

2 years ago

1.0.32

2 years ago

1.0.10

2 years ago

1.0.31

2 years ago

1.0.30

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.34

2 years ago

1.0.12

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago