Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @taquito/local-forging

pkgsign status

Taquito Local forging package

@taquito/local-forging is an npm package that provides developers with local forging functionality for Taquito. It can be injected as follow.

import { TezosToolkit } from '@taquito/taquito'
import { localForger } from '@taquito/local-forging'
Tezos.setProvider({ forger: localForger })

See the top-level https://github.com/ecadlabs/taquito file for details on reporting issues, contributing and versioning.

API Documentation

TypeDoc style documentation is available on-line here

Disclaimer

THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Index

References

CODEC

Re-exports CODEC

Decoder

Re-exports Decoder

Encoder

Re-exports Encoder

Uint8ArrayConsumer

Re-exports Uint8ArrayConsumer

decoders

Re-exports decoders

encoders

Re-exports encoders

Type aliases

Decoder

Decoder: (val: Uint8ArrayConsumer) => string | number | {} | undefined

Type declaration

Encoder

Encoder<T>: (val: T) => string

Type parameters

  • T

Type declaration

    • (val: T): string
    • Parameters

      • val: T

      Returns string

MichelsonValue

MichelsonValue: PrimValue | BytesValue | StringValue | IntValue | ({ annots?: string[]; args?: MichelsonValue[]; prim: string } | { bytes: string } | { string: string } | { int: string })[]

Variables

Const ENTRYPOINT_MAX_LENGTH

ENTRYPOINT_MAX_LENGTH: 31 = 31

Const branchDecoder

branchDecoder: (Anonymous function) = prefixDecoder(Prefix.B)

Const branchEncoder

branchEncoder: (Anonymous function) = prefixEncoder(Prefix.B)

Const entrypointMappingReverse

entrypointMappingReverse: {} = (() => {const result: { [key: string]: string } = {};Object.keys(entrypointMapping).forEach((key: string) => {result[entrypointMapping[key]] = key;});return result;})()

Type declaration

  • [key: string]: string

Const kindMappingReverse

kindMappingReverse: {} = (() => {const result: { [key: string]: string } = {};Object.keys(kindMapping).forEach((key: number | string) => {const keyNum = typeof key === 'string' ? parseInt(key, 10) : key;result[kindMapping[keyNum]] = pad(keyNum, 2);});return result;})()

Type declaration

  • [key: string]: string

Const localForger

localForger: LocalForger = new LocalForger()

Const opMappingReverse

opMappingReverse: {} = (() => {const result: { [key: string]: string } = {};Object.keys(opMapping).forEach((key: string) => {result[opMapping[key]] = key;});return result;})()

Type declaration

  • [key: string]: string

Const tz1Decoder

tz1Decoder: (Anonymous function) = prefixDecoder(Prefix.TZ1)

Const tz1Encoder

tz1Encoder: (Anonymous function) = prefixEncoder(Prefix.TZ1)

Functions

Const addressDecoder

Const addressEncoder

  • addressEncoder(val: string): string

Const ballotDecoder

Const ballotEncoder

  • ballotEncoder(ballot: string): string

Const boolDecoder

Const boolEncoder

  • boolEncoder(bool: unknown): string

Const bytesDecoder

Const bytesEncoder

  • bytesEncoder(value: { bytes: string }): string

Const concat

  • concat(...arr: Uint8Array[]): Uint8Array

Const decodeAnnots

Const delegateDecoder

Const delegateEncoder

  • delegateEncoder(val: string): string

Const encodeAnnots

  • encodeAnnots(value: string[]): string

Const entrypointDecoder

Const entrypointEncoder

  • entrypointEncoder(entrypoint: string): string

Const extractRequiredLen

getCodec

  • getCodec(codec: CODEC): { encoder: (val: T) => string; decoder: any }

Const int32Decoder

Const int32Encoder

  • int32Encoder(val: number | string): string

Const intDecoder

Const intEncoder

  • intEncoder(__namedParameters: { int: string }): string

Const isBytes

Const isInt

Const isPrim

Const isString

Const operationDecoder

  • operationDecoder(decoders: {}): (Anonymous function)

