-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aab4c9e
commit fe5ebb8
Showing
7 changed files
with
75 additions
and
72 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
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 |
---|---|---|
@@ -1,3 +1,34 @@ | ||
export * from './requests'; | ||
export * from './rpc'; | ||
export * from './stx'; | ||
import { GetAddresses, GetInfo, SendTransfer, SignMessage, SignPsbt } from './btcMethods'; | ||
import { | ||
ContractCall, | ||
ContractDeploy, | ||
SignStructuredMessage, | ||
SignStxMessage, | ||
SignTransaction, | ||
TransferStx, | ||
} from './stxMethods'; | ||
|
||
export interface Requests { | ||
getInfo: GetInfo; | ||
getAddresses: GetAddresses; | ||
signMessage: SignMessage; | ||
sendTransfer: SendTransfer; | ||
signPsbt: SignPsbt; | ||
stx_contractCall: ContractCall; | ||
stx_transferStx: TransferStx; | ||
stx_signMessage: SignStxMessage; | ||
stx_signStructuredMessage: SignStructuredMessage; | ||
stx_contractDeploy: ContractDeploy; | ||
stx_signTransaction: SignTransaction; | ||
} | ||
|
||
export type Return<Method> = Method extends keyof Requests ? Requests[Method]['result'] : unknown; | ||
export type Params<Method> = Method extends keyof Requests ? Requests[Method]['params'] : unknown; | ||
|
||
export type Request = <Method extends keyof Requests>( | ||
requestMethod: Method, | ||
params: Params<Method> | ||
) => Promise<Return<Method>>; | ||
|
||
export * from './stxMethods'; | ||
export * from './btcMethods'; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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