Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion __tests__/accountPaymaster.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OutsideCallV2, OutsideExecutionTypedDataV2 } from 'starknet-types-08';
import { OutsideCallV2, OutsideExecutionTypedDataV2 } from '@starknet-io/starknet-types-08';
import { Account, Signature, Call, PaymasterDetails, OutsideExecutionVersion } from '../src';
import { getSelectorFromName } from '../src/utils/hash';

Expand Down
2 changes: 1 addition & 1 deletion __tests__/defaultPaymaster.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OutsideExecutionTypedData } from 'starknet-types-08';
import { OutsideExecutionTypedData } from '@starknet-io/starknet-types-08';
import {
RpcError,
PaymasterRpc,
Expand Down
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@
"abi-wan-kanabi": "2.2.4",
"lossless-json": "^4.0.1",
"pako": "^2.0.4",
"starknet-types-07": "npm:@starknet-io/types-js@~0.7.10",
"starknet-types-08": "npm:@starknet-io/types-js@~0.8.3",
"@starknet-io/starknet-types-07": "npm:@starknet-io/types-js@~0.7.10",
"@starknet-io/starknet-types-08": "npm:@starknet-io/types-js@~0.8.3",
"ts-mixer": "^6.0.3"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion src/channel/ws_0_8.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
SubscriptionTransactionsStatusResponse,
WebSocketEvents,
WebSocketMethods,
} from 'starknet-types-08';
} from '@starknet-io/starknet-types-08';

