kodadot / packages Goto Github PK
View Code? Open in Web Editor NEWMonorepository of npm packages we use in our projects.
Monorepository of npm packages we use in our projects.
In the list of IPFS providers, extend it with kodadot ipfs gateway
Migrate logic from kodadot into separated package
https://orkhan.gitbook.io/typeorm/docs/find-options
export async function getOneAndJoin<T extends EntityWithId>(
store: Store,
entityConstructor: EntityConstructor<T>,
id: string,
relations: FindOptionsRelations<Entity>
): Promise<T | null> {
const where: FindOptionsWhere<T> = { id } as FindOptionsWhere<T>
return store.findOne<T>(entityConstructor, { relations, where })
}
Maintaining packages is quite a time consuming thing. Having a pipeline for deploying & stuff would be awesome
As we've launched the Basilisk marketplace recently, we are looking for ways to programmatically raise the number of offers and bring more liquidity to NFT offers.
At the start, it could be managed by tech-savvy users who can put in their private key, and bot will make offers on their behalf
User can set their strategy what amount they are willing to pay for particular artists, collections, and NFT set &c, this is about your creativity.
Then it would be nice to have setting for % of floor offers should be made, in some cases, underbid listing price per NFT, amount of % from others offers. For example, scan existing orders, and you want to overbid them higher at some certainty (because you believe in high reputation artists or value accrual particular NFT for reason)
This grant has an open end, so the more advanced, the higher reward could be for it.
Good option is to split reward in milestones.
Highly recommend is to use our upcoming uniquery API
In the long run, would be nice to have a telegram/discord bot which can users sent some watch alerts for particular artists offers etc
@Component
export default class ChainMixin extends Vue {
get chainProperties() {
return this.$store.getters['chain/getChainProperties']
}
get decimals(): number {
return this.chainProperties.tokenDecimals
}
get unit(): string {
return this.chainProperties.tokenSymbol
}
}
The problem is that $obtain
currently takes: IPFSProvider
in provider parameter.
The task:
HTTP_URI
Rather having right now read-only at MoonRiver & MoonBeam, let's change it to have there (Beta) to signal people things are in active development and not ready to use.
It would fits much better for upcoming design too.
We need a proper minting SDK:
name:
@kodadot1/mint
Architecture:
It should somehow wrap the minting logic into simple functions.
About design patterns I am thinking to use either Builder, Adapter or Strategy.
Ref:
Patterns:
Extend of @polkadot/types
+
KodaDot specific:
+
Common generic
type GenericMap<T> = Record<string, T>
Support at least level one
https://blog.logrocket.com/how-to-use-keyof-operator-typescript/
export type SomeNFT = {
currentOwner: string
id: string
issuer: string
meta?: {
description: string
name: string
image: string
}
}
kodadot/nft-gallery#3500 (comment)
Basically app runs out of the free websocket
I copy tons of files around :))
Hack a prefixed versions for the api
Either suited for Vue directly (as composables) or just a Typescript package to make it more portable.
ht/ @roiLeo for idea
Next it would be nice to:
import { secondaryFileVisible } from '~~/components/rmrk/Create/mintUtils'
outside rmrk folderOriginally posted by @roiLeo in kodadot/nft-gallery#4637 (review)
Re-check kodadot/nft-gallery#2269
probably we are missing github URL in package.json for packages ?
It would be nice to tune up some good utility to have more verbose logs
✖ error [COLLECTION] [PROBLEM] Entity needs notto be real, {"name":"Future#2","max":3,"symbol":"FUT","version":"RMRK1.0.0","issuer":"DUyAjx5KwFrv7JbdUtvTzvHJFsTaEzzgyeVTUp9TjatS8Lx","metadata":"ipfs://ipfs/QmNMgKU9GnSam44k8xzif21f91S2GSWR5ATZbPQFsji8aD","id":"282781680602E07B32-FUT"}
It should work with consolidator outside of the box
Explain every submodule namely:
[
".",
"./consolidator",
"./entity",
"./types"
]
Looks like consolidator makes a lot of confusion
Token uri call for this contract returns an output something like this:
data:application/json;base64,<encoded metadata + image data>
Encoded part has three things:
Name: xxx
Attributes:xxx
Image: data:image/svg+xml;base64,<encoded svg>
Image value when opened in a browser renders to an svg by default.
This issue is a brain dump what needs to be done to successfully finish RMRK v2 in minimark package.
Critital
rmrk-tools
package (inspo is written for create)rmrk-tools
(we have different types than the package)rmrk-tool
need to be written
Minor
createBase
should take multiple parameters instead of objectMiscelanous
minimarks
in buildIdeation
a = 'https://example.com/Дякую'
console.log(encodeURIComponent(a))
//'https%3A%2F%2Fexample.com%2F%D0%94%D1%8F%D0%BA%D1%83%D1%8E'
The singleton instance, rewritten 3 times is with us since summer 2019.
It served well but when you want to have multiple tabs with different chains it's not suitable
What does it cause:
REST api for uniquery :)
Compatible with libs like useSWR
https://swr.vercel.app/examples/basic
built with
We will use Vuex options-based prefixes.
I think that prefix is bsx
but indexers/ endpoints have basilisk
Unite it under the bsx
I found that TSUP and uses ESM by default but makes very big package
Alternatives:
The idea is to run promise race over JSON metadata or something which is needed fast
EDIT:
The goal is to have a function called ipfsGet
which would be able to fetch the data from the ipfs using the Promise.race function
export function ipfsGet<T = any>(url: string, providers: Provider[] = DEFAULT_PROVIDER_LIST): Promise<T> {
// ... to be implemented
}
then in code we should be able to call
const metadata = await ipfsGet<Metadata>(url)
url
- ipfs://ipfs/bafkreiazeqysfmeuzqcnjp6rijxfu5h7sj3t4h2rxehi7rlyegzfy7lxeq
- ipfs://bafkreiazeqysfmeuzqcnjp6rijxfu5h7sj3t4h2rxehi7rlyegzfy7lxeq
optional: Provider list (this is already done)
to check what is inside ipfs url prefix the hash with (https://ipfs.io/ipfs/
)
https://ipfs.io/ipfs/bafkreiazeqysfmeuzqcnjp6rijxfu5h7sj3t4h2rxehi7rlyegzfy7lxeq
You need to do:
ipfs://
P.S you won't need await
in the function
There is branch hacky-ipfs
with the setup :)
If you need to ask something feel free to ping me here or Discord
It would be nice to have a wrapper for common functions of ->
class Query {
static async getNonce(api: ApiPromise, address: string): Promise<BN> {
const { nonce } = await api.query.system.account(address)
return nonce.toBn()
}
static async getTokenBalance(
api: ApiPromise,
accountId: string
): Promise<string> {
const { availableBalance } = await api.derive.balances.all(accountId)
return availableBalance.toString()
}
static getChainProperties(api: ApiPromise): ChainProperties {
const { chainSS58, chainDecimals, chainTokens } = api.registry
return {
ss58Format: correctFormat(chainSS58),
tokenDecimals: chainDecimals[0] || 12,
tokenSymbol: chainTokens[0] || 'Unit',
}
}
}
We don't need that as settings package is specifically customized to the @kodadot needs
https://github.com/rmrk-team/rmrk-spec/tree/master/standards/rmrk2.0.0
Implement interactions:
Check if there are changes for existing interactions:
Some interactions were renamed (we will support both for the sake of consistency)
The minimark should do:
having tests for this would be golden.
There is a telegram group for RMRK implementers
WARN @kodadot1/sub-api doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.
WARN @kodadot1/vuex-options doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.
https://pnpm.io/motivation#creating-a-non-flat-node_modules-directory
currently, the Polkadot-js API is a dependency that causes a couple of issues for both sub API and minimark.
The idea is to make Polkadot-js API as a peer dependency
ref kodadot/nft-gallery#2197
currently when someone wants to use minimark
she or he will need to export functions like
import { createCollection } from '@kodadot1/minimark'
It is good but we will have V2 #43 soon and I would cause chaos
that we will have Subpackages
For RMRK v1
import { createCollection } from '@kodadot1/minimark/v1'
For RMRK v2
import { createCollection } from '@kodadot1/minimark/2'
For Common
import { asSystemRemark } from '@kodadot1/minimark/common'
http://localhost:4350/graphql
I'm afraid that it could not use sub-api. Because If I want to teleport tokens from Kusama, I need to use ApiPromise of kusama. On the other hand, I would use ApiPromise of basilisk.
And sub-api would only return the API endpoint according to the current prefix. 👀
For once a while it would be nice to bump packages to the latest version
Once we will have profound readme &c
let's make PR
https://github.com/substrate-developer-hub/awesome-substrate#client-libraries
Soon #17 would be merged.
and would be good to support more routes
namely:
https://example.com/metadata.json
)ipfs://ipns/<uri>
)ipfs://ipfs/<hash>/1.json
)ar://<hash>
)It should be an IPFS CID: that will contain:
{
"image": "ipfs://ipfs/<CID>",
"name": "Placeholder",
"description": "Something that tells this is an error"
}
@kodadot1/hypercasual
It should be a set of utitilities we already use in KodaDot nft-gallery but we want to reuse them in sub-scaffold & so.
Example:
ht/ @Roman-24 (maybe add something more)
import { Registration } from '@polkadot/types/interfaces/identity/types'
I am gonna copy mappings/utils/entity into the snek
it would by nice to have a common lib which can be used by devs in the dotsama ecosystem
As far as I noticed getOrCreate is pretty much bog standard in most implementations.
Often times "getEvent"/"getExtrinsic" functions are built to handle multiple versions.
The interface expose the isV***/asV*** but additional logic is required to handle these conditional extractions.
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.