Options
All
  • Public
  • Public/Protected
  • All
Menu

Transmute Framework

Ethereum Integration Middleware for JavaScript Developers.

Commands:

npm run contracts:regenerate && npm run test

Useful when testing contacts.

Special Thanks

Index

Modules

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

TransmuteSolidityEncodingType

TransmuteSolidityEncodingType: "S" | "A" | "B" | "U"

Variables

ACCOUNT_CREATED

ACCOUNT_CREATED: "ACCOUNT_CREATED" = "ACCOUNT_CREATED"

ACCOUNT_NAMED

ACCOUNT_NAMED: "ACCOUNT_NAMED" = "ACCOUNT_NAMED"

ALL

ALL: string[] = [...STORE, ...FACTORY]

ES_CREATED

ES_CREATED: "ES_CREATED" = "ES_CREATED"

FACTORY

FACTORY: string[] = ['NEW_OWNER', 'RECYCLED_TO', 'ES_CREATED']

MAPPER_ENCODING

MAPPER_ENCODING: "I" = "I"

NEW_OWNER

NEW_OWNER: "NEW_OWNER" = "NEW_OWNER"

ProviderEngine

ProviderEngine: any = require('web3-provider-engine')

RECYCLED_TO

RECYCLED_TO: "RECYCLED_TO" = "RECYCLED_TO"

RPC_HOST

RPC_HOST: "http://localhost:8545" = "http://localhost:8545"

RpcSubprovider

RpcSubprovider: any = require('web3-provider-engine/subproviders/rpc.js')

STATE_REQUIRED_PROPS

STATE_REQUIRED_PROPS: string[] = ['contractAddress','readModelType','readModelStoreKey']

STORE

STORE: string[] = ['NEW_OWNER', 'RECYCLED_TO', 'WL_SET']

Storage

Storage: any = require('node-storage')

TransmuteCrypto

TransmuteCrypto: any = require('transmute-crypto')

TransmuteSolidityEncodingTypes

TransmuteSolidityEncodingTypes: string[] = ['S', 'A', 'B', 'U']

WL_SET

WL_SET: "WL_SET" = "WL_SET"

WRITE_EVENT_GAS_COST

WRITE_EVENT_GAS_COST: 4000000 = 4000000

WalletSubprovider

WalletSubprovider: any = require('web3-provider-engine/subproviders/wallet.js')

bs58

bs58: any = require('bs58')

db

db: any = new Storage('./read_model_storage')

ipfs

ipfs: any = ipfsAdapter.getStorage({...ipfsConfig})

ipfsAdapter

ipfsAdapter: any = require('transmute-adapter-ipfs')

jiff

jiff: any = require("jiff")

jsonLogic

jsonLogic: any = require("json-logic-js")

nodeStorageAdapter

nodeStorageAdapter: any = require('../../../transmute-adapter-node-storage')

nodeStorageDB

nodeStorageDB: any = nodeStorageAdapter.getStorage()

state

state: object = initialState

Type declaration

  • contractAddress: string
  • lastEvent: null
  • model: object
  • readModelStoreKey: string
  • readModelType: string

util

util: any = require('ethereumjs-util')

web3Utils

web3Utils: any = require('web3-utils')

Functions

arrayToFSA

  • arrayToFSA(values: any): IFSA

bufferToHex

  • bufferToHex(buffer: Buffer): any

calculateCostFromRefs

  • calculateCostFromRefs(refs: any): number

esEventToFSA

filterEventsByMeta

  • filterEventsByMeta(events: IFSA[], prop: any, propValue: any): any[]

formatHex

  • formatHex(h: any): string

generateTestWallets

  • generateTestWallets(num: number): Promise<any>

getAccounts

  • getAccounts(web3: any): Promise<string[]>

getDefaultEventStoreAdapter

getDefaultReadModelAdapter

  • getDefaultReadModelAdapter(): Promise<object>

getDefaultRelic

  • getDefaultRelic(): Relic

getDefaultWeb3

  • getDefaultWeb3(): object

getFSAFromEsEventWithPartial

  • getFSAFromEsEventWithPartial(esEvent: IEsEvent, partialFSA: IFSA): object

getFSAType

getFSAsFromReceipt

  • getFSAsFromReceipt(receipt: any): any[]

getSetupAsync

  • getSetupAsync(): Promise<object>

getWeb3FromWalletWithMneumonic

  • getWeb3FromWalletWithMneumonic(): object

