Giter Site home page Giter Site logo

waxjs's People

Stargazers

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

Watchers

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

waxjs's Issues

How to verify account ownership?

Is there a way to verify a users ownership of wax account via WaxJS? I need to be able to verify from the backend. Having the client pass to me simply an account name is not sufficient.

I can do this with anchor via their IdentityProof after initiating a login, or with eosjs by asking the user to sign an arbitrary message and verifying that. I haven't seen a way to do something like this via WaxJS.

Could someone point me in the write direction? It would be preferable to be able to do this without pushing a transaction on chain.

Any help much appreciated :)

How to connect waxjs to testnet

Hello, I want to connect waxjs to test-net instead of using main-net, I tried it by replacing rpc-endpoint, but it didn't works

this.wax = new waxjs.WaxJS('https://testnet.waxsweden.org/', null, null, false);

Can't pass oAuth.

When I try to pass oAuth on my local server, I get this error: "Error:Could not resolve host: api.opskins.com".
And when I try on hosting: "Error:Failed to connect to api.opskins.com port 443: Connection refused".
It seems something is wrong with: "api.opskins.com".

How to redeem the pledged WAX

I have no way to redeem my pledged WAX coins. When I apply for redemption, he asked me to go to this website to find a solution. What do I need to do? You will give us a new program

Signing transactions with only existing user keys for broadcast: false

I have a transaction that requires permission from two users. How to use wax js to sign it with the keys that the user has?
Anchor does this, and wax js returns an error: Error: transaction declares authority '{"actor":"userTwo","permission":"active"}', but does not have signatures for it.

How to Transfer NFT

I am not able to find a guide/example of how waxjs could be used to transfer NFT.

Signing Issue

Sometimes it works sometimes throw the following message.
transaction declares authority '{"actor":"myaccountname","permission":"active"}', but does not have signatures for it under a provided delay of 0 ms, provided permissions [], provided keys [], and a delay max limit of 3888000000 ms

I check waxjs in console the object is fine, i enable autologin and do check before transaction but failed

    let isAutoLoginAvailable = await wax.isAutoLoginAvailable();
    if (!isAutoLoginAvailable) {
        await wax.login();
    }
    let userAccount = wax.userAccount;
    try {
        let result = await wax.api.transact({
            actions: [{
                account: 'atomicassets',
                name: 'transfer',
                authorization: [{
                    actor: userAccount,
                    permission: 'active',
                }],
                data: data,
            }]
        }, {
            blocksBehind: 12,
            expireSeconds: 120,
            broadcast: true,
            sign: true,
        }).then((d) => console.log(d)).catch(onErrorCallback)
        return result;
    } catch (error) {
        return onErrorCallback(error)
    }

ForbiddenTransactionException - Malicious website blocked

Since a few days I am getting a ForbiddenTransactionException when trying to broadcast a transaction using wax cloud wallet:
{error: "ForbiddenTransactionException", message: "Malicious website blocked"}

I can't find any documentation on the issue - how to unblock my site or do I need to send some kind of api key / token for the transaction broadcast to go through? Updating to version 1.3.0 doesn't help either..

WaxJS login

Upon integrating the waxjs, I encountered this issue.

image

It says that unknown URL. When I test in my local, it shows the URL of my localhost while the live and staging are not.

Can someone enlighten me on what is going on ?

Thank You.

Unstake Ram

My old version of Wax Bloks is apparently too old, and I was sent in this direction to update app in order to unstake

Login in iOS hybrid (cordova) app

Hi, for our iOS hybrid app (cordova) we would like to use Wax blockchain. What's the best way to implement the wax login? I guess it has to be in popup browser (similar to FB login) but I can't find any documentation or iOS SDK. Tried asking on the Discord but got nothing back.

General fixes

Summary

