opnet 1.4.7 → 1.5.1

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.
Files changed (45) hide show
  1. package/browser/_version.d.ts +1 -1
  2. package/browser/contracts/CallResult.d.ts +4 -2
  3. package/browser/contracts/enums/TransactionFlags.d.ts +8 -0
  4. package/browser/contracts/interfaces/ICallResult.d.ts +1 -0
  5. package/browser/contracts/interfaces/SimulatedTransaction.d.ts +10 -2
  6. package/browser/index.js +1 -1
  7. package/browser/opnet.d.ts +1 -0
  8. package/browser/providers/interfaces/PublicKeyInfo.d.ts +2 -0
  9. package/browser/transactions/Transaction.d.ts +1 -0
  10. package/browser/transactions/interfaces/ITransaction.d.ts +1 -0
  11. package/browser/transactions/interfaces/ITransactionReceipt.d.ts +2 -0
  12. package/browser/transactions/metadata/TransactionReceipt.d.ts +2 -0
  13. package/build/_version.d.ts +1 -1
  14. package/build/_version.js +1 -1
  15. package/build/contracts/CallResult.d.ts +4 -2
  16. package/build/contracts/CallResult.js +7 -1
  17. package/build/contracts/Contract.js +5 -6
  18. package/build/contracts/enums/TransactionFlags.d.ts +8 -0
  19. package/build/contracts/enums/TransactionFlags.js +10 -0
  20. package/build/contracts/interfaces/ICallResult.d.ts +1 -0
  21. package/build/contracts/interfaces/SimulatedTransaction.d.ts +10 -2
  22. package/build/opnet.d.ts +1 -0
  23. package/build/opnet.js +1 -0
  24. package/build/providers/AbstractRpcProvider.js +5 -0
  25. package/build/providers/interfaces/PublicKeyInfo.d.ts +2 -0
  26. package/build/transactions/Transaction.d.ts +1 -0
  27. package/build/transactions/Transaction.js +4 -0
  28. package/build/transactions/interfaces/ITransaction.d.ts +1 -0
  29. package/build/transactions/interfaces/ITransactionReceipt.d.ts +2 -0
  30. package/build/transactions/metadata/TransactionReceipt.d.ts +2 -0
  31. package/build/transactions/metadata/TransactionReceipt.js +4 -0
  32. package/package.json +1 -1
  33. package/src/_version.ts +1 -1
  34. package/src/contracts/CallResult.ts +9 -2
  35. package/src/contracts/Contract.ts +5 -6
  36. package/src/contracts/enums/TransactionFlags.ts +29 -0
  37. package/src/contracts/interfaces/ICallResult.ts +1 -0
  38. package/src/contracts/interfaces/SimulatedTransaction.ts +12 -2
  39. package/src/opnet.ts +2 -0
  40. package/src/providers/AbstractRpcProvider.ts +8 -1
  41. package/src/providers/interfaces/PublicKeyInfo.ts +2 -0
  42. package/src/transactions/Transaction.ts +8 -0
  43. package/src/transactions/interfaces/ITransaction.ts +5 -0
  44. package/src/transactions/interfaces/ITransactionReceipt.ts +10 -0
  45. package/src/transactions/metadata/TransactionReceipt.ts +6 -0
@@ -1 +1 @@
1
- export declare const version = "1.4.7";
1
+ export declare const version = "1.5.1";
@@ -26,7 +26,7 @@ export interface InteractionTransactionReceipt {
26
26
  readonly estimatedFees: bigint;
27
27
  readonly preimage: string;
28
28
  }
29
- export declare class CallResult<T extends ContractDecodedObjectResult = {}, U extends OPNetEvent<ContractDecodedObjectResult>[] = OPNetEvent<ContractDecodedObjectResult>[]> implements Omit<ICallResultData, 'estimatedGas' | 'events'> {
29
+ export declare class CallResult<T extends ContractDecodedObjectResult = {}, U extends OPNetEvent<ContractDecodedObjectResult>[] = OPNetEvent<ContractDecodedObjectResult>[]> implements Omit<ICallResultData, 'estimatedGas' | 'events' | 'specialGas'> {
30
30
  #private;
31
31
  readonly result: BinaryReader;
32
32
  readonly accessList: IAccessList;
@@ -34,8 +34,10 @@ export declare class CallResult<T extends ContractDecodedObjectResult = {}, U ex
34
34
  calldata: Buffer | undefined;
35
35
  loadedStorage: LoadedStorage | undefined;
36
36
  readonly estimatedGas: bigint | undefined;
37
+ readonly refundedGas: bigint | undefined;
37
38
  properties: T;
38
39
  estimatedSatGas: bigint;
40
+ estimatedRefundedGasInSat: bigint;
39
41
  events: U;
40
42
  to: string | undefined;
41
43
  constructor(callResult: ICallResultData, provider: AbstractRpcProvider);
@@ -46,7 +48,7 @@ export declare class CallResult<T extends ContractDecodedObjectResult = {}, U ex
46
48
  private static bytesToHexString;
47
49
  setTo(to: string): void;
48
50
  sendTransaction(interactionParams: TransactionParameters, amountAddition?: bigint): Promise<InteractionTransactionReceipt>;
49
- setGasEstimation(estimatedGas: bigint): void;
51
+ setGasEstimation(estimatedGas: bigint, refundedGas: bigint): void;
50
52
  setDecoded(decoded: DecodedOutput): void;
51
53
  setEvents(events: U): void;
52
54
  setCalldata(calldata: Buffer): void;
@@ -0,0 +1,8 @@
1
+ export declare enum TransactionInputFlags {
2
+ hasCoinbase = 1
3
+ }
4
+ export declare enum TransactionOutputFlags {
5
+ hasTo = 1,
6
+ hasScriptPubKey = 2,
7
+ OP_RETURN = 4
8
+ }
@@ -19,6 +19,7 @@ export interface ICallResultData {
19
19
  readonly accessList: IAccessList;
20
20
  readonly revert?: string;
21
21
  readonly estimatedGas?: string;
22
+ readonly specialGas?: string;
22
23
  readonly loadedStorage?: LoadedStorage;
23
24
  }
24
25
  export type ICallResult = ICallRequestError | ICallResultData;
@@ -1,22 +1,30 @@
1
1
  export interface StrippedTransactionOutput {
2
2
  readonly value: bigint;
3
3
  readonly index: number;
4
- readonly to: string;
4
+ readonly flags: number;
5
+ readonly scriptPubKey: Buffer | undefined;
6
+ readonly to: string | undefined;
5
7
  }
6
8
  export interface StrippedTransactionOutputAPI {
7
9
  readonly value: string;
8
10
  readonly index: number;
9
- readonly to: string;
11
+ readonly to: string | undefined;
12
+ readonly flags: number;
13
+ readonly scriptPubKey: string | undefined;
10
14
  }
11
15
  export interface StrippedTransactionInput {
12
16
  readonly txId: Buffer;
13
17
  readonly outputIndex: number;
14
18
  readonly scriptSig: Buffer;
19
+ readonly flags: number;
20
+ readonly coinbase: Buffer | undefined;
15
21
  }
16
22
  export interface StrippedTransactionInputAPI {
17
23
  readonly txId: string;
18
24
  readonly outputIndex: number;
19
25
  readonly scriptSig: string;
26
+ readonly coinbase: string | undefined;
27
+ readonly flags: number;
20
28
  }
21
29
  export interface SimulatedTransaction {
22
30
  readonly inputs: StrippedTransactionInputAPI[];