diff --git a/src/networkProviders/interface.ts b/src/networkProviders/interface.ts index 144f0583..eb73db28 100644 --- a/src/networkProviders/interface.ts +++ b/src/networkProviders/interface.ts @@ -1,3 +1,4 @@ +import { ITransaction as ITransactionAsInSpecs } from "../interface"; import { AccountOnNetwork } from "./accounts"; import { ContractQueryResponse } from "./contractQueryResponse"; import { NetworkConfig } from "./networkConfig"; @@ -46,7 +47,10 @@ export interface INetworkProvider { /** * Fetches data about the non-fungible tokens held by account. */ - getNonFungibleTokensOfAccount(address: IAddress, pagination?: IPagination): Promise; + getNonFungibleTokensOfAccount( + address: IAddress, + pagination?: IPagination, + ): Promise; /** * Fetches data about a specific fungible token held by an account. @@ -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; + getNonFungibleTokenOfAccount( + address: IAddress, + collection: string, + nonce: number, + ): Promise; /** * Fetches the state of a transaction. @@ -80,7 +88,7 @@ export interface INetworkProvider { /** * Simulates the processing of an already-signed transaction. - * + * */ simulateTransaction(tx: ITransaction): Promise; @@ -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[]; } @@ -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 removed with the next release (replaced by the `ITransaction` interface from "src/interface.ts"). + */ +export type ITransactionNext = ITransactionAsInSpecs; diff --git a/src/networkProviders/providers.dev.net.spec.ts b/src/networkProviders/providers.dev.net.spec.ts index d08e5b4f..b95994cb 100644 --- a/src/networkProviders/providers.dev.net.spec.ts +++ b/src/networkProviders/providers.dev.net.spec.ts @@ -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);