You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: integration-docs/accounts.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,4 @@ Custodians are responsible for maintaining the list of accounts a user can acces
2
2
3
3
These can correspond to private keys held in a HSM, EOAs that are controlled by shared secrets, or any other mechanism that allows the custodian to sign transactions on behalf of the user. Contract wallets are also supported, although they generally cannot sign messages.
4
4
5
-
The custodial snap, once authenticated, will ask the custodian for a list of accounts for this user using the custodian_listAccounts method of the Ethereum Custodian API.
5
+
The institutional snap, once authenticated, will ask the custodian for a list of accounts for this user using the custodian_listAccounts method of the Ethereum Custodian API.
The custodial snap is a preinstalled component of MetaMask that allows users to interact with decentralised applications across EVMs and propose transactions to custodians as if the keys were stored in the extension. It is a thin client that runs in the browser and communicates directly with a custodian service to initiate transactions and message signing.
3
+
The institutional snap is a preinstalled component of MetaMask that allows users to interact with decentralised applications across EVMs and propose transactions to custodians as if the keys were stored in the extension. It is a thin client that runs in the browser and communicates directly with a custodian service to initiate transactions and message signing.
4
4
5
5
Custodians are responsible for account management abd transaction/message signing, including being ultimately accountable for nonce and gas parameters. They are also responsible for providing the user with a way to authenticate with the extension.
Copy file name to clipboardexpand all lines: integration-docs/authentication.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
When users import their custodial accounts, they enter a refresh token, or multiple tokens for access to multiple accounts. This token is used to fetch access tokens use to make requests to the custodian API. See below for the specification of the token refresh endpoint.
4
4
5
-
All requests made by the custodial snap to the Ethereum Custodian API (JSON-RPC API) will use this access token.
5
+
All requests made by the institutional snap to the Ethereum Custodian API (JSON-RPC API) will use this access token.
6
6
7
-
!!! important Custodians must keep separate any tokens issued to users (for example, in the custodian UI) that are capable of signing transactions. In other words, credentials used in the custodial snap should never have the capability to actually cause transfer of funds.
7
+
!!! important Custodians must keep separate any tokens issued to users (for example, in the custodian UI) that are capable of signing transactions. In other words, credentials used in the institutional snap should never have the capability to actually cause transfer of funds.
8
8
9
9
If the custodian has a web UI, they should implement a button or link that takes advantage of RPC Onboarding.
10
10
@@ -16,7 +16,7 @@ Your refresh token endpoint must support application/json request bodies.
16
16
17
17
## Example requests
18
18
19
-
Here are some example requests. that would be made by the custodial snap to your refresh token endpoint.
19
+
Here are some example requests. that would be made by the institutional snap to your refresh token endpoint.
20
20
21
21
```json
22
22
application/json
@@ -48,18 +48,18 @@ It is intended that refresh tokens should last a long time, if not forever. Howe
48
48
49
49
### Non-interactive token replacement
50
50
51
-
Any time the custodial snap encounters a refresh token in the `refresh_token` field of the response from the token refresh endpoint which is different from the stored refresh token, it will be saved as the new refresh token for any accounts that were onboarded using the old token.
51
+
Any time the institutional snap encounters a refresh token in the `refresh_token` field of the response from the token refresh endpoint which is different from the stored refresh token, it will be saved as the new refresh token for any accounts that were onboarded using the old token.
52
52
53
53
54
54
## FAQ
55
55
56
56
### Are refresh tokens securely stored?
57
-
The custodial snap stores the custodian refresh token in a vault (keyring) which is encrypted while the extension is locked. After injection, this token never leaves the vault. The security is the same as MetaMask's storage of private keys and seed phrases.
57
+
The institutional snap stores the custodian refresh token in a vault (keyring) which is encrypted while the extension is locked. After injection, this token never leaves the vault. The security is the same as MetaMask's storage of private keys and seed phrases.
58
58
59
-
### Does the custodial snap support Oauth 2.0?
60
-
The custodial snap does not use a standard Oauth 2.0 flow. However, it does contain elements of the client credentials grant and the refresh token grant. This is to facilitate custodian web applications, mobile apps, and desktop applications.
59
+
### Does the institutional snap support Oauth 2.0?
60
+
The institutional snap does not use a standard Oauth 2.0 flow. However, it does contain elements of the client credentials grant and the refresh token grant. This is to facilitate custodian web applications, mobile apps, and desktop applications.
61
61
62
-
The user provides, from the custodian, a refresh token. The custodial snap uses this token to obtain the actual token for accompanying requests.
62
+
The user provides, from the custodian, a refresh token. The institutional snap uses this token to obtain the actual token for accompanying requests.
63
63
64
-
Ideally, this token is issued in a non-interactive way; i.e. the credential exchange happens at the custodian and this is effectively a Machine-to-Machine token. Since the custodial snap is an extension and not an ordinary web application, it cannot accept redirects.x
64
+
Ideally, this token is issued in a non-interactive way; i.e. the credential exchange happens at the custodian and this is effectively a Machine-to-Machine token. Since the institutional snap is an extension and not an ordinary web application, it cannot accept redirects.x
Copy file name to clipboardexpand all lines: integration-docs/index.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
This document is for crypto custodians looking to integrate with the custodial snap.
1
+
This document is for crypto custodians looking to integrate with the institutional MetaMask snap.
2
2
3
-
The custodial snap provides a customized client library that supports custodian APIs. This document is a guide to the API a custodian must have in order for it to be usable with the custodial snap.
3
+
The institutional snap provides a customized client library that supports custodian APIs. This document is a guide to the API a custodian must have in order for it to be usable with the institutional snap.
4
4
5
5
## How it works
6
6
@@ -20,4 +20,4 @@ The custodial snap provides a customized client library that supports custodian
20
20
21
21
## How to get allowlisted
22
22
23
-
Please create a pull request on this repository adding your API to the list of allowlisted custodians in [this file](/packages/snap/src/lib/custodian-types/custodianMetadata.ts.
23
+
Please create a pull request on this repository adding your API to the list of allowlisted custodians in [this file](/packages/snap/src/lib/custodian-types/custodianMetadata.ts.)
Copy file name to clipboardexpand all lines: integration-docs/rpc-api.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# MMI's JSON-RPC provider
1
+
# JSON-RPC provider
2
2
3
3
!!! info "Terminology information"
4
4
This document refers to the `injected RPC provider` also known as `window.ethereum`. This is the provider that is injected into the browser by Metamask. It does not refer to the JSON-RPC endpoint served by the custodian, or the JSON-RPC provider endpoint served by Ethereum nodes.
@@ -7,18 +7,18 @@ The browser ethereum provider is used by dapps to communicate with the extension
7
7
8
8
### Initial connection
9
9
10
-
In order to first check if the custodial snap is installed and to use later method, it's first necessary to establish a connection.
10
+
In order to first check if the institutional snap is installed and to use later method, it's first necessary to establish a connection.
11
11
12
12
```
13
13
await window.ethereum.request({
14
14
method: "wallet_requestSnaps",
15
15
params: {
16
-
"npm:@metamask/custodial-wallet-snap": {},
16
+
"npm:@metamask/institutional-wallet-snap": {},
17
17
},
18
18
})
19
19
```
20
20
21
-
Once the custodial is fully integrated, the custodian UI can be added as an initial connection and this step can be skipped.
21
+
Once the custodian is fully integrated, the custodian UI can be added as an initial connection and this step can be skipped.
22
22
23
23
## authentication.onboard : Inject the token
24
24
@@ -34,7 +34,7 @@ Several values here will depend on the your integration process.

7
7
8
-
MetaMask via the custodial snap creates/proposes transactions to the custodian API, including a proposed gas price. However, custodians may (at their users' request, or automatically) use a different gas price. Custodians are responsible for the ordering of transactions.
8
+
MetaMask via the institutional snap creates/proposes transactions to the custodian API, including a proposed gas price. However, custodians may (at their users' request, or automatically) use a different gas price. Custodians are responsible for the ordering of transactions.
9
9
10
10
## Supporting multiple chains
11
11
@@ -21,7 +21,7 @@ This is the network that the user intended to create the transaction on.
21
21
This parameter is needed to sign an ethereum transaction, and custodians can also use it to decide where to broadcast the transaction.
22
22
23
23
`custodian_listAccountChainIds`
24
-
A custodian_listAccountChainIds method exists on the Custodian JSON-RPC API which is executed when the extension is unlocked, for each custodian account stored in MMI.
24
+
A custodian_listAccountChainIds method exists on the Custodian JSON-RPC API which is executed when the extension is unlocked, for each custodian account stored in the institutional snap.
25
25
26
26
This method takes a single parameter, the ethereum account address in question. Custodians may ignore this parameter if users use their addresses with all their configured chains.
0 commit comments