Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark ITransactionNext as deprecated #509

Merged
Show file tree
Hide file tree
Changes from 1 commit
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
45 changes: 21 additions & 24 deletions src/networkProviders/interface.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ITransaction as ITransactionAsInSpecs } from "../interface";
import { AccountOnNetwork } from "./accounts";
import { ContractQueryResponse } from "./contractQueryResponse";
import { NetworkConfig } from "./networkConfig";
Expand Down Expand Up @@ -46,7 +47,10 @@ export interface INetworkProvider {
/**
* Fetches data about the non-fungible tokens held by account.
*/
getNonFungibleTokensOfAccount(address: IAddress, pagination?: IPagination): Promise<NonFungibleTokenOfAccountOnNetwork[]>;
getNonFungibleTokensOfAccount(
address: IAddress,
pagination?: IPagination,
): Promise<NonFungibleTokenOfAccountOnNetwork[]>;

/**
* Fetches data about a specific fungible token held by an account.
Expand All @@ -56,7 +60,11 @@ export interface INetworkProvider {
/**
* Fetches data about a specific non-fungible token (instance) held by an account.
*/
getNonFungibleTokenOfAccount(address: IAddress, collection: string, nonce: number): Promise<NonFungibleTokenOfAccountOnNetwork>;
getNonFungibleTokenOfAccount(
address: IAddress,
collection: string,
nonce: number,
): Promise<NonFungibleTokenOfAccountOnNetwork>;

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

/**
* Simulates the processing of an already-signed transaction.
*
*
*/
simulateTransaction(tx: ITransaction): Promise<any>;

Expand Down Expand Up @@ -118,8 +126,8 @@ export interface INetworkProvider {
export interface IContractQuery {
address: IAddress;
caller?: IAddress;
func: { toString(): string; };
value?: { toString(): string; };
func: { toString(): string };
value?: { toString(): string };
getEncodedArguments(): string[];
}

Expand All @@ -132,22 +140,11 @@ export interface ITransaction {
toSendable(): any;
}

export interface IAddress { bech32(): string; }

export interface ITransactionNext {
sender: string;
receiver: string;
gasLimit: bigint;
chainID: string;
nonce: bigint;
value: bigint;
senderUsername: string;
receiverUsername: string;
gasPrice: bigint;
data: Uint8Array;
version: number;
options: number;
guardian: string;
signature: Uint8Array;
guardianSignature: Uint8Array;
}
export interface IAddress {
bech32(): string;
}

/**
* @deprecated This will be remove with the next release (replaced by the `ITransaction` interface from "src/interface.ts").
danielailie marked this conversation as resolved.
Show resolved Hide resolved
*/
export type ITransactionNext = ITransactionAsInSpecs;
2 changes: 2 additions & 0 deletions src/networkProviders/providers.dev.net.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ describe("test network providers on devnet: Proxy and API", function () {
guardian: "",
guardianSignature: new Uint8Array(),
options: 0,
relayer: "",
innerTransactions: [],
};

const apiLegacyTxHash = await apiProvider.sendTransaction(transaction);
Expand Down
Loading