Skip to content

Commit 1c9e326

Browse files
committed
Mark ITransactionNext as deprecated
1 parent fe5f1b4 commit 1c9e326

File tree

2 files changed

+23
-24
lines changed

2 files changed

+23
-24
lines changed

src/networkProviders/interface.ts

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { ITransaction as ITransactionAsInSpecs } from "../interface";
12
import { AccountOnNetwork } from "./accounts";
23
import { ContractQueryResponse } from "./contractQueryResponse";
34
import { NetworkConfig } from "./networkConfig";
@@ -46,7 +47,10 @@ export interface INetworkProvider {
4647
/**
4748
* Fetches data about the non-fungible tokens held by account.
4849
*/
49-
getNonFungibleTokensOfAccount(address: IAddress, pagination?: IPagination): Promise<NonFungibleTokenOfAccountOnNetwork[]>;
50+
getNonFungibleTokensOfAccount(
51+
address: IAddress,
52+
pagination?: IPagination,
53+
): Promise<NonFungibleTokenOfAccountOnNetwork[]>;
5054

5155
/**
5256
* Fetches data about a specific fungible token held by an account.
@@ -56,7 +60,11 @@ export interface INetworkProvider {
5660
/**
5761
* Fetches data about a specific non-fungible token (instance) held by an account.
5862
*/
59-
getNonFungibleTokenOfAccount(address: IAddress, collection: string, nonce: number): Promise<NonFungibleTokenOfAccountOnNetwork>;
63+
getNonFungibleTokenOfAccount(
64+
address: IAddress,
65+
collection: string,
66+
nonce: number,
67+
): Promise<NonFungibleTokenOfAccountOnNetwork>;
6068

6169
/**
6270
* Fetches the state of a transaction.
@@ -80,7 +88,7 @@ export interface INetworkProvider {
8088

8189
/**
8290
* Simulates the processing of an already-signed transaction.
83-
*
91+
*
8492
*/
8593
simulateTransaction(tx: ITransaction): Promise<any>;
8694

@@ -118,8 +126,8 @@ export interface INetworkProvider {
118126
export interface IContractQuery {
119127
address: IAddress;
120128
caller?: IAddress;
121-
func: { toString(): string; };
122-
value?: { toString(): string; };
129+
func: { toString(): string };
130+
value?: { toString(): string };
123131
getEncodedArguments(): string[];
124132
}
125133

@@ -132,22 +140,11 @@ export interface ITransaction {
132140
toSendable(): any;
133141
}
134142

135-
export interface IAddress { bech32(): string; }
136-
137-
export interface ITransactionNext {
138-
sender: string;
139-
receiver: string;
140-
gasLimit: bigint;
141-
chainID: string;
142-
nonce: bigint;
143-
value: bigint;
144-
senderUsername: string;
145-
receiverUsername: string;
146-
gasPrice: bigint;
147-
data: Uint8Array;
148-
version: number;
149-
options: number;
150-
guardian: string;
151-
signature: Uint8Array;
152-
guardianSignature: Uint8Array;
153-
}
143+
export interface IAddress {
144+
bech32(): string;
145+
}
146+
147+
/**
148+
* @deprecated This will be remove with the next release (replaced by the `ITransaction` interface from "src/interface.ts").
149+
*/
150+
export type ITransactionNext = ITransactionAsInSpecs;

src/networkProviders/providers.dev.net.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,8 @@ describe("test network providers on devnet: Proxy and API", function () {
452452
guardian: "",
453453
guardianSignature: new Uint8Array(),
454454
options: 0,
455+
relayer: "",
456+
innerTransactions: [],
455457
};
456458

457459
const apiLegacyTxHash = await apiProvider.sendTransaction(transaction);

0 commit comments

Comments
 (0)