Const operationEncoder

  • operationEncoder(encoders: {}): (Anonymous function)

Const pad

  • pad(num: number, paddingLen?: number): string

Const parametersDecoder

  • parametersDecoder(val: Uint8ArrayConsumer): undefined | { entrypoint: string; value: undefined | string | number | {} }

Const parametersEncoder

  • parametersEncoder(val: { entrypoint: string; value: MichelsonValue }): string

Const pkhDecoder

Const pkhEncoder

  • pkhEncoder(val: string): string

Const prefixDecoder

  • prefixDecoder(pre: Prefix): (Anonymous function)

Const prefixEncoder

  • prefixEncoder(prefix: Prefix): (Anonymous function)

Const primDecoder

Const primEncoder

  • primEncoder(value: { annots?: string[]; args?: MichelsonValue[]; prim: string }): string

Const proposalDecoder

Const proposalEncoder

  • proposalEncoder(proposal: string): string

Const proposalsDecoder

Const proposalsEncoder

  • proposalsEncoder(proposals: string[]): string

Const publicKeyDecoder

Const publicKeyEncoder

  • publicKeyEncoder(val: string): string

Const schemaDecoder

  • schemaDecoder(decoders: {}): (Anonymous function)

Const schemaEncoder

  • schemaEncoder(encoders: {}): (Anonymous function)

Const scriptDecoder

  • scriptDecoder(value: Uint8ArrayConsumer): { code: undefined | string | number | {}; storage: undefined | string | number | {} }

Const scriptEncoder

Const stringDecoder

Const stringEncoder

  • stringEncoder(value: { string: string }): string

Const toHexString

  • toHexString(bytes: Uint8Array): string

Const valueDecoder

Const valueEncoder

Const zarithDecoder

Const zarithEncoder

  • zarithEncoder(n: string): string

Object literals

Const ActivationSchema

ActivationSchema: object

pkh

pkh: string = "tz1"

secret

secret: string = "secret"

Const BallotSchema

BallotSchema: object

ballot

ballot: string = "ballotStmt"

period

period: string = "int32"

proposal

proposal: string = "proposal"

source

source: string = "pkh"

Const DelegationSchema

DelegationSchema: object

counter

counter: string = "zarith"

delegate

delegate: string = "delegate"

fee

fee: string = "zarith"

gas_limit

gas_limit: string = "zarith"

source

source: string = "pkh"

storage_limit

storage_limit: string = "zarith"

Const EndorsementSchema

EndorsementSchema: object

level

level: string = "int32"

Const ManagerOperationSchema

ManagerOperationSchema: object

branch

branch: string = "branch"

contents

contents: string[] = ['operation']

Const OriginationSchema

OriginationSchema: object

balance

balance: string = "zarith"

counter

counter: string = "zarith"

delegate

delegate: string = "delegate"

fee

fee: string = "zarith"

gas_limit

gas_limit: string = "zarith"

script

script: string = "script"

source

source: string = "pkh"

storage_limit

storage_limit: string = "zarith"

Const ProposalsSchema

ProposalsSchema: object

period

period: string = "int32"

proposals

proposals: string = "proposalArr"

source

source: string = "pkh"

Const RevealSchema

RevealSchema: object

counter

counter: string = "zarith"

fee

fee: string = "zarith"

gas_limit

gas_limit: string = "zarith"

public_key

public_key: string = "public_key"

source

source: string = "pkh"

storage_limit

storage_limit: string = "zarith"

Const SeedNonceRevelationSchema

SeedNonceRevelationSchema: object

level

level: string = "int32"

nonce

nonce: string = "raw"

Const TransactionSchema

TransactionSchema: object

amount

amount: string = "zarith"

counter

counter: string = "zarith"

destination

destination: string = "address"

fee

fee: string = "zarith"

gas_limit

gas_limit: string = "zarith"

parameters

parameters: string = "parameters"

source

source: string = "pkh"

storage_limit

storage_limit: string = "zarith"

Const decoders

decoders: object

