anchor-sdk 0.1.44-beta.1 → 0.1.44
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/generated/Api.d.ts +600 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +4 -4
- package/dist/react/index.js +2 -2
- package/dist/react/index.js.map +4 -4
- package/dist/typechain/AnchorPay.d.ts +93 -2
- package/dist/typechain/factories/AnchorPay__factory.d.ts +99 -0
- package/package.json +1 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
|
|
2
2
|
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "./common";
|
|
3
3
|
export interface AnchorPayInterface extends Interface {
|
|
4
|
-
getFunction(nameOrSignature: "UPGRADE_INTERFACE_VERSION" | "acceptOwnership" | "getInterfaceImplementer" | "initialize" | "owner" | "pause" | "pendingOwner" | "proxiableUUID" | "renounceOwnership" | "send" | "setInterfaceImplementer" | "transferOwnership" | "unpause" | "upgradeToAndCall"): FunctionFragment;
|
|
5
|
-
getEvent(nameOrSignatureOrTopic: "Initialized" | "InterfaceImplementerSet" | "OwnershipTransferStarted" | "OwnershipTransferred" | "Paid" | "Upgraded"): EventFragment;
|
|
4
|
+
getFunction(nameOrSignature: "UPGRADE_INTERFACE_VERSION" | "acceptOwnership" | "balanceOf" | "depositFor" | "getInterfaceImplementer" | "initialize" | "owner" | "pause" | "pendingOwner" | "proxiableUUID" | "renounceOwnership" | "send" | "setInterfaceImplementer" | "transferOwnership" | "unpause" | "upgradeToAndCall" | "withdraw"): FunctionFragment;
|
|
5
|
+
getEvent(nameOrSignatureOrTopic: "Deposited" | "Initialized" | "InterfaceImplementerSet" | "OwnershipTransferStarted" | "OwnershipTransferred" | "Paid" | "Upgraded" | "Withdrawn"): EventFragment;
|
|
6
6
|
encodeFunctionData(functionFragment: "UPGRADE_INTERFACE_VERSION", values?: undefined): string;
|
|
7
7
|
encodeFunctionData(functionFragment: "acceptOwnership", values?: undefined): string;
|
|
8
|
+
encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike, AddressLike]): string;
|
|
9
|
+
encodeFunctionData(functionFragment: "depositFor", values: [AddressLike, AddressLike, BigNumberish]): string;
|
|
8
10
|
encodeFunctionData(functionFragment: "getInterfaceImplementer", values: [AddressLike, BytesLike]): string;
|
|
9
11
|
encodeFunctionData(functionFragment: "initialize", values: [AddressLike]): string;
|
|
10
12
|
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
|
|
@@ -17,8 +19,11 @@ export interface AnchorPayInterface extends Interface {
|
|
|
17
19
|
encodeFunctionData(functionFragment: "transferOwnership", values: [AddressLike]): string;
|
|
18
20
|
encodeFunctionData(functionFragment: "unpause", values?: undefined): string;
|
|
19
21
|
encodeFunctionData(functionFragment: "upgradeToAndCall", values: [AddressLike, BytesLike]): string;
|
|
22
|
+
encodeFunctionData(functionFragment: "withdraw", values: [AddressLike, BigNumberish]): string;
|
|
20
23
|
decodeFunctionResult(functionFragment: "UPGRADE_INTERFACE_VERSION", data: BytesLike): Result;
|
|
21
24
|
decodeFunctionResult(functionFragment: "acceptOwnership", data: BytesLike): Result;
|
|
25
|
+
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
|
|
26
|
+
decodeFunctionResult(functionFragment: "depositFor", data: BytesLike): Result;
|
|
22
27
|
decodeFunctionResult(functionFragment: "getInterfaceImplementer", data: BytesLike): Result;
|
|
23
28
|
decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
|
|
24
29
|
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
|
|
@@ -31,6 +36,31 @@ export interface AnchorPayInterface extends Interface {
|
|
|
31
36
|
decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result;
|
|
32
37
|
decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result;
|
|
33
38
|
decodeFunctionResult(functionFragment: "upgradeToAndCall", data: BytesLike): Result;
|
|
39
|
+
decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;
|
|
40
|
+
}
|
|
41
|
+
export declare namespace DepositedEvent {
|
|
42
|
+
type InputTuple = [
|
|
43
|
+
from: AddressLike,
|
|
44
|
+
recipient: AddressLike,
|
|
45
|
+
token: AddressLike,
|
|
46
|
+
amount: BigNumberish
|
|
47
|
+
];
|
|
48
|
+
type OutputTuple = [
|
|
49
|
+
from: string,
|
|
50
|
+
recipient: string,
|
|
51
|
+
token: string,
|
|
52
|
+
amount: bigint
|
|
53
|
+
];
|
|
54
|
+
interface OutputObject {
|
|
55
|
+
from: string;
|
|
56
|
+
recipient: string;
|
|
57
|
+
token: string;
|
|
58
|
+
amount: bigint;
|
|
59
|
+
}
|
|
60
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
61
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
62
|
+
type Log = TypedEventLog<Event>;
|
|
63
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
34
64
|
}
|
|
35
65
|
export declare namespace InitializedEvent {
|
|
36
66
|
type InputTuple = [version: BigNumberish];
|
|
@@ -123,6 +153,23 @@ export declare namespace UpgradedEvent {
|
|
|
123
153
|
type Log = TypedEventLog<Event>;
|
|
124
154
|
type LogDescription = TypedLogDescription<Event>;
|
|
125
155
|
}
|
|
156
|
+
export declare namespace WithdrawnEvent {
|
|
157
|
+
type InputTuple = [
|
|
158
|
+
recipient: AddressLike,
|
|
159
|
+
token: AddressLike,
|
|
160
|
+
amount: BigNumberish
|
|
161
|
+
];
|
|
162
|
+
type OutputTuple = [recipient: string, token: string, amount: bigint];
|
|
163
|
+
interface OutputObject {
|
|
164
|
+
recipient: string;
|
|
165
|
+
token: string;
|
|
166
|
+
amount: bigint;
|
|
167
|
+
}
|
|
168
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
169
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
170
|
+
type Log = TypedEventLog<Event>;
|
|
171
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
172
|
+
}
|
|
126
173
|
export interface AnchorPay extends BaseContract {
|
|
127
174
|
connect(runner?: ContractRunner | null): AnchorPay;
|
|
128
175
|
waitForDeployment(): Promise<this>;
|
|
@@ -138,6 +185,19 @@ export interface AnchorPay extends BaseContract {
|
|
|
138
185
|
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
139
186
|
UPGRADE_INTERFACE_VERSION: TypedContractMethod<[], [string], "view">;
|
|
140
187
|
acceptOwnership: TypedContractMethod<[], [void], "nonpayable">;
|
|
188
|
+
balanceOf: TypedContractMethod<[
|
|
189
|
+
account: AddressLike,
|
|
190
|
+
token: AddressLike
|
|
191
|
+
], [
|
|
192
|
+
bigint
|
|
193
|
+
], "view">;
|
|
194
|
+
depositFor: TypedContractMethod<[
|
|
195
|
+
recipient: AddressLike,
|
|
196
|
+
token: AddressLike,
|
|
197
|
+
amount: BigNumberish
|
|
198
|
+
], [
|
|
199
|
+
void
|
|
200
|
+
], "payable">;
|
|
141
201
|
getInterfaceImplementer: TypedContractMethod<[
|
|
142
202
|
account: AddressLike,
|
|
143
203
|
_interfaceHash: BytesLike
|
|
@@ -181,9 +241,28 @@ export interface AnchorPay extends BaseContract {
|
|
|
181
241
|
], [
|
|
182
242
|
void
|
|
183
243
|
], "payable">;
|
|
244
|
+
withdraw: TypedContractMethod<[
|
|
245
|
+
token: AddressLike,
|
|
246
|
+
amount: BigNumberish
|
|
247
|
+
], [
|
|
248
|
+
void
|
|
249
|
+
], "nonpayable">;
|
|
184
250
|
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
185
251
|
getFunction(nameOrSignature: "UPGRADE_INTERFACE_VERSION"): TypedContractMethod<[], [string], "view">;
|
|
186
252
|
getFunction(nameOrSignature: "acceptOwnership"): TypedContractMethod<[], [void], "nonpayable">;
|
|
253
|
+
getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[
|
|
254
|
+
account: AddressLike,
|
|
255
|
+
token: AddressLike
|
|
256
|
+
], [
|
|
257
|
+
bigint
|
|
258
|
+
], "view">;
|
|
259
|
+
getFunction(nameOrSignature: "depositFor"): TypedContractMethod<[
|
|
260
|
+
recipient: AddressLike,
|
|
261
|
+
token: AddressLike,
|
|
262
|
+
amount: BigNumberish
|
|
263
|
+
], [
|
|
264
|
+
void
|
|
265
|
+
], "payable">;
|
|
187
266
|
getFunction(nameOrSignature: "getInterfaceImplementer"): TypedContractMethod<[
|
|
188
267
|
account: AddressLike,
|
|
189
268
|
_interfaceHash: BytesLike
|
|
@@ -219,13 +298,23 @@ export interface AnchorPay extends BaseContract {
|
|
|
219
298
|
], [
|
|
220
299
|
void
|
|
221
300
|
], "payable">;
|
|
301
|
+
getFunction(nameOrSignature: "withdraw"): TypedContractMethod<[
|
|
302
|
+
token: AddressLike,
|
|
303
|
+
amount: BigNumberish
|
|
304
|
+
], [
|
|
305
|
+
void
|
|
306
|
+
], "nonpayable">;
|
|
307
|
+
getEvent(key: "Deposited"): TypedContractEvent<DepositedEvent.InputTuple, DepositedEvent.OutputTuple, DepositedEvent.OutputObject>;
|
|
222
308
|
getEvent(key: "Initialized"): TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject>;
|
|
223
309
|
getEvent(key: "InterfaceImplementerSet"): TypedContractEvent<InterfaceImplementerSetEvent.InputTuple, InterfaceImplementerSetEvent.OutputTuple, InterfaceImplementerSetEvent.OutputObject>;
|
|
224
310
|
getEvent(key: "OwnershipTransferStarted"): TypedContractEvent<OwnershipTransferStartedEvent.InputTuple, OwnershipTransferStartedEvent.OutputTuple, OwnershipTransferStartedEvent.OutputObject>;
|
|
225
311
|
getEvent(key: "OwnershipTransferred"): TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
|
|
226
312
|
getEvent(key: "Paid"): TypedContractEvent<PaidEvent.InputTuple, PaidEvent.OutputTuple, PaidEvent.OutputObject>;
|
|
227
313
|
getEvent(key: "Upgraded"): TypedContractEvent<UpgradedEvent.InputTuple, UpgradedEvent.OutputTuple, UpgradedEvent.OutputObject>;
|
|
314
|
+
getEvent(key: "Withdrawn"): TypedContractEvent<WithdrawnEvent.InputTuple, WithdrawnEvent.OutputTuple, WithdrawnEvent.OutputObject>;
|
|
228
315
|
filters: {
|
|
316
|
+
"Deposited(address,address,address,uint256)": TypedContractEvent<DepositedEvent.InputTuple, DepositedEvent.OutputTuple, DepositedEvent.OutputObject>;
|
|
317
|
+
Deposited: TypedContractEvent<DepositedEvent.InputTuple, DepositedEvent.OutputTuple, DepositedEvent.OutputObject>;
|
|
229
318
|
"Initialized(uint64)": TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject>;
|
|
230
319
|
Initialized: TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject>;
|
|
231
320
|
"InterfaceImplementerSet(address,bytes32,address)": TypedContractEvent<InterfaceImplementerSetEvent.InputTuple, InterfaceImplementerSetEvent.OutputTuple, InterfaceImplementerSetEvent.OutputObject>;
|
|
@@ -238,5 +327,7 @@ export interface AnchorPay extends BaseContract {
|
|
|
238
327
|
Paid: TypedContractEvent<PaidEvent.InputTuple, PaidEvent.OutputTuple, PaidEvent.OutputObject>;
|
|
239
328
|
"Upgraded(address)": TypedContractEvent<UpgradedEvent.InputTuple, UpgradedEvent.OutputTuple, UpgradedEvent.OutputObject>;
|
|
240
329
|
Upgraded: TypedContractEvent<UpgradedEvent.InputTuple, UpgradedEvent.OutputTuple, UpgradedEvent.OutputObject>;
|
|
330
|
+
"Withdrawn(address,address,uint256)": TypedContractEvent<WithdrawnEvent.InputTuple, WithdrawnEvent.OutputTuple, WithdrawnEvent.OutputObject>;
|
|
331
|
+
Withdrawn: TypedContractEvent<WithdrawnEvent.InputTuple, WithdrawnEvent.OutputTuple, WithdrawnEvent.OutputObject>;
|
|
241
332
|
};
|
|
242
333
|
}
|
|
@@ -21,6 +21,42 @@ export declare class AnchorPay__factory {
|
|
|
21
21
|
readonly inputs: readonly [];
|
|
22
22
|
readonly outputs: readonly [];
|
|
23
23
|
readonly stateMutability: "nonpayable";
|
|
24
|
+
}, {
|
|
25
|
+
readonly type: "function";
|
|
26
|
+
readonly name: "balanceOf";
|
|
27
|
+
readonly inputs: readonly [{
|
|
28
|
+
readonly name: "account";
|
|
29
|
+
readonly type: "address";
|
|
30
|
+
readonly internalType: "address";
|
|
31
|
+
}, {
|
|
32
|
+
readonly name: "token";
|
|
33
|
+
readonly type: "address";
|
|
34
|
+
readonly internalType: "address";
|
|
35
|
+
}];
|
|
36
|
+
readonly outputs: readonly [{
|
|
37
|
+
readonly name: "";
|
|
38
|
+
readonly type: "uint256";
|
|
39
|
+
readonly internalType: "uint256";
|
|
40
|
+
}];
|
|
41
|
+
readonly stateMutability: "view";
|
|
42
|
+
}, {
|
|
43
|
+
readonly type: "function";
|
|
44
|
+
readonly name: "depositFor";
|
|
45
|
+
readonly inputs: readonly [{
|
|
46
|
+
readonly name: "recipient";
|
|
47
|
+
readonly type: "address";
|
|
48
|
+
readonly internalType: "address";
|
|
49
|
+
}, {
|
|
50
|
+
readonly name: "token";
|
|
51
|
+
readonly type: "address";
|
|
52
|
+
readonly internalType: "address";
|
|
53
|
+
}, {
|
|
54
|
+
readonly name: "amount";
|
|
55
|
+
readonly type: "uint256";
|
|
56
|
+
readonly internalType: "uint256";
|
|
57
|
+
}];
|
|
58
|
+
readonly outputs: readonly [];
|
|
59
|
+
readonly stateMutability: "payable";
|
|
24
60
|
}, {
|
|
25
61
|
readonly type: "function";
|
|
26
62
|
readonly name: "getInterfaceImplementer";
|
|
@@ -161,6 +197,45 @@ export declare class AnchorPay__factory {
|
|
|
161
197
|
}];
|
|
162
198
|
readonly outputs: readonly [];
|
|
163
199
|
readonly stateMutability: "payable";
|
|
200
|
+
}, {
|
|
201
|
+
readonly type: "function";
|
|
202
|
+
readonly name: "withdraw";
|
|
203
|
+
readonly inputs: readonly [{
|
|
204
|
+
readonly name: "token";
|
|
205
|
+
readonly type: "address";
|
|
206
|
+
readonly internalType: "address";
|
|
207
|
+
}, {
|
|
208
|
+
readonly name: "amount";
|
|
209
|
+
readonly type: "uint256";
|
|
210
|
+
readonly internalType: "uint256";
|
|
211
|
+
}];
|
|
212
|
+
readonly outputs: readonly [];
|
|
213
|
+
readonly stateMutability: "nonpayable";
|
|
214
|
+
}, {
|
|
215
|
+
readonly type: "event";
|
|
216
|
+
readonly name: "Deposited";
|
|
217
|
+
readonly inputs: readonly [{
|
|
218
|
+
readonly name: "from";
|
|
219
|
+
readonly type: "address";
|
|
220
|
+
readonly indexed: true;
|
|
221
|
+
readonly internalType: "address";
|
|
222
|
+
}, {
|
|
223
|
+
readonly name: "recipient";
|
|
224
|
+
readonly type: "address";
|
|
225
|
+
readonly indexed: true;
|
|
226
|
+
readonly internalType: "address";
|
|
227
|
+
}, {
|
|
228
|
+
readonly name: "token";
|
|
229
|
+
readonly type: "address";
|
|
230
|
+
readonly indexed: true;
|
|
231
|
+
readonly internalType: "address";
|
|
232
|
+
}, {
|
|
233
|
+
readonly name: "amount";
|
|
234
|
+
readonly type: "uint256";
|
|
235
|
+
readonly indexed: false;
|
|
236
|
+
readonly internalType: "uint256";
|
|
237
|
+
}];
|
|
238
|
+
readonly anonymous: false;
|
|
164
239
|
}, {
|
|
165
240
|
readonly type: "event";
|
|
166
241
|
readonly name: "Initialized";
|
|
@@ -256,6 +331,26 @@ export declare class AnchorPay__factory {
|
|
|
256
331
|
readonly internalType: "address";
|
|
257
332
|
}];
|
|
258
333
|
readonly anonymous: false;
|
|
334
|
+
}, {
|
|
335
|
+
readonly type: "event";
|
|
336
|
+
readonly name: "Withdrawn";
|
|
337
|
+
readonly inputs: readonly [{
|
|
338
|
+
readonly name: "recipient";
|
|
339
|
+
readonly type: "address";
|
|
340
|
+
readonly indexed: true;
|
|
341
|
+
readonly internalType: "address";
|
|
342
|
+
}, {
|
|
343
|
+
readonly name: "token";
|
|
344
|
+
readonly type: "address";
|
|
345
|
+
readonly indexed: true;
|
|
346
|
+
readonly internalType: "address";
|
|
347
|
+
}, {
|
|
348
|
+
readonly name: "amount";
|
|
349
|
+
readonly type: "uint256";
|
|
350
|
+
readonly indexed: false;
|
|
351
|
+
readonly internalType: "uint256";
|
|
352
|
+
}];
|
|
353
|
+
readonly anonymous: false;
|
|
259
354
|
}, {
|
|
260
355
|
readonly type: "error";
|
|
261
356
|
readonly name: "AddressEmptyCode";
|
|
@@ -284,6 +379,10 @@ export declare class AnchorPay__factory {
|
|
|
284
379
|
readonly type: "error";
|
|
285
380
|
readonly name: "FailedCall";
|
|
286
381
|
readonly inputs: readonly [];
|
|
382
|
+
}, {
|
|
383
|
+
readonly type: "error";
|
|
384
|
+
readonly name: "InsufficientBalance";
|
|
385
|
+
readonly inputs: readonly [];
|
|
287
386
|
}, {
|
|
288
387
|
readonly type: "error";
|
|
289
388
|
readonly name: "InsufficientPayment";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anchor-sdk",
|
|
3
|
-
"version": "0.1.44
|
|
3
|
+
"version": "0.1.44",
|
|
4
4
|
"description": "TypeScript SDK for interacting with Anchor ecosystem - badge minting, payment processing, and ERC1155 token management",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|