sei-protocol / js-core Goto Github PK
View Code? Open in Web Editor NEWJavascript SDK for Sei
License: Apache License 2.0
Javascript SDK for Sei
License: Apache License 2.0
Can the team update the sdk? I haven't been exposed to cosmos, so I came straight to the sdk. I don't know how to use it.
I tried to execute a contract on Atlantic-1 Testnet with sei-js but it fails.
Does Atlantic-1 have endpoints?
const msg = {
typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract",
value: {
"sender": "sei1....",
"contract": "sei1....",
"msg": {
"test": {}
},
"funds": []
}
}
Error: Unregistered type url: /cosmwasm.wasm.v1.MsgExecuteContract
at Registry.lookupTypeWithError (C:\Users\-\node_modules\@sei-js\proto\node_modules\@cosmjs\proto-signing\src\registry.ts:128:13)
at Registry.encode (C:\Users\-\node_modules\@sei-js\proto\node_modules\@cosmjs\proto-signing\src\registry.ts:145:23)
at Registry.encodeAsAny (C:\Users\-\node_modules\@sei-js\proto\node_modules\@cosmjs\proto-signing\src\registry.ts:155:30)
at C:\Users\-\node_modules\@sei-js\proto\node_modules\@cosmjs\proto-signing\src\registry.ts:163:73
at Array.map (<anonymous>)
at Registry.encodeTxBody (C:\Users\-\node_modules\@sei-js\proto\node_modules\@cosmjs\proto-signing\src\registry.ts:163:51)
at Registry.encode (C:\Users\-\node_modules\@sei-js\proto\node_modules\@cosmjs\proto-signing\src\registry.ts:143:19)
at SigningStargateClient.signDirect (C:\Users\-\node_modules\@sei-js\proto\node_modules\@cosmjs\stargate\src\signingstargateclient.ts:402:39)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SigningStargateClient.signAndBroadcast (C:\Users\-\node_modules\@sei-js\proto\node_modules\@cosmjs\stargate\src\signingstargateclient.ts:295:19)
All the examples in README are the client side, to run it in the browser. How to use it on a server, though?
import { SigningClient, Wallet } from '@sei-js/core';
const { accounts, offlineSigner } = Wallet.connect('leap');
const signingStargateClient = await SigningClient.getSigningClient({
RPC_ENDPOINT,
offlineSigner
});
const fee = calculateFee(100000, GasPrice.fromString('1usei'));
const transferAmount = { amount: SEND_AMOUNT, denom: TOKEN_DENOM };
const sendResponse = await signingStargateClient.sendTokens(accounts[0], DESTINATION_ADDRESSS, [transferAmount], fee);
How to create an offlineSigner from a private key, for instance?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.