diff --git a/package.json b/package.json index 481aab1..ad5d46d 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "@mysten/sui.js": "^0.35.1" }, "devDependencies": { - "@scallop-io/sui-kit": "^0.35.2", + "@scallop-io/sui-kit": "^0.35.3", "@types/node": "^20.1.5", "@types/tmp": "^0.2.3", "dotenv": "^16.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9cf75d7..7e942b3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,8 +19,8 @@ dependencies: devDependencies: '@scallop-io/sui-kit': - specifier: ^0.35.2 - version: 0.35.2(@mysten/sui.js@0.35.1) + specifier: ^0.35.3 + version: 0.35.3(@mysten/sui.js@0.35.1) '@types/node': specifier: ^20.1.5 version: 20.1.5 @@ -287,8 +287,8 @@ packages: - encoding - utf-8-validate - /@scallop-io/sui-kit@0.35.2(@mysten/sui.js@0.35.1): - resolution: {integrity: sha512-gu0I8PcBhotzZb9otnA4V/WudRu10UASBy67AgvjQaSyz0Fr0rFJUwhVlXzmrYDEz3j2/VmJXJkGgkL2D2NJuA==} + /@scallop-io/sui-kit@0.35.3(@mysten/sui.js@0.35.1): + resolution: {integrity: sha512-3y0MtNoOQKeKu/GzsMiwBqvJmRGsfbVSZu8N+ZSH+2Qt+gxD/WxFWgJ4wC7bJNIAvr4naUOYg5aT6lFRT3WkQw==} engines: {node: '>=18'} peerDependencies: '@mysten/sui.js': ^0.35.1 diff --git a/src/lib/sui-response-parser.ts b/src/lib/sui-response-parser.ts index a39628b..2cfe030 100644 --- a/src/lib/sui-response-parser.ts +++ b/src/lib/sui-response-parser.ts @@ -6,12 +6,15 @@ export const parsePublishTxn = (suiResponse: SuiTransactionBlockResponse) => { const parseRes = { packageId: '', upgradeCapId: '', + publisherId: undefined as string | undefined, created: [] as { type: string; objectId: string, owner: string }[], } if (objectChanges) { for (const change of objectChanges) { if (change.type === 'created' && change.objectType.endsWith('package::UpgradeCap')) { parseRes.upgradeCapId = change.objectId; + } else if (change.type === 'created' && change.objectType.endsWith('package::Publisher')) { + parseRes.publisherId = change.objectId; } else if (change.type === 'published') { parseRes.packageId = change.packageId; } else if (change.type === 'created') {