@metamask/snaps-jest 8.2.0 → 8.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/CHANGELOG.md +20 -1
- package/README.md +2 -2
- package/dist/environment.cjs +96 -0
- package/dist/environment.cjs.map +1 -0
- package/dist/{types/environment.d.ts → environment.d.cts} +5 -4
- package/dist/environment.d.cts.map +1 -0
- package/dist/environment.d.mts +53 -0
- package/dist/environment.d.mts.map +1 -0
- package/dist/environment.mjs +94 -44
- package/dist/environment.mjs.map +1 -1
- package/dist/global.cjs +4 -0
- package/dist/global.cjs.map +1 -0
- package/dist/{types/global.d.ts → global.d.cts} +2 -1
- package/dist/global.d.cts.map +1 -0
- package/dist/global.d.mts +70 -0
- package/dist/global.d.mts.map +1 -0
- package/dist/global.mjs +2 -1
- package/dist/global.mjs.map +1 -1
- package/dist/helpers.cjs +240 -0
- package/dist/helpers.cjs.map +1 -0
- package/dist/{types/helpers.d.ts → helpers.d.cts} +47 -4
- package/dist/helpers.d.cts.map +1 -0
- package/dist/helpers.d.mts +132 -0
- package/dist/helpers.d.mts.map +1 -0
- package/dist/helpers.mjs +228 -42
- package/dist/helpers.mjs.map +1 -1
- package/dist/index.cjs +29 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +6 -53
- package/dist/index.mjs.map +1 -1
- package/dist/internals/environment.cjs +18 -0
- package/dist/internals/environment.cjs.map +1 -0
- package/dist/{types/internals/environment.d.ts → internals/environment.d.cts} +1 -0
- package/dist/internals/environment.d.cts.map +1 -0
- package/dist/internals/environment.d.mts +8 -0
- package/dist/internals/environment.d.mts.map +1 -0
- package/dist/internals/environment.mjs +13 -7
- package/dist/internals/environment.mjs.map +1 -1
- package/dist/internals/index.cjs +23 -0
- package/dist/internals/index.cjs.map +1 -0
- package/dist/internals/index.d.cts +7 -0
- package/dist/internals/index.d.cts.map +1 -0
- package/dist/internals/index.d.mts +7 -0
- package/dist/internals/index.d.mts.map +1 -0
- package/dist/internals/index.mjs +6 -141
- package/dist/internals/index.mjs.map +1 -1
- package/dist/internals/logger.cjs +6 -0
- package/dist/internals/logger.cjs.map +1 -0
- package/dist/{types/internals/logger.d.ts → internals/logger.d.cts} +1 -0
- package/dist/internals/logger.d.cts.map +1 -0
- package/dist/internals/logger.d.mts +3 -0
- package/dist/internals/logger.d.mts.map +1 -0
- package/dist/internals/logger.mjs +2 -7
- package/dist/internals/logger.mjs.map +1 -1
- package/dist/internals/request.cjs +143 -0
- package/dist/internals/request.cjs.map +1 -0
- package/dist/{types/internals/request.d.ts → internals/request.d.cts} +8 -7
- package/dist/internals/request.d.cts.map +1 -0
- package/dist/internals/request.d.mts +56 -0
- package/dist/internals/request.d.mts.map +1 -0
- package/dist/internals/request.mjs +137 -41
- package/dist/internals/request.mjs.map +1 -1
- package/dist/internals/server.cjs +74 -0
- package/dist/internals/server.cjs.map +1 -0
- package/dist/{types/internals/server.d.ts → internals/server.d.cts} +4 -3
- package/dist/internals/server.d.cts.map +1 -0
- package/dist/internals/server.d.mts +15 -0
- package/dist/internals/server.d.mts.map +1 -0
- package/dist/internals/server.mjs +73 -8
- package/dist/internals/server.mjs.map +1 -1
- package/dist/internals/simulation/constants.cjs +21 -0
- package/dist/internals/simulation/constants.cjs.map +1 -0
- package/dist/{types/internals/simulation/constants.d.ts → internals/simulation/constants.d.cts} +5 -0
- package/dist/internals/simulation/constants.d.cts.map +1 -0
- package/dist/internals/simulation/constants.d.mts +18 -0
- package/dist/internals/simulation/constants.d.mts.map +1 -0
- package/dist/internals/simulation/constants.mjs +17 -11
- package/dist/internals/simulation/constants.mjs.map +1 -1
- package/dist/internals/simulation/controllers.cjs +101 -0
- package/dist/internals/simulation/controllers.cjs.map +1 -0
- package/dist/{types/internals/simulation/controllers.d.ts → internals/simulation/controllers.d.cts} +15 -14
- package/dist/internals/simulation/controllers.d.cts.map +1 -0
- package/dist/internals/simulation/controllers.d.mts +41 -0
- package/dist/internals/simulation/controllers.d.mts.map +1 -0
- package/dist/internals/simulation/controllers.mjs +95 -24
- package/dist/internals/simulation/controllers.mjs.map +1 -1
- package/dist/internals/simulation/files.cjs +94 -0
- package/dist/internals/simulation/files.cjs.map +1 -0
- package/dist/{types/internals/simulation/files.d.ts → internals/simulation/files.d.cts} +6 -4
- package/dist/internals/simulation/files.d.cts.map +1 -0
- package/dist/internals/simulation/files.d.mts +49 -0
- package/dist/internals/simulation/files.d.mts.map +1 -0
- package/dist/internals/simulation/files.mjs +90 -13
- package/dist/internals/simulation/files.mjs.map +1 -1
- package/dist/internals/simulation/index.cjs +22 -0
- package/dist/internals/simulation/index.cjs.map +1 -0
- package/dist/internals/simulation/index.d.cts +6 -0
- package/dist/internals/simulation/index.d.cts.map +1 -0
- package/dist/internals/simulation/index.d.mts +6 -0
- package/dist/internals/simulation/index.d.mts.map +1 -0
- package/dist/internals/simulation/index.mjs +5 -102
- package/dist/internals/simulation/index.mjs.map +1 -1
- package/dist/internals/simulation/interface.cjs +527 -0
- package/dist/internals/simulation/interface.cjs.map +1 -0
- package/dist/{types/internals/simulation/interface.d.ts → internals/simulation/interface.d.cts} +38 -10
- package/dist/internals/simulation/interface.d.cts.map +1 -0
- package/dist/internals/simulation/interface.d.mts +152 -0
- package/dist/internals/simulation/interface.d.mts.map +1 -0
- package/dist/internals/simulation/interface.mjs +512 -30
- package/dist/internals/simulation/interface.mjs.map +1 -1
- package/dist/internals/simulation/methods/constants.cjs +72 -0
- package/dist/internals/simulation/methods/constants.cjs.map +1 -0
- package/dist/{types/internals/simulation/methods/constants.d.ts → internals/simulation/methods/constants.d.cts} +1 -0
- package/dist/internals/simulation/methods/constants.d.cts.map +1 -0
- package/dist/internals/simulation/methods/constants.d.mts +11 -0
- package/dist/internals/simulation/methods/constants.d.mts.map +1 -0
- package/dist/internals/simulation/methods/constants.mjs +68 -11
- package/dist/internals/simulation/methods/constants.mjs.map +1 -1
- package/dist/internals/simulation/methods/hooks/get-preferences.cjs +18 -0
- package/dist/internals/simulation/methods/hooks/get-preferences.cjs.map +1 -0
- package/dist/internals/simulation/methods/hooks/get-preferences.d.cts +14 -0
- package/dist/internals/simulation/methods/hooks/get-preferences.d.cts.map +1 -0
- package/dist/internals/simulation/methods/hooks/get-preferences.d.mts +14 -0
- package/dist/internals/simulation/methods/hooks/get-preferences.d.mts.map +1 -0
- package/dist/internals/simulation/methods/hooks/get-preferences.mjs +14 -0
- package/dist/internals/simulation/methods/hooks/get-preferences.mjs.map +1 -0
- package/dist/internals/simulation/methods/hooks/index.cjs +22 -0
- package/dist/internals/simulation/methods/hooks/index.cjs.map +1 -0
- package/dist/internals/simulation/methods/hooks/index.d.cts +6 -0
- package/dist/internals/simulation/methods/hooks/index.d.cts.map +1 -0
- package/dist/internals/simulation/methods/hooks/index.d.mts +6 -0
- package/dist/internals/simulation/methods/hooks/index.d.mts.map +1 -0
- package/dist/internals/simulation/methods/hooks/index.mjs +5 -38
- package/dist/internals/simulation/methods/hooks/index.mjs.map +1 -1
- package/dist/internals/simulation/methods/hooks/interface.cjs +24 -0
- package/dist/internals/simulation/methods/hooks/interface.cjs.map +1 -0
- package/dist/{types/internals/simulation/methods/hooks/interface.d.ts → internals/simulation/methods/hooks/interface.d.cts} +3 -2
- package/dist/internals/simulation/methods/hooks/interface.d.cts.map +1 -0
- package/dist/internals/simulation/methods/hooks/interface.d.mts +17 -0
- package/dist/internals/simulation/methods/hooks/interface.d.mts.map +1 -0
- package/dist/internals/simulation/methods/hooks/interface.mjs +18 -9
- package/dist/internals/simulation/methods/hooks/interface.mjs.map +1 -1
- package/dist/internals/simulation/methods/hooks/notifications.cjs +58 -0
- package/dist/internals/simulation/methods/hooks/notifications.cjs.map +1 -0
- package/dist/{types/internals/simulation/methods/hooks/notifications.d.ts → internals/simulation/methods/hooks/notifications.d.cts} +5 -4
- package/dist/internals/simulation/methods/hooks/notifications.d.cts.map +1 -0
- package/dist/internals/simulation/methods/hooks/notifications.d.mts +17 -0
- package/dist/internals/simulation/methods/hooks/notifications.d.mts.map +1 -0
- package/dist/internals/simulation/methods/hooks/notifications.mjs +54 -15
- package/dist/internals/simulation/methods/hooks/notifications.mjs.map +1 -1
- package/dist/internals/simulation/methods/hooks/request-user-approval.cjs +38 -0
- package/dist/internals/simulation/methods/hooks/request-user-approval.cjs.map +1 -0
- package/dist/internals/simulation/methods/hooks/request-user-approval.d.cts +16 -0
- package/dist/internals/simulation/methods/hooks/request-user-approval.d.cts.map +1 -0
- package/dist/internals/simulation/methods/hooks/request-user-approval.d.mts +16 -0
- package/dist/internals/simulation/methods/hooks/request-user-approval.d.mts.map +1 -0
- package/dist/internals/simulation/methods/hooks/request-user-approval.mjs +35 -0
- package/dist/internals/simulation/methods/hooks/request-user-approval.mjs.map +1 -0
- package/dist/internals/simulation/methods/hooks/state.cjs +84 -0
- package/dist/internals/simulation/methods/hooks/state.cjs.map +1 -0
- package/dist/{types/internals/simulation/methods/hooks/state.d.ts → internals/simulation/methods/hooks/state.d.cts} +3 -2
- package/dist/internals/simulation/methods/hooks/state.d.cts.map +1 -0
- package/dist/internals/simulation/methods/hooks/state.d.mts +24 -0
- package/dist/internals/simulation/methods/hooks/state.d.mts.map +1 -0
- package/dist/internals/simulation/methods/hooks/state.mjs +78 -17
- package/dist/internals/simulation/methods/hooks/state.mjs.map +1 -1
- package/dist/internals/simulation/methods/index.cjs +18 -0
- package/dist/internals/simulation/methods/index.cjs.map +1 -0
- package/dist/internals/simulation/methods/index.d.cts +2 -0
- package/dist/internals/simulation/methods/index.d.cts.map +1 -0
- package/dist/internals/simulation/methods/index.d.mts +2 -0
- package/dist/internals/simulation/methods/index.d.mts.map +1 -0
- package/dist/internals/simulation/methods/index.mjs +1 -27
- package/dist/internals/simulation/methods/index.mjs.map +1 -1
- package/dist/internals/simulation/methods/specifications.cjs +85 -0
- package/dist/internals/simulation/methods/specifications.cjs.map +1 -0
- package/dist/{types/internals/simulation/methods/specifications.d.ts → internals/simulation/methods/specifications.d.cts} +8 -7
- package/dist/internals/simulation/methods/specifications.d.cts.map +1 -0
- package/dist/internals/simulation/methods/specifications.d.mts +57 -0
- package/dist/internals/simulation/methods/specifications.d.mts.map +1 -0
- package/dist/internals/simulation/methods/specifications.mjs +77 -26
- package/dist/internals/simulation/methods/specifications.mjs.map +1 -1
- package/dist/internals/simulation/middleware/engine.cjs +37 -0
- package/dist/internals/simulation/middleware/engine.cjs.map +1 -0
- package/dist/{types/internals/simulation/middleware/engine.d.ts → internals/simulation/middleware/engine.d.cts} +8 -7
- package/dist/internals/simulation/middleware/engine.d.cts.map +1 -0
- package/dist/internals/simulation/middleware/engine.d.mts +27 -0
- package/dist/internals/simulation/middleware/engine.d.mts.map +1 -0
- package/dist/internals/simulation/middleware/engine.mjs +33 -14
- package/dist/internals/simulation/middleware/engine.mjs.map +1 -1
- package/dist/internals/simulation/middleware/index.cjs +18 -0
- package/dist/internals/simulation/middleware/index.cjs.map +1 -0
- package/dist/internals/simulation/middleware/index.d.cts +2 -0
- package/dist/internals/simulation/middleware/index.d.cts.map +1 -0
- package/dist/internals/simulation/middleware/index.d.mts +2 -0
- package/dist/internals/simulation/middleware/index.d.mts.map +1 -0
- package/dist/internals/simulation/middleware/index.mjs +1 -15
- package/dist/internals/simulation/middleware/index.mjs.map +1 -1
- package/dist/internals/simulation/middleware/internal-methods/accounts.cjs +34 -0
- package/dist/internals/simulation/middleware/internal-methods/accounts.cjs.map +1 -0
- package/dist/{types/internals/simulation/middleware/internal-methods/accounts.d.ts → internals/simulation/middleware/internal-methods/accounts.d.cts} +5 -3
- package/dist/internals/simulation/middleware/internal-methods/accounts.d.cts.map +1 -0
- package/dist/internals/simulation/middleware/internal-methods/accounts.d.mts +20 -0
- package/dist/internals/simulation/middleware/internal-methods/accounts.d.mts.map +1 -0
- package/dist/internals/simulation/middleware/internal-methods/accounts.mjs +29 -7
- package/dist/internals/simulation/middleware/internal-methods/accounts.mjs.map +1 -1
- package/dist/internals/simulation/middleware/internal-methods/index.cjs +18 -0
- package/dist/internals/simulation/middleware/internal-methods/index.cjs.map +1 -0
- package/dist/internals/simulation/middleware/internal-methods/index.d.cts +2 -0
- package/dist/internals/simulation/middleware/internal-methods/index.d.cts.map +1 -0
- package/dist/internals/simulation/middleware/internal-methods/index.d.mts +2 -0
- package/dist/internals/simulation/middleware/internal-methods/index.d.mts.map +1 -0
- package/dist/internals/simulation/middleware/internal-methods/index.mjs +1 -10
- package/dist/internals/simulation/middleware/internal-methods/index.mjs.map +1 -1
- package/dist/internals/simulation/middleware/internal-methods/middleware.cjs +44 -0
- package/dist/internals/simulation/middleware/internal-methods/middleware.cjs.map +1 -0
- package/dist/{types/internals/simulation/middleware/internal-methods/middleware.d.ts → internals/simulation/middleware/internal-methods/middleware.d.cts} +4 -3
- package/dist/internals/simulation/middleware/internal-methods/middleware.d.cts.map +1 -0
- package/dist/internals/simulation/middleware/internal-methods/middleware.d.mts +23 -0
- package/dist/internals/simulation/middleware/internal-methods/middleware.d.mts.map +1 -0
- package/dist/internals/simulation/middleware/internal-methods/middleware.mjs +38 -8
- package/dist/internals/simulation/middleware/internal-methods/middleware.mjs.map +1 -1
- package/dist/internals/simulation/middleware/internal-methods/provider-state.cjs +28 -0
- package/dist/internals/simulation/middleware/internal-methods/provider-state.cjs.map +1 -0
- package/dist/{types/internals/simulation/middleware/internal-methods/provider-state.d.ts → internals/simulation/middleware/internal-methods/provider-state.d.cts} +4 -2
- package/dist/internals/simulation/middleware/internal-methods/provider-state.d.cts.map +1 -0
- package/dist/internals/simulation/middleware/internal-methods/provider-state.d.mts +16 -0
- package/dist/internals/simulation/middleware/internal-methods/provider-state.d.mts.map +1 -0
- package/dist/internals/simulation/middleware/internal-methods/provider-state.mjs +23 -7
- package/dist/internals/simulation/middleware/internal-methods/provider-state.mjs.map +1 -1
- package/dist/internals/simulation/middleware/mock.cjs +22 -0
- package/dist/internals/simulation/middleware/mock.cjs.map +1 -0
- package/dist/{types/internals/simulation/middleware/mock.d.ts → internals/simulation/middleware/mock.d.cts} +4 -3
- package/dist/internals/simulation/middleware/mock.d.cts.map +1 -0
- package/dist/internals/simulation/middleware/mock.d.mts +11 -0
- package/dist/internals/simulation/middleware/mock.d.mts.map +1 -0
- package/dist/internals/simulation/middleware/mock.mjs +17 -8
- package/dist/internals/simulation/middleware/mock.mjs.map +1 -1
- package/dist/internals/simulation/options.cjs +25 -0
- package/dist/internals/simulation/options.cjs.map +1 -0
- package/dist/{types/internals/simulation/options.d.ts → internals/simulation/options.d.cts} +11 -8
- package/dist/internals/simulation/options.d.cts.map +1 -0
- package/dist/internals/simulation/options.d.mts +40 -0
- package/dist/internals/simulation/options.d.mts.map +1 -0
- package/dist/internals/simulation/options.mjs +20 -8
- package/dist/internals/simulation/options.mjs.map +1 -1
- package/dist/internals/simulation/simulation.cjs +155 -0
- package/dist/internals/simulation/simulation.cjs.map +1 -0
- package/dist/{types/internals/simulation/simulation.d.ts → internals/simulation/simulation.d.cts} +18 -13
- package/dist/internals/simulation/simulation.d.cts.map +1 -0
- package/dist/internals/simulation/simulation.d.mts +103 -0
- package/dist/internals/simulation/simulation.d.mts.map +1 -0
- package/dist/internals/simulation/simulation.mjs +149 -37
- package/dist/internals/simulation/simulation.mjs.map +1 -1
- package/dist/internals/simulation/store/index.cjs +21 -0
- package/dist/internals/simulation/store/index.cjs.map +1 -0
- package/dist/internals/simulation/store/index.d.cts +5 -0
- package/dist/internals/simulation/store/index.d.cts.map +1 -0
- package/dist/internals/simulation/store/index.d.mts +5 -0
- package/dist/internals/simulation/store/index.d.mts.map +1 -0
- package/dist/internals/simulation/store/index.mjs +4 -43
- package/dist/internals/simulation/store/index.mjs.map +1 -1
- package/dist/internals/simulation/store/mocks.cjs +39 -0
- package/dist/internals/simulation/store/mocks.cjs.map +1 -0
- package/dist/{types/internals/simulation/store/mocks.d.ts → internals/simulation/store/mocks.d.cts} +8 -7
- package/dist/internals/simulation/store/mocks.d.cts.map +1 -0
- package/dist/internals/simulation/store/mocks.d.mts +36 -0
- package/dist/internals/simulation/store/mocks.d.mts.map +1 -0
- package/dist/internals/simulation/store/mocks.mjs +33 -14
- package/dist/internals/simulation/store/mocks.mjs.map +1 -1
- package/dist/internals/simulation/store/notifications.cjs +35 -0
- package/dist/internals/simulation/store/notifications.cjs.map +1 -0
- package/dist/{types/internals/simulation/store/notifications.d.ts → internals/simulation/store/notifications.d.cts} +8 -7
- package/dist/internals/simulation/store/notifications.d.cts.map +1 -0
- package/dist/internals/simulation/store/notifications.d.mts +45 -0
- package/dist/internals/simulation/store/notifications.d.mts.map +1 -0
- package/dist/internals/simulation/store/notifications.mjs +30 -14
- package/dist/internals/simulation/store/notifications.mjs.map +1 -1
- package/dist/internals/simulation/store/state.cjs +54 -0
- package/dist/internals/simulation/store/state.cjs.map +1 -0
- package/dist/{types/internals/simulation/store/state.d.ts → internals/simulation/store/state.d.cts} +7 -6
- package/dist/internals/simulation/store/state.d.cts.map +1 -0
- package/dist/internals/simulation/store/state.d.mts +56 -0
- package/dist/internals/simulation/store/state.d.mts.map +1 -0
- package/dist/internals/simulation/store/state.mjs +48 -12
- package/dist/internals/simulation/store/state.mjs.map +1 -1
- package/dist/internals/simulation/store/store.cjs +51 -0
- package/dist/internals/simulation/store/store.cjs.map +1 -0
- package/dist/{types/internals/simulation/store/store.d.ts → internals/simulation/store/store.d.cts} +6 -5
- package/dist/internals/simulation/store/store.d.cts.map +1 -0
- package/dist/internals/simulation/store/store.d.mts +22 -0
- package/dist/internals/simulation/store/store.d.mts.map +1 -0
- package/dist/internals/simulation/store/store.mjs +44 -11
- package/dist/internals/simulation/store/store.mjs.map +1 -1
- package/dist/internals/simulation/store/ui.cjs +24 -0
- package/dist/internals/simulation/store/ui.cjs.map +1 -0
- package/dist/{types/internals/simulation/store/ui.d.ts → internals/simulation/store/ui.d.cts} +9 -7
- package/dist/internals/simulation/store/ui.d.cts.map +1 -0
- package/dist/internals/simulation/store/ui.d.mts +27 -0
- package/dist/internals/simulation/store/ui.d.mts.map +1 -0
- package/dist/internals/simulation/store/ui.mjs +19 -14
- package/dist/internals/simulation/store/ui.mjs.map +1 -1
- package/dist/internals/structs.cjs +157 -0
- package/dist/internals/structs.cjs.map +1 -0
- package/dist/{types/internals/structs.d.ts → internals/structs.d.cts} +67 -66
- package/dist/internals/structs.d.cts.map +1 -0
- package/dist/internals/structs.d.mts +205 -0
- package/dist/internals/structs.d.mts.map +1 -0
- package/dist/internals/structs.mjs +153 -21
- package/dist/internals/structs.mjs.map +1 -1
- package/dist/matchers.cjs +160 -0
- package/dist/matchers.cjs.map +1 -0
- package/dist/{types/matchers.d.ts → matchers.d.cts} +4 -13
- package/dist/matchers.d.cts.map +1 -0
- package/dist/matchers.d.mts +28 -0
- package/dist/matchers.d.mts.map +1 -0
- package/dist/matchers.mjs +152 -49
- package/dist/matchers.mjs.map +1 -1
- package/dist/options.cjs +24 -0
- package/dist/options.cjs.map +1 -0
- package/dist/{types/options.d.ts → options.d.cts} +8 -7
- package/dist/options.d.cts.map +1 -0
- package/dist/options.d.mts +61 -0
- package/dist/options.d.mts.map +1 -0
- package/dist/options.mjs +19 -7
- package/dist/options.mjs.map +1 -1
- package/dist/setup.cjs +7 -0
- package/dist/setup.cjs.map +1 -0
- package/dist/setup.d.cts +2 -0
- package/dist/setup.d.cts.map +1 -0
- package/dist/setup.d.mts +2 -0
- package/dist/setup.d.mts.map +1 -0
- package/dist/setup.mjs +4 -37
- package/dist/setup.mjs.map +1 -1
- package/dist/types/index.cjs +18 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.cts +2 -0
- package/dist/types/index.d.cts.map +1 -0
- package/dist/types/index.d.mts +2 -0
- package/dist/types/index.d.mts.map +1 -0
- package/dist/types/index.mjs +2 -0
- package/dist/types/index.mjs.map +1 -0
- package/dist/types/types.cjs +3 -0
- package/dist/types/types.cjs.map +1 -0
- package/dist/types/{types.d.ts → types.d.cts} +66 -26
- package/dist/types/types.d.cts.map +1 -0
- package/dist/types/types.d.mts +386 -0
- package/dist/types/types.d.mts.map +1 -0
- package/dist/types/types.mjs +2 -0
- package/dist/types/types.mjs.map +1 -0
- package/jest-preset.js +1 -1
- package/package.json +32 -30
- package/dist/chunk-265BMFM5.js +0 -13
- package/dist/chunk-265BMFM5.js.map +0 -1
- package/dist/chunk-2JTGBHPR.js +0 -14
- package/dist/chunk-2JTGBHPR.js.map +0 -1
- package/dist/chunk-2YE2P5BZ.js +0 -36
- package/dist/chunk-2YE2P5BZ.js.map +0 -1
- package/dist/chunk-3FNLFVV2.js +0 -15
- package/dist/chunk-3FNLFVV2.js.map +0 -1
- package/dist/chunk-3M4GRUMH.mjs +0 -54
- package/dist/chunk-3M4GRUMH.mjs.map +0 -1
- package/dist/chunk-43HRTFLS.mjs +0 -421
- package/dist/chunk-43HRTFLS.mjs.map +0 -1
- package/dist/chunk-44ARQBXS.js +0 -95
- package/dist/chunk-44ARQBXS.js.map +0 -1
- package/dist/chunk-4MAA7WGJ.js +0 -153
- package/dist/chunk-4MAA7WGJ.js.map +0 -1
- package/dist/chunk-55J6XMHW.js +0 -1
- package/dist/chunk-55J6XMHW.js.map +0 -1
- package/dist/chunk-57SGDM5B.mjs +0 -69
- package/dist/chunk-57SGDM5B.mjs.map +0 -1
- package/dist/chunk-5SGLRSWR.mjs +0 -153
- package/dist/chunk-5SGLRSWR.mjs.map +0 -1
- package/dist/chunk-5U5WB3SM.mjs +0 -41
- package/dist/chunk-5U5WB3SM.mjs.map +0 -1
- package/dist/chunk-5ZFHFICZ.mjs +0 -1
- package/dist/chunk-5ZFHFICZ.mjs.map +0 -1
- package/dist/chunk-6HHV6YFQ.mjs +0 -1
- package/dist/chunk-6HHV6YFQ.mjs.map +0 -1
- package/dist/chunk-6KXCBUNZ.mjs +0 -11
- package/dist/chunk-6KXCBUNZ.mjs.map +0 -1
- package/dist/chunk-74TIKA2T.mjs +0 -34
- package/dist/chunk-74TIKA2T.mjs.map +0 -1
- package/dist/chunk-7Y27L2EV.js +0 -211
- package/dist/chunk-7Y27L2EV.js.map +0 -1
- package/dist/chunk-ALRZENWP.mjs +0 -42
- package/dist/chunk-ALRZENWP.mjs.map +0 -1
- package/dist/chunk-B73P64TE.mjs +0 -28
- package/dist/chunk-B73P64TE.mjs.map +0 -1
- package/dist/chunk-CKRORVDW.js +0 -1
- package/dist/chunk-CKRORVDW.js.map +0 -1
- package/dist/chunk-CYPP66I7.mjs +0 -163
- package/dist/chunk-CYPP66I7.mjs.map +0 -1
- package/dist/chunk-DR6Y7IVX.js +0 -1
- package/dist/chunk-DR6Y7IVX.js.map +0 -1
- package/dist/chunk-DVDAOXO7.js +0 -134
- package/dist/chunk-DVDAOXO7.js.map +0 -1
- package/dist/chunk-EMTW3H54.js +0 -20
- package/dist/chunk-EMTW3H54.js.map +0 -1
- package/dist/chunk-FP4H3ADT.mjs +0 -20
- package/dist/chunk-FP4H3ADT.mjs.map +0 -1
- package/dist/chunk-FQWOVTBB.mjs +0 -22
- package/dist/chunk-FQWOVTBB.mjs.map +0 -1
- package/dist/chunk-GECE47HW.js +0 -1
- package/dist/chunk-GECE47HW.js.map +0 -1
- package/dist/chunk-GG2BCPQH.mjs +0 -95
- package/dist/chunk-GG2BCPQH.mjs.map +0 -1
- package/dist/chunk-GMTKFAWO.js +0 -42
- package/dist/chunk-GMTKFAWO.js.map +0 -1
- package/dist/chunk-GVTDUKXK.js +0 -421
- package/dist/chunk-GVTDUKXK.js.map +0 -1
- package/dist/chunk-H2464AXT.mjs +0 -33
- package/dist/chunk-H2464AXT.mjs.map +0 -1
- package/dist/chunk-HOI6FPLR.mjs +0 -240
- package/dist/chunk-HOI6FPLR.mjs.map +0 -1
- package/dist/chunk-HROOL3VI.js +0 -1
- package/dist/chunk-HROOL3VI.js.map +0 -1
- package/dist/chunk-IH7UNS5A.mjs +0 -36
- package/dist/chunk-IH7UNS5A.mjs.map +0 -1
- package/dist/chunk-IVFVB4VR.js +0 -163
- package/dist/chunk-IVFVB4VR.js.map +0 -1
- package/dist/chunk-IWJ4HKDR.mjs +0 -50
- package/dist/chunk-IWJ4HKDR.mjs.map +0 -1
- package/dist/chunk-IXKO6X55.mjs +0 -15
- package/dist/chunk-IXKO6X55.mjs.map +0 -1
- package/dist/chunk-J3I5KZIF.js +0 -22
- package/dist/chunk-J3I5KZIF.js.map +0 -1
- package/dist/chunk-J4ZPUCLX.mjs +0 -8
- package/dist/chunk-J4ZPUCLX.mjs.map +0 -1
- package/dist/chunk-JMDSN227.mjs +0 -25
- package/dist/chunk-JMDSN227.mjs.map +0 -1
- package/dist/chunk-KIQOUUEZ.mjs +0 -1
- package/dist/chunk-KIQOUUEZ.mjs.map +0 -1
- package/dist/chunk-KNJNL723.mjs +0 -39
- package/dist/chunk-KNJNL723.mjs.map +0 -1
- package/dist/chunk-KSIBNOB2.mjs +0 -13
- package/dist/chunk-KSIBNOB2.mjs.map +0 -1
- package/dist/chunk-LACTK6EO.js +0 -33
- package/dist/chunk-LACTK6EO.js.map +0 -1
- package/dist/chunk-LB4R3BUA.mjs +0 -36
- package/dist/chunk-LB4R3BUA.mjs.map +0 -1
- package/dist/chunk-LBC2OGSN.js +0 -48
- package/dist/chunk-LBC2OGSN.js.map +0 -1
- package/dist/chunk-MAT5SBM7.mjs +0 -211
- package/dist/chunk-MAT5SBM7.mjs.map +0 -1
- package/dist/chunk-MBQHVBLA.js +0 -89
- package/dist/chunk-MBQHVBLA.js.map +0 -1
- package/dist/chunk-MF43OG3Z.mjs +0 -1
- package/dist/chunk-MF43OG3Z.mjs.map +0 -1
- package/dist/chunk-MPZOXW6I.mjs +0 -48
- package/dist/chunk-MPZOXW6I.mjs.map +0 -1
- package/dist/chunk-N6MAO223.js +0 -60
- package/dist/chunk-N6MAO223.js.map +0 -1
- package/dist/chunk-NSMTFK33.mjs +0 -104
- package/dist/chunk-NSMTFK33.mjs.map +0 -1
- package/dist/chunk-NTOY6Y4Q.mjs +0 -1
- package/dist/chunk-NTOY6Y4Q.mjs.map +0 -1
- package/dist/chunk-O24GTINW.mjs +0 -134
- package/dist/chunk-O24GTINW.mjs.map +0 -1
- package/dist/chunk-ORO3T6BU.mjs +0 -24
- package/dist/chunk-ORO3T6BU.mjs.map +0 -1
- package/dist/chunk-PHUTP7NB.js +0 -25
- package/dist/chunk-PHUTP7NB.js.map +0 -1
- package/dist/chunk-PZDTZGSI.js +0 -34
- package/dist/chunk-PZDTZGSI.js.map +0 -1
- package/dist/chunk-Q2OQXAUM.mjs +0 -35
- package/dist/chunk-Q2OQXAUM.mjs.map +0 -1
- package/dist/chunk-RAMAN5RM.js +0 -24
- package/dist/chunk-RAMAN5RM.js.map +0 -1
- package/dist/chunk-RQKT6BQ2.mjs +0 -1
- package/dist/chunk-RQKT6BQ2.mjs.map +0 -1
- package/dist/chunk-S2HLITUN.js +0 -1
- package/dist/chunk-S2HLITUN.js.map +0 -1
- package/dist/chunk-SB5EPHE3.js +0 -41
- package/dist/chunk-SB5EPHE3.js.map +0 -1
- package/dist/chunk-SLU4FNKX.mjs +0 -60
- package/dist/chunk-SLU4FNKX.mjs.map +0 -1
- package/dist/chunk-SW65QYFV.js +0 -50
- package/dist/chunk-SW65QYFV.js.map +0 -1
- package/dist/chunk-T2PHS5FY.js +0 -28
- package/dist/chunk-T2PHS5FY.js.map +0 -1
- package/dist/chunk-TGZ7WOTJ.mjs +0 -1
- package/dist/chunk-TGZ7WOTJ.mjs.map +0 -1
- package/dist/chunk-TMAWGVZP.mjs +0 -89
- package/dist/chunk-TMAWGVZP.mjs.map +0 -1
- package/dist/chunk-TZB4LBT7.js +0 -8
- package/dist/chunk-TZB4LBT7.js.map +0 -1
- package/dist/chunk-UDOXICJK.mjs +0 -1
- package/dist/chunk-UDOXICJK.mjs.map +0 -1
- package/dist/chunk-VHJZERIC.js +0 -1
- package/dist/chunk-VHJZERIC.js.map +0 -1
- package/dist/chunk-VOYBI6T4.mjs +0 -22
- package/dist/chunk-VOYBI6T4.mjs.map +0 -1
- package/dist/chunk-VXPCUDBI.js +0 -36
- package/dist/chunk-VXPCUDBI.js.map +0 -1
- package/dist/chunk-WDYPMEZB.js +0 -22
- package/dist/chunk-WDYPMEZB.js.map +0 -1
- package/dist/chunk-WHGYMK5B.js +0 -1
- package/dist/chunk-WHGYMK5B.js.map +0 -1
- package/dist/chunk-WMLSD6B5.js +0 -54
- package/dist/chunk-WMLSD6B5.js.map +0 -1
- package/dist/chunk-WRKY2DLV.js +0 -104
- package/dist/chunk-WRKY2DLV.js.map +0 -1
- package/dist/chunk-XAOCS6ZD.js +0 -69
- package/dist/chunk-XAOCS6ZD.js.map +0 -1
- package/dist/chunk-XK5HPZZC.mjs +0 -14
- package/dist/chunk-XK5HPZZC.mjs.map +0 -1
- package/dist/chunk-XKJHFUHE.js +0 -11
- package/dist/chunk-XKJHFUHE.js.map +0 -1
- package/dist/chunk-XWGECIXI.js +0 -39
- package/dist/chunk-XWGECIXI.js.map +0 -1
- package/dist/chunk-Y3JC4WGW.js +0 -35
- package/dist/chunk-Y3JC4WGW.js.map +0 -1
- package/dist/chunk-YNUVT3HC.js +0 -240
- package/dist/chunk-YNUVT3HC.js.map +0 -1
- package/dist/chunk-ZG33OGC3.mjs +0 -1
- package/dist/chunk-ZG33OGC3.mjs.map +0 -1
- package/dist/chunk-ZTX624YO.js +0 -1
- package/dist/chunk-ZTX624YO.js.map +0 -1
- package/dist/environment.js +0 -46
- package/dist/environment.js.map +0 -1
- package/dist/global.js +0 -2
- package/dist/global.js.map +0 -1
- package/dist/helpers.js +0 -43
- package/dist/helpers.js.map +0 -1
- package/dist/index.js +0 -54
- package/dist/index.js.map +0 -1
- package/dist/internals/environment.js +0 -8
- package/dist/internals/environment.js.map +0 -1
- package/dist/internals/index.js +0 -142
- package/dist/internals/index.js.map +0 -1
- package/dist/internals/logger.js +0 -8
- package/dist/internals/logger.js.map +0 -1
- package/dist/internals/request.js +0 -42
- package/dist/internals/request.js.map +0 -1
- package/dist/internals/server.js +0 -9
- package/dist/internals/server.js.map +0 -1
- package/dist/internals/simulation/constants.js +0 -12
- package/dist/internals/simulation/constants.js.map +0 -1
- package/dist/internals/simulation/controllers.js +0 -25
- package/dist/internals/simulation/controllers.js.map +0 -1
- package/dist/internals/simulation/files.js +0 -14
- package/dist/internals/simulation/files.js.map +0 -1
- package/dist/internals/simulation/index.js +0 -103
- package/dist/internals/simulation/index.js.map +0 -1
- package/dist/internals/simulation/interface.js +0 -31
- package/dist/internals/simulation/interface.js.map +0 -1
- package/dist/internals/simulation/methods/constants.js +0 -12
- package/dist/internals/simulation/methods/constants.js.map +0 -1
- package/dist/internals/simulation/methods/hooks/get-locale.js +0 -8
- package/dist/internals/simulation/methods/hooks/get-locale.js.map +0 -1
- package/dist/internals/simulation/methods/hooks/get-locale.mjs +0 -8
- package/dist/internals/simulation/methods/hooks/get-locale.mjs.map +0 -1
- package/dist/internals/simulation/methods/hooks/index.js +0 -39
- package/dist/internals/simulation/methods/hooks/index.js.map +0 -1
- package/dist/internals/simulation/methods/hooks/interface.js +0 -10
- package/dist/internals/simulation/methods/hooks/interface.js.map +0 -1
- package/dist/internals/simulation/methods/hooks/notifications.js +0 -16
- package/dist/internals/simulation/methods/hooks/notifications.js.map +0 -1
- package/dist/internals/simulation/methods/hooks/show-dialog.js +0 -14
- package/dist/internals/simulation/methods/hooks/show-dialog.js.map +0 -1
- package/dist/internals/simulation/methods/hooks/show-dialog.mjs +0 -14
- package/dist/internals/simulation/methods/hooks/show-dialog.mjs.map +0 -1
- package/dist/internals/simulation/methods/hooks/state.js +0 -18
- package/dist/internals/simulation/methods/hooks/state.js.map +0 -1
- package/dist/internals/simulation/methods/index.js +0 -28
- package/dist/internals/simulation/methods/index.js.map +0 -1
- package/dist/internals/simulation/methods/specifications.js +0 -27
- package/dist/internals/simulation/methods/specifications.js.map +0 -1
- package/dist/internals/simulation/middleware/engine.js +0 -15
- package/dist/internals/simulation/middleware/engine.js.map +0 -1
- package/dist/internals/simulation/middleware/index.js +0 -16
- package/dist/internals/simulation/middleware/index.js.map +0 -1
- package/dist/internals/simulation/middleware/internal-methods/accounts.js +0 -8
- package/dist/internals/simulation/middleware/internal-methods/accounts.js.map +0 -1
- package/dist/internals/simulation/middleware/internal-methods/index.js +0 -11
- package/dist/internals/simulation/middleware/internal-methods/index.js.map +0 -1
- package/dist/internals/simulation/middleware/internal-methods/middleware.js +0 -10
- package/dist/internals/simulation/middleware/internal-methods/middleware.js.map +0 -1
- package/dist/internals/simulation/middleware/internal-methods/provider-state.js +0 -8
- package/dist/internals/simulation/middleware/internal-methods/provider-state.js.map +0 -1
- package/dist/internals/simulation/middleware/mock.js +0 -9
- package/dist/internals/simulation/middleware/mock.js.map +0 -1
- package/dist/internals/simulation/options.js +0 -9
- package/dist/internals/simulation/options.js.map +0 -1
- package/dist/internals/simulation/simulation.js +0 -38
- package/dist/internals/simulation/simulation.js.map +0 -1
- package/dist/internals/simulation/store/index.js +0 -44
- package/dist/internals/simulation/store/index.js.map +0 -1
- package/dist/internals/simulation/store/mocks.js +0 -16
- package/dist/internals/simulation/store/mocks.js.map +0 -1
- package/dist/internals/simulation/store/notifications.js +0 -16
- package/dist/internals/simulation/store/notifications.js.map +0 -1
- package/dist/internals/simulation/store/state.js +0 -14
- package/dist/internals/simulation/store/state.js.map +0 -1
- package/dist/internals/simulation/store/store.js +0 -12
- package/dist/internals/simulation/store/store.js.map +0 -1
- package/dist/internals/simulation/store/ui.js +0 -16
- package/dist/internals/simulation/store/ui.js.map +0 -1
- package/dist/internals/structs.js +0 -22
- package/dist/internals/structs.js.map +0 -1
- package/dist/matchers.js +0 -51
- package/dist/matchers.js.map +0 -1
- package/dist/options.js +0 -8
- package/dist/options.js.map +0 -1
- package/dist/setup.js +0 -38
- package/dist/setup.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/dist/types/index.d.ts +0 -5
- package/dist/types/internals/index.d.ts +0 -6
- package/dist/types/internals/simulation/index.d.ts +0 -5
- package/dist/types/internals/simulation/methods/hooks/get-locale.d.ts +0 -9
- package/dist/types/internals/simulation/methods/hooks/index.d.ts +0 -5
- package/dist/types/internals/simulation/methods/hooks/show-dialog.d.ts +0 -9
- package/dist/types/internals/simulation/methods/index.d.ts +0 -1
- package/dist/types/internals/simulation/middleware/index.d.ts +0 -1
- package/dist/types/internals/simulation/middleware/internal-methods/index.d.ts +0 -1
- package/dist/types/internals/simulation/store/index.d.ts +0 -4
- package/dist/types/setup.d.ts +0 -1
- package/dist/types/vendor/readable-stream.d.js +0 -1
- package/dist/types/vendor/readable-stream.d.js.map +0 -1
- package/dist/types/vendor/readable-stream.d.mjs +0 -1
- package/dist/types/vendor/readable-stream.d.mjs.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/types.mjs +0 -2
- package/dist/types.mjs.map +0 -1
|
@@ -1,204 +1,205 @@
|
|
|
1
|
-
export declare const TransactionOptionsStruct: import("superstruct").Struct<{
|
|
2
|
-
value: `0x${string}`;
|
|
1
|
+
export declare const TransactionOptionsStruct: import("@metamask/superstruct").Struct<{
|
|
3
2
|
data: `0x${string}`;
|
|
4
|
-
from: `0x${string}`;
|
|
5
3
|
origin: string;
|
|
4
|
+
value: `0x${string}`;
|
|
5
|
+
nonce: `0x${string}`;
|
|
6
|
+
from: `0x${string}`;
|
|
6
7
|
chainId: string;
|
|
7
8
|
to: `0x${string}`;
|
|
8
9
|
gasLimit: `0x${string}`;
|
|
9
10
|
maxFeePerGas: `0x${string}`;
|
|
10
11
|
maxPriorityFeePerGas: `0x${string}`;
|
|
11
|
-
nonce: `0x${string}`;
|
|
12
12
|
}, {
|
|
13
13
|
/**
|
|
14
14
|
* The CAIP-2 chain ID to send the transaction on. Defaults to `eip155:1`.
|
|
15
15
|
*/
|
|
16
|
-
chainId: import("superstruct").Struct<string, null>;
|
|
16
|
+
chainId: import("@metamask/superstruct").Struct<string, null>;
|
|
17
17
|
/**
|
|
18
18
|
* The origin to send the transaction from. Defaults to `metamask.io`.
|
|
19
19
|
*/
|
|
20
|
-
origin: import("superstruct").Struct<string, null>;
|
|
20
|
+
origin: import("@metamask/superstruct").Struct<string, null>;
|
|
21
21
|
/**
|
|
22
22
|
* The address to send the transaction from. Defaults to a randomly generated
|
|
23
23
|
* address.
|
|
24
24
|
*/
|
|
25
|
-
from: import("superstruct").Struct<`0x${string}`, null>;
|
|
25
|
+
from: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
26
26
|
/**
|
|
27
27
|
* The address to send the transaction to. Defaults to a randomly generated
|
|
28
28
|
* address.
|
|
29
29
|
*/
|
|
30
|
-
to: import("superstruct").Struct<`0x${string}`, null>;
|
|
30
|
+
to: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
31
31
|
/**
|
|
32
32
|
* The value to send with the transaction. The value may be specified as a
|
|
33
33
|
* `number`, `bigint`, `string`, or `Uint8Array`. Defaults to `0`.
|
|
34
34
|
*/
|
|
35
|
-
value: import("superstruct").Struct<`0x${string}`, null>;
|
|
35
|
+
value: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
36
36
|
/**
|
|
37
37
|
* The gas limit to use for the transaction. The gas limit may be specified
|
|
38
38
|
* as a `number`, `bigint`, `string`, or `Uint8Array`. Defaults to `21_000`.
|
|
39
39
|
*/
|
|
40
|
-
gasLimit: import("superstruct").Struct<`0x${string}`, null>;
|
|
40
|
+
gasLimit: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
41
41
|
/**
|
|
42
42
|
* The max fee per gas (in Wei) to use for the transaction. The max fee per
|
|
43
43
|
* gas may be specified as a `number`, `bigint`, `string`, or `Uint8Array`.
|
|
44
44
|
* Defaults to `1`.
|
|
45
45
|
*/
|
|
46
|
-
maxFeePerGas: import("superstruct").Struct<`0x${string}`, null>;
|
|
46
|
+
maxFeePerGas: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
47
47
|
/**
|
|
48
48
|
* The max priority fee per gas (in Wei) to use for the transaction. The max
|
|
49
49
|
* priority fee per gas may be specified as a `number`, `bigint`, `string`,
|
|
50
50
|
* or `Uint8Array`. Defaults to `1`.
|
|
51
51
|
*/
|
|
52
|
-
maxPriorityFeePerGas: import("superstruct").Struct<`0x${string}`, null>;
|
|
52
|
+
maxPriorityFeePerGas: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
53
53
|
/**
|
|
54
54
|
* The nonce to use for the transaction. The nonce may be specified as a
|
|
55
55
|
* `number`, `bigint`, `string`, or `Uint8Array`. Defaults to `0`.
|
|
56
56
|
*/
|
|
57
|
-
nonce: import("superstruct").Struct<`0x${string}`, null>;
|
|
57
|
+
nonce: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
58
58
|
/**
|
|
59
59
|
* The data to send with the transaction. The data may be specified as a
|
|
60
60
|
* `number`, `bigint`, `string`, or `Uint8Array`. Defaults to `0x`.
|
|
61
61
|
*/
|
|
62
|
-
data: import("superstruct").Struct<`0x${string}`, null>;
|
|
62
|
+
data: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
63
63
|
}>;
|
|
64
|
-
export declare const SignatureOptionsStruct: import("superstruct").Struct<{
|
|
64
|
+
export declare const SignatureOptionsStruct: import("@metamask/superstruct").Struct<{
|
|
65
65
|
data: `0x${string}` | Record<string, any> | Record<string, any>[];
|
|
66
|
-
from: `0x${string}`;
|
|
67
66
|
origin: string;
|
|
67
|
+
from: `0x${string}`;
|
|
68
68
|
signatureMethod: "eth_sign" | "personal_sign" | "eth_signTypedData" | "eth_signTypedData_v3" | "eth_signTypedData_v4";
|
|
69
69
|
}, {
|
|
70
70
|
/**
|
|
71
71
|
* The origin making the signature request.
|
|
72
72
|
*/
|
|
73
|
-
origin: import("superstruct").Struct<string, null>;
|
|
73
|
+
origin: import("@metamask/superstruct").Struct<string, null>;
|
|
74
74
|
/**
|
|
75
75
|
* The address signing the signature request. Defaults to a randomly generated
|
|
76
76
|
* address.
|
|
77
77
|
*/
|
|
78
|
-
from: import("superstruct").Struct<`0x${string}`, null>;
|
|
78
|
+
from: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
79
79
|
/**
|
|
80
80
|
* The data to send with the transaction. The data may be specified as a
|
|
81
81
|
* `string`, an object, or an array of objects. This covers the data types
|
|
82
82
|
* for the supported signature methods. Defaults to `0x`.
|
|
83
83
|
*/
|
|
84
|
-
data: import("superstruct").Struct<`0x${string}` | Record<string, any> | Record<string, any>[], null>;
|
|
84
|
+
data: import("@metamask/superstruct").Struct<`0x${string}` | Record<string, any> | Record<string, any>[], null>;
|
|
85
85
|
/**
|
|
86
86
|
* The signature method being used.
|
|
87
87
|
*/
|
|
88
|
-
signatureMethod: import("superstruct").Struct<"eth_sign" | "personal_sign" | "eth_signTypedData" | "eth_signTypedData_v3" | "eth_signTypedData_v4", null>;
|
|
88
|
+
signatureMethod: import("@metamask/superstruct").Struct<"eth_sign" | "personal_sign" | "eth_signTypedData" | "eth_signTypedData_v3" | "eth_signTypedData_v4", null>;
|
|
89
89
|
}>;
|
|
90
|
-
export declare const SnapOptionsStruct: import("superstruct").Struct<{
|
|
90
|
+
export declare const SnapOptionsStruct: import("@metamask/superstruct").Struct<{
|
|
91
91
|
timeout?: number | undefined;
|
|
92
92
|
}, {
|
|
93
93
|
/**
|
|
94
94
|
* The timeout in milliseconds to use for requests to the snap. Defaults to
|
|
95
95
|
* `1000`.
|
|
96
96
|
*/
|
|
97
|
-
timeout: import("superstruct").Struct<number | undefined, null>;
|
|
97
|
+
timeout: import("@metamask/superstruct").Struct<number | undefined, null>;
|
|
98
98
|
}>;
|
|
99
|
-
export declare const JsonRpcMockOptionsStruct: import("superstruct").Struct<{
|
|
100
|
-
result: import("@metamask/snaps-sdk").Json;
|
|
99
|
+
export declare const JsonRpcMockOptionsStruct: import("@metamask/superstruct").Struct<{
|
|
101
100
|
method: string;
|
|
101
|
+
result: import("@metamask/snaps-sdk").Json;
|
|
102
102
|
}, {
|
|
103
|
-
method: import("superstruct").Struct<string, null>;
|
|
104
|
-
result: import("superstruct").Struct<import("@metamask/snaps-sdk").Json, unknown>;
|
|
103
|
+
method: import("@metamask/superstruct").Struct<string, null>;
|
|
104
|
+
result: import("@metamask/superstruct").Struct<import("@metamask/snaps-sdk").Json, unknown>;
|
|
105
105
|
}>;
|
|
106
|
-
export declare const InterfaceStruct: import("superstruct").Struct<{
|
|
106
|
+
export declare const InterfaceStruct: import("@metamask/superstruct").Struct<{
|
|
107
107
|
content?: import("@metamask/snaps-sdk/jsx").JSXElement | undefined;
|
|
108
108
|
}, {
|
|
109
|
-
content: import("superstruct").Struct<import("@metamask/snaps-sdk/jsx").JSXElement | undefined, null>;
|
|
109
|
+
content: import("@metamask/superstruct").Struct<import("@metamask/snaps-sdk/jsx").JSXElement | undefined, null>;
|
|
110
110
|
}>;
|
|
111
|
-
export declare const SnapResponseWithoutInterfaceStruct: import("superstruct").Struct<{
|
|
111
|
+
export declare const SnapResponseWithoutInterfaceStruct: import("@metamask/superstruct").Struct<{
|
|
112
112
|
id: string;
|
|
113
|
-
response: {
|
|
114
|
-
result: import("@metamask/snaps-sdk").Json;
|
|
115
|
-
} | {
|
|
116
|
-
error: import("@metamask/snaps-sdk").Json;
|
|
117
|
-
};
|
|
118
113
|
notifications: {
|
|
119
114
|
type: "native" | "inApp";
|
|
120
115
|
message: string;
|
|
121
116
|
id: string;
|
|
122
117
|
}[];
|
|
118
|
+
response: {
|
|
119
|
+
result: import("@metamask/snaps-sdk").Json;
|
|
120
|
+
} | {
|
|
121
|
+
error: import("@metamask/snaps-sdk").Json;
|
|
122
|
+
};
|
|
123
123
|
}, {
|
|
124
|
-
id: import("superstruct").Struct<string, null>;
|
|
125
|
-
response: import("superstruct").Struct<{
|
|
124
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
125
|
+
response: import("@metamask/superstruct").Struct<{
|
|
126
126
|
result: import("@metamask/snaps-sdk").Json;
|
|
127
127
|
} | {
|
|
128
128
|
error: import("@metamask/snaps-sdk").Json;
|
|
129
129
|
}, null>;
|
|
130
|
-
notifications: import("superstruct").Struct<{
|
|
130
|
+
notifications: import("@metamask/superstruct").Struct<{
|
|
131
131
|
type: "native" | "inApp";
|
|
132
132
|
message: string;
|
|
133
133
|
id: string;
|
|
134
|
-
}[], import("superstruct").Struct<{
|
|
134
|
+
}[], import("@metamask/superstruct").Struct<{
|
|
135
135
|
type: "native" | "inApp";
|
|
136
136
|
message: string;
|
|
137
137
|
id: string;
|
|
138
138
|
}, {
|
|
139
|
-
id: import("superstruct").Struct<string, null>;
|
|
140
|
-
message: import("superstruct").Struct<string, null>;
|
|
141
|
-
type: import("superstruct").Struct<"native" | "inApp", null>;
|
|
139
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
140
|
+
message: import("@metamask/superstruct").Struct<string, null>;
|
|
141
|
+
type: import("@metamask/superstruct").Struct<"native" | "inApp", null>;
|
|
142
142
|
}>>;
|
|
143
143
|
}>;
|
|
144
|
-
export declare const SnapResponseWithInterfaceStruct: import("superstruct").Struct<{
|
|
144
|
+
export declare const SnapResponseWithInterfaceStruct: import("@metamask/superstruct").Struct<{
|
|
145
145
|
id: string;
|
|
146
|
-
response: {
|
|
147
|
-
result: import("@metamask/snaps-sdk").Json;
|
|
148
|
-
} | {
|
|
149
|
-
error: import("@metamask/snaps-sdk").Json;
|
|
150
|
-
};
|
|
151
|
-
getInterface: Function;
|
|
152
146
|
notifications: {
|
|
153
147
|
type: "native" | "inApp";
|
|
154
148
|
message: string;
|
|
155
149
|
id: string;
|
|
156
150
|
}[];
|
|
157
|
-
|
|
158
|
-
getInterface: import("superstruct").Struct<Function, null>;
|
|
159
|
-
id: import("superstruct").Struct<string, null>;
|
|
160
|
-
response: import("superstruct").Struct<{
|
|
151
|
+
response: {
|
|
161
152
|
result: import("@metamask/snaps-sdk").Json;
|
|
162
153
|
} | {
|
|
163
154
|
error: import("@metamask/snaps-sdk").Json;
|
|
164
|
-
}
|
|
165
|
-
|
|
155
|
+
};
|
|
156
|
+
getInterface: Function;
|
|
157
|
+
}, {
|
|
158
|
+
getInterface: import("@metamask/superstruct").Struct<Function, null>;
|
|
159
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
160
|
+
notifications: import("@metamask/superstruct").Struct<{
|
|
166
161
|
type: "native" | "inApp";
|
|
167
162
|
message: string;
|
|
168
163
|
id: string;
|
|
169
|
-
}[], import("superstruct").Struct<{
|
|
164
|
+
}[], import("@metamask/superstruct").Struct<{
|
|
170
165
|
type: "native" | "inApp";
|
|
171
166
|
message: string;
|
|
172
167
|
id: string;
|
|
173
168
|
}, {
|
|
174
|
-
id: import("superstruct").Struct<string, null>;
|
|
175
|
-
message: import("superstruct").Struct<string, null>;
|
|
176
|
-
type: import("superstruct").Struct<"native" | "inApp", null>;
|
|
169
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
170
|
+
message: import("@metamask/superstruct").Struct<string, null>;
|
|
171
|
+
type: import("@metamask/superstruct").Struct<"native" | "inApp", null>;
|
|
177
172
|
}>>;
|
|
178
|
-
|
|
179
|
-
export declare const SnapResponseStruct: import("superstruct").Struct<{
|
|
180
|
-
id: string;
|
|
181
|
-
response: {
|
|
173
|
+
response: import("@metamask/superstruct").Struct<{
|
|
182
174
|
result: import("@metamask/snaps-sdk").Json;
|
|
183
175
|
} | {
|
|
184
176
|
error: import("@metamask/snaps-sdk").Json;
|
|
185
|
-
}
|
|
177
|
+
}, null>;
|
|
178
|
+
}>;
|
|
179
|
+
export declare const SnapResponseStruct: import("@metamask/superstruct").Struct<{
|
|
180
|
+
id: string;
|
|
186
181
|
notifications: {
|
|
187
182
|
type: "native" | "inApp";
|
|
188
183
|
message: string;
|
|
189
184
|
id: string;
|
|
190
185
|
}[];
|
|
191
|
-
} | {
|
|
192
|
-
id: string;
|
|
193
186
|
response: {
|
|
194
187
|
result: import("@metamask/snaps-sdk").Json;
|
|
195
188
|
} | {
|
|
196
189
|
error: import("@metamask/snaps-sdk").Json;
|
|
197
190
|
};
|
|
198
|
-
|
|
191
|
+
} | {
|
|
192
|
+
id: string;
|
|
199
193
|
notifications: {
|
|
200
194
|
type: "native" | "inApp";
|
|
201
195
|
message: string;
|
|
202
196
|
id: string;
|
|
203
197
|
}[];
|
|
198
|
+
response: {
|
|
199
|
+
result: import("@metamask/snaps-sdk").Json;
|
|
200
|
+
} | {
|
|
201
|
+
error: import("@metamask/snaps-sdk").Json;
|
|
202
|
+
};
|
|
203
|
+
getInterface: Function;
|
|
204
204
|
}, null>;
|
|
205
|
+
//# sourceMappingURL=structs.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structs.d.cts","sourceRoot":"","sources":["../../src/internals/structs.ts"],"names":[],"mappings":"AAoCA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;IACnC;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAUH;;;OAGG;;IAUH;;;OAGG;;IAQH;;;OAGG;;IAQH;;;;OAIG;;IAQH;;;;OAIG;;IAQH;;;OAGG;;IAQH;;;OAGG;;EAOH,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;IACjC;;OAEG;;IAGH;;;OAGG;;IASH;;;;OAIG;;IAWH;;OAEG;;EAWH,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;IAC5B;;;OAGG;;EAEH,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;EAGnC,CAAC;AAEH,eAAO,MAAM,eAAe;;;;EAE1B,CAAC;AAEH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsB7C,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK3C,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;QAG7B,CAAC"}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
export declare const TransactionOptionsStruct: import("@metamask/superstruct").Struct<{
|
|
2
|
+
data: `0x${string}`;
|
|
3
|
+
origin: string;
|
|
4
|
+
value: `0x${string}`;
|
|
5
|
+
nonce: `0x${string}`;
|
|
6
|
+
from: `0x${string}`;
|
|
7
|
+
chainId: string;
|
|
8
|
+
to: `0x${string}`;
|
|
9
|
+
gasLimit: `0x${string}`;
|
|
10
|
+
maxFeePerGas: `0x${string}`;
|
|
11
|
+
maxPriorityFeePerGas: `0x${string}`;
|
|
12
|
+
}, {
|
|
13
|
+
/**
|
|
14
|
+
* The CAIP-2 chain ID to send the transaction on. Defaults to `eip155:1`.
|
|
15
|
+
*/
|
|
16
|
+
chainId: import("@metamask/superstruct").Struct<string, null>;
|
|
17
|
+
/**
|
|
18
|
+
* The origin to send the transaction from. Defaults to `metamask.io`.
|
|
19
|
+
*/
|
|
20
|
+
origin: import("@metamask/superstruct").Struct<string, null>;
|
|
21
|
+
/**
|
|
22
|
+
* The address to send the transaction from. Defaults to a randomly generated
|
|
23
|
+
* address.
|
|
24
|
+
*/
|
|
25
|
+
from: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
26
|
+
/**
|
|
27
|
+
* The address to send the transaction to. Defaults to a randomly generated
|
|
28
|
+
* address.
|
|
29
|
+
*/
|
|
30
|
+
to: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
31
|
+
/**
|
|
32
|
+
* The value to send with the transaction. The value may be specified as a
|
|
33
|
+
* `number`, `bigint`, `string`, or `Uint8Array`. Defaults to `0`.
|
|
34
|
+
*/
|
|
35
|
+
value: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
36
|
+
/**
|
|
37
|
+
* The gas limit to use for the transaction. The gas limit may be specified
|
|
38
|
+
* as a `number`, `bigint`, `string`, or `Uint8Array`. Defaults to `21_000`.
|
|
39
|
+
*/
|
|
40
|
+
gasLimit: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
41
|
+
/**
|
|
42
|
+
* The max fee per gas (in Wei) to use for the transaction. The max fee per
|
|
43
|
+
* gas may be specified as a `number`, `bigint`, `string`, or `Uint8Array`.
|
|
44
|
+
* Defaults to `1`.
|
|
45
|
+
*/
|
|
46
|
+
maxFeePerGas: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
47
|
+
/**
|
|
48
|
+
* The max priority fee per gas (in Wei) to use for the transaction. The max
|
|
49
|
+
* priority fee per gas may be specified as a `number`, `bigint`, `string`,
|
|
50
|
+
* or `Uint8Array`. Defaults to `1`.
|
|
51
|
+
*/
|
|
52
|
+
maxPriorityFeePerGas: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
53
|
+
/**
|
|
54
|
+
* The nonce to use for the transaction. The nonce may be specified as a
|
|
55
|
+
* `number`, `bigint`, `string`, or `Uint8Array`. Defaults to `0`.
|
|
56
|
+
*/
|
|
57
|
+
nonce: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
58
|
+
/**
|
|
59
|
+
* The data to send with the transaction. The data may be specified as a
|
|
60
|
+
* `number`, `bigint`, `string`, or `Uint8Array`. Defaults to `0x`.
|
|
61
|
+
*/
|
|
62
|
+
data: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
63
|
+
}>;
|
|
64
|
+
export declare const SignatureOptionsStruct: import("@metamask/superstruct").Struct<{
|
|
65
|
+
data: `0x${string}` | Record<string, any> | Record<string, any>[];
|
|
66
|
+
origin: string;
|
|
67
|
+
from: `0x${string}`;
|
|
68
|
+
signatureMethod: "eth_sign" | "personal_sign" | "eth_signTypedData" | "eth_signTypedData_v3" | "eth_signTypedData_v4";
|
|
69
|
+
}, {
|
|
70
|
+
/**
|
|
71
|
+
* The origin making the signature request.
|
|
72
|
+
*/
|
|
73
|
+
origin: import("@metamask/superstruct").Struct<string, null>;
|
|
74
|
+
/**
|
|
75
|
+
* The address signing the signature request. Defaults to a randomly generated
|
|
76
|
+
* address.
|
|
77
|
+
*/
|
|
78
|
+
from: import("@metamask/superstruct").Struct<`0x${string}`, null>;
|
|
79
|
+
/**
|
|
80
|
+
* The data to send with the transaction. The data may be specified as a
|
|
81
|
+
* `string`, an object, or an array of objects. This covers the data types
|
|
82
|
+
* for the supported signature methods. Defaults to `0x`.
|
|
83
|
+
*/
|
|
84
|
+
data: import("@metamask/superstruct").Struct<`0x${string}` | Record<string, any> | Record<string, any>[], null>;
|
|
85
|
+
/**
|
|
86
|
+
* The signature method being used.
|
|
87
|
+
*/
|
|
88
|
+
signatureMethod: import("@metamask/superstruct").Struct<"eth_sign" | "personal_sign" | "eth_signTypedData" | "eth_signTypedData_v3" | "eth_signTypedData_v4", null>;
|
|
89
|
+
}>;
|
|
90
|
+
export declare const SnapOptionsStruct: import("@metamask/superstruct").Struct<{
|
|
91
|
+
timeout?: number | undefined;
|
|
92
|
+
}, {
|
|
93
|
+
/**
|
|
94
|
+
* The timeout in milliseconds to use for requests to the snap. Defaults to
|
|
95
|
+
* `1000`.
|
|
96
|
+
*/
|
|
97
|
+
timeout: import("@metamask/superstruct").Struct<number | undefined, null>;
|
|
98
|
+
}>;
|
|
99
|
+
export declare const JsonRpcMockOptionsStruct: import("@metamask/superstruct").Struct<{
|
|
100
|
+
method: string;
|
|
101
|
+
result: import("@metamask/snaps-sdk").Json;
|
|
102
|
+
}, {
|
|
103
|
+
method: import("@metamask/superstruct").Struct<string, null>;
|
|
104
|
+
result: import("@metamask/superstruct").Struct<import("@metamask/snaps-sdk").Json, unknown>;
|
|
105
|
+
}>;
|
|
106
|
+
export declare const InterfaceStruct: import("@metamask/superstruct").Struct<{
|
|
107
|
+
content?: import("@metamask/snaps-sdk/jsx").JSXElement | undefined;
|
|
108
|
+
}, {
|
|
109
|
+
content: import("@metamask/superstruct").Struct<import("@metamask/snaps-sdk/jsx").JSXElement | undefined, null>;
|
|
110
|
+
}>;
|
|
111
|
+
export declare const SnapResponseWithoutInterfaceStruct: import("@metamask/superstruct").Struct<{
|
|
112
|
+
id: string;
|
|
113
|
+
notifications: {
|
|
114
|
+
type: "native" | "inApp";
|
|
115
|
+
message: string;
|
|
116
|
+
id: string;
|
|
117
|
+
}[];
|
|
118
|
+
response: {
|
|
119
|
+
result: import("@metamask/snaps-sdk").Json;
|
|
120
|
+
} | {
|
|
121
|
+
error: import("@metamask/snaps-sdk").Json;
|
|
122
|
+
};
|
|
123
|
+
}, {
|
|
124
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
125
|
+
response: import("@metamask/superstruct").Struct<{
|
|
126
|
+
result: import("@metamask/snaps-sdk").Json;
|
|
127
|
+
} | {
|
|
128
|
+
error: import("@metamask/snaps-sdk").Json;
|
|
129
|
+
}, null>;
|
|
130
|
+
notifications: import("@metamask/superstruct").Struct<{
|
|
131
|
+
type: "native" | "inApp";
|
|
132
|
+
message: string;
|
|
133
|
+
id: string;
|
|
134
|
+
}[], import("@metamask/superstruct").Struct<{
|
|
135
|
+
type: "native" | "inApp";
|
|
136
|
+
message: string;
|
|
137
|
+
id: string;
|
|
138
|
+
}, {
|
|
139
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
140
|
+
message: import("@metamask/superstruct").Struct<string, null>;
|
|
141
|
+
type: import("@metamask/superstruct").Struct<"native" | "inApp", null>;
|
|
142
|
+
}>>;
|
|
143
|
+
}>;
|
|
144
|
+
export declare const SnapResponseWithInterfaceStruct: import("@metamask/superstruct").Struct<{
|
|
145
|
+
id: string;
|
|
146
|
+
notifications: {
|
|
147
|
+
type: "native" | "inApp";
|
|
148
|
+
message: string;
|
|
149
|
+
id: string;
|
|
150
|
+
}[];
|
|
151
|
+
response: {
|
|
152
|
+
result: import("@metamask/snaps-sdk").Json;
|
|
153
|
+
} | {
|
|
154
|
+
error: import("@metamask/snaps-sdk").Json;
|
|
155
|
+
};
|
|
156
|
+
getInterface: Function;
|
|
157
|
+
}, {
|
|
158
|
+
getInterface: import("@metamask/superstruct").Struct<Function, null>;
|
|
159
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
160
|
+
notifications: import("@metamask/superstruct").Struct<{
|
|
161
|
+
type: "native" | "inApp";
|
|
162
|
+
message: string;
|
|
163
|
+
id: string;
|
|
164
|
+
}[], import("@metamask/superstruct").Struct<{
|
|
165
|
+
type: "native" | "inApp";
|
|
166
|
+
message: string;
|
|
167
|
+
id: string;
|
|
168
|
+
}, {
|
|
169
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
|
170
|
+
message: import("@metamask/superstruct").Struct<string, null>;
|
|
171
|
+
type: import("@metamask/superstruct").Struct<"native" | "inApp", null>;
|
|
172
|
+
}>>;
|
|
173
|
+
response: import("@metamask/superstruct").Struct<{
|
|
174
|
+
result: import("@metamask/snaps-sdk").Json;
|
|
175
|
+
} | {
|
|
176
|
+
error: import("@metamask/snaps-sdk").Json;
|
|
177
|
+
}, null>;
|
|
178
|
+
}>;
|
|
179
|
+
export declare const SnapResponseStruct: import("@metamask/superstruct").Struct<{
|
|
180
|
+
id: string;
|
|
181
|
+
notifications: {
|
|
182
|
+
type: "native" | "inApp";
|
|
183
|
+
message: string;
|
|
184
|
+
id: string;
|
|
185
|
+
}[];
|
|
186
|
+
response: {
|
|
187
|
+
result: import("@metamask/snaps-sdk").Json;
|
|
188
|
+
} | {
|
|
189
|
+
error: import("@metamask/snaps-sdk").Json;
|
|
190
|
+
};
|
|
191
|
+
} | {
|
|
192
|
+
id: string;
|
|
193
|
+
notifications: {
|
|
194
|
+
type: "native" | "inApp";
|
|
195
|
+
message: string;
|
|
196
|
+
id: string;
|
|
197
|
+
}[];
|
|
198
|
+
response: {
|
|
199
|
+
result: import("@metamask/snaps-sdk").Json;
|
|
200
|
+
} | {
|
|
201
|
+
error: import("@metamask/snaps-sdk").Json;
|
|
202
|
+
};
|
|
203
|
+
getInterface: Function;
|
|
204
|
+
}, null>;
|
|
205
|
+
//# sourceMappingURL=structs.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structs.d.mts","sourceRoot":"","sources":["../../src/internals/structs.ts"],"names":[],"mappings":"AAoCA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;IACnC;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAUH;;;OAGG;;IAUH;;;OAGG;;IAQH;;;OAGG;;IAQH;;;;OAIG;;IAQH;;;;OAIG;;IAQH;;;OAGG;;IAQH;;;OAGG;;EAOH,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;IACjC;;OAEG;;IAGH;;;OAGG;;IASH;;;;OAIG;;IAWH;;OAEG;;EAWH,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;IAC5B;;;OAGG;;EAEH,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;EAGnC,CAAC;AAEH,eAAO,MAAM,eAAe;;;;EAE1B,CAAC;AAEH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsB7C,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK3C,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;QAG7B,CAAC"}
|
|
@@ -1,22 +1,154 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { NotificationType, enumValue } from "@metamask/snaps-sdk";
|
|
2
|
+
import { JSXElementStruct } from "@metamask/snaps-sdk/jsx";
|
|
3
|
+
import { array, assign, bigint, coerce, defaulted, instance, literal, number, object, optional, string, union, record, any, func, type } from "@metamask/superstruct";
|
|
4
|
+
import { bytesToHex, JsonStruct, StrictHexStruct, valueToBytes } from "@metamask/utils";
|
|
5
|
+
import { randomBytes } from "crypto";
|
|
6
|
+
// TODO: Export this from `@metamask/utils` instead.
|
|
7
|
+
const BytesLikeStruct = union([
|
|
8
|
+
bigint(),
|
|
9
|
+
number(),
|
|
10
|
+
string(),
|
|
11
|
+
instance(Uint8Array),
|
|
12
|
+
]);
|
|
13
|
+
export const TransactionOptionsStruct = object({
|
|
14
|
+
/**
|
|
15
|
+
* The CAIP-2 chain ID to send the transaction on. Defaults to `eip155:1`.
|
|
16
|
+
*/
|
|
17
|
+
chainId: defaulted(string(), 'eip155:1'),
|
|
18
|
+
/**
|
|
19
|
+
* The origin to send the transaction from. Defaults to `metamask.io`.
|
|
20
|
+
*/
|
|
21
|
+
origin: defaulted(string(), 'metamask.io'),
|
|
22
|
+
/**
|
|
23
|
+
* The address to send the transaction from. Defaults to a randomly generated
|
|
24
|
+
* address.
|
|
25
|
+
*/
|
|
26
|
+
// TODO: Move this coercer to `@metamask/utils`.
|
|
27
|
+
from: coerce(StrictHexStruct, optional(BytesLikeStruct), (value) => {
|
|
28
|
+
if (value) {
|
|
29
|
+
return bytesToHex(valueToBytes(value));
|
|
30
|
+
}
|
|
31
|
+
return bytesToHex(randomBytes(20));
|
|
32
|
+
}),
|
|
33
|
+
/**
|
|
34
|
+
* The address to send the transaction to. Defaults to a randomly generated
|
|
35
|
+
* address.
|
|
36
|
+
*/
|
|
37
|
+
// TODO: Move this coercer to `@metamask/utils`.
|
|
38
|
+
to: coerce(StrictHexStruct, optional(BytesLikeStruct), (value) => {
|
|
39
|
+
if (value) {
|
|
40
|
+
return bytesToHex(valueToBytes(value));
|
|
41
|
+
}
|
|
42
|
+
return bytesToHex(randomBytes(20));
|
|
43
|
+
}),
|
|
44
|
+
/**
|
|
45
|
+
* The value to send with the transaction. The value may be specified as a
|
|
46
|
+
* `number`, `bigint`, `string`, or `Uint8Array`. Defaults to `0`.
|
|
47
|
+
*/
|
|
48
|
+
value: defaulted(coerce(StrictHexStruct, BytesLikeStruct, (value) => bytesToHex(valueToBytes(value))), '0x0'),
|
|
49
|
+
/**
|
|
50
|
+
* The gas limit to use for the transaction. The gas limit may be specified
|
|
51
|
+
* as a `number`, `bigint`, `string`, or `Uint8Array`. Defaults to `21_000`.
|
|
52
|
+
*/
|
|
53
|
+
gasLimit: defaulted(coerce(StrictHexStruct, BytesLikeStruct, (value) => bytesToHex(valueToBytes(value))), valueToBytes(21000)),
|
|
54
|
+
/**
|
|
55
|
+
* The max fee per gas (in Wei) to use for the transaction. The max fee per
|
|
56
|
+
* gas may be specified as a `number`, `bigint`, `string`, or `Uint8Array`.
|
|
57
|
+
* Defaults to `1`.
|
|
58
|
+
*/
|
|
59
|
+
maxFeePerGas: defaulted(coerce(StrictHexStruct, BytesLikeStruct, (value) => bytesToHex(valueToBytes(value))), valueToBytes(1)),
|
|
60
|
+
/**
|
|
61
|
+
* The max priority fee per gas (in Wei) to use for the transaction. The max
|
|
62
|
+
* priority fee per gas may be specified as a `number`, `bigint`, `string`,
|
|
63
|
+
* or `Uint8Array`. Defaults to `1`.
|
|
64
|
+
*/
|
|
65
|
+
maxPriorityFeePerGas: defaulted(coerce(StrictHexStruct, BytesLikeStruct, (value) => bytesToHex(valueToBytes(value))), valueToBytes(1)),
|
|
66
|
+
/**
|
|
67
|
+
* The nonce to use for the transaction. The nonce may be specified as a
|
|
68
|
+
* `number`, `bigint`, `string`, or `Uint8Array`. Defaults to `0`.
|
|
69
|
+
*/
|
|
70
|
+
nonce: defaulted(coerce(StrictHexStruct, BytesLikeStruct, (value) => bytesToHex(valueToBytes(value))), valueToBytes(0)),
|
|
71
|
+
/**
|
|
72
|
+
* The data to send with the transaction. The data may be specified as a
|
|
73
|
+
* `number`, `bigint`, `string`, or `Uint8Array`. Defaults to `0x`.
|
|
74
|
+
*/
|
|
75
|
+
data: defaulted(coerce(union([StrictHexStruct, literal('0x')]), BytesLikeStruct, (value) => bytesToHex(valueToBytes(value))), '0x'),
|
|
76
|
+
});
|
|
77
|
+
export const SignatureOptionsStruct = object({
|
|
78
|
+
/**
|
|
79
|
+
* The origin making the signature request.
|
|
80
|
+
*/
|
|
81
|
+
origin: defaulted(string(), 'metamask.io'),
|
|
82
|
+
/**
|
|
83
|
+
* The address signing the signature request. Defaults to a randomly generated
|
|
84
|
+
* address.
|
|
85
|
+
*/
|
|
86
|
+
from: coerce(StrictHexStruct, optional(BytesLikeStruct), (value) => {
|
|
87
|
+
if (value) {
|
|
88
|
+
return bytesToHex(valueToBytes(value));
|
|
89
|
+
}
|
|
90
|
+
return bytesToHex(randomBytes(20));
|
|
91
|
+
}),
|
|
92
|
+
/**
|
|
93
|
+
* The data to send with the transaction. The data may be specified as a
|
|
94
|
+
* `string`, an object, or an array of objects. This covers the data types
|
|
95
|
+
* for the supported signature methods. Defaults to `0x`.
|
|
96
|
+
*/
|
|
97
|
+
data: defaulted(union([
|
|
98
|
+
StrictHexStruct,
|
|
99
|
+
literal('0x'),
|
|
100
|
+
record(string(), any()),
|
|
101
|
+
array(record(string(), any())),
|
|
102
|
+
]), '0x'),
|
|
103
|
+
/**
|
|
104
|
+
* The signature method being used.
|
|
105
|
+
*/
|
|
106
|
+
signatureMethod: defaulted(union([
|
|
107
|
+
literal('eth_sign'),
|
|
108
|
+
literal('personal_sign'),
|
|
109
|
+
literal('eth_signTypedData'),
|
|
110
|
+
literal('eth_signTypedData_v3'),
|
|
111
|
+
literal('eth_signTypedData_v4'),
|
|
112
|
+
]), 'personal_sign'),
|
|
113
|
+
});
|
|
114
|
+
export const SnapOptionsStruct = object({
|
|
115
|
+
/**
|
|
116
|
+
* The timeout in milliseconds to use for requests to the snap. Defaults to
|
|
117
|
+
* `1000`.
|
|
118
|
+
*/
|
|
119
|
+
timeout: defaulted(optional(number()), 1000),
|
|
120
|
+
});
|
|
121
|
+
export const JsonRpcMockOptionsStruct = object({
|
|
122
|
+
method: string(),
|
|
123
|
+
result: JsonStruct,
|
|
124
|
+
});
|
|
125
|
+
export const InterfaceStruct = type({
|
|
126
|
+
content: optional(JSXElementStruct),
|
|
127
|
+
});
|
|
128
|
+
export const SnapResponseWithoutInterfaceStruct = object({
|
|
129
|
+
id: string(),
|
|
130
|
+
response: union([
|
|
131
|
+
object({
|
|
132
|
+
result: JsonStruct,
|
|
133
|
+
}),
|
|
134
|
+
object({
|
|
135
|
+
error: JsonStruct,
|
|
136
|
+
}),
|
|
137
|
+
]),
|
|
138
|
+
notifications: array(object({
|
|
139
|
+
id: string(),
|
|
140
|
+
message: string(),
|
|
141
|
+
type: union([
|
|
142
|
+
enumValue(NotificationType.InApp),
|
|
143
|
+
enumValue(NotificationType.Native),
|
|
144
|
+
]),
|
|
145
|
+
})),
|
|
146
|
+
});
|
|
147
|
+
export const SnapResponseWithInterfaceStruct = assign(SnapResponseWithoutInterfaceStruct, object({
|
|
148
|
+
getInterface: func(),
|
|
149
|
+
}));
|
|
150
|
+
export const SnapResponseStruct = union([
|
|
151
|
+
SnapResponseWithoutInterfaceStruct,
|
|
152
|
+
SnapResponseWithInterfaceStruct,
|
|
153
|
+
]);
|
|
22
154
|
//# sourceMappingURL=structs.mjs.map
|