import { BigNumberish, SubscriptionBlockIdentifier } from '../types';
import { JRPC } from '../types/api';
Expand Down
2 changes: 1 addition & 1 deletion src/provider/types/response.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
IsSucceeded,
IsType,
PENDING_BLOCK_WITH_TX_HASHES,
} from 'starknet-types-08';
} from '@starknet-io/starknet-types-08';
import { CompiledSierra, LegacyContractClass } from '../../types/lib';
import {
FELT,
Expand Down
4 changes: 2 additions & 2 deletions src/provider/types/spec.type.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// this file aims to unify the RPC specification types used by the common Provider class

import * as RPCSPEC07 from 'starknet-types-07';
import * as RPCSPEC08 from 'starknet-types-08';
import * as RPCSPEC07 from '@starknet-io/starknet-types-07';
import * as RPCSPEC08 from '@starknet-io/starknet-types-08';

import { SimpleOneOf } from '../../types/helpers';

Expand Down
8 changes: 4 additions & 4 deletions src/types/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export * as JRPC from './jsonrpc';

export * as RPCSPEC07 from 'starknet-types-07';
export * as RPCSPEC08 from 'starknet-types-08';
export { PAYMASTER_API } from 'starknet-types-08';
export * as RPCSPEC07 from '@starknet-io/starknet-types-07';
export * as RPCSPEC08 from '@starknet-io/starknet-types-08';
export { PAYMASTER_API } from '@starknet-io/starknet-types-08';

export * from 'starknet-types-08';
export * from '@starknet-io/starknet-types-08';
// TODO: Should this be default export type as RPCSPEC07 & RPCSPEC08 are sued only in channel rest of the code do not know what rpc version it works with and it can be both.
// export * from '../../provider/types/spec.type';
2 changes: 1 addition & 1 deletion src/types/contract.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BlockHash, TransactionHash } from 'starknet-types-07';
import { BlockHash, TransactionHash } from '@starknet-io/starknet-types-07';
import { CairoEnum } from './cairoEnum';
import {
BigNumberish,
Expand Down
4 changes: 2 additions & 2 deletions src/types/errors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Errors from 'starknet-types-08';
import { PAYMASTER_API } from 'starknet-types-08';
import * as Errors from '@starknet-io/starknet-types-08';
import { PAYMASTER_API } from '@starknet-io/starknet-types-08';

// NOTE: generated with scripts/generateRpcErrorMap.js
export type RPC_ERROR_SET = {
Expand Down
2 changes: 1 addition & 1 deletion src/types/lib/contract/abi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ENUM_EVENT, EVENT_FIELD, STRUCT_EVENT } from 'starknet-types-07';
import type { ENUM_EVENT, EVENT_FIELD, STRUCT_EVENT } from '@starknet-io/starknet-types-07';

/** ABI */
export type Abi = ReadonlyArray<FunctionAbi | AbiEvent | AbiStruct | InterfaceAbi | any>;
Expand Down
58 changes: 38 additions & 20 deletions src/types/lib/contract/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ export interface Program {
}>;
compiler_version?: string;
main_scope?: string;
identifiers?: Record<string,
identifiers?: Record<
string,
| {
destination: string;
type: 'alias';
Expand All @@ -66,19 +67,25 @@ export interface Program {
type: 'function';
implicit_args?: {
full_name: string;
members: Record<string, {
cairo_type: string;
offset: number;
}>;
members: Record<
string,
{
cairo_type: string;
offset: number;
}
>;
size: number;
type: 'struct';
};
explicit_args?: {
full_name: string;
members: Record<string, {
cairo_type: string;
offset: number;
}>;
members: Record<
string,
{
cairo_type: string;
offset: number;
}
>;
size: number;
type: 'struct';
};
Expand All @@ -89,10 +96,15 @@ export interface Program {
}
| {
full_name: string;
members: Record<string, {
cairo_type: string;
offset: number;
}> | Record<string, never>;
members:
| Record<
string,
{
cairo_type: string;
offset: number;
}
>
| Record<string, never>;
size: number;
type: 'struct';
}
Expand Down Expand Up @@ -125,11 +137,17 @@ export interface Program {
type: 'reference';
}
>;
reference_manager?: Record<string, {
references: unknown[];
}>;
debug_info?: Record<string, {
file_contents?: Record<string, string>;
instruction_locations?: Record<string, unknown[]>;
}>;
reference_manager?: Record<
string,
{
references: unknown[];
}
>;
debug_info?: Record<
string,
{
file_contents?: Record<string, string>;
instruction_locations?: Record<string, unknown[]>;
}
>;
}
2 changes: 1 addition & 1 deletion src/types/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SUBSCRIPTION_BLOCK_TAG } from 'starknet-types-08';
import { SUBSCRIPTION_BLOCK_TAG } from '@starknet-io/starknet-types-08';
import { StarknetChainId } from '../../global/constants';
import { weierstrass } from '../../utils/ec';
import { EDataAvailabilityMode } from '../api';
Expand Down
2 changes: 1 addition & 1 deletion src/types/typedData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export {
type StarknetType,
type StarknetDomain,
type TypedData,
} from 'starknet-types-07';
} from '@starknet-io/starknet-types-07';
2 changes: 1 addition & 1 deletion src/utils/outsideExecution.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OutsideCallV1, OutsideCallV2 } from 'starknet-types-08';
import { OutsideCallV1, OutsideCallV2 } from '@starknet-io/starknet-types-08';
import { CallData } from './calldata';
import { Call, type AllowArray, type BigNumberish, type Calldata } from '../types/lib';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/paymaster.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OutsideCallV2, OutsideCallV1 } from 'starknet-types-08';
import { OutsideCallV2, OutsideCallV1 } from '@starknet-io/starknet-types-08';
import { NetworkName, PAYMASTER_RPC_NODES } from '../global/constants';
import { logger } from '../global/logger';
import { BigNumberish, PaymasterDetails, PreparedTransaction, Call } from '../types';
Expand Down
2 changes: 1 addition & 1 deletion src/utils/stark/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getPublicKey, getStarkKey, utils } from '@scure/starknet';
import { gzip, ungzip } from 'pako';

import { PRICE_UNIT } from 'starknet-types-08';
import { PRICE_UNIT } from '@starknet-io/starknet-types-08';
import { config } from '../../global/config';
import { SupportedRpcVersion, ZERO } from '../../global/constants';
import { FeeEstimate } from '../../provider/types/index.type';
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
NetworkChangeEventHandler,
Signature,
WatchAssetParameters,
} from 'starknet-types-08';
} from '@starknet-io/starknet-types-08';

import { Account, AccountInterface } from '../account';
import { StarknetChainId } from '../global/constants';
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
AccountDeploymentData,
Signature,
SpecVersion,
} from 'starknet-types-07';
} from '@starknet-io/starknet-types-07';

/**
* Request Permission for wallet account, return addresses that are allowed by user
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type RpcMessage, type StarknetWindowObject } from 'starknet-types-07';
import { type RpcMessage, type StarknetWindowObject } from '@starknet-io/starknet-types-07';

// ---- TT Request Handler
export type RpcCall = Omit<RpcMessage, 'result'>;
Expand Down
Loading