donate3-sdk
v1.0.44
Published
Donate3 from LXDAO
Downloads
23
Readme
<Donate3 />
A donate in cryptocurrency component(Give me a cup of coffee Web3 version.)
Features
- <Donate3 /> is a fundamental components for Web3 Apps.
Documentation
- Getting Started
<Donate3 />
- Markdown Link
Development
1
Just as a js component for your project.
React:
import { Donate3 } from 'donate3-sdk';
import 'donate3-sdk/dist/style.css';
const config = {
cid: 'bafkreibnfk3tnrmqpgn2b3ynqo7lp7wcolrynuspq54o2dwp25dshmmmou',
// The cid can be generated after the official website configuration information
// If cid exists, other parameters are not required,
// otherwise the remaining parameters are required
type: 1, // 0 Float mode,1 Normal mode
color: "#396AFF", // setting primary color
title: "Charity3", // Your donate project title
accountType: 1, // 0 Externally Owned Accounts, 1 safe Accounts
safeAccounts: [
{
networkId: 1, // the id of the network
address: "0xb86EB6f8a39Db243a9ae544F180ef958dBA4e8b4",
// Your address on the network to accept donations, Use `0x{String}`
}
], //
toAddress: "0xb86EB6f8a39Db243a9ae544F180ef958dBA4e8b4",
// Your donate address, Use `0x{String}`
}
export default () => <Donate3 config={...config}/>
Nextjs
import 'donate3-sdk/dist/style.css'
const Donate3 = dynamic(() => import('donate3-sdk').then(e => e.Donate3), {
ssr: false,
})
const config = {
cid: 'bafkreibnfk3tnrmqpgn2b3ynqo7lp7wcolrynuspq54o2dwp25dshmmmou',
// The cid can be generated after the official website configuration information
// If cid exists, other parameters are not required,
// otherwise the remaining parameters are required
type: 1, // 0 Float mode,1 Normal mode
color: "#396AFF", // setting primary color
title: "Charity3", // Your donate project title
accountType: 1, // 0 Externally Owned Accounts, 1 safe Accounts
safeAccounts: [
{
networkId: 1, // the id of the network
address: "0xb86EB6f8a39Db243a9ae544F180ef958dBA4e8b4",
// Your address on the network to accept donations, Use `0x{String}`
}
], //
toAddress: "0xb86EB6f8a39Db243a9ae544F180ef958dBA4e8b4",
// Your donate address, Use `0x{String}`
}
export default () => <Donate3 config={...config}/>
2
Import a js CDN url to your own website;
If cid exists, other parameters are not required, otherwise the remaining parameters are required
data-donate3-cid
: The cid can be generated after the official website configuration information
data-donate3-type
: 0 Float mode,1 Normal mode
data-donate3-color
: setting primary color
data-donate3-title
: Your donate project title
data-donate3-account-type
: 0 Externally Owned Accounts, 1 safe Accounts
data-donate3-safe-accounts
: [
{
networkId: 1, // the id of the network
address: "0xb86EB6f8a39Db243a9ae544F180ef958dBA4e8b4",
// Your address on the network to accept donations, Use 0x{String}
}
] // This field is an array and needs to be stringified, like this '[{"networkId":1,"address":"0xb86EB6f8a39Db243a9ae544F180ef958dBA4e8b4"}]'
data-donate3-to-address
: Your donate address, Use 0x{String}
<div
data-donate3-cid="bafkreibnfk3tnrmqpgn2b3ynqo7lp7wcolrynuspq54o2dwp25dshmmmou"
data-donate3-type="1"
data-donate3-color="#396AFF"
data-donate3-title="charity3"
data-donate3-account-type="1"
data-donate3-safe-accounts='[{"networkId":1,"address":"0xb86EB6f8a39Db243a9ae544F180ef958dBA4e8b4"}]'
data-donate3-to-address="0xb86EB6f8a39Db243a9ae544F180ef958dBA4e8b4"
></div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/webpack/bundle.js"></script>
3
You can add the corresponding link to the markdown.
<a href="Your Donate3 Link" target="_blank"><img src="https://www.donate3.xyz/Donate3ToMe.svg" alt="Donate3 To Me"></a>
Contact us
YanboTravelAllWorld
Telegarm
License
MIT License
Supported by LXDAO
This is a project supported by LXDAO. More links: LXDAO | LXDAO Forum | LXDAO Discord | LXDAO Twitter.
LXDAO is an R&D-focused DAO in Web3. Our mission is: Gather the power of buidlers to buidl and support “LX” (valuable) Web3 projects sustainably and welcome 1 billion users into Web3. Welcome to join us.