-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
finalize
option to Unisat signPsbt fn
- Loading branch information
1 parent
0b263c6
commit 7e7d9ca
Showing
4 changed files
with
22 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from "./addresses"; | ||
export * from "./signatures"; | ||
export * from "./utils"; | ||
export * from "./addresses" | ||
export * from "./signatures" | ||
export * from "./types" | ||
export * from "./utils" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface UnisatSignPSBTOptions { | ||
finalize?: boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
declare interface Window { | ||
unisat: Unisat; | ||
satsConnect: any; | ||
ethereum: MetaMask; | ||
unisat: Unisat | ||
satsConnect: any | ||
ethereum: MetaMask | ||
} | ||
|
||
type Unisat = { | ||
getNetwork: () => Promise<UnisatNetwork>; | ||
switchNetwork: (targetNetwork: UnisatNetwork) => Promise<void>; | ||
requestAccounts: () => Promise<string[]>; | ||
getPublicKey: () => Promise<string>; | ||
signPsbt: (hex: string) => Promise<string>; | ||
signMessage: (message: string) => Promise<string>; | ||
}; | ||
getNetwork: () => Promise<UnisatNetwork> | ||
switchNetwork: (targetNetwork: UnisatNetwork) => Promise<void> | ||
requestAccounts: () => Promise<string[]> | ||
getPublicKey: () => Promise<string> | ||
signPsbt: (hex: string, { autoFinalized }: Record<string, boolean>) => Promise<string> | ||
signMessage: (message: string) => Promise<string> | ||
} | ||
|
||
type MetaMask = { | ||
isMetaMask: boolean; | ||
request: (options: { method: string; params?: any }) => Promise<any>; | ||
}; | ||
isMetaMask: boolean | ||
request: (options: { method: string; params?: any }) => Promise<any> | ||
} |