From 38a7d192012a82b22bc46767abc7524982108a27 Mon Sep 17 00:00:00 2001 From: Janek Date: Tue, 21 Nov 2023 08:46:48 +0100 Subject: [PATCH] feat: wallet_deploymentData --- packages/core/src/StarknetWindowObject.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/core/src/StarknetWindowObject.ts b/packages/core/src/StarknetWindowObject.ts index ca6b002..8a4c4d4 100644 --- a/packages/core/src/StarknetWindowObject.ts +++ b/packages/core/src/StarknetWindowObject.ts @@ -55,6 +55,14 @@ export interface SwitchStarknetChainParameter { chainId: string // A 0x-prefixed hexadecimal string } +// SNIP: https://community.starknet.io/t/snip-deployment-interface-between-dapps-and-wallets/101923 +interface GetDeploymentDataResult { + address: string // Represented as 'felt252' + class_hash: string // Represented as 'felt252' + salt: string // Represented as 'felt252' + calldata: string[] // Array of 'felt252', length := calldata_len +} + export type RpcMessage = | { type: "wallet_watchAsset" @@ -71,6 +79,11 @@ export type RpcMessage = params: SwitchStarknetChainParameter result: boolean } + | { + type: "wallet_deploymentData" + params: never + result: GetDeploymentDataResult + } export interface IStarknetWindowObject { id: string