[CODEC.ADDRESS]

[CODEC.ADDRESS]: addressDecoder = addressDecoder

[CODEC.BALLOT_STATEMENT]

[CODEC.BALLOT_STATEMENT]: ballotDecoder = ballotDecoder

[CODEC.BRANCH]

[CODEC.BRANCH]: (Anonymous function) = branchDecoder

[CODEC.DELEGATE]

[CODEC.DELEGATE]: delegateDecoder = delegateDecoder

[CODEC.INT32]

[CODEC.INT32]: int32Decoder = int32Decoder

[CODEC.PARAMETERS]

[CODEC.PARAMETERS]: parametersDecoder = parametersDecoder

[CODEC.PKH]

[CODEC.PKH]: pkhDecoder = pkhDecoder

[CODEC.PROPOSAL]

[CODEC.PROPOSAL]: proposalDecoder = proposalDecoder

[CODEC.PROPOSAL_ARR]

[CODEC.PROPOSAL_ARR]: proposalsDecoder = proposalsDecoder

[CODEC.PUBLIC_KEY]

[CODEC.PUBLIC_KEY]: publicKeyDecoder = publicKeyDecoder

[CODEC.SCRIPT]

[CODEC.SCRIPT]: (val: Uint8ArrayConsumer) => string | number | {} | undefined = scriptDecoder

Type declaration

[CODEC.TZ1]

[CODEC.TZ1]: (Anonymous function) = tz1Decoder

[CODEC.ZARITH]

[CODEC.ZARITH]: zarithDecoder = zarithDecoder

[CODEC.RAW]

[CODEC.SECRET]

Const encoders

encoders: object

[CODEC.ADDRESS]

[CODEC.ADDRESS]: addressEncoder = addressEncoder

[CODEC.BALLOT_STATEMENT]

[CODEC.BALLOT_STATEMENT]: ballotEncoder = ballotEncoder

[CODEC.BRANCH]

[CODEC.BRANCH]: (Anonymous function) = branchEncoder

[CODEC.DELEGATE]

[CODEC.DELEGATE]: delegateEncoder = delegateEncoder

[CODEC.INT32]

[CODEC.INT32]: int32Encoder = int32Encoder

[CODEC.PARAMETERS]

[CODEC.PARAMETERS]: parametersEncoder = parametersEncoder

[CODEC.PKH]

[CODEC.PKH]: pkhEncoder = pkhEncoder

[CODEC.PROPOSAL]

[CODEC.PROPOSAL]: proposalEncoder = proposalEncoder

[CODEC.PROPOSAL_ARR]

[CODEC.PROPOSAL_ARR]: proposalsEncoder = proposalsEncoder

[CODEC.PUBLIC_KEY]

[CODEC.PUBLIC_KEY]: publicKeyEncoder = publicKeyEncoder

[CODEC.SCRIPT]

[CODEC.SCRIPT]: (val: T) => string = scriptEncoder

Type declaration

    • (val: T): string
    • Parameters

      • val: T

      Returns string

[CODEC.TZ1]

[CODEC.TZ1]: (Anonymous function) = tz1Encoder

[CODEC.ZARITH]

[CODEC.ZARITH]: zarithEncoder = zarithEncoder

[CODEC.RAW]

  • [CODEC.RAW](val: string): string

[CODEC.SECRET]

  • [CODEC.SECRET](val: string): string

Const entrypointMapping

entrypointMapping: object

00

00: string = "default"

01

01: string = "root"

02

02: string = "do"

03

03: string = "set_delegate"

04

04: string = "remove_delegate"

Const kindMapping

kindMapping: object

0

0: string = "endorsement"

1

1: string = "seed_nonce_revelation"

107

107: string = "reveal"

108

108: string = "transaction"

109

109: string = "origination"

110

110: string = "delegation"

4

4: string = "activate_account"

5

5: string = "proposals"

6

6: string = "ballot"

Const opMapping

opMapping: object

00

00: string = "parameter"

01

01: string = "storage"

02

02: string = "code"

03

