@moralisweb3/streams-typings
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -18,5 +18,5 @@ /** | ||
/** | ||
* The address to be removed from the Stream. | ||
* The address or a list of addresses to be removed from the Stream. | ||
*/ | ||
address: string; | ||
address: string | string[]; | ||
} | ||
@@ -44,6 +44,2 @@ | ||
address: string; | ||
/** | ||
* Unique id of object | ||
*/ | ||
id: UUID; | ||
} | ||
@@ -59,3 +55,3 @@ | ||
*/ | ||
address: string; | ||
address: string | string[]; | ||
} | ||
@@ -62,0 +58,0 @@ |
@@ -5,7 +5,9 @@ import * as webhookTypes from '../types'; | ||
id: UUID; | ||
date: string; | ||
payload: webhookTypes.IWebhook; | ||
date: Date; | ||
payload?: webhookTypes.IWebhookUnParsed; | ||
tinyPayload: webhookTypes.ITinyPayload; | ||
errorMessage: string; | ||
webhookUrl: string; | ||
streamId: string; | ||
tag: string; | ||
} | ||
@@ -12,0 +14,0 @@ |
@@ -1,2 +0,2 @@ | ||
export interface Log { | ||
export interface Log extends Trigger { | ||
logIndex: string; | ||
@@ -12,2 +12,16 @@ transactionHash: string; | ||
export interface INativeBalance { | ||
address: string; | ||
balance: string; | ||
} | ||
export interface Trigger { | ||
triggers?: TriggerOutput[]; | ||
} | ||
export type TriggerOutput = { | ||
name: string; | ||
value: any; | ||
}; | ||
export interface InternalTransaction { | ||
@@ -27,3 +41,3 @@ from: string | null; | ||
export interface Transaction { | ||
export interface Transaction extends Trigger { | ||
hash: string; | ||
@@ -84,6 +98,28 @@ gas: string | null; | ||
nftTransfers: INFTTransfer[]; | ||
nftApprovals: INFTApproval; | ||
nativeBalances: INativeBalance[]; | ||
/** | ||
* @deprecated Will be removed. Use nftTokenApprovals | ||
*/ | ||
nftApprovals: IOldNFTApproval; | ||
nftTokenApprovals: INFTApproval[]; | ||
} | ||
export interface IWebhook extends IParser { | ||
export interface INFTApprovalERC721 extends RootLog, INFTApproval721DecodeLog, INFTMetadata {} | ||
export interface INFTApprovalERC1155 extends RootLog, INFTApprovalForAllDecodeLog, INFTMetadata {} | ||
export interface IOldNFTApproval { | ||
ERC721: INFTApprovalERC721[]; | ||
ERC1155: INFTApprovalERC1155[]; | ||
} | ||
export interface ITinyPayload { | ||
chainId: string; | ||
confirmed: boolean; | ||
block: string; | ||
records: number; | ||
retries: number; | ||
} | ||
export interface IWebhookUnParsed { | ||
block: Block; | ||
@@ -101,2 +137,4 @@ chainId: string; | ||
export interface IWebhook extends IWebhookUnParsed, IParser {} | ||
export interface RootLog { | ||
@@ -114,3 +152,3 @@ transactionHash: string; | ||
export interface IERC20Transfer extends RootLog, IERC20TransferDecodeLog, IERC20Metadata {} | ||
export interface IERC20Transfer extends RootLog, IERC20TransferDecodeLog, IERC20Metadata, Trigger {} | ||
@@ -123,3 +161,3 @@ export interface IERC20ApprovalDecodeLog { | ||
export interface IERC20Approval extends RootLog, IERC20ApprovalDecodeLog, IERC20Metadata {} | ||
export interface IERC20Approval extends RootLog, IERC20ApprovalDecodeLog, IERC20Metadata, Trigger {} | ||
@@ -148,3 +186,3 @@ export interface INFTTransfer721DecodeLog { | ||
export interface INFTTransfer extends RootLog, INFTMetadata { | ||
export interface INFTTransfer extends RootLog, INFTMetadata, Trigger { | ||
operator: string | null; | ||
@@ -157,3 +195,3 @@ from: string; | ||
export interface INFTApproval1155DecodeLog { | ||
export interface INFTApprovalForAllDecodeLog { | ||
account: string; | ||
@@ -170,9 +208,8 @@ operator: string; | ||
export interface INFTApprovalERC721 extends RootLog, INFTApproval721DecodeLog, INFTMetadata {} | ||
export interface INFTApprovalERC1155 extends RootLog, INFTApproval1155DecodeLog, INFTMetadata {} | ||
export interface INFTApproval { | ||
ERC721: INFTApprovalERC721[]; | ||
ERC1155: INFTApprovalERC1155[]; | ||
export interface INFTApproval extends RootLog, INFTMetadata { | ||
contract: string; | ||
account: string; | ||
operator: string; | ||
approvedAll: boolean; | ||
tokenId: string | null; | ||
} | ||
@@ -179,0 +216,0 @@ |
{ | ||
"name": "@moralisweb3/streams-typings", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Streams Typings", | ||
@@ -8,2 +8,2 @@ "typings": "index.d.ts", | ||
"license": "ISC" | ||
} | ||
} |
@@ -14,2 +14,3 @@ import { AbiItem } from './index'; | ||
error = 'error', | ||
terminated = 'terminated', | ||
} | ||
@@ -39,3 +40,3 @@ | ||
/** | ||
* An Array of topic0's in hex, required if the type : log | ||
* An Array of topic0's in string-signature format ex: ['FunctionName(address,uint256)'] | ||
*/ | ||
@@ -59,2 +60,6 @@ topic0?: string[] | null; | ||
includeInternalTxs?: boolean; | ||
/** | ||
* Include native balances for each address in the webhook | ||
*/ | ||
getNativeBalances?: getNativeBalances[]; | ||
abi?: AbiItem[] | null; | ||
@@ -66,4 +71,17 @@ advancedOptions?: advancedOptions[] | null; | ||
chainIds: string[]; | ||
/** | ||
* Indicator if it is a demo stream | ||
*/ | ||
demo?: boolean; | ||
/** | ||
* triggers | ||
*/ | ||
triggers?: StreamsTrigger[] | null; | ||
} | ||
export interface getNativeBalances { | ||
selectors: string[]; | ||
type: StreamsTrigger['type'] | 'internalTx'; | ||
} | ||
export interface StreamsModel extends StreamsModelCreate { | ||
@@ -109,4 +127,16 @@ /** | ||
/** | ||
* The filter object, optional and only used if the type : log | ||
* https://v1docs.moralis.io/moralis-dapp/automatic-transaction-sync/smart-contract-events#event-filters | ||
* Trigger | ||
*/ | ||
export interface StreamsTrigger { | ||
type: 'tx' | 'log' | 'erc20transfer' | 'erc20approval' | 'nfttransfer'; | ||
contractAddress: string; | ||
inputs?: (string | any[])[]; | ||
functionAbi: AbiItem; | ||
topic0?: string; | ||
callFrom?: string; | ||
} | ||
/** | ||
* The filter object for the topic0 | ||
* https://docs.moralis.io/docs/filter-streams | ||
* @example {} | ||
@@ -113,0 +143,0 @@ */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12457
10
521
1