-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding api for pay direct transfers (#4224)
Co-authored-by: Joaquim Verges <[email protected]> Co-authored-by: Edward Sun <[email protected]> Co-authored-by: Edward Sun <[email protected]>
- Loading branch information
1 parent
120d61f
commit 1405598
Showing
15 changed files
with
627 additions
and
278 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"thirdweb": patch | ||
--- | ||
|
||
Added support for direct transfers in Pay |
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
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,40 @@ | ||
import type { ApproveParams } from "../../extensions/erc20/write/approve.js"; | ||
import type { BaseTransactionOptions } from "../../transaction/types.js"; | ||
|
||
export type QuoteTokenInfo = { | ||
chainId: number; | ||
tokenAddress: string; | ||
decimals: number; | ||
priceUSDCents: number; | ||
name?: string; | ||
symbol?: string; | ||
}; | ||
|
||
export type QuoteTransactionRequest = { | ||
data: string; | ||
to: string; | ||
value: string; | ||
from: string; | ||
chainId: number; | ||
gasPrice: string; | ||
gasLimit: string; | ||
}; | ||
|
||
export type QuoteApprovalInfo = { | ||
chainId: number; | ||
tokenAddress: string; | ||
spenderAddress: string; | ||
amountWei: string; | ||
}; | ||
|
||
export type QuotePaymentToken = { | ||
token: QuoteTokenInfo; | ||
amountWei: string; | ||
amount: string; | ||
amountUSDCents: number; | ||
}; | ||
|
||
/** | ||
* @buyCrypto | ||
*/ | ||
export type QuoteApprovalParams = BaseTransactionOptions<ApproveParams>; |
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
Oops, something went wrong.