starknet 5.0.0-beta.3 → 5.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/index.d.ts +21 -8
- package/dist/index.global.js +2508 -2325
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +46 -42
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +41 -38
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# [5.0.0-beta.4](https://github.com/0xs34n/starknet.js/compare/v5.0.0-beta.3...v5.0.0-beta.4) (2023-01-24)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- tests ([3b34c0c](https://github.com/0xs34n/starknet.js/commit/3b34c0c37c0cca3da087e5ff2a881fba8959bf4e))
|
|
6
|
+
- weierstrass import ([c963f90](https://github.com/0xs34n/starknet.js/commit/c963f900cc0f3ffcadce16a704f7b9e592a014e1))
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- add back ec for proper support ([649e0aa](https://github.com/0xs34n/starknet.js/commit/649e0aa032d77ba714fe5cb8d31252590e9eb7f4))
|
|
11
|
+
- add public sequencer fetch method ([1dab230](https://github.com/0xs34n/starknet.js/commit/1dab2302d64f5f3f1df84c225a93e6007592090d))
|
|
12
|
+
- add tests and make RawArgs more flexible ([db9f274](https://github.com/0xs34n/starknet.js/commit/db9f2745d2f55767acd0b3ded4a028d103a0d249))
|
|
13
|
+
- allow BigNumberish in RawCallData ([9b897c7](https://github.com/0xs34n/starknet.js/commit/9b897c7fb653ae1830b3795b29bd35c8be8e2d22))
|
|
14
|
+
- use ec internally ([3392d03](https://github.com/0xs34n/starknet.js/commit/3392d0362af48f283ff414bc7387586ba44ad9a2))
|
|
15
|
+
|
|
1
16
|
# [5.0.0-beta.3](https://github.com/0xs34n/starknet.js/compare/v5.0.0-beta.2...v5.0.0-beta.3) (2023-01-13)
|
|
2
17
|
|
|
3
18
|
### Bug Fixes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import * as _noble_curves_abstract_weierstrass from '@noble/curves/abstract/weierstrass';
|
|
2
|
-
import
|
|
2
|
+
import * as stark$1 from '@noble/curves/stark';
|
|
3
3
|
import { CustomError } from 'ts-custom-error';
|
|
4
4
|
|
|
5
|
+
declare namespace ec {
|
|
6
|
+
export {
|
|
7
|
+
stark$1 as starkCurve,
|
|
8
|
+
_noble_curves_abstract_weierstrass as weierstrass,
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
5
12
|
declare type BigNumberish = string | number | bigint;
|
|
6
13
|
declare function isHex(hex: string): boolean;
|
|
7
14
|
declare function toBigInt(value: BigNumberish): bigint;
|
|
@@ -680,15 +687,15 @@ declare namespace RPC {
|
|
|
680
687
|
type Methods = OPENRPC.Methods;
|
|
681
688
|
}
|
|
682
689
|
|
|
683
|
-
declare type Signature = SignatureType;
|
|
690
|
+
declare type Signature = _noble_curves_abstract_weierstrass.SignatureType;
|
|
684
691
|
declare type RawCalldata = BigNumberish[];
|
|
685
692
|
declare type AllowArray<T> = T | T[];
|
|
686
693
|
declare type RawArgs = {
|
|
687
|
-
[inputName: string]:
|
|
694
|
+
[inputName: string]: BigNumberish | BigNumberish[] | {
|
|
688
695
|
type: 'struct';
|
|
689
696
|
[k: string]: BigNumberish;
|
|
690
697
|
};
|
|
691
|
-
} |
|
|
698
|
+
} | BigNumberish[];
|
|
692
699
|
interface ContractClass {
|
|
693
700
|
program: CompressedProgram;
|
|
694
701
|
entry_points_by_type: RPC.ContractClass['entry_points_by_type'];
|
|
@@ -1751,8 +1758,9 @@ declare class RpcProvider implements ProviderInterface {
|
|
|
1751
1758
|
}
|
|
1752
1759
|
|
|
1753
1760
|
declare type NetworkName = 'mainnet-alpha' | 'goerli-alpha' | 'goerli-alpha-2';
|
|
1761
|
+
declare type SequencerHttpMethod = 'POST' | 'GET';
|
|
1754
1762
|
declare type SequencerProviderOptions = {
|
|
1755
|
-
headers?:
|
|
1763
|
+
headers?: Record<string, string>;
|
|
1756
1764
|
blockIdentifier?: BlockIdentifier;
|
|
1757
1765
|
} & ({
|
|
1758
1766
|
network: NetworkName | StarknetChainId;
|
|
@@ -1767,10 +1775,10 @@ declare class SequencerProvider implements ProviderInterface {
|
|
|
1767
1775
|
baseUrl: string;
|
|
1768
1776
|
feederGatewayUrl: string;
|
|
1769
1777
|
gatewayUrl: string;
|
|
1770
|
-
headers
|
|
1778
|
+
headers?: Record<string, string>;
|
|
1779
|
+
private blockIdentifier;
|
|
1771
1780
|
private chainId;
|
|
1772
1781
|
private responseParser;
|
|
1773
|
-
private blockIdentifier;
|
|
1774
1782
|
constructor(optionsOrProvider?: SequencerProviderOptions);
|
|
1775
1783
|
protected static getNetworkFromName(name: NetworkName | StarknetChainId): "https://alpha-mainnet.starknet.io" | "https://alpha4.starknet.io" | "https://alpha4-2.starknet.io";
|
|
1776
1784
|
protected static getChainIdFromBaseUrl(baseUrl: string): StarknetChainId;
|
|
@@ -1779,6 +1787,11 @@ declare class SequencerProvider implements ProviderInterface {
|
|
|
1779
1787
|
private getQueryString;
|
|
1780
1788
|
private getHeaders;
|
|
1781
1789
|
protected fetchEndpoint<T extends keyof Sequencer.Endpoints>(endpoint: T, ...[query, request]: Sequencer.Endpoints[T]['QUERY'] extends never ? Sequencer.Endpoints[T]['REQUEST'] extends never ? [] : [undefined, Sequencer.Endpoints[T]['REQUEST']] : Sequencer.Endpoints[T]['REQUEST'] extends never ? [Sequencer.Endpoints[T]['QUERY']] : [Sequencer.Endpoints[T]['QUERY'], Sequencer.Endpoints[T]['REQUEST']]): Promise<Sequencer.Endpoints[T]['RESPONSE']>;
|
|
1790
|
+
fetch(endpoint: string, options?: {
|
|
1791
|
+
method?: SequencerHttpMethod;
|
|
1792
|
+
body?: any;
|
|
1793
|
+
parseAlwaysAsBigInt?: boolean;
|
|
1794
|
+
}): Promise<any>;
|
|
1782
1795
|
getChainId(): Promise<StarknetChainId>;
|
|
1783
1796
|
callContract({ contractAddress, entrypoint: entryPointSelector, calldata }: Call, blockIdentifier?: BlockIdentifier): Promise<CallContractResponse>;
|
|
1784
1797
|
getBlock(blockIdentifier?: BlockIdentifier): Promise<GetBlockResponse>;
|
|
@@ -2777,4 +2790,4 @@ declare function validateChecksumAddress(address: string): boolean;
|
|
|
2777
2790
|
declare function isUrl(s?: string): boolean;
|
|
2778
2791
|
declare function buildUrl(baseUrl: string, defaultPath: string, urlOrPath?: string): string;
|
|
2779
2792
|
|
|
2780
|
-
export { Abi, AbiEntry, Account, AccountInterface, AllowArray, Args, AsyncContractFunction, BlockNumber, BlockTag, Call, CallContractResponse, CallDetails, CallL1Handler, CallOptions, Calldata, CommonTransactionReceiptResponse, CommonTransactionResponse, CompiledContract, CompressedCompiledContract, CompressedProgram, Contract, ContractClass, ContractEntryPoint, ContractEntryPointFields, ContractFactory, ContractFunction, ContractInterface, DeclareAndDeployContractPayload, DeclareContractPayload, DeclareContractResponse, DeclareContractTransaction, DeclareDeployUDCResponse, DeclareSignerDetails, DeclareTransactionReceiptResponse, DeclareTransactionResponse, DeployAccountContractPayload, DeployAccountContractTransaction, DeployAccountSignerDetails, DeployContractPayload, DeployContractResponse, DeployContractUDCResponse, EntryPointType, EntryPointsByType, EstimateFee, EstimateFeeAction, EstimateFeeBulk, EstimateFeeDetails, EstimateFeeResponse, EstimateFeeResponseBulk, Event, ExecutionResources, FunctionAbi, FunctionInvocation, GatewayError, GetBlockResponse, GetCodeResponse, GetContractAddressesResponse, GetTransactionReceiptResponse, GetTransactionResponse, GetTransactionStatusResponse, HttpError, Invocation, InvocationBulk, InvocationsDetails, InvocationsDetailsWithNonce, InvocationsSignerDetails, InvokeFunctionResponse, InvokeTransactionReceiptResponse, InvokeTransactionResponse, LibraryError, MessageToL1, MessageToL2, MultiDeployContractResponse, Overrides, ParsedStruct, Program, Provider, ProviderInterface, ProviderOptions, RPC, RawArgs, RawCalldata, Result, RpcProvider, RpcProviderOptions, Sequencer, SequencerProvider, SequencerProviderOptions, Signature, Signer, SignerInterface, Status, Struct, StructAbi, TransactionBulk, TransactionSimulation, TransactionSimulationResponse, TransactionStatus, TransactionTraceResponse, TransactionType, UniversalDeployerContractPayload, addAddressPadding, buildUrl, constants, defaultProvider, encode, getChecksumAddress, hash, isUrl, json, merkle, number, shortString, stark, transaction, index as typedData, uint256, validateAndParseAddress, validateChecksumAddress };
|
|
2793
|
+
export { Abi, AbiEntry, Account, AccountInterface, AllowArray, Args, AsyncContractFunction, BlockNumber, BlockTag, Call, CallContractResponse, CallDetails, CallL1Handler, CallOptions, Calldata, CommonTransactionReceiptResponse, CommonTransactionResponse, CompiledContract, CompressedCompiledContract, CompressedProgram, Contract, ContractClass, ContractEntryPoint, ContractEntryPointFields, ContractFactory, ContractFunction, ContractInterface, DeclareAndDeployContractPayload, DeclareContractPayload, DeclareContractResponse, DeclareContractTransaction, DeclareDeployUDCResponse, DeclareSignerDetails, DeclareTransactionReceiptResponse, DeclareTransactionResponse, DeployAccountContractPayload, DeployAccountContractTransaction, DeployAccountSignerDetails, DeployContractPayload, DeployContractResponse, DeployContractUDCResponse, EntryPointType, EntryPointsByType, EstimateFee, EstimateFeeAction, EstimateFeeBulk, EstimateFeeDetails, EstimateFeeResponse, EstimateFeeResponseBulk, Event, ExecutionResources, FunctionAbi, FunctionInvocation, GatewayError, GetBlockResponse, GetCodeResponse, GetContractAddressesResponse, GetTransactionReceiptResponse, GetTransactionResponse, GetTransactionStatusResponse, HttpError, Invocation, InvocationBulk, InvocationsDetails, InvocationsDetailsWithNonce, InvocationsSignerDetails, InvokeFunctionResponse, InvokeTransactionReceiptResponse, InvokeTransactionResponse, LibraryError, MessageToL1, MessageToL2, MultiDeployContractResponse, NetworkName, Overrides, ParsedStruct, Program, Provider, ProviderInterface, ProviderOptions, RPC, RawArgs, RawCalldata, Result, RpcProvider, RpcProviderOptions, Sequencer, SequencerHttpMethod, SequencerProvider, SequencerProviderOptions, Signature, Signer, SignerInterface, Status, Struct, StructAbi, TransactionBulk, TransactionSimulation, TransactionSimulationResponse, TransactionStatus, TransactionTraceResponse, TransactionType, UniversalDeployerContractPayload, addAddressPadding, buildUrl, constants, defaultProvider, ec, encode, getChecksumAddress, hash, isUrl, json, merkle, number, shortString, stark, transaction, index as typedData, uint256, validateAndParseAddress, validateChecksumAddress };
|