메서드
register_group
register_group_and_attach_license
mint_and_register_ip_and_attach_license_and_add_to_group
register_ip_and_attach_license_and_add_to_group
register_group_and_attach_license_and_add_ips
collect_and_distribute_group_royalties
register_group
그룹 IPA를 등록합니다.
Parameters:
group_pool
: 그룹 풀의 주소입니다.
tx_options
: [선택사항] 트랜잭션 옵션 딕셔너리입니다.
Python
Request Parameters
Response
result = story_client.Group.register_group(
group_pool = "0xf96f2c30b41Cb6e0290de43C8528ae83d4f33F89" , # EvenSplitGroupPool
)
print ( f "Group registered with ID: { result[ 'group_id' ] } at transaction hash { result[ 'tx_hash' ] } " )
register_group_and_attach_license
그룹 IP를 그룹 보상 풀에 등록하고 그룹 IP에 라이선스 조건을 첨부합니다.
메서드 register_group_and_attach_license
Parameters:
group_pool
: 그룹 풀의 주소입니다.
license_data
: 조건과 설정이 포함된 라이선스 데이터 객체입니다.
tx_options
: [선택사항] 트랜잭션 옵션 딕셔너리입니다.
Python
Request Parameters
Response
result = story_client.Group.register_group_and_attach_license(
group_pool = "0xf96f2c30b41Cb6e0290de43C8528ae83d4f33F89" , # EvenSplitGroupPool
license_data ={
"license_template" : "0x7e9b9B31BF5F3399D36E1E0a9E589c30Cb6925D1" , # Programmable IP License
"license_terms_id" : "5"
}
)
print ( f "Group registered with ID: { result[ 'group_id' ] } at transaction hash { result[ 'tx_hash' ] } " )
mint_and_register_ip_and_attach_license_and_add_to_group
SPGNFT 컬렉션에서 NFT를 발행하고, 메타데이터와 함께 IP로 등록하고, 등록된 IP에 라이선스 조건을 첨부하고, 그룹 IP에 추가합니다.
메서드 mint_and_register_ip_and_attach_license_and_add_to_group
Parameters:
group_id
: IP를 추가할 그룹의 ID입니다.
spg_nft_contract
: SPG NFT 계약의 주소입니다.
license_data
: 조건과 설정이 포함된 라이선스 데이터 객체 목록입니다.
max_allowed_reward_share
: 최대 허용 보상 공유 비율입니다.
ip_metadata
: [선택사항] IP의 메타데이터입니다.
recipient
: [선택사항] NFT의 수신자입니다 (기본값은 호출자).
allow_duplicates
: [선택사항] 중복 IP를 허용할지 여부입니다.
deadline
: [선택사항] 서명의 마감 시간(밀리초)입니다.
tx_options
: [선택사항] 트랜잭션 옵션 딕셔너리입니다.
Python
Request Parameters
Response
result = story_client.Group.mint_and_register_ip_and_attach_license_and_add_to_group(
group_id = "0x089d75C9b7E441dA3115AF93FF9A855BDdbfe384" ,
spg_nft_contract = "0x1234567890123456789012345678901234567890" ,
license_data =[
{
"license_template" : "0x7e9b9B31BF5F3399D36E1E0a9E589c30Cb6925D1" , # Programmable IP License
"license_terms_id" : "5"
}
],
max_allowed_reward_share = 5 , # 5%
ip_metadata ={
"ip_metadata_uri" : "ipfs://QmXxxx" ,
"ip_metadata_hash" : "0x1234..."
},
)
print ( f "IP registered with ID: { result[ 'ip_id' ] } and token ID: { result[ 'token_id' ] } at transaction hash { result[ 'tx_hash' ] } " )
register_ip_and_attach_license_and_add_to_group
NFT를 메타데이터와 함께 IP로 등록하고, 등록된 IP에 라이선스 조건을 첨부하고, 그룹 IP에 추가합니다.
메서드 register_ip_and_attach_license_and_add_to_group
Parameters:
group_id
: IP를 추가할 그룹의 ID입니다.
nft_contract
: NFT 계약의 주소입니다.
token_id
: NFT의 토큰 ID입니다.
license_data
: 조건과 설정이 포함된 라이선스 데이터 객체 목록입니다.
max_allowed_reward_share
: 최대 허용 보상 공유 비율입니다.
ip_metadata
: [선택사항] IP의 메타데이터입니다.
deadline
: [선택사항] 서명의 마감 시간(밀리초)입니다.
tx_options
: [선택사항] 트랜잭션 옵션 딕셔너리입니다.
Python
Request Parameters
Response
result = story_client.Group.register_ip_and_attach_license_and_add_to_group(
group_id = "0x089d75C9b7E441dA3115AF93FF9A855BDdbfe384" ,
nft_contract = "0x1234567890123456789012345678901234567890" ,
token_id = 123 ,
license_data =[
{
"license_template" : "0x7e9b9B31BF5F3399D36E1E0a9E589c30Cb6925D1" , # Programmable IP License
"license_terms_id" : "5"
}
],
max_allowed_reward_share = 5 , # 5%
ip_metadata ={
"ip_metadata_uri" : "ipfs://QmXxxx" ,
"ip_metadata_hash" : "0x1234..."
}
)
print ( f "IP registered with ID: { result[ 'ip_id' ] } and token ID: { result[ 'token_id' ] } at transaction hash { result[ 'tx_hash' ] } " )
register_group_and_attach_license_and_add_ips
그룹 IP를 그룹 보상 풀에 등록하고, 그룹 IP에 라이선스 조건을 첨부하고, 개별 IP를 그룹 IP에 추가합니다.
메서드 register_group_and_attach_license_and_add_ips
Parameters:
group_pool
: 그룹 풀의 주소입니다.
ip_ids
: 그룹에 추가할 IP ID 목록입니다.
license_data
: 조건과 설정이 포함된 라이선스 데이터 객체입니다.
max_allowed_reward_share
: 최대 허용 보상 공유 비율입니다.
tx_options
: [선택사항] 트랜잭션 옵션 딕셔너리입니다.
Python
Request Parameters
Response
result = story_client.Group.register_group_and_attach_license_and_add_ips(
group_pool = "0xf96f2c30b41Cb6e0290de43C8528ae83d4f33F89" , # EvenSplitGroupPool
ip_ids =[ "0x1234567890123456789012345678901234567890" , "0x0987654321098765432109876543210987654321" ],
license_data ={
"license_template" : "0x7e9b9B31BF5F3399D36E1E0a9E589c30Cb6925D1" , # Programmable IP License
"license_terms_id" : "5"
},
max_allowed_reward_share = 5 , # 5%
)
print ( f "Group registered with ID: { result[ 'group_id' ] } at transaction hash { result[ 'tx_hash' ] } " )
collect_and_distribute_group_royalties
전체 그룹에 대한 로열티를 수집하고 각 멤버 IP의 로열티 금고에 보상을 분배합니다.
메서드 collect_and_distribute_group_royalties
Parameters:
group_ip_id
: 그룹 IP의 ID입니다.
currency_tokens
: 통화 토큰 주소 목록입니다.
member_ip_ids
: 멤버 IP ID 목록입니다.
tx_options
: [선택사항] 트랜잭션 옵션 딕셔너리입니다.
Python
Request Parameters
Response
result = story_client.Group.collect_and_distribute_group_royalties(
group_ip_id = "0x089d75C9b7E441dA3115AF93FF9A855BDdbfe384" ,
currency_tokens =[ "0x1514000000000000000000000000000000000000" ], # $WIP
member_ip_ids =[ "0x1234567890123456789012345678901234567890" , "0x0987654321098765432109876543210987654321" ]
)
print ( f "Collected royalties: { result[ 'collected_royalties' ] } " )
print ( f "Royalties distributed: { result[ 'royalties_distributed' ] } " )