@@ -4,10 +4,10 @@ use xmtp_api::{strategies, ApiClientWrapper, ApiIdentifier};
4
4
use xmtp_api_http:: XmtpHttpApiClient ;
5
5
use xmtp_id:: associations:: Identifier as XmtpIdentifier ;
6
6
7
- #[ wasm_bindgen( js_name = getInboxIdForAddress ) ]
8
- pub async fn get_inbox_id_for_address (
7
+ #[ wasm_bindgen( js_name = getInboxIdForIdentifier ) ]
8
+ pub async fn get_inbox_id_for_identifier (
9
9
host : String ,
10
- account_identifier : Identifier ,
10
+ # [ wasm_bindgen ( js_name = accountIdentifier ) ] account_identifier : Identifier ,
11
11
) -> Result < Option < String > , JsError > {
12
12
let api_client = ApiClientWrapper :: new (
13
13
XmtpHttpApiClient :: new ( host. clone ( ) , "0.0.0" . into ( ) ) ?. into ( ) ,
@@ -25,7 +25,9 @@ pub async fn get_inbox_id_for_address(
25
25
}
26
26
27
27
#[ wasm_bindgen( js_name = generateInboxId) ]
28
- pub fn generate_inbox_id ( account_identifier : Identifier ) -> Result < String , JsError > {
28
+ pub fn generate_inbox_id (
29
+ #[ wasm_bindgen( js_name = accountIdentifier) ] account_identifier : Identifier ,
30
+ ) -> Result < String , JsError > {
29
31
// ensure that the nonce is always 1 for now since this will only be used for the
30
32
// create_client function above, which also has a hard-coded nonce of 1
31
33
let ident: XmtpIdentifier = account_identifier. try_into ( ) ?;
0 commit comments