0.0.15 • Published 1 year ago

donate3-sdk-ellen v0.0.15

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

<Donate3 />

A donate in cryptocurrency component(Give me a cup of coffee)

Features

  • npm (tag) npm (downloads) \<Donate3 \/> is a fundamental components for Web3 Apps.

Documentation

Development

The first method uses Donate3,Just as a js component for your project

React:

import { Donate3 } from 'donate3-sdk-ellen';
import 'donate3-sdk-ellen/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-ellen/dist/style.css'
const Donate3 = dynamic(() => import('donate3-sdk-ellen').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}/>

The second method uses Donate3,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/donate3-sdk-ellen@0.0.9/dist/webpack/bundle.js"></script>

The third way is that 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>

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.

Join our Discord server!