getWeb3FromWalletWithPrivateKey

  • getWeb3FromWalletWithPrivateKey(): Promise<object>

handlePackageDelete

  • handlePackageDelete(state: any, action: any): any

handlePackageUpdate

  • handlePackageUpdate(state: any, action: any): any

hex2ipfshash

  • hex2ipfshash(hash: any): any

hexToNumber

  • hexToNumber(h: any): any

ipfs2hex

  • ipfs2hex(ipfshash: any): string

isAdapterEvent

  • isAdapterEvent(fsa: IFSA): boolean

isHex

  • isHex(h: any): boolean

isNativeEvent

  • isNativeEvent(fsa: IFSA): boolean

isSimpleStringKeyValue

  • isSimpleStringKeyValue(fsa: IFSA): boolean

isValidAddress

  • isValidAddress(address: string): any

privateKeyHexToAddress

  • privateKeyHexToAddress(privatKeyHex: any): any

reducer

  • reducer(state: any, action: any): any
  • reducer(state: any, action: any): any
  • reducer(state: any, action: any): any

setLengthLeft

  • setLengthLeft(_value: string, size: number): any

toAscii

  • toAscii(value: string): any

toChecksumAddress

  • toChecksumAddress(address: string): any

updatesFromMeta

  • updatesFromMeta(meta: any): object
  • updatesFromMeta(meta: any): object
  • updatesFromMeta(meta: any): object

valuesToEsEvent

  • valuesToEsEvent(Id: any, TxOrigin: any, MsgSender: any, Created: any, EventType: any, KeyType: any, ValueType: any, Key: any, Value: any): IEsEvent

Object literals

Adapter1

Adapter1: object

eventType

eventType: string = "test"

key

key: string = "sha1"

keyType

keyType: string = "S"

value

value: string = "6e37fcc805e971f2668dcda593cfba52"

valueType

valueType: string = "N"

Adapter2

Adapter2: object

eventType

eventType: string = "test"

key

key: string = "multihash"

keyType

keyType: string = "S"

value

value: string = "0xce66b612ec7e1f01b62cece1b4849716005c37af4f6b578f8b9d69dbc68a7e46"

valueType

valueType: string = "I"

Address

Address: object

eventType

eventType: string = "test"

key

key: string = "address"

keyType

keyType: string = "S"

value

value: string = "0x00000000000000000000000001000c268181f5d90587392ff67ada1a16393fe4"

valueType

valueType: string = "A"

Bytes32

Bytes32: object

eventType

eventType: string = "test"

key

key: string = "bytes32"

keyType

keyType: string = "S"

value

value: string = "0x000000000000000000000000000000000000000000000000000000000000000A"

valueType

valueType: string = "B"

GAS_COSTS

GAS_COSTS: object

WRITE_EVENT

WRITE_EVENT: number = 4000000

KeyValue

KeyValue: object

eventType

eventType: string = "test"

key

key: string = "key"

keyType

keyType: string = "S"

value

value: string = "value"

valueType

valueType: string = "S"

UInt

UInt: object

eventType

eventType: string = "test"

key

key: string = "uint"

keyType

keyType: string = "S"

value

value: string = "0x0000000000000000000000000000000000000000000000000000000000000000"

valueType

valueType: string = "U"

handlers

handlers: object

PACKAGE_DELETED

  • PACKAGE_DELETED(state: any, action: any): any

PACKAGE_UPDATED

  • PACKAGE_UPDATED(state: any, action: any): any

__computed

  • __computed(state: any, action: any): any
  • __computed(state: any, action: any): any
  • __computed(state: any, action: any): any
  • __computed(state: any, action: any): any
  • __computed(state: any, action: any): any

initialState

initialState: object

contractAddress

contractAddress: string = "0x0000000000000000000000000000000000000000"

lastEvent

lastEvent: null = null

model

model: object

Type declaration

readModelStoreKey

readModelStoreKey: string = ""

readModelType

readModelType: string = "MockReadModel"

ipfsConfig

ipfsConfig: object

host

host: string = "localhost"

port

port: number = 5001

protocol

protocol: string = "http"

isHeroBirthday

isHeroBirthday: object

and

and: object[] = [{"==": [{var: "hero.birthday"},{var: "date"}]}]

payloadKeyToKeyType

payloadKeyToKeyType: object

address

address: string = "A"

bytes32

bytes32: string = "B"

uint

uint: string = "U"

readModelAdapter

readModelAdapter: object

getItem

  • getItem(id: string): any

setItem

  • setItem(id: string, value: any): any

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc