Closed jcramer closed 5 years ago
I looked over the spec briefly but i'm unclear on something: Where does the name of the token come from? Shouldn't we be using the complete genesis tx hash id?
That's the tokenID right?
Also, if we expect adoption on the NFT two-step tokens, we might as well add that to the scheme now as well.
I looked over the spec briefly but i'm unclear on something: Where does the name of the token come from? Shouldn't we be using the complete genesis tx hash id?
in the grammar table it specifies tokenid
to be an optional component of the amount=
parameter, formatted as amount=<tokenid>:<qty>
. If the <tokenid>:
is omitted the quantity is assumed to just be a BCH amount.
One thing that I need to add to the implementation notes:
"Only a single amount=
parameter can be provided for each type of currency."
That's the tokenID right?
Also, if we expect adoption on the NFT two-step tokens, we might as well add that to the scheme now as well.
Are you suggesting the situation where someone wants to request any valid NFT created from X fungible token?
Are you suggesting the situation where someone wants to request any valid NFT created from X fungible token?
Yes, might as well accomodate that. Requesting one NFT by itself can be done with tokenID alone I think.
@imaginaryusername let me know if you think these updates address the NFT group needs and will stand the test of time. Using "nftfromgroup" is one option that will handle what you're getting at, and we can add additional modes later.
Looks good to me, and it can be switched to provide for v2 etc. as well.
Since currently SLP can only transfer 1 token at a time there could only possibly be up to 2 amounts provided (but this could change in a future version I suppose). If we wanted to consider a slight variation that would lock us into having only 1 token and optional BCH I made this version on a different branch.
https://github.com/simpleledger/slp-specifications/blob/URI-schema-alt/slp-uri-scheme.md
So once I started implementing in python I realized that you cannot have a repeating "amount=" parameter because it causes some URI libs to crash. I might also be against URI standard, but I wasn't able to find the exact URI spec requirement for uniqueness.
As a solution I just appended "amount" with "_X" where X is a has a uniqueness requirement.
If this doesn't feel right then we should take a look at the scheme option I presented on "URI-schema-alt" branch.
Ok, I made some cleanup and adjustments to the grammar. I think it makes more sense now.
This is an initial URI schema for requesting payments in SLP tokens and a base currency. Acceptance of this spec is a prerequisite to implementing in EC SLP and should also be completed before merge of EC SLP into main version of Electron Cash.
https://github.com/simpleledger/Electron-Cash-SLP/issues/63.
Considerations for BIP-70 may need to be added.