@palliora.org/chainsdk 0.2.0 → 0.3.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/dist/index.cjs +320 -120
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +413 -225
- package/dist/index.d.ts +413 -225
- package/dist/index.js +295 -95
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import * as _polkadot_util_crypto_types from '@polkadot/util-crypto/types';
|
|
2
|
+
import { KeyringPair } from '@polkadot/keyring/types';
|
|
3
|
+
import * as _polkadot_types_types from '@polkadot/types/types';
|
|
4
|
+
import { ISubmittableResult } from '@polkadot/types/types';
|
|
2
5
|
import { ApiPromise, Keyring, WsProvider } from '@polkadot/api';
|
|
3
6
|
export { ApiPromise, HttpProvider, WsProvider } from '@polkadot/api';
|
|
7
|
+
import * as _polkadot_types_interfaces from '@polkadot/types/interfaces';
|
|
8
|
+
import { SignedBlock, EventRecord } from '@polkadot/types/interfaces';
|
|
9
|
+
import { SubmittableExtrinsic } from '@polkadot/api/types';
|
|
4
10
|
import * as _noble_curves_abstract_weierstrass from '@noble/curves/abstract/weierstrass';
|
|
5
11
|
import { ProjPointType } from '@noble/curves/abstract/weierstrass';
|
|
6
12
|
import { Fp, Fp2, Fp12 } from '@noble/curves/abstract/tower';
|
|
@@ -30,7 +36,7 @@ declare enum AccountSourceType {
|
|
|
30
36
|
* @param cryptoType - The crypto type: 'sr25519' | 'ed25519' | 'ecdsa' (default: 'sr25519').
|
|
31
37
|
* @returns The keypair object.
|
|
32
38
|
*/
|
|
33
|
-
declare function createAccount(input:
|
|
39
|
+
declare function createAccount(input: string, type: AccountSourceType, name?: string, cryptoType?: CryptoType): Promise<KeyringPair>;
|
|
34
40
|
declare function pairFromPrivateKeyHex(privateKeyHex: string, cryptoType: CryptoType): _polkadot_util_crypto_types.Keypair;
|
|
35
41
|
|
|
36
42
|
declare const API_RPC: {
|
|
@@ -168,7 +174,7 @@ declare const API_TYPES: {
|
|
|
168
174
|
pk_bytes: string;
|
|
169
175
|
tau_params: string;
|
|
170
176
|
};
|
|
171
|
-
|
|
177
|
+
ThresholdParams: {
|
|
172
178
|
_enum: {
|
|
173
179
|
SilentThreshold: string;
|
|
174
180
|
};
|
|
@@ -179,24 +185,61 @@ declare const API_TYPES: {
|
|
|
179
185
|
Aes256GcmParams: {
|
|
180
186
|
nonce: string;
|
|
181
187
|
};
|
|
182
|
-
|
|
188
|
+
SymmetricParams: {
|
|
183
189
|
_enum: {
|
|
184
190
|
ChaCha20Poly1305: string;
|
|
185
191
|
Aes256Gcm: string;
|
|
186
192
|
};
|
|
187
193
|
};
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
194
|
+
KdfParams: {
|
|
195
|
+
_enum: {
|
|
196
|
+
HkdfSha256: string;
|
|
197
|
+
HkdfSha512: string;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
Secp256k1Params: {
|
|
201
|
+
recipient_public_key: string;
|
|
202
|
+
ephemeral_public_key: string;
|
|
203
|
+
compressed: string;
|
|
204
|
+
kdf: string;
|
|
205
|
+
salt: string;
|
|
206
|
+
info: string;
|
|
207
|
+
};
|
|
208
|
+
Ed25519Params: {
|
|
209
|
+
recipient_public_key: string;
|
|
210
|
+
ephemeral_public_key: string;
|
|
211
|
+
kdf: string;
|
|
212
|
+
salt: string;
|
|
213
|
+
info: string;
|
|
214
|
+
};
|
|
215
|
+
AsymmetricParams: {
|
|
216
|
+
_enum: {
|
|
217
|
+
Secp256k1: string;
|
|
218
|
+
Ed25519: string;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
ThresholdHybridParams: {
|
|
222
|
+
threshold_params: string;
|
|
223
|
+
symmetric_params: string;
|
|
224
|
+
};
|
|
225
|
+
AsymmetricHybridParams: {
|
|
226
|
+
asymmetric_params: string;
|
|
227
|
+
symmetric_params: string;
|
|
191
228
|
};
|
|
192
229
|
CipherSuite: {
|
|
193
230
|
_enum: {
|
|
194
231
|
Plaintext: string;
|
|
195
|
-
|
|
232
|
+
ThresholdHybrid: string;
|
|
233
|
+
AsymmetricHybrid: string;
|
|
196
234
|
};
|
|
197
235
|
};
|
|
198
236
|
ConfidentialityLevel: {
|
|
199
|
-
_enum:
|
|
237
|
+
_enum: {
|
|
238
|
+
Trusted: string;
|
|
239
|
+
TEE: string;
|
|
240
|
+
FHE: string;
|
|
241
|
+
SMPC: string;
|
|
242
|
+
};
|
|
200
243
|
};
|
|
201
244
|
NativeExecuteDA: {
|
|
202
245
|
_enum: string[];
|
|
@@ -222,6 +265,7 @@ declare const API_TYPES: {
|
|
|
222
265
|
};
|
|
223
266
|
DAInput: {
|
|
224
267
|
_enum: {
|
|
268
|
+
Null: string;
|
|
225
269
|
Inline: string;
|
|
226
270
|
ChainTransaction: string;
|
|
227
271
|
Ipfs: string;
|
|
@@ -384,6 +428,143 @@ declare const API_EXTENSIONS: {
|
|
|
384
428
|
};
|
|
385
429
|
};
|
|
386
430
|
|
|
431
|
+
declare const PALI_SYMBOL = "PALI";
|
|
432
|
+
declare const PALI_DECIMALS = 18;
|
|
433
|
+
interface TokenProperties {
|
|
434
|
+
symbol: string;
|
|
435
|
+
decimals: number;
|
|
436
|
+
}
|
|
437
|
+
type PaliAmountInput = string | number;
|
|
438
|
+
type AtomicPaliAmount = bigint;
|
|
439
|
+
declare const toAtomicPaliAmount: (amount: PaliAmountInput) => AtomicPaliAmount;
|
|
440
|
+
declare const fromAtomicPaliAmount: (amount: bigint) => string;
|
|
441
|
+
declare const formatPaliAmount: (amount: bigint, symbol?: string) => string;
|
|
442
|
+
/**
|
|
443
|
+
* Fetch token name and decimals from RPC system properties
|
|
444
|
+
* Results are cached for subsequent calls
|
|
445
|
+
* @param rpc - RPC provider instance with system.properties method
|
|
446
|
+
* @returns Promise<TokenProperties> with symbol and decimals
|
|
447
|
+
*/
|
|
448
|
+
declare function fetchTokenProperties(): Promise<TokenProperties>;
|
|
449
|
+
/**
|
|
450
|
+
* Get cached token properties without making an RPC call
|
|
451
|
+
* @returns TokenProperties or null if not yet cached
|
|
452
|
+
*/
|
|
453
|
+
declare function getCachedTokenProperties(): TokenProperties | null;
|
|
454
|
+
/**
|
|
455
|
+
* Clear the token properties cache
|
|
456
|
+
*/
|
|
457
|
+
declare function clearTokenCache(): void;
|
|
458
|
+
/**
|
|
459
|
+
* Format balance using cached token properties
|
|
460
|
+
* @param balance - The balance value to format
|
|
461
|
+
* @returns Formatted balance string
|
|
462
|
+
*/
|
|
463
|
+
declare function formatBalanceWithTokenProperties(balance: string | number | bigint): Promise<string>;
|
|
464
|
+
declare const tokenToBigint: (amount: PaliAmountInput) => AtomicPaliAmount;
|
|
465
|
+
|
|
466
|
+
type Hex = `0x${string}`;
|
|
467
|
+
/**
|
|
468
|
+
* Mirrors the on-chain ComputePayload SCALE type (CheckCompute signed extension).
|
|
469
|
+
* `agreement` is an array of 32-byte guardian peer-ID keys, obtained by
|
|
470
|
+
* base58-decoding the peer ID and stripping the first 6 multiaddr prefix bytes.
|
|
471
|
+
*/
|
|
472
|
+
interface ComputePayload {
|
|
473
|
+
/** DA type: 0 = none, 1 = DA. */
|
|
474
|
+
da_type: number;
|
|
475
|
+
/** Guardian agreement keys. Each element is a 32-byte Uint8Array or number[]. */
|
|
476
|
+
agreement?: Uint8Array[] | number[][];
|
|
477
|
+
/** Verification mode. */
|
|
478
|
+
verification: number;
|
|
479
|
+
/** Compute mode. */
|
|
480
|
+
compute: number;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
interface OnChainRef {
|
|
484
|
+
blockNumber: number;
|
|
485
|
+
index: number;
|
|
486
|
+
}
|
|
487
|
+
interface SilentThresholdParams {
|
|
488
|
+
/** Encoded threshold ciphertext bytes (from encodeCiphertext). */
|
|
489
|
+
td_params: number[];
|
|
490
|
+
/** Guardian group aggregate public key bytes. */
|
|
491
|
+
pk_bytes: number[];
|
|
492
|
+
/** KZG powers-of-tau bytes. */
|
|
493
|
+
tau_params: number[];
|
|
494
|
+
}
|
|
495
|
+
type ThresholdParams = {
|
|
496
|
+
SilentThreshold: SilentThresholdParams;
|
|
497
|
+
};
|
|
498
|
+
type SymmetricParams = {
|
|
499
|
+
ChaCha20Poly1305: {
|
|
500
|
+
nonce: number[];
|
|
501
|
+
};
|
|
502
|
+
} | {
|
|
503
|
+
Aes256Gcm: {
|
|
504
|
+
nonce: number[];
|
|
505
|
+
};
|
|
506
|
+
};
|
|
507
|
+
type KdfParams = "HkdfSha256" | "HkdfSha512";
|
|
508
|
+
interface Secp256k1Params {
|
|
509
|
+
recipient_public_key: number[];
|
|
510
|
+
ephemeral_public_key?: number[] | null;
|
|
511
|
+
compressed: boolean;
|
|
512
|
+
kdf: KdfParams;
|
|
513
|
+
salt?: number[] | null;
|
|
514
|
+
info?: number[] | null;
|
|
515
|
+
}
|
|
516
|
+
interface Ed25519Params {
|
|
517
|
+
recipient_public_key: number[];
|
|
518
|
+
ephemeral_public_key?: number[] | null;
|
|
519
|
+
kdf: KdfParams;
|
|
520
|
+
salt?: number[] | null;
|
|
521
|
+
info?: number[] | null;
|
|
522
|
+
}
|
|
523
|
+
type AsymmetricParams = {
|
|
524
|
+
Secp256k1: Secp256k1Params;
|
|
525
|
+
} | {
|
|
526
|
+
Ed25519: Ed25519Params;
|
|
527
|
+
};
|
|
528
|
+
interface ThresholdHybridParams {
|
|
529
|
+
threshold_params: ThresholdParams;
|
|
530
|
+
symmetric_params: SymmetricParams;
|
|
531
|
+
}
|
|
532
|
+
interface AsymmetricHybridParams {
|
|
533
|
+
asymmetric_params: AsymmetricParams;
|
|
534
|
+
symmetric_params: SymmetricParams;
|
|
535
|
+
}
|
|
536
|
+
/** Mirrors the on-chain CipherSuite enum from spec.ts. */
|
|
537
|
+
type CipherSuite = "Plaintext" | {
|
|
538
|
+
ThresholdHybrid: ThresholdHybridParams;
|
|
539
|
+
} | {
|
|
540
|
+
AsymmetricHybrid: AsymmetricHybridParams;
|
|
541
|
+
};
|
|
542
|
+
interface SubmitTEDataResult {
|
|
543
|
+
ref: OnChainRef;
|
|
544
|
+
cipher: CipherSuite;
|
|
545
|
+
}
|
|
546
|
+
type GuardianAddress = string;
|
|
547
|
+
interface GuardianGroupInfo {
|
|
548
|
+
groupId: string;
|
|
549
|
+
guardians: GuardianAddress[];
|
|
550
|
+
tauParams: string;
|
|
551
|
+
aggKey: string;
|
|
552
|
+
groupPk: string;
|
|
553
|
+
}
|
|
554
|
+
interface UploadOptions {
|
|
555
|
+
name: string;
|
|
556
|
+
description: string;
|
|
557
|
+
price: PaliAmountInput;
|
|
558
|
+
type: "model" | "dataset" | "agent";
|
|
559
|
+
guardianGroupInfo: GuardianGroupInfo;
|
|
560
|
+
ref?: string;
|
|
561
|
+
filePath?: string;
|
|
562
|
+
/** Options forwarded to signAndSend. Defaults to dormant DA payload (da_type=1, compute=0). */
|
|
563
|
+
opts?: {
|
|
564
|
+
compute: ComputePayload;
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
|
|
387
568
|
type OnChainFileOptions = {
|
|
388
569
|
file: File;
|
|
389
570
|
filePath: string;
|
|
@@ -391,19 +572,27 @@ type OnChainFileOptions = {
|
|
|
391
572
|
description: string;
|
|
392
573
|
baseCost: bigint;
|
|
393
574
|
ownerL2Address: string;
|
|
394
|
-
guardianInfo:
|
|
575
|
+
guardianInfo: GuardianGroupInfo;
|
|
576
|
+
};
|
|
577
|
+
type ChunkRef = {
|
|
578
|
+
blockNumber: number;
|
|
579
|
+
extrinsicIndex: number;
|
|
580
|
+
};
|
|
581
|
+
type FileMetadata = {
|
|
582
|
+
name: string;
|
|
583
|
+
description: string;
|
|
584
|
+
startRef: [number, number];
|
|
395
585
|
};
|
|
396
586
|
declare class MCryptFs {
|
|
397
587
|
_api: any;
|
|
398
588
|
_init: boolean;
|
|
399
|
-
_metaRef:
|
|
400
|
-
_metadata:
|
|
401
|
-
_chunkRefs:
|
|
402
|
-
|
|
403
|
-
constructor(mcryptApi: any, metadataRef: any, metadata: any);
|
|
589
|
+
_metaRef: [number, number] | null;
|
|
590
|
+
_metadata: FileMetadata | null;
|
|
591
|
+
_chunkRefs: ChunkRef[];
|
|
592
|
+
constructor(mcryptApi: any, metadataRef: [number, number] | null, metadata: FileMetadata | null);
|
|
404
593
|
static dummyInstance(mcryptApi: any): MCryptFs;
|
|
405
594
|
isValid(): void;
|
|
406
|
-
getMetadata():
|
|
595
|
+
getMetadata(): FileMetadata | null;
|
|
407
596
|
}
|
|
408
597
|
declare class MCryptFsWriter {
|
|
409
598
|
_file: File;
|
|
@@ -414,42 +603,45 @@ declare class MCryptFsWriter {
|
|
|
414
603
|
_fileName: string;
|
|
415
604
|
_baseCost: bigint;
|
|
416
605
|
_ownerL2Address: string;
|
|
417
|
-
_guardianInfo:
|
|
606
|
+
_guardianInfo: GuardianGroupInfo;
|
|
418
607
|
_api: any;
|
|
419
|
-
_account:
|
|
420
|
-
_chunkRefs:
|
|
608
|
+
_account: KeyringPair;
|
|
609
|
+
_chunkRefs: ChunkRef[];
|
|
421
610
|
_blockNumber: number;
|
|
422
611
|
_extrinsicIndex: number;
|
|
423
612
|
_progress: {
|
|
424
613
|
iFileSize: number;
|
|
425
614
|
iBlocksWritten: number;
|
|
426
615
|
};
|
|
427
|
-
_error:
|
|
428
|
-
constructor(fileOptions: OnChainFileOptions, chunkSize: number | undefined, mcryptApi: any, account:
|
|
429
|
-
prependMetadata(chunk:
|
|
430
|
-
writeChunk(chunk:
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
616
|
+
_error: Error | null;
|
|
617
|
+
constructor(fileOptions: OnChainFileOptions, chunkSize: number | undefined, mcryptApi: any, account: KeyringPair);
|
|
618
|
+
prependMetadata(chunk: Blob): Blob;
|
|
619
|
+
writeChunk(chunk: Blob): Promise<{
|
|
620
|
+
blockNumber: number;
|
|
621
|
+
index: number;
|
|
622
|
+
}>;
|
|
623
|
+
submitKey(account: KeyringPair, data: string): Promise<{
|
|
624
|
+
blockNumber: number;
|
|
625
|
+
index: number;
|
|
626
|
+
hash: `0x${string}`;
|
|
627
|
+
tx_result: _polkadot_types_types.ISubmittableResult;
|
|
436
628
|
}>;
|
|
437
629
|
writeMetadata(): Promise<{
|
|
438
|
-
blockNumber:
|
|
439
|
-
index:
|
|
440
|
-
hash:
|
|
441
|
-
tx_result:
|
|
630
|
+
blockNumber: number;
|
|
631
|
+
index: number;
|
|
632
|
+
hash: `0x${string}`;
|
|
633
|
+
tx_result: _polkadot_types_types.ISubmittableResult;
|
|
442
634
|
}>;
|
|
443
635
|
writeFile(): Promise<MCryptFs>;
|
|
444
636
|
}
|
|
445
637
|
declare class MCryptFsReader {
|
|
446
638
|
_filename: string;
|
|
447
639
|
_api: any;
|
|
448
|
-
_onChainFile:
|
|
449
|
-
constructor(filename: string, mcryptApi: any, onChainFile:
|
|
640
|
+
_onChainFile: MCryptFs;
|
|
641
|
+
constructor(filename: string, mcryptApi: any, onChainFile: MCryptFs);
|
|
450
642
|
downloadFile(): Promise<Blob>;
|
|
451
643
|
}
|
|
452
|
-
declare const FileFromMetadataRef: (mcryptApi: any, metadataRef:
|
|
644
|
+
declare const FileFromMetadataRef: (mcryptApi: any, metadataRef: [number, number]) => Promise<MCryptFs>;
|
|
453
645
|
|
|
454
646
|
/**
|
|
455
647
|
* Module providing singleton access to Polkadot API, WebSocket provider, and keyring.
|
|
@@ -532,83 +724,124 @@ declare function getKeyring(): Promise<Keyring>;
|
|
|
532
724
|
*/
|
|
533
725
|
declare function getEncKeyring(): Promise<Keyring>;
|
|
534
726
|
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
727
|
+
/** On-chain proof that a result extrinsic was included in a block. */
|
|
728
|
+
interface SubmissionReceipt {
|
|
729
|
+
/** Hash of the result extrinsic (hex-encoded, "0x..."). */
|
|
730
|
+
extrinsicHash: string;
|
|
731
|
+
/** Block height at which the result extrinsic was included. */
|
|
732
|
+
blockHeight: number;
|
|
733
|
+
/** Zero-based index of the result extrinsic within the block. */
|
|
734
|
+
extrinsicIndex: number;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
declare const signAndSend: (request: SubmittableExtrinsic<"promise">, account: KeyringPair, opts?: Record<string, unknown>) => Promise<{
|
|
738
|
+
blockNumber: number;
|
|
739
|
+
index: number;
|
|
740
|
+
hash: `0x${string}`;
|
|
741
|
+
tx_result: ISubmittableResult;
|
|
546
742
|
}>;
|
|
547
|
-
declare const getFileMetadataCall: (api:
|
|
743
|
+
declare const getFileMetadataCall: (api: ApiPromise, metadataRef: [number, number]) => Promise<_polkadot_types_types.CallBase<_polkadot_types_types.AnyTuple, _polkadot_types_interfaces.FunctionMetadataLatest>>;
|
|
548
744
|
declare const getGuardianAddress: () => Promise<{
|
|
549
745
|
peerid: string;
|
|
550
746
|
address: string;
|
|
551
747
|
}[]>;
|
|
552
|
-
declare const getGuardianNwParams: () => Promise<
|
|
553
|
-
|
|
554
|
-
declare const provider: WsProvider;
|
|
555
|
-
|
|
556
|
-
declare function createAgreement(contract: any, account: any): Promise<{
|
|
557
|
-
blockNumber: any;
|
|
558
|
-
index: any;
|
|
559
|
-
hash: any;
|
|
560
|
-
agreementId?: string;
|
|
561
|
-
}>;
|
|
562
|
-
declare function createSimpleAgreement(): Promise<{
|
|
563
|
-
blockNumber: any;
|
|
564
|
-
index: any;
|
|
565
|
-
hash: any;
|
|
566
|
-
agreementId?: string;
|
|
567
|
-
}>;
|
|
568
|
-
|
|
569
|
-
declare const PALI_SYMBOL = "PALI";
|
|
570
|
-
declare const PALI_DECIMALS = 18;
|
|
571
|
-
interface TokenProperties {
|
|
572
|
-
symbol: string;
|
|
573
|
-
decimals: number;
|
|
574
|
-
}
|
|
575
|
-
type PaliAmountInput = string | number;
|
|
576
|
-
type AtomicPaliAmount = bigint;
|
|
577
|
-
declare const toAtomicPaliAmount: (amount: PaliAmountInput) => AtomicPaliAmount;
|
|
578
|
-
declare const fromAtomicPaliAmount: (amount: bigint) => string;
|
|
579
|
-
declare const formatPaliAmount: (amount: bigint, symbol?: string) => string;
|
|
748
|
+
declare const getGuardianNwParams: () => Promise<string>;
|
|
580
749
|
/**
|
|
581
|
-
*
|
|
582
|
-
*
|
|
583
|
-
*
|
|
584
|
-
*
|
|
750
|
+
* Fetches the block at `blockHeight`, extracts the extrinsic at
|
|
751
|
+
* `extrinsicIndex`, and returns both the raw codec object and its human-readable
|
|
752
|
+
* decoded form.
|
|
753
|
+
*
|
|
754
|
+
* Throws if the block cannot be found or the index is out of range.
|
|
585
755
|
*/
|
|
586
|
-
declare function
|
|
756
|
+
declare function fetchAndDecodeExtrinsic(blockHeight: number, extrinsicIndex: number): Promise<{
|
|
757
|
+
raw: any;
|
|
758
|
+
decoded: Record<string, unknown>;
|
|
759
|
+
}>;
|
|
760
|
+
type BlockScanFilter = {
|
|
761
|
+
/** Pallet name, e.g. "dataAvailability" (case-insensitive) */
|
|
762
|
+
section: string;
|
|
763
|
+
/** Event name, e.g. "DaccGuardianGroup" (case-insensitive) */
|
|
764
|
+
method: string;
|
|
765
|
+
predicate?: never;
|
|
766
|
+
} | {
|
|
767
|
+
/**
|
|
768
|
+
* Custom predicate called for every event record in each scanned block.
|
|
769
|
+
* The full signed block is pre-fetched before any predicate call.
|
|
770
|
+
* Return true to accept the match and resolve, false to skip and keep scanning.
|
|
771
|
+
*/
|
|
772
|
+
predicate: (block: SignedBlock, event: EventRecord['event'], phase: EventRecord['phase']) => boolean | Promise<boolean>;
|
|
773
|
+
section?: never;
|
|
774
|
+
method?: never;
|
|
775
|
+
};
|
|
776
|
+
type BlockScanResult = {
|
|
777
|
+
blockHash: string;
|
|
778
|
+
blockNumber: number;
|
|
779
|
+
/** Index of the extrinsic that emitted the event, or null for inherents */
|
|
780
|
+
extrinsicIndex: number | null;
|
|
781
|
+
/** Returns the full signed block; cached when predicate mode was used */
|
|
782
|
+
block: () => Promise<SignedBlock>;
|
|
783
|
+
/** All event records for this block */
|
|
784
|
+
events: EventRecord[];
|
|
785
|
+
};
|
|
587
786
|
/**
|
|
588
|
-
*
|
|
589
|
-
*
|
|
787
|
+
* Subscribes to new block headers and resolves with a match descriptor as soon
|
|
788
|
+
* as a qualifying event is found.
|
|
789
|
+
*
|
|
790
|
+
* Supply exactly one of:
|
|
791
|
+
* - `section` + `method` — lightweight name match, no block fetch
|
|
792
|
+
* - `predicate(block, event, phase)` — full control; block is pre-fetched
|
|
793
|
+
*
|
|
794
|
+
* @param api Connected ApiPromise instance
|
|
795
|
+
* @param filter Either a name filter or a predicate (mutually exclusive)
|
|
796
|
+
* @param startBlock Ignore blocks with a number strictly below this value
|
|
797
|
+
* @param maxBlocks Reject after scanning this many blocks; pass 0 to wait indefinitely (default 20)
|
|
590
798
|
*/
|
|
591
|
-
declare
|
|
799
|
+
declare const scanForBlockEvent: (api: ApiPromise, filter: BlockScanFilter, startBlock?: number, maxBlocks?: number) => Promise<BlockScanResult>;
|
|
592
800
|
/**
|
|
593
|
-
*
|
|
801
|
+
* Subscribes to new block headers and scans each block's extrinsics until a
|
|
802
|
+
* `compute.result` extrinsic matching `requestId` is found. Resolves with the
|
|
803
|
+
* {@link SubmissionReceipt} (extrinsic hash, block height, and extrinsic index).
|
|
804
|
+
*
|
|
805
|
+
* The result-relay submits the extrinsic asynchronously, so this watcher may
|
|
806
|
+
* need to observe several blocks before the tx lands.
|
|
807
|
+
*
|
|
808
|
+
* @param requestId - The hex-encoded request ID to match (e.g. "0xabc123…").
|
|
809
|
+
* @param timeoutMs - Milliseconds to wait before giving up (default: 10 min).
|
|
594
810
|
*/
|
|
595
|
-
declare function
|
|
811
|
+
declare function watchForSubmissionReceipt(requestId: string, timeoutMs?: number): Promise<SubmissionReceipt>;
|
|
596
812
|
/**
|
|
597
|
-
*
|
|
598
|
-
*
|
|
599
|
-
*
|
|
813
|
+
* Fetches block events at `blockHeight` and returns the request ID from the
|
|
814
|
+
* `compute.AgreementCreated` event emitted by the extrinsic at `extrinsicIndex`.
|
|
815
|
+
* Returns `null` if no matching event is found for that extrinsic.
|
|
600
816
|
*/
|
|
601
|
-
declare function
|
|
602
|
-
|
|
817
|
+
declare function getAgreementCreatedRequestId(blockHeight: number, extrinsicIndex: number): Promise<string | null>;
|
|
818
|
+
|
|
819
|
+
interface ComputeContract {
|
|
820
|
+
contract_type: "Active" | "Dormant";
|
|
821
|
+
guardians: GuardianAddress[];
|
|
822
|
+
pre_check?: unknown;
|
|
823
|
+
compute: Record<string, unknown>;
|
|
824
|
+
post_check?: unknown;
|
|
825
|
+
result_cipher: unknown;
|
|
826
|
+
}
|
|
827
|
+
declare function createAgreement(contract: ComputeContract, account: KeyringPair): Promise<{
|
|
828
|
+
blockNumber: number;
|
|
829
|
+
index: number;
|
|
830
|
+
hash: string;
|
|
831
|
+
agreementId?: string;
|
|
832
|
+
}>;
|
|
833
|
+
declare function createSimpleAgreement(): Promise<{
|
|
834
|
+
blockNumber: number;
|
|
835
|
+
index: number;
|
|
836
|
+
hash: string;
|
|
837
|
+
agreementId?: string;
|
|
838
|
+
}>;
|
|
603
839
|
|
|
604
840
|
interface DataContractParams {
|
|
605
841
|
/** URL pointing to the data to store. */
|
|
606
842
|
url: string;
|
|
607
843
|
/** Guardian account IDs that participate in this contract. */
|
|
608
|
-
guardians:
|
|
609
|
-
peerid: string;
|
|
610
|
-
address: string;
|
|
611
|
-
}[];
|
|
844
|
+
guardians: string[];
|
|
612
845
|
/** Fee offered for the contract in PALI. Defaults to 0. */
|
|
613
846
|
fees?: PaliAmountInput;
|
|
614
847
|
/** Block number deadline. Defaults to 0 (no deadline). */
|
|
@@ -625,10 +858,10 @@ interface DataContractParams {
|
|
|
625
858
|
* - No pre-check or post-check verifications
|
|
626
859
|
* - Plain (unencrypted) result
|
|
627
860
|
*/
|
|
628
|
-
declare function dataContract(params: DataContractParams): Promise<{
|
|
629
|
-
blockNumber:
|
|
630
|
-
index:
|
|
631
|
-
hash:
|
|
861
|
+
declare function dataContract(params: DataContractParams, account: KeyringPair): Promise<{
|
|
862
|
+
blockNumber: number;
|
|
863
|
+
index: number;
|
|
864
|
+
hash: string;
|
|
632
865
|
agreementId?: string;
|
|
633
866
|
}>;
|
|
634
867
|
|
|
@@ -636,10 +869,7 @@ interface InferenceComputeParams {
|
|
|
636
869
|
/** Raw input data — string will be UTF-8 encoded, Uint8Array used as-is. */
|
|
637
870
|
input: Uint8Array | string;
|
|
638
871
|
/** Guardian account IDs that participate in this compute. */
|
|
639
|
-
guardians:
|
|
640
|
-
peerid: string;
|
|
641
|
-
address: string;
|
|
642
|
-
}[];
|
|
872
|
+
guardians: string[];
|
|
643
873
|
/** Fee offered for the compute step in PALI. Defaults to 0. */
|
|
644
874
|
fees?: PaliAmountInput;
|
|
645
875
|
/** Block number deadline for the compute step. Defaults to 0 (no deadline). */
|
|
@@ -655,25 +885,35 @@ interface InferenceComputeParams {
|
|
|
655
885
|
* - Cipher fields carry zero-value placeholders (unused in the trusted path).
|
|
656
886
|
* - Result is returned in plain (no re-encryption).
|
|
657
887
|
*/
|
|
658
|
-
declare function inferenceCompute(params: InferenceComputeParams): Promise<{
|
|
659
|
-
blockNumber:
|
|
660
|
-
index:
|
|
661
|
-
hash:
|
|
888
|
+
declare function inferenceCompute(params: InferenceComputeParams, account: KeyringPair): Promise<{
|
|
889
|
+
blockNumber: number;
|
|
890
|
+
index: number;
|
|
891
|
+
hash: string;
|
|
662
892
|
agreementId?: string;
|
|
663
893
|
}>;
|
|
664
894
|
|
|
665
|
-
|
|
895
|
+
interface GuardianParticipants {
|
|
896
|
+
nwState: {
|
|
897
|
+
localPeerId: string | undefined;
|
|
898
|
+
worker: unknown;
|
|
899
|
+
currentEra: unknown;
|
|
900
|
+
guardians: string | null;
|
|
901
|
+
nextGuardians: string | null;
|
|
902
|
+
currentIndex: unknown;
|
|
903
|
+
nextIndex: number;
|
|
904
|
+
};
|
|
905
|
+
currentGuardians: unknown[];
|
|
906
|
+
upcomingGuardians: unknown[];
|
|
907
|
+
}
|
|
908
|
+
declare function getGuardianParticipants(): Promise<GuardianParticipants>;
|
|
666
909
|
|
|
667
910
|
interface SimpleComputeParams {
|
|
668
911
|
/** Guardian account IDs that participate in this compute. */
|
|
669
|
-
guardians:
|
|
670
|
-
peerid: string;
|
|
671
|
-
address: string;
|
|
672
|
-
}[];
|
|
912
|
+
guardians: string[];
|
|
673
913
|
/** Input reference block number from which to read the tx payload. */
|
|
674
|
-
inputBlockNumber
|
|
914
|
+
inputBlockNumber?: number;
|
|
675
915
|
/** Input reference extrinsic index within the input block. */
|
|
676
|
-
inputExtrinsicIndex
|
|
916
|
+
inputExtrinsicIndex?: number;
|
|
677
917
|
/** Program location as URL. */
|
|
678
918
|
programUrl: string;
|
|
679
919
|
/** Fee offered for the compute step in PALI. Defaults to 0. */
|
|
@@ -691,10 +931,10 @@ interface SimpleComputeParams {
|
|
|
691
931
|
* - program fetched from URL
|
|
692
932
|
* - no pre/post verification
|
|
693
933
|
*/
|
|
694
|
-
declare function simpleCompute(params: SimpleComputeParams): Promise<{
|
|
695
|
-
blockNumber:
|
|
696
|
-
index:
|
|
697
|
-
hash:
|
|
934
|
+
declare function simpleCompute(params: SimpleComputeParams, account: KeyringPair): Promise<{
|
|
935
|
+
blockNumber: number;
|
|
936
|
+
index: number;
|
|
937
|
+
hash: string;
|
|
698
938
|
agreementId?: string;
|
|
699
939
|
}>;
|
|
700
940
|
|
|
@@ -830,85 +1070,11 @@ declare const testCrypt: (kzg: string, agg_key: string) => {
|
|
|
830
1070
|
*/
|
|
831
1071
|
declare function generateRandomBytes(length?: number): Uint8Array;
|
|
832
1072
|
|
|
833
|
-
|
|
834
|
-
/**
|
|
835
|
-
* Mirrors the on-chain ComputePayload SCALE type (CheckCompute signed extension).
|
|
836
|
-
* `agreement` is an array of 32-byte guardian peer-ID keys, obtained by
|
|
837
|
-
* base58-decoding the peer ID and stripping the first 6 multiaddr prefix bytes.
|
|
838
|
-
*/
|
|
839
|
-
interface ComputePayload {
|
|
840
|
-
/** DA type: 0 = none, 1 = DA. */
|
|
841
|
-
da_type: number;
|
|
842
|
-
/** Guardian agreement keys. Each element is a 32-byte Uint8Array or number[]. */
|
|
843
|
-
agreement?: Uint8Array[] | number[][];
|
|
844
|
-
/** Verification mode. */
|
|
845
|
-
verification: number;
|
|
846
|
-
/** Compute mode. */
|
|
847
|
-
compute: number;
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
interface OnChainRef {
|
|
1073
|
+
declare function writeMetadata(account: KeyringPair, name: string, description: string, ref: OnChainRef, price: bigint, dataType: number, l2Owner: string, groupId: string): Promise<{
|
|
851
1074
|
blockNumber: number;
|
|
852
1075
|
index: number;
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
/** Encoded threshold ciphertext bytes (from encodeCiphertext). */
|
|
856
|
-
td_params: number[];
|
|
857
|
-
/** Guardian group aggregate public key bytes. */
|
|
858
|
-
pk_bytes: number[];
|
|
859
|
-
/** KZG powers-of-tau bytes. */
|
|
860
|
-
tau_params: number[];
|
|
861
|
-
}
|
|
862
|
-
type ThresholdAlgos = {
|
|
863
|
-
SilentThreshold: SilentThresholdParams;
|
|
864
|
-
};
|
|
865
|
-
type SymmetricAlgos = {
|
|
866
|
-
ChaCha20Poly1305: {
|
|
867
|
-
nonce: number[];
|
|
868
|
-
};
|
|
869
|
-
} | {
|
|
870
|
-
Aes256Gcm: {
|
|
871
|
-
nonce: number[];
|
|
872
|
-
};
|
|
873
|
-
};
|
|
874
|
-
interface CipherSuiteEncrypted {
|
|
875
|
-
threshold: ThresholdAlgos;
|
|
876
|
-
symmetric: SymmetricAlgos;
|
|
877
|
-
}
|
|
878
|
-
/** Mirrors the on-chain CipherSuite enum from spec.ts. */
|
|
879
|
-
type CipherSuite = "Plaintext" | {
|
|
880
|
-
Encrypted: CipherSuiteEncrypted;
|
|
881
|
-
};
|
|
882
|
-
interface SubmitTEDataResult {
|
|
883
|
-
ref: OnChainRef;
|
|
884
|
-
cipher: CipherSuite;
|
|
885
|
-
}
|
|
886
|
-
interface GuardianGroupInfo {
|
|
887
|
-
groupId: string;
|
|
888
|
-
guardians: any[];
|
|
889
|
-
tauParams: string;
|
|
890
|
-
aggKey: string;
|
|
891
|
-
groupPk: string;
|
|
892
|
-
}
|
|
893
|
-
interface UploadOptions {
|
|
894
|
-
name: string;
|
|
895
|
-
description: string;
|
|
896
|
-
price: PaliAmountInput;
|
|
897
|
-
type: "model" | "dataset" | "agent";
|
|
898
|
-
guardianGroupInfo: GuardianGroupInfo;
|
|
899
|
-
ref?: string;
|
|
900
|
-
filePath?: string;
|
|
901
|
-
/** Options forwarded to signAndSend. Defaults to dormant DA payload (da_type=1, compute=0). */
|
|
902
|
-
opts?: {
|
|
903
|
-
compute: ComputePayload;
|
|
904
|
-
};
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
declare function writeMetadata(account: any, name: string, description: string, ref: OnChainRef, price: bigint, dataType: number, l2Owner: string, groupId: string): Promise<{
|
|
908
|
-
blockNumber: any;
|
|
909
|
-
index: any;
|
|
910
|
-
hash: any;
|
|
911
|
-
tx_result: any;
|
|
1076
|
+
hash: `0x${string}`;
|
|
1077
|
+
tx_result: _polkadot_types_types.ISubmittableResult;
|
|
912
1078
|
}>;
|
|
913
1079
|
interface DataAgreementMetadata {
|
|
914
1080
|
name: string;
|
|
@@ -922,10 +1088,7 @@ interface DataAgreementParams {
|
|
|
922
1088
|
/** DA blob reference returned by submitTEData. */
|
|
923
1089
|
ref: OnChainRef;
|
|
924
1090
|
/** Guardian account IDs that participate in this agreement. */
|
|
925
|
-
guardians:
|
|
926
|
-
peerid: string;
|
|
927
|
-
address: string;
|
|
928
|
-
}[];
|
|
1091
|
+
guardians: string[];
|
|
929
1092
|
/** Fee for the agreement in PALI atomic units. */
|
|
930
1093
|
fees: bigint;
|
|
931
1094
|
/** If provided, populates ComputeInfo.metadata in the contract. */
|
|
@@ -944,28 +1107,28 @@ interface DataAgreementParams {
|
|
|
944
1107
|
*/
|
|
945
1108
|
resultCipher?: CipherSuite;
|
|
946
1109
|
}
|
|
947
|
-
declare function registerDataAgreement(account:
|
|
948
|
-
blockNumber:
|
|
949
|
-
index:
|
|
950
|
-
hash:
|
|
1110
|
+
declare function registerDataAgreement(account: KeyringPair, params: DataAgreementParams): Promise<{
|
|
1111
|
+
blockNumber: number;
|
|
1112
|
+
index: number;
|
|
1113
|
+
hash: string;
|
|
951
1114
|
agreementId?: string;
|
|
952
1115
|
}>;
|
|
953
1116
|
|
|
954
|
-
declare function runAgent(account:
|
|
955
|
-
blockNumber:
|
|
956
|
-
index:
|
|
957
|
-
hash:
|
|
958
|
-
tx_result:
|
|
1117
|
+
declare function runAgent(account: KeyringPair, agentRef: OnChainRef, nonce: Uint8Array, ciphertext: Uint8Array, tdParams: Uint8Array, pkBytes: Uint8Array, tauParams: Uint8Array, baseModel: OnChainRef, publicKey: Uint8Array, guardians: Uint8Array[], guardian?: Uint8Array, agreementId?: Uint8Array): Promise<{
|
|
1118
|
+
blockNumber: number;
|
|
1119
|
+
index: number;
|
|
1120
|
+
hash: `0x${string}`;
|
|
1121
|
+
tx_result: _polkadot_types_types.ISubmittableResult;
|
|
959
1122
|
}>;
|
|
960
1123
|
|
|
961
|
-
declare function submitData(account:
|
|
962
|
-
declare function submitTEData(account:
|
|
1124
|
+
declare function submitData(account: KeyringPair, data: string): Promise<void>;
|
|
1125
|
+
declare function submitTEData(account: KeyringPair, data: string, chosenGuardians: string[], tau_params: string, agg_key: string, group_pk: string): Promise<OnChainRef>;
|
|
963
1126
|
/**
|
|
964
1127
|
* Identical to submitTEData but additionally returns the populated CipherSuite
|
|
965
1128
|
* so callers can pass it directly to registerDataAgreement without
|
|
966
1129
|
* re-deriving the cipher parameters.
|
|
967
1130
|
*/
|
|
968
|
-
declare function submitTEDataWithCipher(account:
|
|
1131
|
+
declare function submitTEDataWithCipher(account: KeyringPair, data: string, chosenGuardians: string[], tau_params: string, agg_key: string, group_pk: string): Promise<SubmitTEDataResult>;
|
|
969
1132
|
|
|
970
1133
|
declare function uploadData(options: UploadOptions): Promise<void>;
|
|
971
1134
|
/**
|
|
@@ -978,27 +1141,48 @@ declare function uploadDataLegacy(options: Omit<UploadOptions, "opts">): Promise
|
|
|
978
1141
|
|
|
979
1142
|
declare const getGuardianList: () => Promise<string[]>;
|
|
980
1143
|
|
|
981
|
-
declare const createGuardianGroup: (account:
|
|
1144
|
+
declare const createGuardianGroup: (account: KeyringPair, selectedGuardians: GuardianAddress[]) => Promise<{
|
|
1145
|
+
blockNumber: number;
|
|
1146
|
+
index: number;
|
|
1147
|
+
hash: `0x${string}`;
|
|
1148
|
+
tx_result: _polkadot_types_types.ISubmittableResult;
|
|
1149
|
+
}>;
|
|
1150
|
+
/**
|
|
1151
|
+
* Creates a guardian group with exactly 3 guardians, waits for tx confirmation,
|
|
1152
|
+
* then watches incoming blocks for the `DaccGuardianGroup` event (emitted by a
|
|
1153
|
+
* subsequent `daccGuardianGroupInfo` extrinsic) and returns the decoded args.
|
|
1154
|
+
*
|
|
1155
|
+
* @param account Signing account
|
|
1156
|
+
* @param guardians Exactly 3 guardian addresses / peer-ids
|
|
1157
|
+
* @param maxBlocks Give up waiting for the event after this many blocks; 0 = indefinite (default 20)
|
|
1158
|
+
*/
|
|
1159
|
+
declare const createGuardianGroupAndWatch: (account: KeyringPair, guardians: GuardianAddress[], maxBlocks?: number) => Promise<GuardianGroupInfo>;
|
|
982
1160
|
|
|
983
|
-
|
|
1161
|
+
interface GuardianJoinPrefs {
|
|
1162
|
+
compute?: string;
|
|
1163
|
+
fee?: bigint | string | number;
|
|
1164
|
+
standard?: boolean;
|
|
1165
|
+
verifier?: boolean;
|
|
1166
|
+
}
|
|
1167
|
+
declare function joinGuardian(account: KeyringPair, prefs: GuardianJoinPrefs): Promise<void>;
|
|
984
1168
|
|
|
985
|
-
declare function addStake(account:
|
|
1169
|
+
declare function addStake(account: KeyringPair, amountBaseUnits: bigint): Promise<void>;
|
|
986
1170
|
|
|
987
|
-
declare function joinIdleStaker(account:
|
|
1171
|
+
declare function joinIdleStaker(account: KeyringPair): Promise<void>;
|
|
988
1172
|
|
|
989
|
-
declare function newStake(account:
|
|
1173
|
+
declare function newStake(account: KeyringPair, amountBaseUnits: bigint, rewardDestination?: string): Promise<void>;
|
|
990
1174
|
|
|
991
|
-
declare function payoutStake(account:
|
|
1175
|
+
declare function payoutStake(account: KeyringPair, eras: Array<number>, address?: string): Promise<void>;
|
|
992
1176
|
|
|
993
|
-
declare function reduceStake(account:
|
|
1177
|
+
declare function reduceStake(account: KeyringPair, amountBaseUnits: bigint): Promise<void>;
|
|
994
1178
|
|
|
995
|
-
declare function removeStake(account:
|
|
1179
|
+
declare function removeStake(account: KeyringPair): Promise<void>;
|
|
996
1180
|
|
|
997
|
-
declare function withdrawStake(account:
|
|
1181
|
+
declare function withdrawStake(account: KeyringPair): Promise<void>;
|
|
998
1182
|
|
|
999
|
-
declare function fundAccount(account:
|
|
1183
|
+
declare function fundAccount(account: KeyringPair, amountBaseUnits: bigint, address?: string): Promise<void>;
|
|
1000
1184
|
|
|
1001
|
-
declare function transfer(account:
|
|
1185
|
+
declare function transfer(account: KeyringPair, amountBaseUnits: bigint, address: string): Promise<void>;
|
|
1002
1186
|
|
|
1003
1187
|
/**
|
|
1004
1188
|
* Converts a hex string into a Uint8Array.
|
|
@@ -1066,12 +1250,13 @@ declare const decodeField: (field: string, expectedLength?: number) => Uint8Arra
|
|
|
1066
1250
|
*/
|
|
1067
1251
|
declare const debugLog: (message?: any, ...optionalParams: any[]) => void;
|
|
1068
1252
|
|
|
1069
|
-
declare function joinValidator(account:
|
|
1253
|
+
declare function joinValidator(account: KeyringPair, commission: number): Promise<void>;
|
|
1070
1254
|
|
|
1071
1255
|
declare let PALLIORA_WS: string;
|
|
1072
1256
|
declare let PALLIORA_RPC_URL: string;
|
|
1073
1257
|
declare let DEBUG: boolean;
|
|
1074
1258
|
declare let TX_WAIT_FINALIZATION: boolean;
|
|
1259
|
+
declare let provider: WsProvider;
|
|
1075
1260
|
declare function configure(opts: {
|
|
1076
1261
|
pallioraWs?: string;
|
|
1077
1262
|
pallioraRpcUrl?: string;
|
|
@@ -1079,9 +1264,12 @@ declare function configure(opts: {
|
|
|
1079
1264
|
txWaitFinalization?: boolean;
|
|
1080
1265
|
}): void;
|
|
1081
1266
|
|
|
1082
|
-
|
|
1267
|
+
interface IdentityFields {
|
|
1268
|
+
display?: string;
|
|
1269
|
+
}
|
|
1270
|
+
declare function setIdentity(account: KeyringPair, { display }: IdentityFields): Promise<void>;
|
|
1083
1271
|
|
|
1084
|
-
declare function rotateAndSetKeys(account:
|
|
1085
|
-
declare function setWorker(account:
|
|
1272
|
+
declare function rotateAndSetKeys(account: KeyringPair): Promise<void>;
|
|
1273
|
+
declare function setWorker(account: KeyringPair): Promise<void>;
|
|
1086
1274
|
|
|
1087
|
-
export { API_EXTENSIONS, API_RPC, API_TYPES, AccountSourceType, type AtomicPaliAmount, type CipherSuite, type
|
|
1275
|
+
export { API_EXTENSIONS, API_RPC, API_TYPES, AccountSourceType, type AsymmetricHybridParams, type AsymmetricParams, type AtomicPaliAmount, type BlockScanFilter, type BlockScanResult, type CipherSuite, type ComputeContract, CryptoType, DEBUG, DEFAULT_COMPUTE_PAYLOAD, DEFAULT_EMPTY_PAYLOAD, type DataAgreementMetadata, type DataAgreementParams, type DataContractParams, type Ed25519Params, FileFromMetadataRef, type GuardianAddress, type GuardianGroupInfo, type GuardianJoinPrefs, type GuardianParticipants, type IdentityFields, type InferenceComputeParams, type KdfParams, MCryptFs, MCryptFsReader, MCryptFsWriter, type OnChainRef, PALI_DECIMALS, PALI_SYMBOL, PALLIORA_RPC_URL, PALLIORA_WS, type PaliAmountInput, type Secp256k1Params, type SilentThresholdParams, type SimpleComputeParams, type SubmissionReceipt, type SubmitTEDataResult, type SymmetricParams, TX_WAIT_FINALIZATION, type ThresholdHybridParams, type ThresholdParams, type UploadOptions, addStake, base64ToUint8Array, clearTokenCache, configure, createAccount, createAgreement, createGuardianGroup, createGuardianGroupAndWatch, createSimpleAgreement, dataContract, debugLog, decodeAggregateKey, decodeField, decodePowersOfTau, decrypt, encrypt as ecncryptTest, encodeCiphertext, encrypt$1 as encrypt, fetchAndDecodeExtrinsic, fetchTokenProperties, formatBalanceWithTokenProperties, formatPaliAmount, fromAtomicPaliAmount, fundAccount, gen_shared_key, gen_stretched_key, generateRandomBytes, getAgreementCreatedRequestId, getApi, getCachedTokenProperties, getEncKeyring, getFileMetadataCall, getGuardianAddress, getGuardianList, getGuardianNwParams, getGuardianParticipants, getKeyring, hexToUint8Array, inferenceCompute, joinGuardian, joinIdleStaker, joinValidator, newStake, pairFromPrivateKeyHex, payoutStake, provider, reduceStake, registerDataAgreement, removeStake, rotateAndSetKeys, runAgent, scanForBlockEvent, setIdentity, setWorker, signAndSend, simpleCompute, submitData, submitTEData, submitTEDataWithCipher, testCrypt, toAtomicPaliAmount, tokenToBigint, transfer, uint8ArrayToBase64, uploadData, uploadDataLegacy, watchForSubmissionReceipt, withdrawStake, writeMetadata };
|