This package is important to the community, we shouldn't let it die. There are still plenty of things to do:

  • Github templates
  • Fix export
  • Change compiler (recommend tsup), to allow both commonjs, and modules to be used
  • Add logout method (suggested on #100)
  • Listen for popup closing (or timeout)
  • Add jsdoc description to methods
  • add mock ability so the package can be better tested (and also override some behaviors if the user needs it)
  • add github workflow for handling package validation, testing and publish

Local storage issue

hi i am using 0.0.15 version of @waxio/waxjs in node.js but when i am trying to use autologin it gives me error ReferenceError: is not defined can anyone help me to sort out this error.

Screenshot 2021-06-13 at 11 52 28 AM

Cant login in WAX account with waxjs

Im update waxjs version because old version alert "You need to update version to use WAX".
After update, Im trying to login to WAX as this:

const wax = new waxjs.WaxJS({ 
      rpcEndpoint:  'https://wax.greymass.com', 
      userAccount: network.account,
      tryAutoLogin: true,
      pubKeys: network.keys
     })
const userAccount = await wax.login()

but I have 422 error:

XHRGET
https://idm-api.mycloudwallet.com/v1/accounts/auto-accept/login
[HTTP/2 422  215ms]

	
GET
	https://idm-api.mycloudwallet.com/v1/accounts/auto-accept/login
Status
422
Referrer policystrict-origin-when-cross-origin

    access-control-allow-credentials
    	true
    access-control-allow-origin
    	http://localhost:8080
    cache-control
    	no-cache, private
    cf-cache-status
    	DYNAMIC
    cf-ray
    	81828d1ffa2f16db-DME
    content-language
    	ru
    content-type
    	application/json
    date
    	Wed, 18 Oct 2023 17:37:47 GMT
    server
    	cloudflare
    vary
    	Origin
    X-Firefox-Spdy
    	h2
    	
    Accept
    	*/*
    Accept-Encoding
    	gzip, deflate, br
    Accept-Language
    	ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3
    Connection
    	keep-alive
    Host
    	idm-api.mycloudwallet.com
    Origin
    	http://localhost:8080
    Referer
    	http://localhost:8080/
    Sec-Fetch-Dest
    	empty
    Sec-Fetch-Mode
    	cors
    Sec-Fetch-Site
    	cross-site
    TE
    	trailers

and responce content:

errors	[ {…} ]
0	Object { error_type: "Request validation error", message: "Session token required in header", error_code: "0" }

How to resolve this error?

Make `userAccount` public

There is no reason that userAccount is private. Typescript complains when I try to access it on WaxJS objects so I need to add //@ts-ignore each time I am using it.

UglifyJS error

I get this error every time I build my project:
Error: bundles\pages\index.js from UglifyJs
Unexpected token: name (WaxJS)
I tried to shut down UglifyJs, as well as replace it with other minifier and even disable minification at all – nothing of that works. Configuring Babel also doesn't help.

[Bug] signViaEndpoint Don't worked

I use signViaEndpoint for auto sign.

But the http response is :

{"errors":[{"error_type":"Unauthorized","message":"Session token invalid or expired","error_code":"0"}]}

Error Message with the Wax.gallery

Hi,

I thought that I would let someone know that whenever I try to login to the "Wax.gallery" I am receiving the error message below,

"This application is currently utilizing an outdated version of waxjs that is no longer supported.
We kindly request you to contact the application's team to upgrade to the latest waxjs version"

Thanks,

Matt

Cannot read property 'length' of undefined

Hi, I have an issue when i use the wax sample code of wax ref- https://developer.wax.io/waa/waxjs-demo/
i click the sendToken button for send transaction function to transfer WAX, I got an error (Cannot read property 'length' of undefined) before the window popup .

I m using this function to send the transfer function
Code-->
async function sendToken() {
if (!wax.api) {
return document.getElementById('response').append('* Login first *');
}
try {
const result = await wax.api.transact({
actions: [{
account: 'eosio.token',
name: 'transfer',
authorization: [{
actor: wax.userAccount,
permission: 'active',
}],
data: {
from: wax.userAccount,
to: 'jahvu.wam',
quantity: '0.1 WAX',
memo: 'demo ',
},
}]
}, {
blocksBehind: 3,
expireSeconds: 1200,
});
// console.log("result===>", result);
document.getElementById('response').append(JSON.stringify(result, null, 2))
} catch (e) {
// console.log("hello", e);
document.getElementById('response').append(e.message);
}
}

If anyone know about how to solve this error..!!

Screenshot from 2021-08-30 19-27-02

How to use it on raw NodeJS

fetch doesnt supported defaultly, we can just use node-fetch but wax cloud wallet auth thing making it really centralised and i cant open auth page from raw nodejs.

c++ vesion?

hello, is there a c++ version of the library to use in unreal engine?

TypeError: t us undefined

Trying to implement v1.0 of the waxjs.js library and when I try and create a new instance with

const wax = new waxjs.WaxJS('https://api.waxsweden.org'); it is giving me the error:

TypeError: t is undefined

Previous builds seemed to work ok. Any ideas or am I doing something wrong here?

cloud wallet redirecting doesn't work on webkit of LINE app

Screenshot (Oct 3, 2021 13_00_21)

hello I tried to create new wallet from webkit of LINE app but counting-down and redirecting doesn't work.
is it available to put a link "click/tap here if redirecting doesn't work in 5 seconds" on this page?

also it would be great if you have multi-language on this page, thanks!

trying to use eosio.msig with wax wallet

Hello,

i've been trying to use actions from the contract eosio.msig, it works with anchor, but wax wallet sends the error "Error : Request failed with status code 403, This transaction contains forbidden actions".

It tried also what has been mentionned in this issue

#99

to set 'freeBandwidth' to false in the intialization but doesn't seem to allow WCW to sign a transaction that require authorization from multiple accounts.

Is the error 'This transaction contains forbidden actions' normal using eosio.msig ?
{"actions": [ {"account":"eosio.msig", "name":"propose", "authorization":[ {"actor":"3bhmm.c.wam","permission":"active"} ], "data": { "proposer":"3bhmm.c.wam", "proposal_name":"wjnnomfwv2zw", "requested":[ {"actor":"3bhmm.c.wam","permission":"active"}, {"actor":"hobby1testsc","permission":"active"} ], "trx": { "expiration":"2022-05-15T10:08:58", "ref_block_num":0, "ref_block_prefix":0, "max_net_usage_words":0, "max_cpu_usage_ms":0, "delay_sec":0, "context_free_actions":[], "actions":[ { "account":"starcadiagam", "name":"usemulti", "authorization":[ {"actor":"3bhmm.c.wam","permission":"active"}, {"actor":"hobby1testsc","permission":"active"} ], "data":"02FED86C0E0001000000A4E1000129DB19FBD86C0E000100008070C62A077F0E6DB3000000" } ], "transaction_extensions":[] } } } ]}

same error if i create the proposal with anchor and try to execute the approve action with WCW.

Global is not defined (for the Global.fetch in eosjs-jsonrpc.js line 87)

Hello, im trying to implement Waxjs into an Angular app, i did an npm i @waxio/waxjs, then i imported with "import * as waxjs from "@waxio/waxjs/dist";" but when i try to call it with " const wax = new waxjs.WaxJS('https://wax.greymass.com/', undefined, undefined, false);
" or new waxjs.WaxJS('https://wax.greymass.com/%27) i have the following issue :

Global is not defined (for the Global.fetch in eosjs-jsonrpc.js line 87)
I searched about webpack problms but didnt found something for solve it ( tryed to manualy require global-fetch ..ect)
If someone could help me pls, thanks

How to find the profile endpoint with the identity_wcw scope

I see that we can pass the account name and public keys to instantiate the object but I don't know how to find them from this sentence.

If you use the WAX Cloud Wallet OA service to sign a user in, you can use the profile endpoint with the identity_wcw scope to get a user’s WAX Blockchain Account name and public keys.

Wax account log in

No where in any examples do I see usage of the password or private key, how does login supposed to work if there is never passed the password or private key?

CloudWallet login via Github not possible

I'm not sure if this is the right repo to post this issue so please bear with me.

For about three days I'm unable to log into the WAX Cloud Wallet via GitHub authentication.
Upon signing in it quickly shows a redirect window and then sends me back to the login again.
This happens on each site that uses the Cloud Wallet and on the wallet itself.

What I tried so far without success:

  • restart the browser
  • Clear the cache
  • Use a different browser
  • Use a different PC in another location

According to Reddit there are a couple of other people suffering under the same issue:
https://www.reddit.com/r/AlienWorldsio/comments/n0l1ir/can_not_login_wax_cloud_wallet_with_github/

image

Cannot read property 'replace' of undefined

I am using 0.0.7 version of @waxio/waxjs in js.
I am trying to call the wax.login() it gives me error Cannot read property 'replace' of undefined
I believe there's an error with the library - wax.js . I have tried running the sdk example as well as the full html example as represented in the docs.

Can anyone help me out on this error ?
Thanks

Not working in Electronjs

Hi my friend, you are not working on Electronjs.

  • I'm using ReactJS + ElectronJS and it's not working.
  • Does not return anything from the promise, Nothing happens.
  • In ReactJS it works, but using Electron JS the package doesn't work.

logout?

how can I logout from client?

Delete This Thread..

Splinterlands Issue with Atomichub.io
https://splinterlands.com/

Hi,

I thought that I would let someone know that there is an issue going on with transferring NFT's from Atomichub.io to Splinterlands.

When I purchase Splinterland NFT's at Atomichub.io, I am not able to transfer the NFT's to a Splinterlands Account because of the issue.

Here is the Error Message that I am receiving below,

"This application is currently utilizing an outdated version of waxjs that is no longer supported.

We kindly request you to contact the application's team to upgrade to the latest waxjs version by following this link.
https://github.com/worldwide-asset-exchange/waxjs"

Thanks,

Mathiew Burkett

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.