@nibgate/sdk 0.1.0 → 0.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nibgate/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Framework-agnostic browser and server package for creator-owned gated content, unlock events, and receipts.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -1,5 +1,7 @@
1
1
  import { stringifyJson } from './json.js';
2
2
 
3
+ const runtimeImport = new Function('specifier', 'return import(specifier)');
4
+
3
5
  function encodeBase64(value) {
4
6
  const text = typeof value === 'string' ? value : stringifyJson(value);
5
7
  if (typeof Buffer !== 'undefined') return Buffer.from(text).toString('base64');
@@ -18,8 +20,8 @@ export async function createCircleGatewayBrowserAdapter(options = {}) {
18
20
  }
19
21
 
20
22
  const circleClientModule = options.clientModule || (options.clientModuleUrl
21
- ? await import(options.clientModuleUrl)
22
- : await import('@circle-fin/x402-batching/client'));
23
+ ? await runtimeImport(options.clientModuleUrl)
24
+ : await runtimeImport('@circle-fin/x402-batching/client'));
23
25
  const { BatchEvmScheme } = circleClientModule;
24
26
  const scheme = new BatchEvmScheme(signer);
25
27
  const network = options.network || options.chainId && `eip155:${options.chainId}` || 'eip155:5042002';
package/src/index.d.ts CHANGED
@@ -39,7 +39,7 @@ export type NibgateResource = {
39
39
  image?: string;
40
40
  description?: string;
41
41
  summary?: string;
42
- tags?: string[] | string;
42
+ tags?: readonly string[] | string;
43
43
  access?: NibgateAccessMode | NibgateAccessPolicy;
44
44
  unlock?: NibgateUnlockMode | NibgateUnlockPolicy;
45
45
  [key: string]: unknown;
package/src/server.d.ts CHANGED
@@ -18,7 +18,7 @@ export type NibgateServerResource = {
18
18
  image?: string;
19
19
  description?: string;
20
20
  summary?: string;
21
- tags?: string[] | string;
21
+ tags?: readonly string[] | string;
22
22
  currency?: string;
23
23
  access?: NibgateAccessMode | NibgateAccessPolicy;
24
24
  unlock?: NibgateUnlockMode | NibgateUnlockPolicy;