Skip to content

Commit

Permalink
feat: wallet_deploymentData
Browse files Browse the repository at this point in the history
  • Loading branch information
janek26 committed Nov 21, 2023
1 parent acc334f commit 38a7d19
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/core/src/StarknetWindowObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -71,6 +79,11 @@ export type RpcMessage =
params: SwitchStarknetChainParameter
result: boolean
}
| {
type: "wallet_deploymentData"
params: never
result: GetDeploymentDataResult
}

export interface IStarknetWindowObject {
id: string
Expand Down

0 comments on commit 38a7d19

Please sign in to comment.