@lfdecentralizedtrust/paladin-sdk 0.13.0-rc.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/README.md +21 -0
- package/build/domains/abis/INoto.json +448 -0
- package/build/domains/abis/INotoPrivate.json +347 -0
- package/build/domains/abis/IZetoFungible.json +197 -0
- package/build/domains/abis/PentePrivacyGroup.json +613 -0
- package/build/domains/abis/Zeto_Anon.json +1263 -0
- package/build/domains/noto.d.ts +117 -0
- package/build/domains/noto.js +292 -0
- package/build/domains/pente.d.ts +84 -0
- package/build/domains/pente.js +191 -0
- package/build/domains/zeto.d.ts +83 -0
- package/build/domains/zeto.js +201 -0
- package/build/index.d.ts +9 -0
- package/build/index.js +28 -0
- package/build/interfaces/algorithms.d.ts +3 -0
- package/build/interfaces/algorithms.js +9 -0
- package/build/interfaces/blockchainevent.d.ts +15 -0
- package/build/interfaces/blockchainevent.js +2 -0
- package/build/interfaces/blockindex.d.ts +30 -0
- package/build/interfaces/blockindex.js +2 -0
- package/build/interfaces/domains.d.ts +9 -0
- package/build/interfaces/domains.js +2 -0
- package/build/interfaces/index.d.ts +15 -0
- package/build/interfaces/index.js +31 -0
- package/build/interfaces/keymanager.d.ts +32 -0
- package/build/interfaces/keymanager.js +2 -0
- package/build/interfaces/logger.d.ts +8 -0
- package/build/interfaces/logger.js +2 -0
- package/build/interfaces/paladin.d.ts +14 -0
- package/build/interfaces/paladin.js +2 -0
- package/build/interfaces/privacygroups.d.ts +76 -0
- package/build/interfaces/privacygroups.js +2 -0
- package/build/interfaces/query.d.ts +33 -0
- package/build/interfaces/query.js +2 -0
- package/build/interfaces/registry.d.ts +26 -0
- package/build/interfaces/registry.js +2 -0
- package/build/interfaces/states.d.ts +61 -0
- package/build/interfaces/states.js +2 -0
- package/build/interfaces/transaction.d.ts +159 -0
- package/build/interfaces/transaction.js +12 -0
- package/build/interfaces/transport.d.ts +32 -0
- package/build/interfaces/transport.js +2 -0
- package/build/interfaces/verifiers.d.ts +6 -0
- package/build/interfaces/verifiers.js +10 -0
- package/build/interfaces/websocket.d.ts +57 -0
- package/build/interfaces/websocket.js +2 -0
- package/build/paladin.d.ts +265 -0
- package/build/paladin.js +739 -0
- package/build/transaction.d.ts +8 -0
- package/build/transaction.js +17 -0
- package/build/utils.d.ts +5 -0
- package/build/utils.js +49 -0
- package/build/verifier.d.ts +16 -0
- package/build/verifier.js +24 -0
- package/build/websocket.d.ts +35 -0
- package/build/websocket.js +177 -0
- package/build.gradle +75 -0
- package/package.json +32 -0
- package/scripts/abi.mjs +19 -0
- package/scripts/contracts.mjs +20 -0
- package/scripts/download.mjs +27 -0
- package/scripts/util.mjs +42 -0
- package/src/domains/noto.ts +420 -0
- package/src/domains/pente.ts +287 -0
- package/src/domains/zeto.ts +282 -0
- package/src/index.ts +10 -0
- package/src/interfaces/algorithms.ts +6 -0
- package/src/interfaces/blockchainevent.ts +18 -0
- package/src/interfaces/blockindex.ts +33 -0
- package/src/interfaces/domains.ts +10 -0
- package/src/interfaces/index.ts +15 -0
- package/src/interfaces/keymanager.ts +35 -0
- package/src/interfaces/logger.ts +8 -0
- package/src/interfaces/paladin.ts +17 -0
- package/src/interfaces/privacygroups.ts +86 -0
- package/src/interfaces/query.ts +37 -0
- package/src/interfaces/registry.ts +27 -0
- package/src/interfaces/states.ts +77 -0
- package/src/interfaces/transaction.ts +179 -0
- package/src/interfaces/transport.ts +35 -0
- package/src/interfaces/verifiers.ts +6 -0
- package/src/interfaces/websocket.ts +67 -0
- package/src/paladin.ts +1295 -0
- package/src/transaction.ts +17 -0
- package/src/utils.ts +24 -0
- package/src/verifier.ts +27 -0
- package/src/websocket.ts +217 -0
- package/tsconfig.json +14 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export interface ISchema {
|
|
2
|
+
id: string;
|
|
3
|
+
created: string;
|
|
4
|
+
domain: string;
|
|
5
|
+
type: SchemaType;
|
|
6
|
+
signature: string;
|
|
7
|
+
definition: object;
|
|
8
|
+
labels: string[];
|
|
9
|
+
}
|
|
10
|
+
export type SchemaType = "abi";
|
|
11
|
+
export interface IStateBase {
|
|
12
|
+
id: string;
|
|
13
|
+
created: string;
|
|
14
|
+
domain: string;
|
|
15
|
+
schema: string;
|
|
16
|
+
contractAddress: string;
|
|
17
|
+
data: object;
|
|
18
|
+
}
|
|
19
|
+
export interface IStateEncoded {
|
|
20
|
+
id: string;
|
|
21
|
+
domain: string;
|
|
22
|
+
schema: string;
|
|
23
|
+
contractAddress: string;
|
|
24
|
+
data: string;
|
|
25
|
+
}
|
|
26
|
+
export interface IState extends IStateBase {
|
|
27
|
+
confirmed?: IStateConfirm;
|
|
28
|
+
spent?: IStateSpend;
|
|
29
|
+
locks?: IStateLock[];
|
|
30
|
+
nullifier?: IStateNullifier;
|
|
31
|
+
}
|
|
32
|
+
export interface IStateLabel {
|
|
33
|
+
domainName: string;
|
|
34
|
+
state: string;
|
|
35
|
+
label: string;
|
|
36
|
+
value: string;
|
|
37
|
+
}
|
|
38
|
+
export interface IStateInt64Label {
|
|
39
|
+
domainName: string;
|
|
40
|
+
state: string;
|
|
41
|
+
label: string;
|
|
42
|
+
value: number;
|
|
43
|
+
}
|
|
44
|
+
export interface IStateConfirm {
|
|
45
|
+
transaction: string;
|
|
46
|
+
}
|
|
47
|
+
export interface IStateSpend {
|
|
48
|
+
transaction: string;
|
|
49
|
+
}
|
|
50
|
+
type StateLockType = "create" | "read" | "spend";
|
|
51
|
+
export interface IStateLock {
|
|
52
|
+
transaction: string;
|
|
53
|
+
type: StateLockType;
|
|
54
|
+
}
|
|
55
|
+
export interface IStateNullifier {
|
|
56
|
+
domain: string;
|
|
57
|
+
id: string;
|
|
58
|
+
spent?: IStateSpend;
|
|
59
|
+
}
|
|
60
|
+
export type StateStatus = "available" | "confirmed" | "unconfirmed" | "spent" | "all";
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { BigNumberish, ethers } from "ethers";
|
|
2
|
+
import { NotoUnlockPublicParams } from "../domains/noto";
|
|
3
|
+
import { IStateBase } from "./states";
|
|
4
|
+
export interface IBlock {
|
|
5
|
+
number: number;
|
|
6
|
+
hash: string;
|
|
7
|
+
timestamp: string;
|
|
8
|
+
}
|
|
9
|
+
export declare enum TransactionType {
|
|
10
|
+
PUBLIC = "public",
|
|
11
|
+
PRIVATE = "private"
|
|
12
|
+
}
|
|
13
|
+
export interface PublicTxOptions {
|
|
14
|
+
gas?: BigNumberish;
|
|
15
|
+
value?: BigNumberish;
|
|
16
|
+
maxPriorityFeePerGas?: BigNumberish;
|
|
17
|
+
maxFeePerGas?: BigNumberish;
|
|
18
|
+
}
|
|
19
|
+
export interface ITransactionBase {
|
|
20
|
+
type: TransactionType;
|
|
21
|
+
domain?: string;
|
|
22
|
+
function?: string;
|
|
23
|
+
from: string;
|
|
24
|
+
to?: string;
|
|
25
|
+
data: {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export interface ITransaction extends ITransactionBase {
|
|
30
|
+
id: string;
|
|
31
|
+
created: string;
|
|
32
|
+
abiReference: string;
|
|
33
|
+
}
|
|
34
|
+
export interface IPreparedTransaction {
|
|
35
|
+
id: string;
|
|
36
|
+
domain: string;
|
|
37
|
+
to: string;
|
|
38
|
+
transaction: ITransactionBase & {
|
|
39
|
+
abiReference: string;
|
|
40
|
+
};
|
|
41
|
+
states: {
|
|
42
|
+
spent?: IStateBase[];
|
|
43
|
+
read?: IStateBase[];
|
|
44
|
+
confirmed?: IStateBase[];
|
|
45
|
+
info?: IStateBase[];
|
|
46
|
+
};
|
|
47
|
+
metadata: any;
|
|
48
|
+
}
|
|
49
|
+
export interface ITransactionInput extends ITransactionBase {
|
|
50
|
+
abiReference?: string;
|
|
51
|
+
abi?: ethers.InterfaceAbi;
|
|
52
|
+
bytecode?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface ITransactionCall extends ITransactionInput {
|
|
55
|
+
}
|
|
56
|
+
export interface ITransactionReceipt {
|
|
57
|
+
blockNumber: number;
|
|
58
|
+
id: string;
|
|
59
|
+
sequence: number;
|
|
60
|
+
success: boolean;
|
|
61
|
+
transactionHash: string;
|
|
62
|
+
source: string;
|
|
63
|
+
domain?: string;
|
|
64
|
+
contractAddress?: string;
|
|
65
|
+
states?: ITransactionStates;
|
|
66
|
+
domainReceipt?: IPenteDomainReceipt | INotoDomainReceipt;
|
|
67
|
+
failureMessage?: string;
|
|
68
|
+
}
|
|
69
|
+
export interface IPenteDomainReceipt {
|
|
70
|
+
receipt: {
|
|
71
|
+
from?: string;
|
|
72
|
+
to?: string;
|
|
73
|
+
contractAddress?: string;
|
|
74
|
+
logs?: IPenteLog[];
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export interface IPenteLog {
|
|
78
|
+
address: string;
|
|
79
|
+
topics: string[];
|
|
80
|
+
data: string;
|
|
81
|
+
}
|
|
82
|
+
export interface INotoDomainReceipt {
|
|
83
|
+
states: {
|
|
84
|
+
inputs?: IReceiptState<INotoCoin>[];
|
|
85
|
+
outputs?: IReceiptState<INotoCoin>[];
|
|
86
|
+
readInputs?: IReceiptState<INotoCoin>[];
|
|
87
|
+
preparedOutputs?: IReceiptState<INotoCoin>[];
|
|
88
|
+
lockedInputs?: IReceiptState<INotoLockedCoin>[];
|
|
89
|
+
lockedOutputs?: IReceiptState<INotoLockedCoin>[];
|
|
90
|
+
readLockedInputs?: IReceiptState<INotoLockedCoin>[];
|
|
91
|
+
preparedLockedOutputs?: IReceiptState<INotoLockedCoin>[];
|
|
92
|
+
};
|
|
93
|
+
transfers?: {
|
|
94
|
+
from?: string;
|
|
95
|
+
to?: string;
|
|
96
|
+
amount: string;
|
|
97
|
+
}[];
|
|
98
|
+
lockInfo?: {
|
|
99
|
+
lockId: string;
|
|
100
|
+
delegate?: string;
|
|
101
|
+
unlockParams?: NotoUnlockPublicParams;
|
|
102
|
+
unlockCall?: string;
|
|
103
|
+
};
|
|
104
|
+
data?: string;
|
|
105
|
+
}
|
|
106
|
+
export interface IReceiptState<T> {
|
|
107
|
+
id: string;
|
|
108
|
+
data: T;
|
|
109
|
+
}
|
|
110
|
+
export interface INotoCoin {
|
|
111
|
+
salt: string;
|
|
112
|
+
owner: string;
|
|
113
|
+
amount: string;
|
|
114
|
+
}
|
|
115
|
+
export interface INotoLockedCoin {
|
|
116
|
+
lockId: string;
|
|
117
|
+
salt: string;
|
|
118
|
+
owner: string;
|
|
119
|
+
amount: string;
|
|
120
|
+
}
|
|
121
|
+
export interface ITransactionStates {
|
|
122
|
+
none?: boolean;
|
|
123
|
+
spent?: IStateBase[];
|
|
124
|
+
read?: IStateBase[];
|
|
125
|
+
confirmed?: IStateBase[];
|
|
126
|
+
info?: IStateBase[];
|
|
127
|
+
unavailable?: {
|
|
128
|
+
spent?: string[];
|
|
129
|
+
read?: string[];
|
|
130
|
+
confirmed?: string[];
|
|
131
|
+
info?: string[];
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
export declare enum TransactionType {
|
|
135
|
+
Private = "private",
|
|
136
|
+
Public = "public"
|
|
137
|
+
}
|
|
138
|
+
export interface IABIDecodedData {
|
|
139
|
+
signature: string;
|
|
140
|
+
definition: ethers.JsonFragment;
|
|
141
|
+
data: any;
|
|
142
|
+
summary: string;
|
|
143
|
+
}
|
|
144
|
+
export interface IStoredABI {
|
|
145
|
+
hash: string;
|
|
146
|
+
abi: ethers.InterfaceAbi;
|
|
147
|
+
}
|
|
148
|
+
export interface ITransactionReceiptListener {
|
|
149
|
+
name: string;
|
|
150
|
+
filters?: {
|
|
151
|
+
sequenceAbove?: number;
|
|
152
|
+
type?: TransactionType;
|
|
153
|
+
domain?: string;
|
|
154
|
+
};
|
|
155
|
+
options?: {
|
|
156
|
+
domainReceipts?: boolean;
|
|
157
|
+
incompleteStateReceiptBehavior?: "block_contract" | "process";
|
|
158
|
+
};
|
|
159
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionType = void 0;
|
|
4
|
+
var TransactionType;
|
|
5
|
+
(function (TransactionType) {
|
|
6
|
+
TransactionType["PUBLIC"] = "public";
|
|
7
|
+
TransactionType["PRIVATE"] = "private";
|
|
8
|
+
})(TransactionType || (exports.TransactionType = TransactionType = {}));
|
|
9
|
+
(function (TransactionType) {
|
|
10
|
+
TransactionType["Private"] = "private";
|
|
11
|
+
TransactionType["Public"] = "public";
|
|
12
|
+
})(TransactionType || (exports.TransactionType = TransactionType = {}));
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface IPeerInfo {
|
|
2
|
+
name: string;
|
|
3
|
+
stats: IPeerStats;
|
|
4
|
+
activated: string;
|
|
5
|
+
outboundTransport?: string;
|
|
6
|
+
outbound?: any;
|
|
7
|
+
outboundError?: any;
|
|
8
|
+
}
|
|
9
|
+
export interface IPeerStats {
|
|
10
|
+
sentMsgs: number;
|
|
11
|
+
receivedMsgs: number;
|
|
12
|
+
sentBytes: number;
|
|
13
|
+
receivedBytes: number;
|
|
14
|
+
lastSend?: string;
|
|
15
|
+
lastReceive?: string;
|
|
16
|
+
reliableHighestSent: number;
|
|
17
|
+
reliableAckBase: number;
|
|
18
|
+
}
|
|
19
|
+
export interface IReliableMessage {
|
|
20
|
+
sequence: number;
|
|
21
|
+
id: string;
|
|
22
|
+
created: string;
|
|
23
|
+
node: string;
|
|
24
|
+
messageType: string;
|
|
25
|
+
metadata: any;
|
|
26
|
+
ack?: IReliableMessageAck;
|
|
27
|
+
}
|
|
28
|
+
export interface IReliableMessageAck {
|
|
29
|
+
messageId: string;
|
|
30
|
+
time?: string;
|
|
31
|
+
error?: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Verifiers = void 0;
|
|
4
|
+
var Verifiers;
|
|
5
|
+
(function (Verifiers) {
|
|
6
|
+
Verifiers["ETH_ADDRESS"] = "eth_address";
|
|
7
|
+
Verifiers["ETH_ADDRESS_CHECKSUM"] = "eth_address_checksum";
|
|
8
|
+
Verifiers["HEX_ECDSA_PUBKEY_UNCOMPRESSED"] = "hex_ecdsa_pubkey_uncompressed";
|
|
9
|
+
Verifiers["HEX_ECDSA_PUBKEY_UNCOMPRESSED_0X"] = "hex_ecdsa_pubkey_uncompressed_0x";
|
|
10
|
+
})(Verifiers || (exports.Verifiers = Verifiers = {}));
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as http from "http";
|
|
2
|
+
import WebSocket from "ws";
|
|
3
|
+
import { IEventWithData } from "./blockindex";
|
|
4
|
+
import { Logger } from "./logger";
|
|
5
|
+
import { ITransactionReceipt } from "./transaction";
|
|
6
|
+
import { IPrivacyGroupMessage } from "./privacygroups";
|
|
7
|
+
export interface WebSocketSender {
|
|
8
|
+
send: (json: object) => void;
|
|
9
|
+
ack: (subscription: string) => void;
|
|
10
|
+
}
|
|
11
|
+
export interface WebSocketConnectCallback {
|
|
12
|
+
(sender: WebSocketSender): void | Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export interface WebSocketEventCallback<TEvent> {
|
|
15
|
+
(sender: WebSocketSender, event: TEvent): void | Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export interface WebSocketClientOptions<TMessageTypes extends string> {
|
|
18
|
+
url: string;
|
|
19
|
+
username?: string;
|
|
20
|
+
password?: string;
|
|
21
|
+
subscriptions?: WebSocketSubscription<TMessageTypes>[];
|
|
22
|
+
logger?: Logger;
|
|
23
|
+
heartbeatInterval?: number;
|
|
24
|
+
reconnectDelay?: number;
|
|
25
|
+
afterConnect?: WebSocketConnectCallback;
|
|
26
|
+
socketOptions?: WebSocket.ClientOptions | http.ClientRequestArgs;
|
|
27
|
+
}
|
|
28
|
+
export interface WebSocketSubscription<TMessageTypes extends string> {
|
|
29
|
+
type: TMessageTypes;
|
|
30
|
+
name: string;
|
|
31
|
+
}
|
|
32
|
+
export interface WebSocketEvent {
|
|
33
|
+
method: "ptx_subscription" | undefined;
|
|
34
|
+
params: {
|
|
35
|
+
subscription: string;
|
|
36
|
+
result: TransactionReceiptBatch | TransactionEventBatch;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface TransactionReceiptBatch {
|
|
40
|
+
batchId: number;
|
|
41
|
+
receipts: ITransactionReceipt[];
|
|
42
|
+
}
|
|
43
|
+
export interface TransactionEventBatch {
|
|
44
|
+
batchId: number;
|
|
45
|
+
events: IEventWithData[];
|
|
46
|
+
}
|
|
47
|
+
export interface PrivacyGroupWebSocketEvent {
|
|
48
|
+
method: "pgroup_subscription" | undefined;
|
|
49
|
+
params: {
|
|
50
|
+
subscription: string;
|
|
51
|
+
result: IPrivacyGroupMessageBatch;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export interface IPrivacyGroupMessageBatch {
|
|
55
|
+
batchId: number;
|
|
56
|
+
messages: IPrivacyGroupMessage[];
|
|
57
|
+
}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import { ethers, InterfaceAbi } from "ethers";
|
|
3
|
+
import { ActiveFilter, Algorithms, IABIDecodedData, IBlockchainEventListener, IEthAddress, IEventWithData, IKeyMappingAndVerifier, IKeyQueryEntry, INotoDomainReceipt, IPenteDomainReceipt, IPreparedTransaction, IPrivacyGroup, IPrivacyGroupEVMCall, IPrivacyGroupEVMTXInput, IPrivacyGroupInput, IPrivacyGroupMessageInput, IPrivacyGroupMessageListener, IQuery, IRegistryEntry, IRegistryEntryWithProperties, IRegistryProperty, ISchema, IState, IStoredABI, ITransaction, ITransactionCall, ITransactionInput, ITransactionReceipt, ITransactionReceiptListener, ITransactionStates, IWalletInfo, PaladinConfig, StateStatus, Verifiers } from "./interfaces";
|
|
4
|
+
import { PaladinVerifier } from "./verifier";
|
|
5
|
+
export default class PaladinClient {
|
|
6
|
+
protected http: AxiosInstance;
|
|
7
|
+
private logger;
|
|
8
|
+
private onError;
|
|
9
|
+
constructor(options: PaladinConfig);
|
|
10
|
+
getHttpInstance(): AxiosInstance;
|
|
11
|
+
protected defaultHeaders(): {
|
|
12
|
+
Accept: string;
|
|
13
|
+
"Content-Type": string;
|
|
14
|
+
};
|
|
15
|
+
protected defaultPayload(): {
|
|
16
|
+
jsonrpc: string;
|
|
17
|
+
id: number;
|
|
18
|
+
};
|
|
19
|
+
getVerifiers(...lookups: string[]): PaladinVerifier[];
|
|
20
|
+
parseAxiosErrorMessage(err: any): any;
|
|
21
|
+
private post;
|
|
22
|
+
pollForReceipt(txID: string, waitMs: number, full?: boolean): Promise<ITransactionReceipt | undefined>;
|
|
23
|
+
pollForPreparedTransaction(txID: string, waitMs: number): Promise<IPreparedTransaction | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Use ptx.prepareTransaction instead
|
|
26
|
+
*/
|
|
27
|
+
prepareTransaction(transaction: ITransactionInput): Promise<string>;
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Use ptx.sendTransaction instead
|
|
30
|
+
*/
|
|
31
|
+
sendTransaction(transaction: ITransactionInput): Promise<string>;
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated Use ptx.call instead
|
|
34
|
+
*/
|
|
35
|
+
call(transaction: ITransactionCall): Promise<any>;
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated Use ptx.queryTransactions instead
|
|
38
|
+
*/
|
|
39
|
+
queryTransactions(query: IQuery): Promise<ITransaction[]>;
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated Use ptx.getTransaction or ptx.getTransactionFull instead
|
|
42
|
+
*/
|
|
43
|
+
getTransaction(txID: string, full?: boolean): Promise<ITransaction | undefined>;
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated Use ptx.getPreparedTransaction instead
|
|
46
|
+
*/
|
|
47
|
+
getPreparedTransaction(txID: string): Promise<IPreparedTransaction | undefined>;
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated Use ptx.queryTransactionReceipts instead
|
|
50
|
+
*/
|
|
51
|
+
queryTransactionReceipts(query: IQuery): Promise<ITransactionReceipt[]>;
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated Use ptx.getTransactionReceipt or ptx.getTransactionReceiptFull instead
|
|
54
|
+
*/
|
|
55
|
+
getTransactionReceipt(txID: string, full?: boolean): Promise<ITransactionReceipt | undefined>;
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated Use ptx.getStateReceipt instead
|
|
58
|
+
*/
|
|
59
|
+
getStateReceipt(txID: string): Promise<ITransactionStates | undefined>;
|
|
60
|
+
/**
|
|
61
|
+
* @deprecated Use ptx.getDomainReceipt instead
|
|
62
|
+
*/
|
|
63
|
+
getDomainReceipt(domain: string, txID: string): Promise<IPenteDomainReceipt | INotoDomainReceipt | undefined>;
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated Use ptx.resolveVerifier instead
|
|
66
|
+
*/
|
|
67
|
+
resolveVerifier(lookup: string, algorithm: Algorithms | string, verifierType: Verifiers | string): Promise<string>;
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated Use ptx.storeABI instead
|
|
70
|
+
*/
|
|
71
|
+
storeABI(abi: ethers.InterfaceAbi): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* @deprecated Use ptx.getStoredABI instead
|
|
74
|
+
*/
|
|
75
|
+
getStoredABI(hash: string): Promise<IStoredABI>;
|
|
76
|
+
/**
|
|
77
|
+
* @deprecated Use ptx.decodeCall instead
|
|
78
|
+
*/
|
|
79
|
+
decodeCall(callData: string, dataFormat: string): Promise<IABIDecodedData>;
|
|
80
|
+
/**
|
|
81
|
+
* @deprecated Use ptx.decodeEvent instead
|
|
82
|
+
*/
|
|
83
|
+
decodeEvent(topics: string[], data: string): Promise<IABIDecodedData | undefined>;
|
|
84
|
+
/**
|
|
85
|
+
* @deprecated Use ptx.decodeError instead
|
|
86
|
+
*/
|
|
87
|
+
decodeError(revertError: string, dataFormat: string): Promise<IABIDecodedData>;
|
|
88
|
+
/**
|
|
89
|
+
* @deprecated Use bidx.decodeTransactionEvents instead
|
|
90
|
+
*/
|
|
91
|
+
decodeTransactionEvents(transactionHash: string, abi: InterfaceAbi, resultFormat: string): Promise<IEventWithData[]>;
|
|
92
|
+
/**
|
|
93
|
+
* @deprecated Use pstate.listSchemas instead
|
|
94
|
+
*/
|
|
95
|
+
listSchemas(domain: string): Promise<ISchema[]>;
|
|
96
|
+
/**
|
|
97
|
+
* @deprecated Use pstate.queryStates instead
|
|
98
|
+
*/
|
|
99
|
+
queryStates(domain: string, schema: string, query: IQuery, status: StateStatus): Promise<IState[]>;
|
|
100
|
+
/**
|
|
101
|
+
* @deprecated Use pstate.queryContractStates instead
|
|
102
|
+
*/
|
|
103
|
+
queryContractStates(domain: string, contractAddress: string, schema: string, query: IQuery, status: StateStatus): Promise<IState[]>;
|
|
104
|
+
/**
|
|
105
|
+
* @deprecated Use pgroup.createGroup instead
|
|
106
|
+
*/
|
|
107
|
+
createPrivacyGroup(pgroup: IPrivacyGroupInput): Promise<IPrivacyGroup>;
|
|
108
|
+
/**
|
|
109
|
+
* @deprecated Use pgroup.getGroupById instead
|
|
110
|
+
*/
|
|
111
|
+
getPrivacyGroupById(domainName: string, id: string): Promise<IPrivacyGroup>;
|
|
112
|
+
/**
|
|
113
|
+
* @deprecated Use pgroup.getGroupByAddress instead
|
|
114
|
+
*/
|
|
115
|
+
getPrivacyGroupByAddress(address: string): Promise<IPrivacyGroup>;
|
|
116
|
+
/**
|
|
117
|
+
* @deprecated Use pgroup.sendTransaction instead
|
|
118
|
+
*/
|
|
119
|
+
sendPrivacyGroupTransaction(txi: IPrivacyGroupEVMTXInput): Promise<string>;
|
|
120
|
+
/**
|
|
121
|
+
* @deprecated Use pgroup.call instead
|
|
122
|
+
*/
|
|
123
|
+
callPrivacyGroup(txi: IPrivacyGroupEVMCall): Promise<any>;
|
|
124
|
+
/**
|
|
125
|
+
* @deprecated Use ptx.createReceiptListener instead
|
|
126
|
+
*/
|
|
127
|
+
createReceiptListener(listener: ITransactionReceiptListener): Promise<boolean>;
|
|
128
|
+
/**
|
|
129
|
+
* @deprecated Use ptx.deleteReceiptListener instead
|
|
130
|
+
*/
|
|
131
|
+
deleteReceiptListener(name: string): Promise<boolean>;
|
|
132
|
+
/**
|
|
133
|
+
* @deprecated Use ptx.getReceiptListener instead
|
|
134
|
+
*/
|
|
135
|
+
getReceiptListener(name: string): Promise<ITransactionReceiptListener | undefined>;
|
|
136
|
+
/**
|
|
137
|
+
* @deprecated Use ptx.createBlockchainEventListener instead
|
|
138
|
+
*/
|
|
139
|
+
createBlockchainEventListener(listener: IBlockchainEventListener): Promise<boolean>;
|
|
140
|
+
/**
|
|
141
|
+
* @deprecated Use ptx.deleteBlockchainEventListener instead
|
|
142
|
+
*/
|
|
143
|
+
deleteBlockchainEventListener(name: string): Promise<boolean>;
|
|
144
|
+
/**
|
|
145
|
+
* @deprecated Use ptx.getBlockchainEventListener instead
|
|
146
|
+
*/
|
|
147
|
+
getBlockchainEventListener(name: string): Promise<IBlockchainEventListener | undefined>;
|
|
148
|
+
keymgr: {
|
|
149
|
+
wallets: () => Promise<IWalletInfo[]>;
|
|
150
|
+
resolveKey: (identifier: string, algorithm: string, verifierType: string) => Promise<IKeyMappingAndVerifier>;
|
|
151
|
+
resolveEthAddress: (identifier: string) => Promise<IEthAddress>;
|
|
152
|
+
reverseKeyLookup: (algorithm: string, verifierType: string, verifier: string) => Promise<IKeyMappingAndVerifier>;
|
|
153
|
+
queryKeys: (query: IQuery) => Promise<IKeyQueryEntry[]>;
|
|
154
|
+
};
|
|
155
|
+
ptx: {
|
|
156
|
+
sendTransaction: (transaction: ITransactionInput) => Promise<string>;
|
|
157
|
+
sendTransactions: (transactions: ITransactionInput[]) => Promise<string[]>;
|
|
158
|
+
prepareTransaction: (transaction: ITransactionInput) => Promise<string>;
|
|
159
|
+
prepareTransactions: (transactions: ITransactionInput[]) => Promise<string[]>;
|
|
160
|
+
updateTransaction: (id: string, transaction: ITransactionInput) => Promise<string>;
|
|
161
|
+
call: (transaction: ITransactionCall) => Promise<any>;
|
|
162
|
+
getTransaction: (txID: string) => Promise<ITransaction | undefined>;
|
|
163
|
+
getTransactionFull: (txID: string) => Promise<ITransaction | undefined>;
|
|
164
|
+
getTransactionByIdempotencyKey: (idempotencyKey: string) => Promise<ITransaction | undefined>;
|
|
165
|
+
queryTransactions: (query: IQuery) => Promise<ITransaction[]>;
|
|
166
|
+
queryTransactionsFull: (query: IQuery) => Promise<ITransaction[]>;
|
|
167
|
+
queryPendingTransactions: (query: IQuery, full?: boolean) => Promise<ITransaction[]>;
|
|
168
|
+
getTransactionReceipt: (txID: string) => Promise<ITransactionReceipt | undefined>;
|
|
169
|
+
getTransactionReceiptFull: (txID: string) => Promise<ITransactionReceipt | undefined>;
|
|
170
|
+
getDomainReceipt: (domain: string, txID: string) => Promise<IPenteDomainReceipt | INotoDomainReceipt | undefined>;
|
|
171
|
+
getStateReceipt: (txID: string) => Promise<ITransactionStates | undefined>;
|
|
172
|
+
queryTransactionReceipts: (query: IQuery) => Promise<ITransactionReceipt[]>;
|
|
173
|
+
getTransactionDependencies: (txID: string) => Promise<string[] | undefined>;
|
|
174
|
+
queryPublicTransactions: (query: IQuery) => Promise<any[]>;
|
|
175
|
+
queryPendingPublicTransactions: (query: IQuery) => Promise<any[]>;
|
|
176
|
+
getPublicTransactionByNonce: (from: string, nonce: number) => Promise<any>;
|
|
177
|
+
getPublicTransactionByHash: (hash: string) => Promise<any>;
|
|
178
|
+
getPreparedTransaction: (txID: string) => Promise<IPreparedTransaction | undefined>;
|
|
179
|
+
queryPreparedTransactions: (query: IQuery) => Promise<IPreparedTransaction[]>;
|
|
180
|
+
storeABI: (abi: ethers.InterfaceAbi) => Promise<void>;
|
|
181
|
+
getStoredABI: (hash: string) => Promise<IStoredABI>;
|
|
182
|
+
queryStoredABIs: (query: IQuery) => Promise<IStoredABI[]>;
|
|
183
|
+
decodeCall: (callData: string, dataFormat: string) => Promise<IABIDecodedData>;
|
|
184
|
+
decodeEvent: (topics: string[], data: string) => Promise<IABIDecodedData | undefined>;
|
|
185
|
+
decodeError: (revertError: string, dataFormat: string) => Promise<IABIDecodedData>;
|
|
186
|
+
resolveVerifier: (lookup: string, algorithm: Algorithms | string, verifierType: Verifiers | string) => Promise<string>;
|
|
187
|
+
createReceiptListener: (listener: ITransactionReceiptListener) => Promise<boolean>;
|
|
188
|
+
queryReceiptListeners: (query: IQuery) => Promise<ITransactionReceiptListener[]>;
|
|
189
|
+
getReceiptListener: (name: string) => Promise<ITransactionReceiptListener | undefined>;
|
|
190
|
+
startReceiptListener: (name: string) => Promise<boolean>;
|
|
191
|
+
stopReceiptListener: (name: string) => Promise<boolean>;
|
|
192
|
+
deleteReceiptListener: (name: string) => Promise<boolean>;
|
|
193
|
+
createBlockchainEventListener: (listener: IBlockchainEventListener) => Promise<boolean>;
|
|
194
|
+
queryBlockchainEventListeners: (query: IQuery) => Promise<IBlockchainEventListener[]>;
|
|
195
|
+
getBlockchainEventListener: (name: string) => Promise<IBlockchainEventListener | undefined>;
|
|
196
|
+
startBlockchainEventListener: (name: string) => Promise<boolean>;
|
|
197
|
+
stopBlockchainEventListener: (name: string) => Promise<boolean>;
|
|
198
|
+
deleteBlockchainEventListener: (name: string) => Promise<boolean>;
|
|
199
|
+
getBlockchainEventListenerStatus: (name: string) => Promise<any>;
|
|
200
|
+
};
|
|
201
|
+
pstate: {
|
|
202
|
+
listSchemas: (domain: string) => Promise<ISchema[]>;
|
|
203
|
+
getSchemaById: (domain: string, schemaId: string) => Promise<ISchema | undefined>;
|
|
204
|
+
storeState: (domain: string, contractAddress: string, schema: string, data: any) => Promise<IState>;
|
|
205
|
+
queryStates: (domain: string, schema: string, query: IQuery, status: StateStatus) => Promise<IState[]>;
|
|
206
|
+
queryContractStates: (domain: string, contractAddress: string, schema: string, query: IQuery, status: StateStatus) => Promise<IState[]>;
|
|
207
|
+
queryNullifiers: (domain: string, schema: string, query: IQuery, status: StateStatus) => Promise<IState[]>;
|
|
208
|
+
queryContractNullifiers: (domain: string, contractAddress: string, schema: string, query: IQuery, status: StateStatus) => Promise<IState[]>;
|
|
209
|
+
};
|
|
210
|
+
pgroup: {
|
|
211
|
+
createGroup: (pgroup: IPrivacyGroupInput) => Promise<IPrivacyGroup>;
|
|
212
|
+
getGroupById: (domainName: string, id: string) => Promise<IPrivacyGroup>;
|
|
213
|
+
getGroupByAddress: (address: string) => Promise<IPrivacyGroup>;
|
|
214
|
+
queryGroups: (query: IQuery) => Promise<IPrivacyGroup[]>;
|
|
215
|
+
queryGroupsWithMember: (member: string, query: IQuery) => Promise<IPrivacyGroup[]>;
|
|
216
|
+
sendTransaction: (txi: IPrivacyGroupEVMTXInput) => Promise<string>;
|
|
217
|
+
call: (txi: IPrivacyGroupEVMCall) => Promise<any>;
|
|
218
|
+
sendMessage: (msg: IPrivacyGroupMessageInput) => Promise<string>;
|
|
219
|
+
getMessageById: (id: string) => Promise<any>;
|
|
220
|
+
queryMessages: (query: IQuery) => Promise<any[]>;
|
|
221
|
+
createMessageListener: (listener: IPrivacyGroupMessageListener) => Promise<boolean>;
|
|
222
|
+
queryMessageListeners: (query: IQuery) => Promise<IPrivacyGroupMessageListener[]>;
|
|
223
|
+
getMessageListener: (name: string) => Promise<IPrivacyGroupMessageListener | undefined>;
|
|
224
|
+
startMessageListener: (name: string) => Promise<boolean>;
|
|
225
|
+
stopMessageListener: (name: string) => Promise<boolean>;
|
|
226
|
+
deleteMessageListener: (name: string) => Promise<boolean>;
|
|
227
|
+
};
|
|
228
|
+
transport: {
|
|
229
|
+
nodeName: () => Promise<string>;
|
|
230
|
+
localTransports: () => Promise<string[]>;
|
|
231
|
+
localTransportDetails: (transportName: string) => Promise<string>;
|
|
232
|
+
peers: () => Promise<any[]>;
|
|
233
|
+
peerInfo: (nodeName: string) => Promise<any>;
|
|
234
|
+
queryReliableMessages: (query: IQuery) => Promise<any[]>;
|
|
235
|
+
queryReliableMessageAcks: (query: IQuery) => Promise<any[]>;
|
|
236
|
+
};
|
|
237
|
+
domain: {
|
|
238
|
+
listDomains: () => Promise<string[]>;
|
|
239
|
+
getDomain: (name: string) => Promise<any>;
|
|
240
|
+
getDomainByAddress: (address: string) => Promise<any>;
|
|
241
|
+
querySmartContracts: (query: IQuery) => Promise<any[]>;
|
|
242
|
+
getSmartContractByAddress: (address: string) => Promise<any>;
|
|
243
|
+
};
|
|
244
|
+
bidx: {
|
|
245
|
+
getBlockByNumber: (number: number) => Promise<any>;
|
|
246
|
+
getTransactionByHash: (hash: string) => Promise<any>;
|
|
247
|
+
getTransactionByNonce: (from: string, nonce: number) => Promise<any>;
|
|
248
|
+
getBlockTransactionsByNumber: (blockNumber: number) => Promise<any[]>;
|
|
249
|
+
getTransactionEventsByHash: (hash: string) => Promise<any[]>;
|
|
250
|
+
queryIndexedBlocks: (query: IQuery) => Promise<any[]>;
|
|
251
|
+
queryIndexedTransactions: (query: IQuery) => Promise<any[]>;
|
|
252
|
+
queryIndexedEvents: (query: IQuery) => Promise<any[]>;
|
|
253
|
+
getConfirmedBlockHeight: () => Promise<number>;
|
|
254
|
+
decodeTransactionEvents: (transactionHash: string, abi: InterfaceAbi, resultFormat: string) => Promise<IEventWithData[]>;
|
|
255
|
+
};
|
|
256
|
+
debug: {
|
|
257
|
+
getTransactionStatus: (txID: string) => Promise<any>;
|
|
258
|
+
};
|
|
259
|
+
reg: {
|
|
260
|
+
registries: () => Promise<string[]>;
|
|
261
|
+
queryEntries: (registryName: string, query: IQuery, activeFilter: ActiveFilter) => Promise<IRegistryEntry[]>;
|
|
262
|
+
queryEntriesWithProps: (registryName: string, query: IQuery, activeFilter: ActiveFilter) => Promise<IRegistryEntryWithProperties[]>;
|
|
263
|
+
getEntryProperties: (registryName: string, entryId: string, activeFilter: ActiveFilter) => Promise<IRegistryProperty[]>;
|
|
264
|
+
};
|
|
265
|
+
}
|