entropyxyz / sdk

Official JavaScript SDK for Entropy blockchain.
GNU Affero General Public License v3.0
7 stars 0 forks source link

global programs and program usage #274

Closed frankiebee closed 6 months ago

frankiebee commented 7 months ago

In the future programs will have configs. Possibly registering with a hash of the program who knows right now. but this is all of course up for debate. this is a place holder for some api design notes for a session between myself and @jakehemmerle. Lets use this as a place to save notes on thoughts and possibly branch out working items.

import Entropy from '@entropyxyz/sdk'
import * as publicPrograms from '@entropyxyz/program-registery'

const entropy = new Entropy(opts)

const publicPrograms = {
  '0x123..': {
    name: 'access-list',
    config: { allow: 'string[]', deny: 'string[]' } // or args
    arch: 'evm', // can also be a string array if compatible with mutiple arches?
    description: 'i keep you from sending to strangers' // under 144 chars
    url: ''
    developer: ''
    auditer: '', // could be an object
  },
}

const program = entropy.programs.get(userChosenProgram)

program.config
program.bytecode
frankiebee commented 6 months ago

already done in #288