NASA Planetary Mission

    qubic-creator-sdk
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.4 • Public • Published

    Qubic creator SDK

    Usage

    const creatorHelper = new CreatorHelper({
      name: 'xxx',
      service: 'xxx',
      domain: 'xxx',
      key: 'xxx',
      secret: 'xxx',
      qubicWalletKey: 'xxx',
      qubicWalletSecret: 'xxx',
      infuraId: 'xxx',
      creatorUrl: 'xxx', //optional
      chainId: 'xxx', //optional
    });

    // 預設 style 顯示成 pop 中間

    createHelper.createLoginPanel(element: DomElement, {
      onLogin: (
        errorMessage: string,
        data: {
          type: 'metamask' | 'walletconnect' | 'qubic',
          address: string,
          accessToken: string,
          errorMessage: string,
          provider: ExternalProvider
        }
      ) => void,
      // onLogout: () => void
      titleText?: string, // default: 'Connect your wallet'
      containerStyle?: CSSStyle,
      backdropStyle?: CSSStyle,
      itemStyle?: CSSStyle,
    })
    
    
    // iframe
    createHelper.createPaymentPanel(element: DomElement, {
      onOrderCreated: (order: Order) => void,
      onError: (errorMessage: string) => void
    })

    TODO

    • try to cache createOrGetRoot for handling same element createRoot again

    Keywords

    none

    Install

    npm i qubic-creator-sdk

    DownloadsWeekly Downloads

    15

    Version

    0.1.4

    License

    Apache-2.0

    Unpacked Size

    65.5 kB

    Total Files

    45

    Last publish

    Collaborators

    • roadmanfong