@nibgate/sdk 0.2.13 → 0.2.15
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/nibgate.js +3 -172
- package/dist/nibgate.js.map +4 -4
- package/dist/nibgate.min.js +33 -33
- package/dist/nibgate.min.js.map +4 -4
- package/package.json +1 -1
- package/src/browser/gateway.js +2 -11
package/package.json
CHANGED
package/src/browser/gateway.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BatchEvmScheme as CircleBatchEvmScheme } from '@circle-fin/x402-batching/client';
|
|
1
2
|
import { stringifyJson } from './json.js';
|
|
2
3
|
|
|
3
4
|
function encodeBase64(value) {
|
|
@@ -17,17 +18,7 @@ export async function createCircleGatewayBrowserAdapter(options = {}) {
|
|
|
17
18
|
throw new Error('Circle Gateway browser adapter requires an EVM signer with address and signTypedData.');
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
try {
|
|
22
|
-
const circle = await import('@circle-fin/x402-batching/client');
|
|
23
|
-
BatchEvmScheme = circle.BatchEvmScheme;
|
|
24
|
-
} catch {
|
|
25
|
-
const local = await import('./schemes/batch-scheme.js');
|
|
26
|
-
BatchEvmScheme = local.BatchEvmScheme;
|
|
27
|
-
}
|
|
28
|
-
const scheme = options.clientModule?.BatchEvmScheme
|
|
29
|
-
? new options.clientModule.BatchEvmScheme(signer)
|
|
30
|
-
: new BatchEvmScheme(signer);
|
|
21
|
+
const scheme = new CircleBatchEvmScheme(signer);
|
|
31
22
|
const network = options.network || options.chainId && `eip155:${options.chainId}` || 'eip155:5042002';
|
|
32
23
|
|
|
33
24
|
function parsePaymentRequired(input) {
|