Customers can be created with or without a wallet address. When no wallet is provided, the system generates a referenceKey that you can use to link a wallet later.
The SDK provides typed search methods that map to different lookup strategies. Each returns a single Customer object or throws a TrussetError with code NOT_FOUND.
// By wallet addressconst c1 = await trusset.customers.manage.searchByWallet('0x1234...abcd')// By your internal IDconst c2 = await trusset.customers.manage.searchByExternalId('crm-4821')// By reference key (for pre-wallet customers)const c3 = await trusset.customers.manage.searchByReference('ref_a1b2c3d4...')// By name (substring match, returns paginated list)const results = await trusset.customers.manage.searchByName('Acme', { limit: 20, offset: 0,})// results.customers, results.total
The wallet address must not already be assigned to another customer in the same instance. If the address is already verified on-chain, the customer status updates to verified automatically.