Comments (5)
same for substrate-test-runtime-client
from substrate-node-template.
The node_primitives
crate is for use specifically in the demonstration node that lives in the Substrate repo. This is evidenced by the fact that it lives in bin/node/pirmitives
. The two imports you mentioned, AccountId and Signature are both type aliases to things that are in the library part of the Substrate repo and are published on crates.io.
This node template, makes the same type aliases directly in the runtime's lib.rs
(AccountId, Signature). If you're basing your node on this template, you can use those type aliases directly, or if you like having them in a separate crate, you can move them to their own crate. You could call that crate node-primitives
and let it's context make it clear what node they are for or you could give it a name like brenzis-node-primitives
. You can see polkadot also [follows this pattern](https://github.com/paritytech/polkadot/tree/master/primitives
from substrate-node-template.
ok. but how about substrate-test-runtime-client? Where should I get use test_client::AccountKeyring;
from? From sp_keyring
I guess?
from substrate-node-template.
TBH, I'm not nearly as familiar with that one. I guess maybe from here https://substrate.dev/rustdocs/master/sp_keyring/test/index.html
@gnunicorn is that right?
from substrate-node-template.
@brenzi node-*
are meant for the substrate-node
-default-implementation only, are very opinionated and not suitable for reusability but part of the executable only. We are still discussing whether we eventually publish them on crates.io but for the time being (and probably 2.0 release), these won't be published there (as we can't and won't give the same semver stability guarantees for the binary).
That said, what you are asking for is literally something you can (and should) define yourself:
use sp_runtime::{
generic, traits::{Verify, IdentifyAccount}, MultiSignature
};
pub type Signature = MultiSignature;
pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::AccountId;
from substrate-node-template.
Related Issues (20)
- the trait `MaxEncodedLen` is not implemented for `std::vec::Vec<u32>` HOT 1
- Don't use default weights in the runtime HOT 2
- Multiple version conflict HOT 2
- failed to get frame-benchmarking as a dependency of package HOT 2
- failed to run custom build command for `tikv-jemalloc-sys v0.4.3+5.2.1-patched.2` HOT 1
- warning: "jemalloc support for `x86_64-pc-windows-msvc` is untested" error: failed to run custom build command for `tikv-jemalloc-sys v0.4.3+5.2.1-patched.2` HOT 12
- BUG: Build is failing for Ubuntu WSL in Windows 10 HOT 6
- build failed
- build failed
- build failed HOT 2
- Build error HOT 33
- ecryptfs => Filename to long HOT 1
- Docker image version to use on versions
- Fix broken FRAME link HOT 1
- Build error when trying to create a function that takes a `T::AccountId` along with `Origin`. HOT 1
- Add benchmarks to test runs HOT 1
- Close this repo to PRs HOT 5
- error: failed to start node HOT 7
- It's better to use an image sourced from paritytech dockerhub registry. And automate its' creation via CI.
- Missing `frame-weight-template.hbs` from file tree
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from substrate-node-template.