diff --git a/example/bond/package-lock.json b/example/bond/package-lock.json index a1e498c97..69cee94a2 100644 --- a/example/bond/package-lock.json +++ b/example/bond/package-lock.json @@ -20,7 +20,7 @@ }, "../../sdk/typescript": { "name": "@lfdecentralizedtrust-labs/paladin-sdk", - "version": "0.0.6-alpha.1", + "version": "0.0.6-alpha.2", "license": "Apache-2.0", "dependencies": { "axios": "^1.7.7", diff --git a/example/zeto/package-lock.json b/example/zeto/package-lock.json index ee01375a5..d60093b3a 100644 --- a/example/zeto/package-lock.json +++ b/example/zeto/package-lock.json @@ -20,7 +20,7 @@ }, "../../sdk/typescript": { "name": "@lfdecentralizedtrust-labs/paladin-sdk", - "version": "0.0.6-alpha.1", + "version": "0.0.6-alpha.2", "license": "Apache-2.0", "dependencies": { "axios": "^1.7.7", diff --git a/sdk/typescript/src/interfaces/domains/pente.ts b/sdk/typescript/src/interfaces/domains/pente.ts index 50b65480b..97717adf5 100644 --- a/sdk/typescript/src/interfaces/domains/pente.ts +++ b/sdk/typescript/src/interfaces/domains/pente.ts @@ -7,5 +7,5 @@ export interface IGroupInfo { export interface IGroupInfoUnresolved { salt: string; - members: PaladinVerifier[]; + members: (string | PaladinVerifier)[]; } diff --git a/sdk/typescript/src/interfaces/transaction.ts b/sdk/typescript/src/interfaces/transaction.ts index e8c78a9f9..efa17819c 100644 --- a/sdk/typescript/src/interfaces/transaction.ts +++ b/sdk/typescript/src/interfaces/transaction.ts @@ -105,3 +105,14 @@ export interface IDecodedEvent { data: any; summary: string; // errors only } + +export interface IEventWithData { + blockNumber: number; + transactionIndex: number; + logIndex: number; + transactionHash: string; + signature: string; + soliditySignature: string; + address: string; + data: string; +} diff --git a/sdk/typescript/src/paladin.ts b/sdk/typescript/src/paladin.ts index 75b2d869f..55e250374 100644 --- a/sdk/typescript/src/paladin.ts +++ b/sdk/typescript/src/paladin.ts @@ -14,9 +14,10 @@ import { ITransactionReceipt, ITransactionStates, IDecodedEvent, + IEventWithData, } from "./interfaces/transaction"; import { Algorithms, Verifiers } from "./interfaces"; -import { ethers } from "ethers"; +import { ethers, InterfaceAbi } from "ethers"; import { PaladinVerifier } from "./verifier"; const POLL_INTERVAL_MS = 100; @@ -216,4 +217,16 @@ export default class PaladinClient { throw err; } } + + async decodeTransactionEvents( + transactionHash: string, + abi: InterfaceAbi, + resultFormat: string + ) { + const res = await this.post>( + "bidx_decodeTransactionEvents", + [transactionHash, abi, resultFormat] + ); + return res.data; + } }