wowok 2.2.4 → 2.2.5

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.
Files changed (189) hide show
  1. package/dist/cjs/_deps/bcs/bcs-type.d.ts +127 -0
  2. package/dist/cjs/_deps/bcs/bcs-type.js +1 -0
  3. package/dist/cjs/_deps/bcs/bcs.d.ts +49 -0
  4. package/dist/cjs/_deps/bcs/bcs.js +1 -0
  5. package/dist/cjs/_deps/bcs/index.d.ts +16 -0
  6. package/dist/cjs/_deps/bcs/index.js +1 -0
  7. package/dist/cjs/_deps/bcs/reader.d.ts +15 -0
  8. package/dist/cjs/_deps/bcs/reader.js +1 -0
  9. package/dist/cjs/_deps/bcs/types.d.ts +24 -0
  10. package/dist/cjs/_deps/bcs/types.js +1 -0
  11. package/dist/cjs/_deps/bcs/uleb.d.ts +5 -0
  12. package/dist/cjs/_deps/bcs/uleb.js +1 -0
  13. package/dist/cjs/_deps/bcs/utils.d.ts +4 -0
  14. package/dist/cjs/_deps/bcs/utils.js +1 -0
  15. package/dist/cjs/_deps/bcs/writer.d.ts +28 -0
  16. package/dist/cjs/_deps/bcs/writer.js +1 -0
  17. package/dist/cjs/_deps/utils/b58.d.ts +2 -0
  18. package/dist/cjs/_deps/utils/b58.js +1 -0
  19. package/dist/cjs/_deps/utils/b64.d.ts +2 -0
  20. package/dist/cjs/_deps/utils/b64.js +1 -0
  21. package/dist/cjs/_deps/utils/chunk.d.ts +1 -0
  22. package/dist/cjs/_deps/utils/chunk.js +1 -0
  23. package/dist/cjs/_deps/utils/dataloader.d.ts +43 -0
  24. package/dist/cjs/_deps/utils/dataloader.js +1 -0
  25. package/dist/cjs/_deps/utils/hex.d.ts +2 -0
  26. package/dist/cjs/_deps/utils/hex.js +1 -0
  27. package/dist/cjs/_deps/utils/index.d.ts +7 -0
  28. package/dist/cjs/_deps/utils/index.js +1 -0
  29. package/dist/cjs/_deps/utils/types.d.ts +4 -0
  30. package/dist/cjs/_deps/utils/types.js +1 -0
  31. package/dist/cjs/_deps/utils/with-resolver.d.ts +6 -0
  32. package/dist/cjs/_deps/utils/with-resolver.js +1 -0
  33. package/dist/cjs/bcs/bcs.d.ts +245 -245
  34. package/dist/cjs/bcs/bcs.js +1 -1
  35. package/dist/cjs/bcs/effects.d.ts +193 -193
  36. package/dist/cjs/bcs/effects.js +1 -1
  37. package/dist/cjs/bcs/index.d.ts +1 -1
  38. package/dist/cjs/bcs/index.js +1 -1
  39. package/dist/cjs/bcs/pure.d.ts +1 -1
  40. package/dist/cjs/bcs/pure.js +1 -1
  41. package/dist/cjs/bcs/type-tag-serializer.js +1 -1
  42. package/dist/cjs/cryptography/keypair.js +1 -1
  43. package/dist/cjs/cryptography/mnemonics.js +1 -1
  44. package/dist/cjs/cryptography/publickey.js +1 -1
  45. package/dist/cjs/cryptography/signature.js +1 -1
  46. package/dist/cjs/experimental/client.d.ts +1 -1
  47. package/dist/cjs/grpc/core.js +1 -1
  48. package/dist/cjs/jsonRpc/client.js +1 -1
  49. package/dist/cjs/jsonRpc/core.js +1 -1
  50. package/dist/cjs/jsonRpc/json-rpc-resolver.js +1 -1
  51. package/dist/cjs/keypairs/falcon512/publickey.js +1 -1
  52. package/dist/cjs/multisig/publickey.js +1 -1
  53. package/dist/cjs/multisig/signer.js +1 -1
  54. package/dist/cjs/transactions/Commands.js +1 -1
  55. package/dist/cjs/transactions/Inputs.d.ts +1 -1
  56. package/dist/cjs/transactions/Inputs.js +1 -1
  57. package/dist/cjs/transactions/Transaction.d.ts +5 -5
  58. package/dist/cjs/transactions/Transaction.js +1 -1
  59. package/dist/cjs/transactions/TransactionData.js +1 -1
  60. package/dist/cjs/transactions/__tests__/Transaction.test.js +1 -1
  61. package/dist/cjs/transactions/__tests__/bcs.test.js +1 -1
  62. package/dist/cjs/transactions/data/internal.d.ts +2 -2
  63. package/dist/cjs/transactions/data/v1.d.ts +2 -2
  64. package/dist/cjs/transactions/data/v1.js +1 -1
  65. package/dist/cjs/transactions/data/v2.d.ts +1 -1
  66. package/dist/cjs/transactions/executor/parallel.js +1 -1
  67. package/dist/cjs/transactions/executor/serial.js +1 -1
  68. package/dist/cjs/transactions/pure.d.ts +1 -1
  69. package/dist/cjs/transactions/pure.js +1 -1
  70. package/dist/cjs/transactions/serializer.d.ts +1 -1
  71. package/dist/cjs/utils/dynamic-fields.js +1 -1
  72. package/dist/cjs/utils/index.d.ts +1 -1
  73. package/dist/cjs/utils/index.js +1 -1
  74. package/dist/cjs/utils/sui-types.js +1 -1
  75. package/dist/cjs/verify/verify.js +1 -1
  76. package/dist/cjs/w/call/arbitration.js +1 -1
  77. package/dist/cjs/w/call/base.js +1 -1
  78. package/dist/cjs/w/call/contact.js +1 -1
  79. package/dist/cjs/w/call/demand.js +1 -1
  80. package/dist/cjs/w/call/guard.js +1 -1
  81. package/dist/cjs/w/call/machine.js +1 -1
  82. package/dist/cjs/w/call/personal.js +1 -1
  83. package/dist/cjs/w/call/repository.js +1 -1
  84. package/dist/cjs/w/call/reward.js +1 -1
  85. package/dist/cjs/w/call/service.js +1 -1
  86. package/dist/cjs/w/call/treasury.js +1 -1
  87. package/dist/cjs/w/local/storage.js +1 -1
  88. package/dist/cjs/w/local/util.js +1 -1
  89. package/dist/cjs/w/local/wip.js +1 -1
  90. package/dist/cjs/w/messenger/messenger-api.js +1 -1
  91. package/dist/cjs/w/messenger/messenger.js +1 -1
  92. package/dist/cjs/w/messenger/pq/crypto.js +1 -1
  93. package/dist/cjs/w/messenger/storage.js +1 -1
  94. package/dist/cjs/w/query/object.js +1 -1
  95. package/dist/esm/_deps/bcs/bcs-type.d.ts +127 -0
  96. package/dist/esm/_deps/bcs/bcs-type.js +1 -0
  97. package/dist/esm/_deps/bcs/bcs.d.ts +49 -0
  98. package/dist/esm/_deps/bcs/bcs.js +1 -0
  99. package/dist/esm/_deps/bcs/index.d.ts +16 -0
  100. package/dist/esm/_deps/bcs/index.js +1 -0
  101. package/dist/esm/_deps/bcs/reader.d.ts +15 -0
  102. package/dist/esm/_deps/bcs/reader.js +1 -0
  103. package/dist/esm/_deps/bcs/types.d.ts +24 -0
  104. package/dist/esm/_deps/bcs/types.js +1 -0
  105. package/dist/esm/_deps/bcs/uleb.d.ts +5 -0
  106. package/dist/esm/_deps/bcs/uleb.js +1 -0
  107. package/dist/esm/_deps/bcs/utils.d.ts +4 -0
  108. package/dist/esm/_deps/bcs/utils.js +1 -0
  109. package/dist/esm/_deps/bcs/writer.d.ts +28 -0
  110. package/dist/esm/_deps/bcs/writer.js +1 -0
  111. package/dist/esm/_deps/utils/b58.d.ts +2 -0
  112. package/dist/esm/_deps/utils/b58.js +1 -0
  113. package/dist/esm/_deps/utils/b64.d.ts +2 -0
  114. package/dist/esm/_deps/utils/b64.js +1 -0
  115. package/dist/esm/_deps/utils/chunk.d.ts +1 -0
  116. package/dist/esm/_deps/utils/chunk.js +1 -0
  117. package/dist/esm/_deps/utils/dataloader.d.ts +43 -0
  118. package/dist/esm/_deps/utils/dataloader.js +1 -0
  119. package/dist/esm/_deps/utils/hex.d.ts +2 -0
  120. package/dist/esm/_deps/utils/hex.js +1 -0
  121. package/dist/esm/_deps/utils/index.d.ts +7 -0
  122. package/dist/esm/_deps/utils/index.js +1 -0
  123. package/dist/esm/_deps/utils/types.d.ts +4 -0
  124. package/dist/esm/_deps/utils/types.js +1 -0
  125. package/dist/esm/_deps/utils/with-resolver.d.ts +6 -0
  126. package/dist/esm/_deps/utils/with-resolver.js +1 -0
  127. package/dist/esm/bcs/bcs.d.ts +245 -245
  128. package/dist/esm/bcs/bcs.js +1 -1
  129. package/dist/esm/bcs/effects.d.ts +193 -193
  130. package/dist/esm/bcs/effects.js +1 -1
  131. package/dist/esm/bcs/index.d.ts +1 -1
  132. package/dist/esm/bcs/index.js +1 -1
  133. package/dist/esm/bcs/pure.d.ts +1 -1
  134. package/dist/esm/bcs/pure.js +1 -1
  135. package/dist/esm/bcs/type-tag-serializer.js +1 -1
  136. package/dist/esm/cryptography/keypair.js +1 -1
  137. package/dist/esm/cryptography/mnemonics.js +1 -1
  138. package/dist/esm/cryptography/publickey.js +1 -1
  139. package/dist/esm/cryptography/signature.js +1 -1
  140. package/dist/esm/experimental/client.d.ts +1 -1
  141. package/dist/esm/grpc/core.js +1 -1
  142. package/dist/esm/jsonRpc/client.js +1 -1
  143. package/dist/esm/jsonRpc/core.js +1 -1
  144. package/dist/esm/jsonRpc/json-rpc-resolver.js +1 -1
  145. package/dist/esm/keypairs/falcon512/publickey.js +1 -1
  146. package/dist/esm/multisig/publickey.js +1 -1
  147. package/dist/esm/multisig/signer.js +1 -1
  148. package/dist/esm/transactions/Commands.js +1 -1
  149. package/dist/esm/transactions/Inputs.d.ts +1 -1
  150. package/dist/esm/transactions/Inputs.js +1 -1
  151. package/dist/esm/transactions/Transaction.d.ts +5 -5
  152. package/dist/esm/transactions/Transaction.js +1 -1
  153. package/dist/esm/transactions/TransactionData.js +1 -1
  154. package/dist/esm/transactions/__tests__/Transaction.test.js +1 -1
  155. package/dist/esm/transactions/__tests__/bcs.test.js +1 -1
  156. package/dist/esm/transactions/data/internal.d.ts +2 -2
  157. package/dist/esm/transactions/data/v1.d.ts +2 -2
  158. package/dist/esm/transactions/data/v1.js +1 -1
  159. package/dist/esm/transactions/data/v2.d.ts +1 -1
  160. package/dist/esm/transactions/executor/parallel.js +1 -1
  161. package/dist/esm/transactions/executor/serial.js +1 -1
  162. package/dist/esm/transactions/pure.d.ts +1 -1
  163. package/dist/esm/transactions/pure.js +1 -1
  164. package/dist/esm/transactions/serializer.d.ts +1 -1
  165. package/dist/esm/utils/dynamic-fields.js +1 -1
  166. package/dist/esm/utils/index.d.ts +1 -1
  167. package/dist/esm/utils/index.js +1 -1
  168. package/dist/esm/utils/sui-types.js +1 -1
  169. package/dist/esm/verify/verify.js +1 -1
  170. package/dist/esm/w/call/arbitration.js +1 -1
  171. package/dist/esm/w/call/base.js +1 -1
  172. package/dist/esm/w/call/contact.js +1 -1
  173. package/dist/esm/w/call/demand.js +1 -1
  174. package/dist/esm/w/call/guard.js +1 -1
  175. package/dist/esm/w/call/machine.js +1 -1
  176. package/dist/esm/w/call/personal.js +1 -1
  177. package/dist/esm/w/call/repository.js +1 -1
  178. package/dist/esm/w/call/reward.js +1 -1
  179. package/dist/esm/w/call/service.js +1 -1
  180. package/dist/esm/w/call/treasury.js +1 -1
  181. package/dist/esm/w/local/storage.js +1 -1
  182. package/dist/esm/w/local/util.js +1 -1
  183. package/dist/esm/w/local/wip.js +1 -1
  184. package/dist/esm/w/messenger/messenger-api.js +1 -1
  185. package/dist/esm/w/messenger/messenger.js +1 -1
  186. package/dist/esm/w/messenger/pq/crypto.js +1 -1
  187. package/dist/esm/w/messenger/storage.js +1 -1
  188. package/dist/esm/w/query/object.js +1 -1
  189. package/package.json +1 -3
