@glacislabs/stablegenie-zerodelta 4.4.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-53K3BXT5.js → chunk-447DEZ5S.js} +70 -2
- package/dist/{chunk-NYIORRFU.js → chunk-COBXR362.js} +14 -1
- package/dist/core/index.cjs +70 -2
- package/dist/core/index.d.cts +7 -2
- package/dist/core/index.d.ts +7 -2
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +83 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/{mount-D8hY-a-s.d.cts → mount-BnAD7hWX.d.cts} +1 -1
- package/dist/{mount-Blg-caPn.d.ts → mount-DcbU1gqd.d.ts} +1 -1
- package/dist/mount.cjs +83 -2
- package/dist/mount.d.cts +2 -2
- package/dist/mount.d.ts +2 -2
- package/dist/mount.js +2 -2
- package/dist/standalone.global.js +7 -7
- package/dist/{verify-C1VaWfiy.d.cts → verify-D722uRwZ.d.cts} +45 -0
- package/dist/{verify-C1VaWfiy.d.ts → verify-D722uRwZ.d.ts} +45 -0
- package/package.json +1 -1
|
@@ -955,6 +955,36 @@ declare function laneLimitError(limit: LaneLimit, symbol: string): string;
|
|
|
955
955
|
* gateway message: that text is untrusted and can carry infrastructure detail. */
|
|
956
956
|
declare function brokenLaneReason(lane: BrokenLane | undefined): string;
|
|
957
957
|
|
|
958
|
+
/**
|
|
959
|
+
* The shapes the gateway would refuse anyway, checked here so a bad value costs
|
|
960
|
+
* no request.
|
|
961
|
+
*
|
|
962
|
+
* ⚠️ A submit transaction has TWO shapes, and accepting only the EVM one would
|
|
963
|
+
* drop the whole Solana family silently: an EVM 32-byte hash in 0x-hex, or a
|
|
964
|
+
* Solana transaction SIGNATURE in base58 (64 bytes ⇒ 86-88 chars). The length
|
|
965
|
+
* floor keeps a signature distinguishable from an ADDRESS (32-44 chars), which
|
|
966
|
+
* shares the alphabet.
|
|
967
|
+
*
|
|
968
|
+
* ⚠️ The WALLET is always the EVM owner, on every family. A Solana-source order
|
|
969
|
+
* is PAID by a Solana wallet but OWNED by an EVM account — that is the cancel
|
|
970
|
+
* and refund path, and it is what the chain records. Reporting the signer would
|
|
971
|
+
* name a wallet the chain never held for that order.
|
|
972
|
+
*/
|
|
973
|
+
/**
|
|
974
|
+
* How far this widget followed the transaction it is reporting.
|
|
975
|
+
*
|
|
976
|
+
* `submitted` — the wallet handed back a hash. Reported immediately, so
|
|
977
|
+
* attribution survives a payer closing the tab during the wait.
|
|
978
|
+
* `confirmed` — the widget's own receipt check agreed it landed. This is the
|
|
979
|
+
* one fact only the surface can supply: whether the payer was still here when
|
|
980
|
+
* the payment completed, which for an embedded widget is exactly the
|
|
981
|
+
* conversion question its integrator is asking.
|
|
982
|
+
*
|
|
983
|
+
* ⚠️ It is NOT a claim about the chain. The gateway reads the order's real
|
|
984
|
+
* status from its own indexed data either way.
|
|
985
|
+
*/
|
|
986
|
+
type SubmissionStage = "submitted" | "confirmed";
|
|
987
|
+
|
|
958
988
|
interface ResolvedConfig {
|
|
959
989
|
apiBase: string;
|
|
960
990
|
getApiKey: () => Promise<string>;
|
|
@@ -1036,6 +1066,21 @@ interface ApiClient {
|
|
|
1036
1066
|
* direct ERC-20 transfer and a sanctioned counterparty.
|
|
1037
1067
|
*/
|
|
1038
1068
|
screenWallet: (address: string, chainId?: number) => Promise<WalletScreen>;
|
|
1069
|
+
/**
|
|
1070
|
+
* Tell the gateway this widget sent a transaction. Resolves to whether it was
|
|
1071
|
+
* accepted and **never rejects**.
|
|
1072
|
+
*
|
|
1073
|
+
* ⚠️ OPTIONAL on the type, and deliberately so: a host may hold an engine
|
|
1074
|
+
* built before this existed, and a caller must be able to reach for it
|
|
1075
|
+
* without a payment depending on it being there. See `reportQuietly` in
|
|
1076
|
+
* `useFlow` for the other half of that rule.
|
|
1077
|
+
*/
|
|
1078
|
+
reportSubmission?: (report: {
|
|
1079
|
+
txHash: string;
|
|
1080
|
+
chainId: number;
|
|
1081
|
+
wallet: string;
|
|
1082
|
+
stage?: SubmissionStage;
|
|
1083
|
+
}) => Promise<boolean>;
|
|
1039
1084
|
apiBase: string;
|
|
1040
1085
|
}
|
|
1041
1086
|
/** Build an API client bound to a resolved config. The 60s resource cache is per-instance. */
|
|
@@ -955,6 +955,36 @@ declare function laneLimitError(limit: LaneLimit, symbol: string): string;
|
|
|
955
955
|
* gateway message: that text is untrusted and can carry infrastructure detail. */
|
|
956
956
|
declare function brokenLaneReason(lane: BrokenLane | undefined): string;
|
|
957
957
|
|
|
958
|
+
/**
|
|
959
|
+
* The shapes the gateway would refuse anyway, checked here so a bad value costs
|
|
960
|
+
* no request.
|
|
961
|
+
*
|
|
962
|
+
* ⚠️ A submit transaction has TWO shapes, and accepting only the EVM one would
|
|
963
|
+
* drop the whole Solana family silently: an EVM 32-byte hash in 0x-hex, or a
|
|
964
|
+
* Solana transaction SIGNATURE in base58 (64 bytes ⇒ 86-88 chars). The length
|
|
965
|
+
* floor keeps a signature distinguishable from an ADDRESS (32-44 chars), which
|
|
966
|
+
* shares the alphabet.
|
|
967
|
+
*
|
|
968
|
+
* ⚠️ The WALLET is always the EVM owner, on every family. A Solana-source order
|
|
969
|
+
* is PAID by a Solana wallet but OWNED by an EVM account — that is the cancel
|
|
970
|
+
* and refund path, and it is what the chain records. Reporting the signer would
|
|
971
|
+
* name a wallet the chain never held for that order.
|
|
972
|
+
*/
|
|
973
|
+
/**
|
|
974
|
+
* How far this widget followed the transaction it is reporting.
|
|
975
|
+
*
|
|
976
|
+
* `submitted` — the wallet handed back a hash. Reported immediately, so
|
|
977
|
+
* attribution survives a payer closing the tab during the wait.
|
|
978
|
+
* `confirmed` — the widget's own receipt check agreed it landed. This is the
|
|
979
|
+
* one fact only the surface can supply: whether the payer was still here when
|
|
980
|
+
* the payment completed, which for an embedded widget is exactly the
|
|
981
|
+
* conversion question its integrator is asking.
|
|
982
|
+
*
|
|
983
|
+
* ⚠️ It is NOT a claim about the chain. The gateway reads the order's real
|
|
984
|
+
* status from its own indexed data either way.
|
|
985
|
+
*/
|
|
986
|
+
type SubmissionStage = "submitted" | "confirmed";
|
|
987
|
+
|
|
958
988
|
interface ResolvedConfig {
|
|
959
989
|
apiBase: string;
|
|
960
990
|
getApiKey: () => Promise<string>;
|
|
@@ -1036,6 +1066,21 @@ interface ApiClient {
|
|
|
1036
1066
|
* direct ERC-20 transfer and a sanctioned counterparty.
|
|
1037
1067
|
*/
|
|
1038
1068
|
screenWallet: (address: string, chainId?: number) => Promise<WalletScreen>;
|
|
1069
|
+
/**
|
|
1070
|
+
* Tell the gateway this widget sent a transaction. Resolves to whether it was
|
|
1071
|
+
* accepted and **never rejects**.
|
|
1072
|
+
*
|
|
1073
|
+
* ⚠️ OPTIONAL on the type, and deliberately so: a host may hold an engine
|
|
1074
|
+
* built before this existed, and a caller must be able to reach for it
|
|
1075
|
+
* without a payment depending on it being there. See `reportQuietly` in
|
|
1076
|
+
* `useFlow` for the other half of that rule.
|
|
1077
|
+
*/
|
|
1078
|
+
reportSubmission?: (report: {
|
|
1079
|
+
txHash: string;
|
|
1080
|
+
chainId: number;
|
|
1081
|
+
wallet: string;
|
|
1082
|
+
stage?: SubmissionStage;
|
|
1083
|
+
}) => Promise<boolean>;
|
|
1039
1084
|
apiBase: string;
|
|
1040
1085
|
}
|
|
1041
1086
|
/** Build an API client bound to a resolved config. The 60s resource cache is per-instance. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glacislabs/stablegenie-zerodelta",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "Lightweight embeddable ZeroDelta payment + swap widget (exact-receive Pay and exact-in Swap). Wallet always owns the final signature.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|