GithubHelp home page GithubHelp logo

ethos-connect's Introduction

Ethos Connect

Documentation

For full documentation on Ethos Connect please visit Ethos Connect.

Setting up local development

From the root folder of the project you are working on (not this project)

yarn remove ethos-connect
cd node_modules/react
yarn unlink
yarn link
cd ../react-dom
yarn unlink
yarn link
cd ../..

From the root directory of this project:

yarn unlink react
yarn unlink react-dom
yarn link
yarn install
yarn link react
yarn link react-dom
yarn build

From the root folder of the project you are working on (not this project)

yarn link ethos-connect

To reset local

To reset your UI (consumer of the NPM package)

yarn unlink ethos-connect
yarn unlink react
yarn unlink react-dom
yarn add ethos-connect react react-dom

To reset and unlink in the NPM package repo

yarn unlink
yarn unlink react
yarn unlink react-dom
yarn add react react-dom

You can also reset all your linked packages by running (mac only):

rm -rf cd ~/.config/yarn/*

Or, for windows powershell:

Remove-Item C:\Users\<USERNAME>\AppData\Local\Yarn\Data\link\* -Recurse -Force

Publishing

When you're ready to publish your changes, update the package.json file with a new version number following Semantic Versioning guidelines. Then run:

npm publish

This will run the prepublishOnly script and publish the new version to NPM.

ethos-connect's People

Contributors

adamwade2384 avatar aegatlin avatar benjaminrosenberg avatar cijiugechu avatar dependabot[bot] avatar i-am-neon avatar jaredcosulich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ethos-connect's Issues

Can I use this repo to check wallet balance and transfer some funds?

Hello:
I found there is web browser extension wallet: Ethos Sui Wallet, and I want to know the following:

  1. Does the wallet support tokens (like USDT) on HECO chain?
  2. Can I use the repo (do you have NPM for Node.js?) to check wallet balance and transfer received funds to another address via different network: like receive USDT via HECO network, and send to another address via ERC20/BEP20 network?
    Please advise,

How to use ethos-connect for args: vector<u8>?

I get an error on the front end using the ethos interaction contract, but the same parameters are fine in the sui client.
I succeeded in the method with only String parameters, but this multi-parameter method failed.
I suspect it's a problem with the vector type.
Error:
Uncaught (in promise) Error: Transaction failed with the following error. Error executing a move call: Error: RPC Error: invalid type: map, expected a string at line 1 column 0 with args {"arguments":["[email protected]","james king","bavatar","2000-01-01","male","Basketball","["nba"]","USA","King"],"function":"register","gasBudget":10000,"module":"user","packageObjectId":{"contractAddress":"0xc867a645b70c7741121ef1c4f713a8efd6b96481"},"typeArguments":[]}
Contract:

   public entry fun register(
        email: String,
        name: String,
        avatar: vector<u8>,
        birthday: String,
        gender: String,
        biography: String,
        interests: vector<String>,
        location: String,
        memo: String,
        ctx: &mut TxContext,
    ) 
----- Certificate ----
Transaction Hash: 2EqZEDQCwjh4YnBg8W/d+O31e2Np6gk9eDlRXbD8Z6U=
Transaction Signature: AA==@Mg/OFIUWiSBKSjT6SXuQI4yDfXFm49RPlwJscEOpfVjV5T80tpd/rM0PsOfeamtaXqANPxCYiWCEn7o7lFjiBw==@UqPyfxDF4mqhd2SCOsx6sN8gX3XXRnnJ6Z0bLmOxsWU=
Signed Authorities Bitmap: RoaringBitmap<[0, 1, 3]>
Transaction Kind : Call
Package ID : 0xc867a645b70c7741121ef1c4f713a8efd6b96481
Module : user
Function : register
Arguments : ["[email protected]", "james king", "bavatar", "2000-01-01", "male", "Basketball", ["nba"], "USA", "King"]
Type Arguments : []
----- Transaction Effects ----
Status : Success
Created Objects:
  - ID: 0x96def174a8a64eaeb8a941a9e7ad79d5f0d9f09f , Owner: Account Address ( 0x01f97c6894c897f4e23d551bdf7faf29fef505ec )
Mutated Objects:
  - ID: 0x0ca37c1f455cf54dfea412bfdf01f3ca90ad8f8b , Owner: Account Address ( 0x01f97c6894c897f4e23d551bdf7faf29fef505ec )

Front End:

 data: {
                packageObjectId: contractAddress,
                module: 'user',
                function: 'register',
                typeArguments: [],
                arguments: [
                    '[email protected]',
                    'james king',
                    'bavatar',//'[]', '[""]', '[90,10]'  Replacing them with these parameters still gives an error
                    '2000-01-01',
                    'male',
                    'Basketball',
                    '["nba"]',
                    'USA',
                    'King'
                ],
                gasBudget: 10000,
 }

EthosConnect gets stuck in the "loading" status

I was able to connect to the Sui wallet however after I refreshed the page it show the following errors

Unhandled Runtime Error
Error: Error fetching owned object: Error: RPC Error: Method not found for address 

Call Stack
JsonRpcProvider.eval
node_modules/@mysten/sui.js/dist/index.mjs (3554:0)
Generator.throw
<anonymous>
rejected
node_modules/@mysten/sui.js/dist/index.mjs (52:0)

Below is my nextjs page

export default function HomePage() {
  const { status, wallet } = ethos.useWallet();

  return (
    <EthosConnectProvider
      dappName='Joed'
      connectMessage='Your connect message goes here!'
      ethosConfiguration={{
        hideEmailSignIn: false, // defaults to false,
      }}
    >
      <Layout>
        <Seo />

        <main>
          <section className='bg-white'>
            <div>
              Status: {status}, address {wallet?.address}
            </div>
            <SignInButton> Connect Wallet </SignInButton>
          </section>
        </main>
      </Layout>
    </EthosConnectProvider>
  );
}

Next js + Tailwind CSS + TypeScript Starter 2023-03-28 20-10-39

My node modules

"ethos-connect": "^0.0.106",
"next": "^13.2.4",
"react": "^18.2.0",

AddressWidget error when trying to exludeButtons

I am trying to use the AddressWidget inside my App. I want to exlude the WalletExplorer button so I did this:

<ethos.components.AddressWidget excludeButtons={[AddressWidgetButtons.WalletExplorer]} />
The problem with this is that:

ERROR in ./src/client/layouts/NavBar.tsx 40:0-85 Module not found: Error: Package path ./dist/enums/AddressWidgetButtons is not exported from package .../node_modules/ethos-connect (see exports field in .../node_modules/ethos-connect/package.json)

So the type need to be used is not properly exported. I tried to use the value directly "wallet_explorer" but the component expects type of AddressWidgetButtons , so I need to use ts-ignore.

I am raising this issue for future resolution.

Disconnect doesnt work

Ethos connect version: 0.0.123

On vanilla create-react-app, the ethos disconnect wallet doesn't seem to disconnect the wallet, it stays connected.

Error with Next.js 13

Hello! I try to connect my next.js application with Ethos, but there are some error
window.navigator.wallets is not an array

As result I can't connect to sui at all... Maybe it happens with version 13? Can you fix it?

image

image

deprecated @mysten/[email protected]: Wallet adapters have been deprecated in favor of the Wallet Standard. Please upgrade to the latest Wallet Kit versions.

any plans on updating dependencies?

$ npm install ethos-connect --save
[…]
npm WARN deprecated @mysten/[email protected]: Wallet adapters have been deprecated in favor of the Wallet Standard. Please upgrade to the latest Wallet Kit versions.
npm WARN deprecated @mysten/[email protected]: Wallet adapters have been deprecated in favor of the Wallet Standard. Please upgrade to the latest Wallet Kit versions.
npm WARN deprecated @mysten/[email protected]: Wallet adapters have been deprecated in favor of the Wallet Standard. Please upgrade to the latest Wallet Kit versions.
npm WARN deprecated @mysten/[email protected]: Wallet adapters have been deprecated in favor of the Wallet Standard. Please upgrade to the latest Wallet Kit versions.
[…]

$ node -v
v18.17.1

$ npm -v
10.1.0

$ sw_vers
ProductName:            macOS
ProductVersion:         13.4.1
ProductVersionExtra:    (c)
BuildVersion:           22F770820d

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.