Skip to main content
Version: 5.24.3

Namespace: stark

Functions​

compressProgram​

â–¸ compressProgram(jsonProgram): CompressedProgram

Compress compiled Cairo program

Reference

Parameters​

NameTypeDescription
jsonProgramstring | ProgramRepresenting the compiled cairo program

Returns​

CompressedProgram

Defined in​

src/utils/stark.ts:20


decompressProgram​

â–¸ decompressProgram(base64): any

Decompress compressed compiled Cairo program

Parameters​

NameTypeDescription
base64stringCompressed program

Returns​

any

Parsed decompressed compiled Cairo program

Defined in​

src/utils/stark.ts:31


randomAddress​

â–¸ randomAddress(): string

Random Address based on random keyPair

Returns​

string

Defined in​

src/utils/stark.ts:40


makeAddress​

â–¸ makeAddress(input): string

Lowercase and hex prefix string

Deprecated

Not used internally, naming is confusing based on functionality

Parameters​

NameType
inputstring

Returns​

string

Defined in​

src/utils/stark.ts:50


formatSignature​

â–¸ formatSignature(sig?): ArraySignatureType

Format Signature to standard type (hex array)

Parameters​

NameType
sig?Signature

Returns​

ArraySignatureType

Custom hex array or weierstrass.SignatureType hex array

Defined in​

src/utils/stark.ts:58


signatureToDecimalArray​

â–¸ signatureToDecimalArray(sig?): ArraySignatureType

Format Signature to decimal string array

Parameters​

NameType
sig?Signature

Returns​

ArraySignatureType

Defined in​

src/utils/stark.ts:74


signatureToHexArray​

â–¸ signatureToHexArray(sig?): ArraySignatureType

Format Signature to hex string array

Parameters​

NameType
sig?Signature

Returns​

ArraySignatureType

Defined in​

src/utils/stark.ts:81


estimatedFeeToMaxFee​

â–¸ estimatedFeeToMaxFee(estimatedFee, overhead?): bigint

Convert estimated fee to max fee with overhead

Parameters​

NameTypeDefault value
estimatedFeeBigNumberishundefined
overheadnumber0.5

Returns​

bigint

Defined in​

src/utils/stark.ts:88