Preparing search index...
The search index is not available @gumhq/sdk
Methods
create
create( metadataUri: string , screenNameAccount: PublicKey , authority: PublicKey , payer?: PublicKey ) : Promise < { instructionMethodBuilder: MethodsBuilder < GplCore , Object > ; profilePDA: PublicKey ; } >
Parameters
metadataUri: string
screenNameAccount: PublicKey
authority: PublicKey
payer: PublicKey = authority
Returns Promise < { instructionMethodBuilder: MethodsBuilder < GplCore , Object > ; profilePDA: PublicKey ; } >
create Profile With Gum Domain
create Profile With Gum Domain( metadataUri: string , domainName: string , authority: PublicKey , payer?: PublicKey ) : Promise < { instructionMethodBuilder: MethodsBuilder < GplCore , Object > ; profilePDA: PublicKey ; } >
Parameters
metadataUri: string
domainName: string
authority: PublicKey
payer: PublicKey = authority
Returns Promise < { instructionMethodBuilder: MethodsBuilder < GplCore , Object > ; profilePDA: PublicKey ; } >
delete
delete( profileAccount: PublicKey , authority: PublicKey ) : MethodsBuilder < GplCore , Object >
Parameters
profileAccount: PublicKey
authority: PublicKey
Returns MethodsBuilder < GplCore , Object >
get
get( profileAccount: PublicKey ) : Promise < DecodeStruct < { fields: [ { name: "issuer" ; type: "publicKey" ; } , { name: "holder" ; type: "publicKey" ; } , { name: "updateAuthority" ; type: "publicKey" ; } , { name: "schema" ; type: "publicKey" ; } , { name: "metadataUri" ; type: "string" ; } ] ; kind: "struct" ; } | { fields: [ { name: "authority" ; type: "publicKey" ; } , { name: "verified" ; type: "bool" ; } ] ; kind: "struct" ; } | { fields: [ { name: "authority" ; type: "publicKey" ; } , { name: "metadataUri" ; type: "string" ; } , { name: "randomHash" ; type: { array: [ "u8" , 32 ] ; } ; } ] ; kind: "struct" ; } | { fields: [ { name: "fromProfile" ; type: "publicKey" ; } , { name: "toProfile" ; type: "publicKey" ; } ] ; kind: "struct" ; } | { fields: [ { name: "profile" ; type: "publicKey" ; } , { name: "metadataUri" ; type: "string" ; } , { name: "randomHash" ; type: { array: [ "u8" , 32 ] ; } ; } , { name: "replyTo" ; type: { option: "publicKey" ; } ; } ] ; kind: "struct" ; } | { fields: [ { name: "authority" ; type: "publicKey" ; } , { name: "metadataUri" ; type: "string" ; } , { name: "screenName" ; type: "publicKey" ; } , { name: "randomHash" ; type: { array: [ "u8" , 32 ] ; } ; } ] ; kind: "struct" ; } | { fields: [ { name: "fromProfile" ; type: "publicKey" ; } , { name: "toPost" ; type: "publicKey" ; } , { name: "reactionType" ; type: "string" ; } ] ; kind: "struct" ; } , DecodedHelper < [ { name: "PostError" ; type: { kind: "enum" ; variants: [ { name: "URITooLong" ; } ] ; } ; } , { name: "ProfileMetadataError" ; type: { kind: "enum" ; variants: [ { name: "URITooLong" ; } ] ; } ; } , { name: "ConnectionError" ; type: { kind: "enum" ; variants: [ { name: "CannotConnectToSelf" ; } ] ; } ; } ] , EmptyDefined > > >
Parameters
profileAccount: PublicKey
Returns Promise < DecodeStruct < { fields: [ { name: "issuer" ; type: "publicKey" ; } , { name: "holder" ; type: "publicKey" ; } , { name: "updateAuthority" ; type: "publicKey" ; } , { name: "schema" ; type: "publicKey" ; } , { name: "metadataUri" ; type: "string" ; } ] ; kind: "struct" ; } | { fields: [ { name: "authority" ; type: "publicKey" ; } , { name: "verified" ; type: "bool" ; } ] ; kind: "struct" ; } | { fields: [ { name: "authority" ; type: "publicKey" ; } , { name: "metadataUri" ; type: "string" ; } , { name: "randomHash" ; type: { array: [ "u8" , 32 ] ; } ; } ] ; kind: "struct" ; } | { fields: [ { name: "fromProfile" ; type: "publicKey" ; } , { name: "toProfile" ; type: "publicKey" ; } ] ; kind: "struct" ; } | { fields: [ { name: "profile" ; type: "publicKey" ; } , { name: "metadataUri" ; type: "string" ; } , { name: "randomHash" ; type: { array: [ "u8" , 32 ] ; } ; } , { name: "replyTo" ; type: { option: "publicKey" ; } ; } ] ; kind: "struct" ; } | { fields: [ { name: "authority" ; type: "publicKey" ; } , { name: "metadataUri" ; type: "string" ; } , { name: "screenName" ; type: "publicKey" ; } , { name: "randomHash" ; type: { array: [ "u8" , 32 ] ; } ; } ] ; kind: "struct" ; } | { fields: [ { name: "fromProfile" ; type: "publicKey" ; } , { name: "toPost" ; type: "publicKey" ; } , { name: "reactionType" ; type: "string" ; } ] ; kind: "struct" ; } , DecodedHelper < [ { name: "PostError" ; type: { kind: "enum" ; variants: [ { name: "URITooLong" ; } ] ; } ; } , { name: "ProfileMetadataError" ; type: { kind: "enum" ; variants: [ { name: "URITooLong" ; } ] ; } ; } , { name: "ConnectionError" ; type: { kind: "enum" ; variants: [ { name: "CannotConnectToSelf" ; } ] ; } ; } ] , EmptyDefined > > >
get Or Create
get Or Create( metadataUri: string , screenNameAccount: PublicKey , authority: PublicKey , payer?: PublicKey ) : Promise < PublicKey >
Parameters
metadataUri: string
screenNameAccount: PublicKey
authority: PublicKey
payer: PublicKey = authority
Returns Promise < PublicKey >
get Profile
get Profile( screenNameAccount: PublicKey , authority: PublicKey ) : Promise < GumDecodedProfile >
Parameters
screenNameAccount: PublicKey
authority: PublicKey
get Profiles By Profile Account
get Profiles By Profile Account( profileAccount: PublicKey ) : Promise < GumDecodedProfile >
Parameters
profileAccount: PublicKey
get Profiles By Screen Name
get Profiles By Screen Name( screenNameAccount: PublicKey ) : Promise < GumDecodedProfile [] >
Parameters
screenNameAccount: PublicKey
update
update( metadataUri: string , profileAccount: PublicKey , screenNameAccount: PublicKey , authority: PublicKey ) : Promise < MethodsBuilder < GplCore , Object > >
Parameters
metadataUri: string
profileAccount: PublicKey
screenNameAccount: PublicKey
authority: PublicKey
Returns Promise < MethodsBuilder < GplCore , Object > >
validate Profile Metadata
validate Profile Metadata( metadataUri: string ) : Promise < boolean >
Returns Promise < boolean >
Gets or creates a profile for a given user account and namespace.
To use this method, you must first initialize an instance of the SDK and pass a GraphQL client to the constructor. The client will be used to fetch profile information.