@@ -0,0 +1 @@
1
+ import{ulebEncode}from'./uleb.js';import{encodeStr}from'./utils.js';export class BcsWriter{['dataView'];['bytePosition']=0x0;['size'];['maxSize'];['allocateSize'];constructor({initialSize:initialSize=0x400,maxSize:maxSize=Infinity,allocateSize:allocateSize=0x400}={}){this['size']=initialSize,this['maxSize']=maxSize,this['allocateSize']=allocateSize,this['dataView']=new DataView(new ArrayBuffer(initialSize));}['ensureSizeOrGrow'](a){const b=this['bytePosition']+a;if(b>this['size']){const c=Math['min'](this['maxSize'],Math['max'](this['size']+b,this['size']+this['allocateSize']));if(b>c)throw new Error('Attempting\x20to\x20serialize\x20to\x20BCS,\x20but\x20buffer\x20does\x20not\x20have\x20enough\x20size.\x20Allocated\x20size:\x20'+this['size']+',\x20Max\x20size:\x20'+this['maxSize']+',\x20Required\x20size:\x20'+b);this['size']=c;const d=new ArrayBuffer(this['size']);new Uint8Array(d)['set'](new Uint8Array(this['dataView']['buffer'])),this['dataView']=new DataView(d);}}['shift'](a){return this['bytePosition']+=a,this;}['write8'](a){return this['ensureSizeOrGrow'](0x1),this['dataView']['setUint8'](this['bytePosition'],Number(a)),this['shift'](0x1);}['writeBytes'](a){this['ensureSizeOrGrow'](a['length']);for(let b=0x0;b<a['length'];b++){this['dataView']['setUint8'](this['bytePosition']+b,a[b]);}return this['shift'](a['length']);}['write16'](a){return this['ensureSizeOrGrow'](0x2),this['dataView']['setUint16'](this['bytePosition'],Number(a),!![]),this['shift'](0x2);}['write32'](a){return this['ensureSizeOrGrow'](0x4),this['dataView']['setUint32'](this['bytePosition'],Number(a),!![]),this['shift'](0x4);}['write64'](a){return toLittleEndian(BigInt(a),0x8)['forEach'](b=>this['write8'](b)),this;}['write128'](a){return toLittleEndian(BigInt(a),0x10)['forEach'](b=>this['write8'](b)),this;}['write256'](a){return toLittleEndian(BigInt(a),0x20)['forEach'](b=>this['write8'](b)),this;}['writeULEB'](a){return ulebEncode(a)['forEach'](b=>this['write8'](b)),this;}['writeVec'](a,b){return this['writeULEB'](a['length']),Array['from'](a)['forEach']((c,d)=>b(this,c,d,a['length'])),this;}*[Symbol['iterator']](){for(let a=0x0;a<this['bytePosition'];a++){yield this['dataView']['getUint8'](a);}return this['toBytes']();}['toBytes'](){return new Uint8Array(this['dataView']['buffer']['slice'](0x0,this['bytePosition']));}['toString'](a){return encodeStr(this['toBytes'](),a);}}function toLittleEndian(a,b){const c=new Uint8Array(b);let d=0x0;while(a>0x0){c[d]=Number(a%BigInt(0x100)),a=a/BigInt(0x100),d+=0x1;}return c;}
@@ -0,0 +1,2 @@
1
+ export declare const toBase58: (buffer: Uint8Array) => string;
2
+ export declare const fromBase58: (str: string) => Uint8Array<ArrayBuffer>;
@@ -0,0 +1 @@
1
+ import{base58}from'@scure/base';export const toBase58=a=>base58['encode'](a);export const fromBase58=a=>base58['decode'](a);
@@ -0,0 +1,2 @@
1
+ export declare function fromBase64(base64String: string): Uint8Array<ArrayBuffer>;
2
+ export declare function toBase64(bytes: Uint8Array): string;
@@ -0,0 +1 @@
1
+ export function fromBase64(a){return Uint8Array['from'](atob(a),b=>b['charCodeAt'](0x0));}const CHUNK_SIZE=0x2000;export function toBase64(a){if(a['length']<CHUNK_SIZE)return btoa(String['fromCharCode'](...a));let b='';for(var c=0x0;c<a['length'];c+=CHUNK_SIZE){const d=a['slice'](c,c+CHUNK_SIZE);b+=String['fromCharCode'](...d);}return btoa(b);}
@@ -0,0 +1 @@
1
+ export declare function chunk<T>(array: readonly T[], size: number): T[][];
@@ -0,0 +1 @@
1
+ export function chunk(a,b){return Array['from']({'length':Math['ceil'](a['length']/b)},(c,d)=>{return a['slice'](d*b,(d+0x1)*b);});}
@@ -0,0 +1,43 @@
1
+ export declare class DataLoader<K, V, C = K> {
2
+ constructor(batchLoadFn: DataLoader.BatchLoadFn<K, V>, options?: DataLoader.Options<K, V, C>);
3
+ _batchLoadFn: DataLoader.BatchLoadFn<K, V>;
4
+ _maxBatchSize: number;
5
+ _batchScheduleFn: (cb: () => void) => void;
6
+ _cacheKeyFn: (key: K) => C;
7
+ _cacheMap: DataLoader.CacheMap<C, Promise<V>> | null;
8
+ _batch: Batch<K, V> | null;
9
+ load(key: K): Promise<V>;
10
+ loadMany(keys: ReadonlyArray<K>): Promise<Array<V | Error>>;
11
+ clear(key: K): this;
12
+ clearAll(): this;
13
+ prime(key: K, value: V | Promise<V> | Error): this;
14
+ name: string | null;
15
+ }
16
+ type Batch<K, V> = {
17
+ hasDispatched: boolean;
18
+ keys: Array<K>;
19
+ callbacks: Array<{
20
+ resolve: (value: V) => void;
21
+ reject: (error: Error) => void;
22
+ }>;
23
+ cacheHits?: Array<() => void>;
24
+ };
25
+ export declare namespace DataLoader {
26
+ type CacheMap<K, V> = {
27
+ get(key: K): V | void;
28
+ set(key: K, value: V): any;
29
+ delete(key: K): any;
30
+ clear(): any;
31
+ };
32
+ type BatchLoadFn<K, V> = (keys: ReadonlyArray<K>) => PromiseLike<ArrayLike<V | Error>>;
33
+ type Options<K, V, C = K> = {
34
+ batch?: boolean;
35
+ maxBatchSize?: number;
36
+ batchScheduleFn?: (callback: () => void) => void;
37
+ cache?: boolean;
38
+ cacheKeyFn?: (key: K) => C;
39
+ cacheMap?: CacheMap<C, Promise<V>> | null;
40
+ name?: string | null;
41
+ };
42
+ }
43
+ export {};
@@ -0,0 +1 @@
1
+ export class DataLoader{constructor(a,b){if(typeof a!=='function')throw new TypeError('DataLoader\x20must\x20be\x20constructed\x20with\x20a\x20function\x20which\x20accepts\x20'+('Array<key>\x20and\x20returns\x20Promise<Array<value>>,\x20but\x20got:\x20'+a+'.'));this['_batchLoadFn']=a,this['_maxBatchSize']=getValidMaxBatchSize(b),this['_batchScheduleFn']=getValidBatchScheduleFn(b),this['_cacheKeyFn']=getValidCacheKeyFn(b),this['_cacheMap']=getValidCacheMap(b),this['_batch']=null,this['name']=getValidName(b);}['_batchLoadFn'];['_maxBatchSize'];['_batchScheduleFn'];['_cacheKeyFn'];['_cacheMap'];['_batch'];['load'](a){if(a===null||a===undefined)throw new TypeError('The\x20loader.load()\x20function\x20must\x20be\x20called\x20with\x20a\x20value,\x20but\x20got:\x20'+String(a)+'.');const b=getCurrentBatch(this),c=this['_cacheMap'];let d;if(c){d=this['_cacheKeyFn'](a);const f=c['get'](d);if(f){const g=b['cacheHits']||(b['cacheHits']=[]);return new Promise(h=>{g['push'](()=>{h(f);});});}}b['keys']['push'](a);const e=new Promise((h,i)=>{b['callbacks']['push']({'resolve':h,'reject':i});});return c&&c['set'](d,e),e;}['loadMany'](a){if(!isArrayLike(a))throw new TypeError('The\x20loader.loadMany()\x20function\x20must\x20be\x20called\x20with\x20Array<key>,\x20but\x20got:\x20'+a+'.');const b=[];for(let c=0x0;c<a['length'];c++){b['push'](this['load'](a[c])['catch'](d=>d));}return Promise['all'](b);}['clear'](a){const b=this['_cacheMap'];if(b){const c=this['_cacheKeyFn'](a);b['delete'](c);}return this;}['clearAll'](){const a=this['_cacheMap'];return a&&a['clear'](),this;}['prime'](a,b){const c=this['_cacheMap'];if(c){const d=this['_cacheKeyFn'](a);if(c['get'](d)===undefined){let e;b instanceof Error?(e=Promise['reject'](b),e['catch'](()=>{})):e=Promise['resolve'](b),c['set'](d,e);}}return this;}['name'];}const enqueuePostPromiseJob=typeof process==='object'&&typeof process['nextTick']==='function'?function(a){!resolvedPromise&&(resolvedPromise=Promise['resolve']()),resolvedPromise['then'](()=>{process['nextTick'](a);});}:typeof setImmediate==='function'?function(a){setImmediate(a);}:function(a){setTimeout(a);};let resolvedPromise;function getCurrentBatch(a){const b=a['_batch'];if(b!==null&&!b['hasDispatched']&&b['keys']['length']<a['_maxBatchSize'])return b;const c={'hasDispatched':![],'keys':[],'callbacks':[]};return a['_batch']=c,a['_batchScheduleFn'](()=>{dispatchBatch(a,c);}),c;}function dispatchBatch(a,b){b['hasDispatched']=!![];if(b['keys']['length']===0x0){resolveCacheHits(b);return;}let c;try{c=a['_batchLoadFn'](b['keys']);}catch(d){return failedDispatch(a,b,new TypeError('DataLoader\x20must\x20be\x20constructed\x20with\x20a\x20function\x20which\x20accepts\x20'+'Array<key>\x20and\x20returns\x20Promise<Array<value>>,\x20but\x20the\x20function\x20'+('errored\x20synchronously:\x20'+String(d)+'.')));}if(!c||typeof c['then']!=='function')return failedDispatch(a,b,new TypeError('DataLoader\x20must\x20be\x20constructed\x20with\x20a\x20function\x20which\x20accepts\x20'+'Array<key>\x20and\x20returns\x20Promise<Array<value>>,\x20but\x20the\x20function\x20did\x20'+('not\x20return\x20a\x20Promise:\x20'+String(c)+'.')));Promise['resolve'](c)['then'](f=>{if(!isArrayLike(f))throw new TypeError('DataLoader\x20must\x20be\x20constructed\x20with\x20a\x20function\x20which\x20accepts\x20'+'Array<key>\x20and\x20returns\x20Promise<Array<value>>,\x20but\x20the\x20function\x20did\x20'+('not\x20return\x20a\x20Promise\x20of\x20an\x20Array:\x20'+String(f)+'.'));if(f['length']!==b['keys']['length'])throw new TypeError('DataLoader\x20must\x20be\x20constructed\x20with\x20a\x20function\x20which\x20accepts\x20'+'Array<key>\x20and\x20returns\x20Promise<Array<value>>,\x20but\x20the\x20function\x20did\x20'+'not\x20return\x20a\x20Promise\x20of\x20an\x20Array\x20of\x20the\x20same\x20length\x20as\x20the\x20Array\x20'+'of\x20keys.'+('\x0a\x0aKeys:\x0a'+String(b['keys']))+('\x0a\x0aValues:\x0a'+String(f)));resolveCacheHits(b);for(let g=0x0;g<b['callbacks']['length'];g++){const h=f[g];h instanceof Error?b['callbacks'][g]['reject'](h):b['callbacks'][g]['resolve'](h);}})['catch'](f=>{failedDispatch(a,b,f);});}function failedDispatch(a,b,c){resolveCacheHits(b);for(let d=0x0;d<b['keys']['length'];d++){a['clear'](b['keys'][d]),b['callbacks'][d]['reject'](c);}}function resolveCacheHits(a){if(a['cacheHits'])for(let b=0x0;b<a['cacheHits']['length'];b++){a['cacheHits'][b]();}}function getValidMaxBatchSize(a){const b=!a||a['batch']!==![];if(!b)return 0x1;const c=a&&a['maxBatchSize'];if(c===undefined)return Infinity;if(typeof c!=='number'||c<0x1)throw new TypeError('maxBatchSize\x20must\x20be\x20a\x20positive\x20number:\x20'+c);return c;}function getValidBatchScheduleFn(a){const b=a&&a['batchScheduleFn'];if(b===undefined)return enqueuePostPromiseJob;if(typeof b!=='function')throw new TypeError('batchScheduleFn\x20must\x20be\x20a\x20function:\x20'+b);return b;}function getValidCacheKeyFn(a){const b=a&&a['cacheKeyFn'];if(b===undefined)return c=>c;if(typeof b!=='function')throw new TypeError('cacheKeyFn\x20must\x20be\x20a\x20function:\x20'+b);return b;}function getValidCacheMap(a){const b=!a||a['cache']!==![];if(!b)return null;const c=a&&a['cacheMap'];if(c===undefined)return new Map();if(c!==null){const d=['get','set','delete','clear'],e=d['filter'](f=>c&&typeof c[f]!=='function');if(e['length']!==0x0)throw new TypeError('Custom\x20cacheMap\x20missing\x20methods:\x20'+e['join'](',\x20'));}return c;}function getValidName(a){if(a&&a['name'])return a['name'];return null;}function isArrayLike(a){return typeof a==='object'&&a!==null&&'length'in a&&typeof a['length']==='number'&&(a['length']===0x0||a['length']>0x0&&Object['prototype']['hasOwnProperty']['call'](a,a['length']-0x1));}
@@ -0,0 +1,2 @@
1
+ export declare function fromHex(hexStr: string): Uint8Array<ArrayBuffer>;
2
+ export declare function toHex(bytes: Uint8Array): string;
@@ -0,0 +1 @@
1
+ export function fromHex(a){const b=a['startsWith']('0x')?a['slice'](0x2):a,c=b['length']%0x2===0x0?b:'0'+b,d=c['match'](/[0-9a-fA-F]{2}/g)?.['map'](e=>parseInt(e,0x10))??[];if(d['length']!==c['length']/0x2)throw new Error('Invalid\x20hex\x20string\x20'+a);return Uint8Array['from'](d);}export function toHex(a){return a['reduce']((b,c)=>b+c['toString'](0x10)['padStart'](0x2,'0'),'');}
@@ -0,0 +1,7 @@
1
+ export { fromBase58, toBase58 } from "./b58.js";
2
+ export { fromBase64, toBase64 } from "./b64.js";
3
+ export { fromHex, toHex } from "./hex.js";
4
+ export type { Simplify, UnionToIntersection } from "./types.js";
5
+ export { chunk } from "./chunk.js";
6
+ export { promiseWithResolvers, type PromiseWithResolvers, } from "./with-resolver.js";
7
+ export { DataLoader } from "./dataloader.js";
@@ -0,0 +1 @@
1
+ export{fromBase58,toBase58}from'./b58.js';export{fromBase64,toBase64}from'./b64.js';export{fromHex,toHex}from'./hex.js';export{chunk}from'./chunk.js';export{promiseWithResolvers}from'./with-resolver.js';export{DataLoader}from'./dataloader.js';
@@ -0,0 +1,4 @@
1
+ export type Simplify<T> = {
2
+ [K in keyof T]: T[K];
3
+ } & {};
4
+ export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1,6 @@
1
+ export interface PromiseWithResolvers<T> {
2
+ promise: Promise<T>;
3
+ resolve: (value: T) => void;
4
+ reject: (error: unknown) => void;
5
+ }
6
+ export declare function promiseWithResolvers<T>(): PromiseWithResolvers<T>;
@@ -0,0 +1 @@
1
+ export function promiseWithResolvers(){let a,b;const c=new Promise((d,e)=>{a=d,b=e;});return{'promise':c,'resolve':a,'reject':b};}