@miden-sdk/miden-wallet-adapter-base 0.16.0 → 0.16.3
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/AGENTS.md +77 -0
- package/dist/adapter.js.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/helpers.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/signer.js.map +1 -1
- package/dist/transaction.js.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +9 -3
- package/skills/wallet-adapter-integration/SKILL.md +335 -0
- package/__tests__/adapter.test.ts +0 -82
- package/__tests__/errors.test.ts +0 -100
- package/__tests__/helpers.test.ts +0 -39
- package/__tests__/signer.test.ts +0 -20
- package/__tests__/transaction.test.ts +0 -166
- package/adapter.ts +0 -146
- package/dist/__tests__/adapter.test.d.ts +0 -1
- package/dist/__tests__/adapter.test.js +0 -66
- package/dist/__tests__/adapter.test.js.map +0 -1
- package/dist/__tests__/errors.test.d.ts +0 -1
- package/dist/__tests__/errors.test.js +0 -70
- package/dist/__tests__/errors.test.js.map +0 -1
- package/dist/__tests__/helpers.test.d.ts +0 -1
- package/dist/__tests__/helpers.test.js +0 -35
- package/dist/__tests__/helpers.test.js.map +0 -1
- package/dist/__tests__/signer.test.d.ts +0 -1
- package/dist/__tests__/signer.test.js +0 -18
- package/dist/__tests__/signer.test.js.map +0 -1
- package/dist/__tests__/transaction.test.d.ts +0 -1
- package/dist/__tests__/transaction.test.js +0 -113
- package/dist/__tests__/transaction.test.js.map +0 -1
- package/dist/vitest.config.d.ts +0 -2
- package/dist/vitest.config.js +0 -8
- package/dist/vitest.config.js.map +0 -1
- package/docs/@miden-sdk/namespaces/EventEmitter/README.md +0 -24
- package/docs/@miden-sdk/namespaces/EventEmitter/interfaces/EventEmitterStatic.md +0 -17
- package/docs/@miden-sdk/namespaces/EventEmitter/interfaces/ListenerFn.md +0 -25
- package/docs/@miden-sdk/namespaces/EventEmitter/type-aliases/ArgumentMap.md +0 -15
- package/docs/@miden-sdk/namespaces/EventEmitter/type-aliases/EventArgs.md +0 -19
- package/docs/@miden-sdk/namespaces/EventEmitter/type-aliases/EventListener.md +0 -19
- package/docs/@miden-sdk/namespaces/EventEmitter/type-aliases/EventNames.md +0 -15
- package/docs/@miden-sdk/namespaces/EventEmitter/type-aliases/ValidEventTypes.md +0 -17
- package/docs/@miden-sdk/namespaces/EventEmitter/variables/EventEmitter.md +0 -9
- package/docs/README.md +0 -88
- package/docs/classes/BaseMessageSignerWalletAdapter.md +0 -755
- package/docs/classes/BaseSignerWalletAdapter.md +0 -579
- package/docs/classes/BaseWalletAdapter.md +0 -535
- package/docs/classes/ConsumeTransaction.md +0 -93
- package/docs/classes/CustomTransaction.md +0 -93
- package/docs/classes/EventEmitter.md +0 -305
- package/docs/classes/SendTransaction.md +0 -107
- package/docs/classes/Transaction.md +0 -151
- package/docs/classes/WalletAccountError.md +0 -223
- package/docs/classes/WalletAddressError.md +0 -223
- package/docs/classes/WalletConfigError.md +0 -223
- package/docs/classes/WalletConnectionError.md +0 -223
- package/docs/classes/WalletDecryptionError.md +0 -223
- package/docs/classes/WalletDecryptionNotAllowedError.md +0 -223
- package/docs/classes/WalletDisconnectedError.md +0 -223
- package/docs/classes/WalletDisconnectionError.md +0 -223
- package/docs/classes/WalletError.md +0 -244
- package/docs/classes/WalletKeypairError.md +0 -223
- package/docs/classes/WalletLoadError.md +0 -223
- package/docs/classes/WalletNotConnectedError.md +0 -223
- package/docs/classes/WalletNotReadyError.md +0 -223
- package/docs/classes/WalletNotSelectedError.md +0 -223
- package/docs/classes/WalletPrivateDataPermissionError.md +0 -223
- package/docs/classes/WalletRecordsError.md +0 -223
- package/docs/classes/WalletSendTransactionError.md +0 -223
- package/docs/classes/WalletSignMessageError.md +0 -223
- package/docs/classes/WalletSignTransactionError.md +0 -223
- package/docs/classes/WalletTimeoutError.md +0 -223
- package/docs/classes/WalletTransactionError.md +0 -223
- package/docs/classes/WalletWindowBlockedError.md +0 -223
- package/docs/classes/WalletWindowClosedError.md +0 -223
- package/docs/enumerations/AllowedPrivateData.md +0 -37
- package/docs/enumerations/PrivateDataPermission.md +0 -19
- package/docs/enumerations/TransactionType.md +0 -25
- package/docs/enumerations/WalletAdapterNetwork.md +0 -19
- package/docs/enumerations/WalletReadyState.md +0 -49
- package/docs/functions/b64ToU8.md +0 -19
- package/docs/functions/scopePollingDetectionStrategy.md +0 -19
- package/docs/functions/u8ToB64.md +0 -19
- package/docs/interfaces/Asset.md +0 -19
- package/docs/interfaces/IFailedTransactionOutput.md +0 -13
- package/docs/interfaces/MessageSignerWalletAdapterProps.md +0 -293
- package/docs/interfaces/MidenConsumeTransaction.md +0 -37
- package/docs/interfaces/MidenCustomTransaction.md +0 -37
- package/docs/interfaces/MidenSendTransaction.md +0 -43
- package/docs/interfaces/MidenTransaction.md +0 -19
- package/docs/interfaces/SignerWalletAdapterProps.md +0 -149
- package/docs/interfaces/TransactionOutput.md +0 -19
- package/docs/interfaces/WalletAdapterEvents.md +0 -69
- package/docs/interfaces/WalletAdapterProps.md +0 -106
- package/docs/interfaces/WalletTransactionSuccessOutput.md +0 -19
- package/docs/type-aliases/Adapter.md +0 -9
- package/docs/type-aliases/FungibleAssetDetails.md +0 -21
- package/docs/type-aliases/InputNoteDetails.md +0 -45
- package/docs/type-aliases/MessageSignerWalletAdapter.md +0 -15
- package/docs/type-aliases/NoteTypeString.md +0 -9
- package/docs/type-aliases/SignKind.md +0 -9
- package/docs/type-aliases/SignerWalletAdapter.md +0 -15
- package/docs/type-aliases/SupportedTransactionVersions.md +0 -9
- package/docs/type-aliases/TransactionOrVersionedTransaction.md +0 -15
- package/docs/type-aliases/TransactionPayload.md +0 -9
- package/docs/type-aliases/WalletAdapter.md +0 -15
- package/docs/type-aliases/WalletName.md +0 -21
- package/docs/type-aliases/WalletTransactionOutput.md +0 -9
- package/errors.ts +0 -97
- package/helpers.ts +0 -28
- package/index.ts +0 -6
- package/signer.ts +0 -84
- package/transaction.ts +0 -178
- package/tsconfig.json +0 -15
- package/types.ts +0 -93
- package/vitest.config.ts +0 -8
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "vitest";
|
|
2
|
-
describe("GuardianInfo", () => {
|
|
3
|
-
it("has the agreed shape", () => {
|
|
4
|
-
const g = {
|
|
5
|
-
isGuardianAccount: false,
|
|
6
|
-
guardianEndpoint: null,
|
|
7
|
-
guardianProvider: null,
|
|
8
|
-
guardianSyncStatus: null,
|
|
9
|
-
};
|
|
10
|
-
expect(Object.keys(g).sort()).toEqual([
|
|
11
|
-
"guardianEndpoint",
|
|
12
|
-
"guardianProvider",
|
|
13
|
-
"guardianSyncStatus",
|
|
14
|
-
"isGuardianAccount",
|
|
15
|
-
]);
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
//# sourceMappingURL=signer.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"signer.test.js","sourceRoot":"","sources":["../../__tests__/signer.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAG9C,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,sBAAsB,EAAE,GAAG,EAAE;QAC9B,MAAM,CAAC,GAAiB;YACtB,iBAAiB,EAAE,KAAK;YACxB,gBAAgB,EAAE,IAAI;YACtB,gBAAgB,EAAE,IAAI;YACtB,kBAAkB,EAAE,IAAI;SACzB,CAAC;QAEF,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC;YACpC,kBAAkB;YAClB,kBAAkB;YAClB,oBAAoB;YACpB,mBAAmB;SACpB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, vi } from "vitest";
|
|
2
|
-
import { SendTransaction, ConsumeTransaction, CustomTransaction, Transaction, TransactionType, } from "../transaction";
|
|
3
|
-
import { u8ToB64 } from "../helpers";
|
|
4
|
-
describe("TransactionType enum", () => {
|
|
5
|
-
it("has correct values", () => {
|
|
6
|
-
expect(TransactionType.Send).toBe("send");
|
|
7
|
-
expect(TransactionType.Consume).toBe("consume");
|
|
8
|
-
expect(TransactionType.Custom).toBe("custom");
|
|
9
|
-
});
|
|
10
|
-
});
|
|
11
|
-
describe("SendTransaction", () => {
|
|
12
|
-
it("sets all fields correctly", () => {
|
|
13
|
-
const tx = new SendTransaction("sender-addr", "recipient-addr", "faucet-123", "public", 1000);
|
|
14
|
-
expect(tx.senderAddress).toBe("sender-addr");
|
|
15
|
-
expect(tx.recipientAddress).toBe("recipient-addr");
|
|
16
|
-
expect(tx.faucetId).toBe("faucet-123");
|
|
17
|
-
expect(tx.noteType).toBe("public");
|
|
18
|
-
expect(tx.amount).toBe(1000);
|
|
19
|
-
expect(tx.recallBlocks).toBeUndefined();
|
|
20
|
-
});
|
|
21
|
-
it("sets optional recallBlocks", () => {
|
|
22
|
-
const tx = new SendTransaction("sender", "recipient", "faucet", "private", 500, 10);
|
|
23
|
-
expect(tx.recallBlocks).toBe(10);
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
describe("ConsumeTransaction", () => {
|
|
27
|
-
it("sets fields correctly", () => {
|
|
28
|
-
const tx = new ConsumeTransaction("faucet-1", "note-1", "public", 100);
|
|
29
|
-
expect(tx.faucetId).toBe("faucet-1");
|
|
30
|
-
expect(tx.noteId).toBe("note-1");
|
|
31
|
-
expect(tx.noteType).toBe("public");
|
|
32
|
-
expect(tx.amount).toBe(100);
|
|
33
|
-
expect(tx.noteBytes).toBeUndefined();
|
|
34
|
-
});
|
|
35
|
-
it("converts noteBytes Uint8Array to base64", () => {
|
|
36
|
-
const bytes = new Uint8Array([1, 2, 3]);
|
|
37
|
-
const tx = new ConsumeTransaction("faucet", "note", "private", 50, bytes);
|
|
38
|
-
expect(tx.noteBytes).toBe(u8ToB64(bytes));
|
|
39
|
-
});
|
|
40
|
-
it("leaves noteBytes undefined when not provided", () => {
|
|
41
|
-
const tx = new ConsumeTransaction("faucet", "note", "public", 50);
|
|
42
|
-
expect(tx.noteBytes).toBeUndefined();
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
describe("CustomTransaction", () => {
|
|
46
|
-
it("serializes transactionRequest to base64", () => {
|
|
47
|
-
const mockBytes = new Uint8Array([10, 20, 30]);
|
|
48
|
-
const mockRequest = {
|
|
49
|
-
serialize: vi.fn().mockReturnValue(mockBytes),
|
|
50
|
-
};
|
|
51
|
-
const tx = new CustomTransaction("addr", "recipient", mockRequest);
|
|
52
|
-
expect(mockRequest.serialize).toHaveBeenCalled();
|
|
53
|
-
expect(tx.transactionRequest).toBe(u8ToB64(mockBytes));
|
|
54
|
-
expect(tx.address).toBe("addr");
|
|
55
|
-
expect(tx.recipientAddress).toBe("recipient");
|
|
56
|
-
});
|
|
57
|
-
it("sets optional inputNoteIds", () => {
|
|
58
|
-
const mockRequest = {
|
|
59
|
-
serialize: vi.fn().mockReturnValue(new Uint8Array([1])),
|
|
60
|
-
};
|
|
61
|
-
const tx = new CustomTransaction("addr", "recipient", mockRequest, [
|
|
62
|
-
"id1",
|
|
63
|
-
"id2",
|
|
64
|
-
]);
|
|
65
|
-
expect(tx.inputNoteIds).toEqual(["id1", "id2"]);
|
|
66
|
-
});
|
|
67
|
-
it("converts importNotes from Uint8Array[] to base64 strings", () => {
|
|
68
|
-
const mockRequest = {
|
|
69
|
-
serialize: vi.fn().mockReturnValue(new Uint8Array([1])),
|
|
70
|
-
};
|
|
71
|
-
const noteBytes = [new Uint8Array([4, 5]), new Uint8Array([6, 7])];
|
|
72
|
-
const tx = new CustomTransaction("addr", "recipient", mockRequest, ["id1"], noteBytes);
|
|
73
|
-
expect(tx.importNotes).toEqual([
|
|
74
|
-
u8ToB64(noteBytes[0]),
|
|
75
|
-
u8ToB64(noteBytes[1]),
|
|
76
|
-
]);
|
|
77
|
-
});
|
|
78
|
-
it("leaves optional fields undefined when not provided", () => {
|
|
79
|
-
const mockRequest = {
|
|
80
|
-
serialize: vi.fn().mockReturnValue(new Uint8Array([1])),
|
|
81
|
-
};
|
|
82
|
-
const tx = new CustomTransaction("addr", "recipient", mockRequest);
|
|
83
|
-
expect(tx.inputNoteIds).toBeUndefined();
|
|
84
|
-
expect(tx.importNotes).toBeUndefined();
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
describe("Transaction factory", () => {
|
|
88
|
-
it("createSendTransaction returns correct type and payload", () => {
|
|
89
|
-
const tx = Transaction.createSendTransaction("sender", "recipient", "faucet", "public", 100);
|
|
90
|
-
expect(tx.type).toBe(TransactionType.Send);
|
|
91
|
-
expect(tx.payload).toBeInstanceOf(SendTransaction);
|
|
92
|
-
const payload = tx.payload;
|
|
93
|
-
expect(payload.senderAddress).toBe("sender");
|
|
94
|
-
expect(payload.amount).toBe(100);
|
|
95
|
-
});
|
|
96
|
-
it("createConsumeTransaction returns correct type and payload", () => {
|
|
97
|
-
const tx = Transaction.createConsumeTransaction("faucet", "note-id", "private", 200);
|
|
98
|
-
expect(tx.type).toBe(TransactionType.Consume);
|
|
99
|
-
expect(tx.payload).toBeInstanceOf(ConsumeTransaction);
|
|
100
|
-
const payload = tx.payload;
|
|
101
|
-
expect(payload.faucetId).toBe("faucet");
|
|
102
|
-
expect(payload.noteId).toBe("note-id");
|
|
103
|
-
});
|
|
104
|
-
it("createCustomTransaction returns correct type and payload", () => {
|
|
105
|
-
const mockRequest = {
|
|
106
|
-
serialize: vi.fn().mockReturnValue(new Uint8Array([1, 2])),
|
|
107
|
-
};
|
|
108
|
-
const tx = Transaction.createCustomTransaction("addr", "recipient", mockRequest);
|
|
109
|
-
expect(tx.type).toBe(TransactionType.Custom);
|
|
110
|
-
expect(tx.payload).toBeInstanceOf(CustomTransaction);
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
//# sourceMappingURL=transaction.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.test.js","sourceRoot":"","sources":["../../__tests__/transaction.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACX,eAAe,GAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,oBAAoB,EAAE,GAAG,EAAE;QAC5B,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC1C,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAChD,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,2BAA2B,EAAE,GAAG,EAAE;QACnC,MAAM,EAAE,GAAG,IAAI,eAAe,CAC5B,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,IAAI,CACL,CAAC;QACF,MAAM,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC7C,MAAM,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACnD,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,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AC9C,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;QACtD,MAAM,OAAO,GAAG,EAAE,CAAC,OAA6B,CAAC;QACjD,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACxC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;QAClE,MAAM,WAAW,GAAG;YAClB,SAAS,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SACpD,CAAC;QACT,MAAM,EAAE,GAAG,WAAW,CAAC,uBAAuB,CAC5C,MAAM,EACN,WAAW,EACX,WAAW,CACZ,CAAC;QACF,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAC7C,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/vitest.config.d.ts
DELETED
package/dist/vitest.config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vitest.config.js","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,eAAe,YAAY,CAAC;IAC1B,IAAI,EAAE;QACJ,WAAW,EAAE,OAAO;QACpB,OAAO,EAAE,IAAI;KACd;CACF,CAAC,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
[**@miden-sdk/miden-wallet-adapter-base**](../../../README.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[@miden-sdk/miden-wallet-adapter-base](../../../README.md) / EventEmitter
|
|
6
|
-
|
|
7
|
-
# EventEmitter
|
|
8
|
-
|
|
9
|
-
## Interfaces
|
|
10
|
-
|
|
11
|
-
- [EventEmitterStatic](interfaces/EventEmitterStatic.md)
|
|
12
|
-
- [ListenerFn](interfaces/ListenerFn.md)
|
|
13
|
-
|
|
14
|
-
## Type Aliases
|
|
15
|
-
|
|
16
|
-
- [ArgumentMap](type-aliases/ArgumentMap.md)
|
|
17
|
-
- [EventArgs](type-aliases/EventArgs.md)
|
|
18
|
-
- [EventListener](type-aliases/EventListener.md)
|
|
19
|
-
- [EventNames](type-aliases/EventNames.md)
|
|
20
|
-
- [ValidEventTypes](type-aliases/ValidEventTypes.md)
|
|
21
|
-
|
|
22
|
-
## Variables
|
|
23
|
-
|
|
24
|
-
- [EventEmitter](variables/EventEmitter.md)
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
[**@miden-sdk/miden-wallet-adapter-base**](../../../../README.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[@miden-sdk/miden-wallet-adapter-base](../../../../README.md) / [EventEmitter](../README.md) / EventEmitterStatic
|
|
6
|
-
|
|
7
|
-
# Interface: EventEmitterStatic
|
|
8
|
-
|
|
9
|
-
## Constructors
|
|
10
|
-
|
|
11
|
-
### Constructor
|
|
12
|
-
|
|
13
|
-
> **new EventEmitterStatic**\<`EventTypes`, `Context`\>(): [`EventEmitter`](../../../../classes/EventEmitter.md)\<`EventTypes`, `Context`\>
|
|
14
|
-
|
|
15
|
-
#### Returns
|
|
16
|
-
|
|
17
|
-
[`EventEmitter`](../../../../classes/EventEmitter.md)\<`EventTypes`, `Context`\>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
[**@miden-sdk/miden-wallet-adapter-base**](../../../../README.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[@miden-sdk/miden-wallet-adapter-base](../../../../README.md) / [EventEmitter](../README.md) / ListenerFn
|
|
6
|
-
|
|
7
|
-
# Interface: ListenerFn()\<Args\>
|
|
8
|
-
|
|
9
|
-
## Type Parameters
|
|
10
|
-
|
|
11
|
-
### Args
|
|
12
|
-
|
|
13
|
-
`Args` *extends* `any`[] = `any`[]
|
|
14
|
-
|
|
15
|
-
> **ListenerFn**(...`args`): `void`
|
|
16
|
-
|
|
17
|
-
## Parameters
|
|
18
|
-
|
|
19
|
-
### args
|
|
20
|
-
|
|
21
|
-
...`Args`
|
|
22
|
-
|
|
23
|
-
## Returns
|
|
24
|
-
|
|
25
|
-
`void`
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
[**@miden-sdk/miden-wallet-adapter-base**](../../../../README.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[@miden-sdk/miden-wallet-adapter-base](../../../../README.md) / [EventEmitter](../README.md) / ArgumentMap
|
|
6
|
-
|
|
7
|
-
# Type Alias: ArgumentMap\<T\>
|
|
8
|
-
|
|
9
|
-
> **ArgumentMap**\<`T`\> = `{ [K in keyof T]: T[K] extends (args: any[]) => void ? Parameters<T[K]> : T[K] extends any[] ? T[K] : any[] }`
|
|
10
|
-
|
|
11
|
-
## Type Parameters
|
|
12
|
-
|
|
13
|
-
### T
|
|
14
|
-
|
|
15
|
-
`T` *extends* `object`
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
[**@miden-sdk/miden-wallet-adapter-base**](../../../../README.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[@miden-sdk/miden-wallet-adapter-base](../../../../README.md) / [EventEmitter](../README.md) / EventArgs
|
|
6
|
-
|
|
7
|
-
# Type Alias: EventArgs\<T, K\>
|
|
8
|
-
|
|
9
|
-
> **EventArgs**\<`T`, `K`\> = `Parameters`\<[`EventListener`](EventListener.md)\<`T`, `K`\>\>
|
|
10
|
-
|
|
11
|
-
## Type Parameters
|
|
12
|
-
|
|
13
|
-
### T
|
|
14
|
-
|
|
15
|
-
`T` *extends* [`ValidEventTypes`](ValidEventTypes.md)
|
|
16
|
-
|
|
17
|
-
### K
|
|
18
|
-
|
|
19
|
-
`K` *extends* [`EventNames`](EventNames.md)\<`T`\>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
[**@miden-sdk/miden-wallet-adapter-base**](../../../../README.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[@miden-sdk/miden-wallet-adapter-base](../../../../README.md) / [EventEmitter](../README.md) / EventListener
|
|
6
|
-
|
|
7
|
-
# Type Alias: EventListener\<T, K\>
|
|
8
|
-
|
|
9
|
-
> **EventListener**\<`T`, `K`\> = `T` *extends* `string` \| `symbol` ? (...`args`) => `void` : (...`args`) => `void`
|
|
10
|
-
|
|
11
|
-
## Type Parameters
|
|
12
|
-
|
|
13
|
-
### T
|
|
14
|
-
|
|
15
|
-
`T` *extends* [`ValidEventTypes`](ValidEventTypes.md)
|
|
16
|
-
|
|
17
|
-
### K
|
|
18
|
-
|
|
19
|
-
`K` *extends* [`EventNames`](EventNames.md)\<`T`\>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
[**@miden-sdk/miden-wallet-adapter-base**](../../../../README.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[@miden-sdk/miden-wallet-adapter-base](../../../../README.md) / [EventEmitter](../README.md) / EventNames
|
|
6
|
-
|
|
7
|
-
# Type Alias: EventNames\<T\>
|
|
8
|
-
|
|
9
|
-
> **EventNames**\<`T`\> = `T` *extends* `string` \| `symbol` ? `T` : keyof `T`
|
|
10
|
-
|
|
11
|
-
## Type Parameters
|
|
12
|
-
|
|
13
|
-
### T
|
|
14
|
-
|
|
15
|
-
`T` *extends* [`ValidEventTypes`](ValidEventTypes.md)
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
[**@miden-sdk/miden-wallet-adapter-base**](../../../../README.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[@miden-sdk/miden-wallet-adapter-base](../../../../README.md) / [EventEmitter](../README.md) / ValidEventTypes
|
|
6
|
-
|
|
7
|
-
# Type Alias: ValidEventTypes
|
|
8
|
-
|
|
9
|
-
> **ValidEventTypes** = `string` \| `symbol` \| `object`
|
|
10
|
-
|
|
11
|
-
`object` should be in either of the following forms:
|
|
12
|
-
```
|
|
13
|
-
interface EventTypes {
|
|
14
|
-
'event-with-parameters': any[]
|
|
15
|
-
'event-with-example-handler': (...args: any[]) => void
|
|
16
|
-
}
|
|
17
|
-
```
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
[**@miden-sdk/miden-wallet-adapter-base**](../../../../README.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[@miden-sdk/miden-wallet-adapter-base](../../../../README.md) / [EventEmitter](../README.md) / EventEmitter
|
|
6
|
-
|
|
7
|
-
# Variable: EventEmitter
|
|
8
|
-
|
|
9
|
-
> `const` **EventEmitter**: [`EventEmitterStatic`](../interfaces/EventEmitterStatic.md)
|
package/docs/README.md
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
**@miden-sdk/miden-wallet-adapter-base**
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
# @miden-sdk/miden-wallet-adapter-base
|
|
6
|
-
|
|
7
|
-
## Namespaces
|
|
8
|
-
|
|
9
|
-
- [EventEmitter](@miden-sdk/namespaces/EventEmitter/README.md)
|
|
10
|
-
|
|
11
|
-
## Enumerations
|
|
12
|
-
|
|
13
|
-
- [AllowedPrivateData](enumerations/AllowedPrivateData.md)
|
|
14
|
-
- [PrivateDataPermission](enumerations/PrivateDataPermission.md)
|
|
15
|
-
- [TransactionType](enumerations/TransactionType.md)
|
|
16
|
-
- [WalletAdapterNetwork](enumerations/WalletAdapterNetwork.md)
|
|
17
|
-
- [WalletReadyState](enumerations/WalletReadyState.md)
|
|
18
|
-
|
|
19
|
-
## Classes
|
|
20
|
-
|
|
21
|
-
- [BaseMessageSignerWalletAdapter](classes/BaseMessageSignerWalletAdapter.md)
|
|
22
|
-
- [BaseSignerWalletAdapter](classes/BaseSignerWalletAdapter.md)
|
|
23
|
-
- [BaseWalletAdapter](classes/BaseWalletAdapter.md)
|
|
24
|
-
- [ConsumeTransaction](classes/ConsumeTransaction.md)
|
|
25
|
-
- [CustomTransaction](classes/CustomTransaction.md)
|
|
26
|
-
- [EventEmitter](classes/EventEmitter.md)
|
|
27
|
-
- [SendTransaction](classes/SendTransaction.md)
|
|
28
|
-
- [Transaction](classes/Transaction.md)
|
|
29
|
-
- [WalletAccountError](classes/WalletAccountError.md)
|
|
30
|
-
- [WalletAddressError](classes/WalletAddressError.md)
|
|
31
|
-
- [WalletConfigError](classes/WalletConfigError.md)
|
|
32
|
-
- [WalletConnectionError](classes/WalletConnectionError.md)
|
|
33
|
-
- [WalletDecryptionError](classes/WalletDecryptionError.md)
|
|
34
|
-
- [WalletDecryptionNotAllowedError](classes/WalletDecryptionNotAllowedError.md)
|
|
35
|
-
- [WalletDisconnectedError](classes/WalletDisconnectedError.md)
|
|
36
|
-
- [WalletDisconnectionError](classes/WalletDisconnectionError.md)
|
|
37
|
-
- [WalletError](classes/WalletError.md)
|
|
38
|
-
- [WalletKeypairError](classes/WalletKeypairError.md)
|
|
39
|
-
- [WalletLoadError](classes/WalletLoadError.md)
|
|
40
|
-
- [WalletNotConnectedError](classes/WalletNotConnectedError.md)
|
|
41
|
-
- [WalletNotReadyError](classes/WalletNotReadyError.md)
|
|
42
|
-
- [WalletNotSelectedError](classes/WalletNotSelectedError.md)
|
|
43
|
-
- [WalletPrivateDataPermissionError](classes/WalletPrivateDataPermissionError.md)
|
|
44
|
-
- [WalletRecordsError](classes/WalletRecordsError.md)
|
|
45
|
-
- [WalletSendTransactionError](classes/WalletSendTransactionError.md)
|
|
46
|
-
- [WalletSignMessageError](classes/WalletSignMessageError.md)
|
|
47
|
-
- [WalletSignTransactionError](classes/WalletSignTransactionError.md)
|
|
48
|
-
- [WalletTimeoutError](classes/WalletTimeoutError.md)
|
|
49
|
-
- [WalletTransactionError](classes/WalletTransactionError.md)
|
|
50
|
-
- [WalletWindowBlockedError](classes/WalletWindowBlockedError.md)
|
|
51
|
-
- [WalletWindowClosedError](classes/WalletWindowClosedError.md)
|
|
52
|
-
|
|
53
|
-
## Interfaces
|
|
54
|
-
|
|
55
|
-
- [Asset](interfaces/Asset.md)
|
|
56
|
-
- [IFailedTransactionOutput](interfaces/IFailedTransactionOutput.md)
|
|
57
|
-
- [MessageSignerWalletAdapterProps](interfaces/MessageSignerWalletAdapterProps.md)
|
|
58
|
-
- [MidenConsumeTransaction](interfaces/MidenConsumeTransaction.md)
|
|
59
|
-
- [MidenCustomTransaction](interfaces/MidenCustomTransaction.md)
|
|
60
|
-
- [MidenSendTransaction](interfaces/MidenSendTransaction.md)
|
|
61
|
-
- [MidenTransaction](interfaces/MidenTransaction.md)
|
|
62
|
-
- [SignerWalletAdapterProps](interfaces/SignerWalletAdapterProps.md)
|
|
63
|
-
- [TransactionOutput](interfaces/TransactionOutput.md)
|
|
64
|
-
- [WalletAdapterEvents](interfaces/WalletAdapterEvents.md)
|
|
65
|
-
- [WalletAdapterProps](interfaces/WalletAdapterProps.md)
|
|
66
|
-
- [WalletTransactionSuccessOutput](interfaces/WalletTransactionSuccessOutput.md)
|
|
67
|
-
|
|
68
|
-
## Type Aliases
|
|
69
|
-
|
|
70
|
-
- [Adapter](type-aliases/Adapter.md)
|
|
71
|
-
- [FungibleAssetDetails](type-aliases/FungibleAssetDetails.md)
|
|
72
|
-
- [InputNoteDetails](type-aliases/InputNoteDetails.md)
|
|
73
|
-
- [MessageSignerWalletAdapter](type-aliases/MessageSignerWalletAdapter.md)
|
|
74
|
-
- [NoteTypeString](type-aliases/NoteTypeString.md)
|
|
75
|
-
- [SignerWalletAdapter](type-aliases/SignerWalletAdapter.md)
|
|
76
|
-
- [SignKind](type-aliases/SignKind.md)
|
|
77
|
-
- [SupportedTransactionVersions](type-aliases/SupportedTransactionVersions.md)
|
|
78
|
-
- [TransactionOrVersionedTransaction](type-aliases/TransactionOrVersionedTransaction.md)
|
|
79
|
-
- [TransactionPayload](type-aliases/TransactionPayload.md)
|
|
80
|
-
- [WalletAdapter](type-aliases/WalletAdapter.md)
|
|
81
|
-
- [WalletName](type-aliases/WalletName.md)
|
|
82
|
-
- [WalletTransactionOutput](type-aliases/WalletTransactionOutput.md)
|
|
83
|
-
|
|
84
|
-
## Functions
|
|
85
|
-
|
|
86
|
-
- [b64ToU8](functions/b64ToU8.md)
|
|
87
|
-
- [scopePollingDetectionStrategy](functions/scopePollingDetectionStrategy.md)
|
|
88
|
-
- [u8ToB64](functions/u8ToB64.md)
|