03: string = "False"

04

04: string = "Elt"

05

05: string = "Left"

06

06: string = "None"

07

07: string = "Pair"

08

08: string = "Right"

09

09: string = "Some"

0a

0a: string = "True"

0b

0b: string = "Unit"

0c

0c: string = "PACK"

0d

0d: string = "UNPACK"

0e

0e: string = "BLAKE2B"

0f

0f: string = "SHA256"

10

10: string = "SHA512"

11

11: string = "ABS"

12

12: string = "ADD"

13

13: string = "AMOUNT"

14

14: string = "AND"

15

15: string = "BALANCE"

16

16: string = "CAR"

17

17: string = "CDR"

18

18: string = "CHECK_SIGNATURE"

19

19: string = "COMPARE"

1a

1a: string = "CONCAT"

1b

1b: string = "CONS"

1c

1c: string = "CREATE_ACCOUNT"

1d

1d: string = "CREATE_CONTRACT"

1e

1e: string = "IMPLICIT_ACCOUNT"

1f

1f: string = "DIP"

20

20: string = "DROP"

21

21: string = "DUP"

22

22: string = "EDIV"

23

23: string = "EMPTY_MAP"

24

24: string = "EMPTY_SET"

25

25: string = "EQ"

26

26: string = "EXEC"

27

27: string = "FAILWITH"

28

28: string = "GE"

29

29: string = "GET"

2a

2a: string = "GT"

2b

2b: string = "HASH_KEY"

2c

2c: string = "IF"

2d

2d: string = "IF_CONS"

2e

2e: string = "IF_LEFT"

2f

2f: string = "IF_NONE"

30

30: string = "INT"

31

31: string = "LAMBDA"

32

32: string = "LE"

33

33: string = "LEFT"

34

34: string = "LOOP"

35

35: string = "LSL"

36

36: string = "LSR"

37

37: string = "LT"

38

38: string = "MAP"

39

39: string = "MEM"

3a

3a: string = "MUL"

3b

3b: string = "NEG"

3c

3c: string = "NEQ"

3d

3d: string = "NIL"

3e

3e: string = "NONE"

3f

3f: string = "NOT"

40

40: string = "NOW"

41

41: string = "OR"

42

42: string = "PAIR"

43

43: string = "PUSH"

44

44: string = "RIGHT"

45

45: string = "SIZE"

46

46: string = "SOME"

47

47: string = "SOURCE"

48

48: string = "SENDER"

49

49: string = "SELF"

4a

4a: string = "STEPS_TO_QUOTA"

4b

4b: string = "SUB"

4c

4c: string = "SWAP"

4d

4d: string = "TRANSFER_TOKENS"

4e

4e: string = "SET_DELEGATE"

4f

4f: string = "UNIT"

50

50: string = "UPDATE"

51

51: string = "XOR"

52

52: string = "ITER"

53

53: string = "LOOP_LEFT"

54

54: string = "ADDRESS"

55

55: string = "CONTRACT"

56

56: string = "ISNAT"

57

57: string = "CAST"

58

58: string = "RENAME"

59

59: string = "bool"

5a

5a: string = "contract"

5b

5b: string = "int"

5c

5c: string = "key"

5d

5d: string = "key_hash"

5e

5e: string = "lambda"

5f

5f: string = "list"

60

60: string = "map"

61

61: string = "big_map"

62

62: string = "nat"

63

63: string = "option"

64

64: string = "or"

65

65: string = "pair"

66

66: string = "set"

67

67: string = "signature"

68

68: string = "string"

69

69: string = "bytes"

6a

6a: string = "mutez"

6b

6b: string = "timestamp"

6c

6c: string = "unit"

6d

6d: string = "operation"

6e

6e: string = "address"

6f

6f: string = "SLICE"

70

70: string = "DIG"

71

71: string = "DUG"

72

72: string = "EMPTY_BIG_MAP"

73

73: string = "APPLY"

74

74: string = "chain_id"

75

75: string = "CHAIN_ID"

Generated using TypeDoc