Giter Site home page Giter Site logo

dotta-license's People

Contributors

cryppadotta avatar jacobrosenthal avatar

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dotta-license's Issues

Discussion: Using Dotlicense for Subscription SaaS / Web Apps

I think Dotlicense could be used in a web context for SaaS apps. If you used a Metamask/signing-based login then you could use that proof of ownership to verify an active subscription.

For example, see meta-auth for a Metamask-based login with Node middleware. (Note: I haven't tried meta-auth and I can't vouch for it's security, but I think it's an interesting idea.)

This could work with Dotlicense like this:

  1. The user has paid for a subscription-token on-chain
  2. For a user to log in they sign a challenge, proving they own the given address (and the webserver sets a cookie so that this only has to be done as often as you would log in normally)
  3. The webserver now knows the identity of the user, as well as the user's ETH address. This means the webserver can check on-chain if the user's subscription is valid and unlock features accordingly.

As of writing, I haven't built any of the supporting Web UI libraries nor the Node middleware, but once we have Dotlicense working, it should be straightforward to do this.

doc: how can I use with bulk licensing

If I want to give a bulk discount for say 10 licenses how would I do that. Additionally, how can I restrict a license to a particular "node". Is there a way to pass a machine uuid during the validate process and verify license validity? Are machine uuids stored in the contract?

Features: setInventory, setExpiration

Two features I'd like to add in a v2:

  • setInventory - set the inventory of a product to a specific level, subject to supply constraints
  • setExpiration - manually set the expiration of any subscription token - currently even admins can only renew in cycle-chunks.

is this project still maintained?

I've tried getting it running with Node 14 and 16 and not had any luck. I was able to compile the contracts at least, thanks to help from this web3/web3.js#3079 but I was unable to get any further than that. The CLI gives me a lot of node-gyp errors and doesn't seem to install properly.

dot-abi-cli example: tokensOfOwnerByIndex Couldn't decode uint256 from ABI: 0x

Ive poked at most of the function calls (that dont require gas) and they seem valid, but this one errors on me:

bash-3.2$ node cryptokitties-cli.js tokensOfOwnerByIndex 0xa6c366D97cb64708211f24310dFAd5363BC96a04 0
cryptokitties-cli.js tokensOfOwnerByIndex <owner> <index>

Returns the nth Kitty assigned to an address, with n specified by the  _index argument.

Positionals:
  owner, _owner                                                                                                                    [required]
  index, _index                                                                                                                    [required]

Options:
  --web3              web3 provider url                                                          [default: "https://mainnet.infura.io/remix"]
  --from              from address
  --gasPrice          gas price in wei to use for this transaction                                                    [default: "1000000010"]
  --gasLimit          maximum gas provided for this transaction                                                          [default: "4700000"]
  --value             The value transferred for the transaction in wei
  --contract-address  address to contract                                  [required] [default: "0x06012c8cf97BEaD5deAe237070F9587f8E7A266d"]
  --network-id        The network ID                                                                                           [default: "1"]
  --ledger            use a ledger                                                                                                  [boolean]
  --hd-path           hd-path (used for hardware wallets)                                                           [default: "44'/60'/0'/0"]
  --help              Show help                                                                                                     [boolean]
  --version           Show version number                                                                                           [boolean]
  --provider                                                                                                            [default: (provider)]

Error: Couldn't decode uint256 from ABI: 0x
    at SolidityTypeUInt.formatOutputUInt [as _outputFormatter] (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/node_modules/web3-eth-abi/src/formatters.js:174:15)
    at SolidityTypeUInt.SolidityType.decode (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/node_modules/web3-eth-abi/src/type.js:252:17)
    at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/node_modules/web3-eth-abi/src/index.js:327:49
    at Array.forEach (<anonymous>)
    at ABICoder.decodeParameters (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/node_modules/web3-eth-abi/src/index.js:326:13)
    at Contract._decodeMethodReturn (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/node_modules/web3-eth-contract/src/index.js:459:22)
    at Method.outputFormatter (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/node_modules/web3-eth-contract/src/index.js:811:46)
    at Method.formatOutput (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/node_modules/web3-core-method/src/index.js:162:54)
    at sendTxCallback (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/node_modules/web3-core-method/src/index.js:453:33)
    at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/node_modules/web3-core-requestmanager/src/index.js:144:9
    at Web3ProviderEngine._inspectResponseForNewBlock (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:231:12)
    at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:131:14
    at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:473:16
    at replenish (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:993:25)
    at iterateeCallback (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:983:17)
    at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:958:16
    at async.eachSeries.resultObj.id (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:111:9)
    at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:3096:16
    at replenish (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:998:17)
    at iterateeCallback (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:983:17)
    at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:958:16
    at async.eachSeries.resultObj.id (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:111:9)
    at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:3096:16
    at replenish (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:998:17)
    at iterateeCallback (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:983:17)
    at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:958:16
    at async.eachSeries.resultObj.id (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:111:9)
    at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:3096:16
    at replenish (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:998:17)
    at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:1002:9
    at eachLimit$1 (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:3182:24)
    at Object.<anonymous> (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:1032:16)
    at end (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:106:11)
    at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/subproviders/web3.js:16:5
bash-3.2$ 

[Suggestion] Trial period?

Maybe it's there and I just don't see it but would be cool to be able to issue trial periods to users

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.